Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

Author: torontoai

SpecAugment: A New Data Augmentation Method for Automatic Speech Recognition

Automatic Speech Recognition (ASR), the process of taking an audio input and transcribing it to text, has benefited greatly from the ongoing development of deep neural networks. As a result, ASR has become ubiquitous in many modern devices and products, such as Google Assistant, Google Home and YouTube. Nevertheless, there remain many important challenges in developing deep learning-based ASR systems. One such challenge is that ASR models, which have many parameters, tend to overfit the training data and have a hard time generalizing to unseen data when the training set is not extensive enough.

In the absence of an adequate volume of training data, it is possible to increase the effective size of existing data through the process of data augmentation, which has contributed to significantly improving the performance of deep networks in the domain of image classification. In the case of speech recognition, augmentation traditionally involves deforming the audio waveform used for training in some fashion (e.g., by speeding it up or slowing it down), or adding background noise. This has the effect of making the dataset effectively larger, as multiple augmented versions of a single input is fed into the network over the course of training, and also helps the network become robust by forcing it to learn relevant features. However, existing conventional methods of augmenting audio input introduces additional computational cost and sometimes requires additional data.

In our recent paper, “SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition”, we take a new approach to augmenting audio data, treating it as a visual problem rather than an audio one. Instead of augmenting the input audio waveform as is traditionally done, SpecAugment applies an augmentation policy directly to the audio spectrogram (i.e., an image representation of the waveform). This method is simple, computationally cheap to apply, and does not require additional data. It is also surprisingly effective in improving the performance of ASR networks, demonstrating state-of-the-art performance on the ASR tasks LibriSpeech 960h and Switchboard 300h.

SpecAugment
In traditional ASR, the audio waveform is typically encoded as a visual representation, such as a spectrogram, before being input as training data for the network. Augmentation of training data is normally applied to the waveform audio before it is converted into the spectrogram, such that after every iteration, new spectrograms must be generated. In our approach, we investigate the approach of augmenting the spectrogram itself, rather than the waveform data. Since the augmentation is applied directly to the input features of the network, it can be run online during training without significantly impacting training speed.

A waveform is typically converted into a visual representation (in our case, a log mel spectrogram; steps 1 through 3 of this article) before being fed into a network.

SpecAugment modifies the spectrogram by warping it in the time direction, masking blocks of consecutive frequency channels, and masking blocks of utterances in time. These augmentations have been chosen to help the network to be robust against deformations in the time direction, partial loss of frequency information and partial loss of small segments of speech of the input. An example of such an augmentation policy is displayed below.

The log mel spectrogram is augmented by warping in the time direction, and masking (multiple) blocks of consecutive time steps (vertical masks) and mel frequency channels (horizontal masks). The masked portion of the spectrogram is displayed in purple for emphasis.

To test SpecAugment, we performed some experiments with the LibriSpeech dataset, where we took three Listen Attend and Spell (LAS) networks, end-to-end networks commonly used for speech recognition, and compared the test performance between networks trained with and without augmentation. The performance of an ASR network is measured by the Word Error Rate (WER) of the transcript produced by the network against the target transcript. Here, all hyperparameters were kept the same, and only the data fed into the network was altered. We found that SpecAugment improves network performance without any additional adjustments to the network or training parameters.

Performance of networks on the test sets of LibriSpeech with and without augmentation. The LibriSpeech test set is divided into two portions, test-clean and test-other, the latter of which contains noisier audio data.

More importantly, SpecAugment prevents the network from over-fitting by giving it deliberately corrupted data. As an example of this, below we show how the WER for the training set and the development (or dev) set evolves through training with and without augmentation. We see that without augmentation, the network achieves near-perfect performance on the training set, while grossly under-performing on both the clean and noisy dev set. On the other hand, with augmentation, the network struggles to perform as well on the training set, but actually shows better performance on the clean dev set, and shows comparable performance on the noisy dev set. This suggests that the network is no longer over-fitting the training data, and that improving training performance would lead to better test performance.

Training, clean (dev-clean) and noisy (dev-other) development set performance with and without augmentation.

State-of-the-Art Results
We can now focus on improving training performance, which can be done by adding more capacity to the networks by making them larger. By doing this in conjunction with increasing training time, we were able to get state-of-the-art (SOTA) results on the tasks LibriSpeech 960h and Switchboard 300h.

Word error rates (%) for state-of-the-art results for the tasks LibriSpeech 960h and Switchboard 300h. The test set for both tasks have a clean (clean/Switchboard) and a noisy (other/CallHome) subset. Previous SOTA results taken from Li et. al (2019), Yang et. al (2018) and Zeyer et. al (2018).

The simple augmentation scheme we have used is surprisingly powerful—we are able to improve the performance of the end-to-end LAS networks so much that it surpasses those of classical ASR models, which traditionally did much better on smaller academic datasets such as LibriSpeech or Switchboard.

Performance of various classes of networks on LibriSpeech and Switchboard tasks. The performance of LAS models is compared to classical (e.g., HMM) and other end-to-end models (e.g., CTC/ASG) over time.

Language Models
Language models (LMs), which are trained on a bigger corpus of text-only data, have played a significant role in improving the performance of an ASR network by leveraging information learned from text. However, LMs typically need to be trained separately from the ASR network, and can be very large in memory, making it hard to fit on a small device, such as a phone. An unexpected outcome of our research was that models trained with SpecAugment out-performed all prior methods even without the aid of a language model. While our networks still benefit from adding an LM, our results are encouraging in that it suggests the possibility of training networks that can be used for practical purposes without the aid of an LM.

Word error rates for LibriSpeech and Switchboard tasks with and without LMs. SpecAugment outperforms previous state-of-the-art even before the inclusion of a language model.

Most of the work on ASR in the past has been focused on looking for better networks to train. Our work demonstrates that looking for better ways to train networks is a promising alternative direction of research.

Acknowledgements
We would like to thank the co-authors of our paper Chung-Cheng Chiu, Ekin Dogus Cubuk, Quoc Le, Yu Zhang and Barret Zoph. We also thank Yuan Cao, Ciprian Chelba, Kazuki Irie, Ye Jia, Anjuli Kannan, Patrick Nguyen, Vijay Peddinti, Rohit Prabhavalkar, Yonghui Wu and Shuyuan Zhang for useful discussions.

[P] I2S OCR – Image 2 Speech App

Hey folks,

We are pleased to introduce the I2S OCR scanner app. I2S is a state-of-the-art OCR Scanner that practically turns almost any images with human readable characters into text content which is in turn transformed into human voice in your native language & accent.

Once the image data (Book page, magazine, journal, scientific paper, etc.) recognized & transformed into text content, you’ll be able to playback that text in your local accent & over 45 languages of your choice!

Text output not understood? no problem, use the built-in translation service & get your text translated to over 75 languages of your choice. Generate PDF on the fly, Copy to device clipboard &, share your text output with friends.

Feature Set Includes:

  • State of the art OCR processing algorithm powered by PixLab.
  • Ability to recognize the input language automatically.
  • Speaks over 45 languages & their accents.
  • Translate output to over 70 languages of your choice.
  • Generate PDF, Share your output & Give your feedback.

Links:

We hope you enjoy using I2S and we look for your feedback if any!

submitted by /u/histoire_guy
[link] [comments]

Lean, Green, AI Machines: 5 Projects Using GPUs for a Better Planet

Earth Day is a good day for AI.

And the benefits are felt all year, all around the world, as deep learning and NVIDIA GPUs aid our understanding of ecosystems and climate patterns, preserving plants and animals, and managing waste.

Here are five ways companies, researchers and scientists are using GPUs for a better planet:

Into the Woods AI Goes

Whether in a rainforest or urban green spaces, life on Earth relies heavily on trees. But manually monitoring forested areas to track potential risks to plant health is time consuming and costly.

Portugal-based startup 20tree.ai is using AI to monitor forests from satellite imagery in a fraction of the time currently required. It uses NVIDIA GPUs inhouse and in the cloud to process some 100TB of new satellite data daily, helping clients analyze tree species, growth and productivity.

A Cloudy Picture of Climate Change

The Earth is warming, but at what rate? Climate models vary in their projections of global temperature rise in the coming years, from 1.5 degrees to more than three degrees by 2100. This variation is largely due to the difficulty of representing clouds in global climate models.

Neural networks can be used to address this cloud resolution challenge, researchers from Columbia University, UC Irvine and the University of Munich found. Developed using an assortment of NVIDIA GPUs, their deep learning model improved performance and provided better predictions for precipitation extremes than the original climate model. This detailed view can improve scientists’ ability to predict regional climate impact.

One Person’s Trash Is an AI’s Treasure

Trying to correctly sort the remains of a lunch into compost, recycling and landfill is a hard enough task for the average person. But if different types of waste are collected together and sent to recycling centers, the trash often can’t be sorted and it all ends up in a landfill. Only 29 percent of the municipal waste generated in Europe in 2017 was recycled.

Smart recycling startup Bin-e hopes to raise the recycling rate with deep learning. Using the NVIDIA Jetson TX1, the startup has created a smart recycling bin that automatically recognizes, sorts and compresses waste. Its AI, trained on NVIDIA TITAN Xp GPUs, takes an image of each piece of trash and determines whether it’s paper, aluminum, plastic or e-waste before depositing it into the correct bin.

Sequencing on Land and at Sea

DNA sequencing isn’t just for the human genome. Nanopore sequencing, a technique for DNA sequencing, can be used to analyze the genomes of plants and microorganisms. UK.startup Oxford Nanopore Technologies is using recurrent neural networks to help scientists detect pathogens in cassava plant genomes.

It’s also analyzed the DNA of microbial sea life off the coast of Alaska, giving researchers a better understanding of ocean biodiversity and the effects of climate change on marine microorganisms.

Oxford Nanopore’s MinIT hand-held AI supercomputer is powered by NVIDIA AGX, enabling researchers to run sequence analysis in the field.

Whale, AI’ll Say

Due to centuries of whaling by humans, just 500 North Atlantic right whales still exist. Those left have been forced by climate change to adopt a new migration path — exposing them to a new threat: commercial shipping vessels that can accidentally strike whales as they pass through shipping lanes.

Autonomous drone company Planck Aerosystems is working with Transport Canada, the national transportation department, to identify whales from aerial drone imagery with AI and NVIDIA GPUs. The tool can help biologists narrow down thousands of images to identify the few containing whales, so ships can slow down and avoid the endangered creatures.

Learn more about how GPU technology is driving applications with social impact, including environmental projects.

The post Lean, Green, AI Machines: 5 Projects Using GPUs for a Better Planet appeared first on The Official NVIDIA Blog.

[D] Confused with axis and space

If i apply the dirichlet process, or any other clustering method for that matter, am able to create components/clusters out of my data, these are plotted on a 2d plane. What are the axis that define this space? What are the plots and clusters defined as? And why is it safe to assume that the distance between each value can determind whether or not the data shares a similar structure / topic?

submitted by /u/Unlistedd
[link] [comments]

[D]My ML Journal #11: Macro view of reinforcement learning and more OpenAI gym games

[D]My ML Journal #11: Macro view of reinforcement learning and more OpenAI gym games

Thanks for the support in my last post.

Here’s the vlog version of this journal as usual: https://youtu.be/N7KThxV5maI

Most of the resources I used and talked about in this post can be found in this google doc, I am not linking many directly because I think my posts were getting auto classified as spam for having too many links

I spent a few hours researching just what the heck is going on with RL. I debriefed the most starred GitHub projects, the SOTA (state of the art) algorithms, and the open source platforms. Generally speaking, RL should be used whenever a problem can be modeled with an agent, environment, and reward setup. Technically speaking we can train a lot of models with an RL mindset. For example, a traditional GAN has a generator and a discriminator, the generator is trained by how much it fooled the discriminator. With an RL mindset, we can define the generator as the agent, its state being the random strokes it painted, and the rewards being the degree it fooled the discriminator. Still the same workflow, but now we introduce more possibilities, we can tune the reward algorithms & RL training mechanisms, etc.

My general plan for learning RL is to implement gym games first, then playing around with complex environments like Project Malmo and ViZDoom, and at last, I will get onto the Unity RL env and making my own game and training my own RL agent to beat it!

So right now, let me implement a few gym games first, for this time, I am trying to beat Cartpole & Acrobot.

Processing gif sqjzj2cgnpt21…

Cartpole, objective is to balance the stick so it doesn’t tilt over 15 degrees

Since I copied and understood the atari breakout code, I thought this was a piece of cake! Interestingly, the observations of the environment turned out to be an array with 4 floats while I thought it was going to be a picture (like in Atari). That changes my game plan, I can’t just use the Atari code for this, because in Atari, we predict an action by feeding in a 210 * 180 * 3 image, which is the state, that image goes through a few Conv layers, connects to a Dense layer with 4 outputs, which represents the actions we can choose (we will choose the output that had the highest value because that represents the one that will yield the highest reward). But a cartpole state is a 4 * 1 array, so I decided to feed it through a random neural network and connected it to a dense layer with 2 outputs at the end.

But I still ended up using a great portion of gsurma’s code. The reason being that the original Atari code wasn’t the best, it is intuitive to do this:

class AtariSolver: def __init__(...): define the model structure def saveMemory(...): self.memory.append the current state, reward, etc so we can train the model with the memory variable later def getAction(...): ... 

But the Atari code scattered all of these across places, they weren’t contained inside of a single class, which would make a lot of sense. Here’s my GitHub repository that beat Cartpole, again, huge credits to gsurma.

Now onto my nemesis: the Acrobot.

Processing gif 1z6fixzenpt21…

The observation of an acrobot is an array with 6 floats, so I thought I could’ve beat it with the same approach with Cartpole and use the Deep Q-Learning algorithm to train the RL agent.

I was wrong! I am still trying to motivate this skinny blue dude to cross the black line (the objective of the game)! The agent gets rewarded with negative points each frame the RL agent cannot reach the black line. The problem is, a lot of negative points won’t help on making the best choice if the agent never experienced a positive reward. And since the default Deep Q-Learning algorithm decreases the exploration rate over time, the agent will try random stuff less and less. That is at least what I am feeling. I ran this model for 100 iterations and all of it terminated because it reached the maximum 500 timeframes.

It’s okay, the next time I will be reporting back to you, I will have defeated this skinny blue dude. I looked into something that might help me, on the openAI Gym Leaderboard, someone beat acrobot with an algorithm called PPO (proximal policy optimization). It seems really hard to understand mathematically, but I will understand it, beat acrobot, and share it with you next time!

submitted by /u/RedditAcy
[link] [comments]