Improving Generalization of Deep Neural Network Acoustic Models with Length Perturbation and N-best Based Label Smoothing

We introduce two techniques, length perturbation and n-best based label smoothing, to improve generalization of deep neural network (DNN) acoustic models for automatic speech recognition (ASR). Length perturbation is a data augmentation algorithm that randomly drops and inserts frames of an utterance to alter the length of the speech feature sequence. N-best based label smoothing randomly injects noise to ground truth labels during training in order to avoid overfitting, where the noisy labels are generated from n-best hypotheses. We evaluate these two techniques extensively on the 300-hour Switchboard (SWB300) dataset and an in-house 500-hour Japanese (JPN500) dataset using recurrent neural network transducer (RNNT) acoustic models for ASR. We show that both techniques improve the generalization of RNNT models individually and they can also be complementary. In particular, they yield good improvements over a strong SWB300 baseline and give state-of-art performance on SWB300 using RNNT models.


Introduction
Generalization is a fundamental problem in machine learning. In ASR, acoustic models with deep neural network (DNN) architectures may suffer from overfitting due to their huge number of parameters. To make DNN models generalize well, techniques such as model regularization (e.g. 1-norm or 2-norm regularization [1] and dropout [2]) and data augmentation [3] [4][5] [6] have been broadly used in training. In this paper we introduce two techniques to improve generalization of DNN acoustic models in ASR. One is data augmentation based on length perturbation which randomly drops and inserts frames of an utterance to alter the length of the speech feature sequence. The other is label smoothing based on n-best hypotheses.
Length perturbation compresses and stretches the feature sequence of an utterance in the training to provide a perturbed variant of it having a different length. This is conducted by both frame skipping and frame insertion. Frame skipping and frame insertion as separate approaches have been used in the speech community for different purposes. In most cases, frames are skipped in ASR systems, in a fixed or dynamic manner, for reduced processing time in training or decoding [7][8] [9] [10]. In [11], SpliceOut is proposed to treat frame skipping as a time masking approach to improve generalization of DNN models in various speech recognition and audio classification tasks. In [10], it is observed that DropFrame, despite being aimed at reducing training time, may also help to improve performance of end-toend models. Analogously, frame insertion or time stretching is a common perturbation technique for speech and audio signals in the other direction [12][13] [14]. From the length perturbation perspective, the current application of either frame skipping or frame insertion tends to perturb the length of an utterance biased towards one direction. The length perturbation approach investigated in this paper consists of perturbation both ways.
Label smoothing, first introduced in [15], aims to improve generalization in machine learning by avoiding overconfidence over labels. Although researchers are still trying to gain insights into the working mechanism of label smoothing [16] [17], it has been shown to be helpful in a broad variety of machine learning tasks [18] [19][20] [21]. In its conventional setting, label smoothing is accomplished by smoothing a one-hot label vector with a uniform distribution across all class labels under the cross-entropy loss function. Since ASR is essentially a sequence to sequence mapping problem and the acoustic model of interest in this work is recurrent neural network transducers (RNNTs) [22][23] estimated under the maximum likelihood loss function, we approach label smoothing from a sequence perspective. We choose n-best hypotheses as competing "classes" and use them as "noisy" labels in the training with probability.
ASR experiments are carried out on the 300-hour Switchboard (SWB300) dataset [24][25] which consists of narrowband speech and an in-house 500-hour Japanese (JPN500) dataset which consists of broadband speech to evaluate the two proposed techniques with various configurations. The acoustic models are RNNTs [8][26] [27]. We show that both techniques can improve word error rates (WERs) separately on the two datasets. Moreover, the two techniques can be complementary. In particular, when combining length perturbation and n-best label smoothing, we obtain state-of-the-art WERs on the SWB300 dataset using RNNTs.
The remainder of the paper is organized as follows. Section 2 and Section 3 are devoted to the length perturbation and n-best label smoothing, respectively. Experimental results on SWB300 and JPN500 are reported in Section 4. Section 5 concludes the paper with a summary.

Length Perturbation
Implementation of the proposed length perturbation is given in Algorithm 1. The length of an utterance is perturbed first by skipping frames and then followed by inserting frames, both with a probability. To skip frames, one randomly samples rs percentage of frames from the utterance to operate on. For each sampled frame x, ts consecutive frames are dropped starting from x where ts is an integer upper bounded by a hyper-parameter Ts. Analogously, to insert frames, one randomly samples rp percentage of frames from the utterance to operate on. is the logMel spectrum after frame skipping followed by frame insertion.
sampled frame y, tp consecutive blank frames (zero vectors) are inserted after y where tp is an integer upper bounded by a hyper-parameter Tp. This is illustrated in Fig.1 where the logMel spectrum of an utterance is demonstrated in Fig.1a. Fig.1b and Fig.1c are its perturbed versions by frame skipping and insertion, respectively. Fig.1d is the overall effect of perturbation after both frame skipping and insertion. All three perturbations are carried out with certain probabilities according to Algorithm 1.
Length perturbation can help in scenarios where there is a mismatch in the length of utterances between training and test conditions. In addition, by randomly dropping frames, it can also perturb the "memory" of a sequence model such as long shortterm memory (LSTM) [28] network to avoid simply memorizing the history of the feature sequence in the training. Therefore it can improve the generalization. Furthermore, the applied frame insertion can be viewed as simulating a SpecAug [6] mechanism for an utterance of longer length (Fig.1c). It encourages the system to fill in those inserted frames during training, which is also similar in spirit to the filling in frames (FIF) idea in voice conversion [29].

Algorithm 1 Length Perturbation of Input Utterances
L ← Total number of utterances ps ← Probability of perturbation by dropping frames; rs ← Percentage of frames to be perturbed in an utterance; Ts ← Maximum frames to drop; pp ← Probability of perturbation by inserting frames; rp ← Percentage of frames to be perturbed in an utterance; Tp ← Maximum frames to insert; for 1 ← 1, · · · , L do Perturb this utterance by dropping frames with prob. ps: DropFrames(rs, Ts) Perturb this utterance by inserting frames with prob. pp: Insert tp consecutive blank frames after y this is one this is one of the most highly taxed areas in the country 01 this is one this is one the most highly taxed areas in the country 02 this is one this is one the most highly tax areas in the country 03 this is one this is one the most highly taxed areas and country 04 this one this is one the most highly taxed areas and the country 05 this is one this is one the most highly tax areas and country Figure 2: An example of a ground truth label (top line in bold) and its 5 best hypotheses.

N-best Based Label Smoothing
Label smoothing introduces a small amount of noise to ground truth labels to avoid training with over-confidence to help generalization. For a classification problem with cross-entropy loss, labels are typically provided as one-hot vectors. Suppose y is a class label for a sample x and there are K classes in total. Label smoothing smoothes the label with a uniform distribution over K classes weighted by as shown in Eq.1 Suppose p is the ground truth (one-hot) distribution, q is the distribution to be learned and u is the uniform distribution. Label smoothing amounts to imposing a regularization term n i=1 Hi(u, q) to the original cross-entropy term n i=1 Hi(p, q) as shown in Eq.2 where i = 1, · · · , n and n is the total number of samples.
Extending the label smoothing setting in Eq.1 to RNNT training under the maximum likelihood loss is not straightforward as the softmax output of RNNT reflects local decisions while the learning is focused on the whole sequence. From a sequence classification perspective, each sequence may represent a class and all sequences over the output space Y form a countably infinite set of classes in that sequence space. In this light, we may smooth out the ground truth label sequence with a small number of competing label sequences, which motivates us to investigate the label smoothing strategy based on n-best hypotheses.
Let γ be a random variable uniformly distributed in [0, 1] and a constant ∈ [0, 1]. Suppose y is a ground truth label sequence and Ω y|x = {ŷ1, · · · ,ŷK } is the n-best set that consists of K nbest hypotheses of y given x. Select uniformly at random from K hypotheses a hypothesisŷi, i ∈ {1, · · · , K}, and replace the ground truth label with it with probability . This is given in Eq.3 where I(·) is the indicator function: Fig.2 shows an example of a ground truth label sequence and its n-best hypotheses that are used to smooth the ground truth label. The n-best hypotheses are generated by the baseline RNNT models.

SWB300
The RNNT acoustic model for SWB300 has 6 bi-directional LSTM layers in the transcription network with 1,280 cells in each layer (640 cells in each direction). The prediction network is a single-layer uni-directional LSTM with 768 cells. The outputs of the transcription network and the prediction network are projected down to a 256-dimensional latent space where they are combined by element-wise multiplication in the joint network. After a hyperbolic tangent nonlinearity followed by a linear transform, it connects to a softmax layer consisting of 46 output units which correspond to 45 characters and the null symbol. The acoustic features are 40-dimensional logMel features extracted every 10ms and their first and second order derivatives. The logMel features are after conversation based mean and variance normalization. Every two adjacent frames are concatenated and appended by a 100-dimensional i-vector [30] as speaker embedding. Therefore the input to the transcription network is 340 in dimensionality.
The training data goes through three steps of data augmentation. First, it is augmented by speed and tempo perturbation [4]. This is conducted offline and produces additional 4 replicas of the original training data, which gives rise to about 1,500 hours of training data in total. After the speed and tempo perturbation, mix-up sequence noise is injected where an utterance is artificially corrupted by adding a randomly selected downscaled training utterance from the training set [5]. After that, SpecAugment is applied where the logMel spectrum of a training utterance is randomly masked in blocks in both the time and frequency domains [6]. Dropout [2] is also used in the LSTM layers with a dropout rate of 0.25 and the embedding layer with a dropout rate of 0.05. In addition, DropConnect [31] is applied with a rate of 0.25, which randomly zeros out elements of the LSTM hidden-to-hidden transition matrices. A Connectionist Temporal Classification (CTC) [32] model is used to initialize the transcription network.
Optimizer AdamW is used for the training. The learning rate starts at 0.0001 in the first epoch and then linearly scales up to 0.001 in the first 10 epochs. It holds for another 6 epochs before being annealed by 1 √ 2 every epoch after the 17 th epoch. The training ends after 30 epochs. The batch size is 64 utterances. An alignment-length synchronous decoder [33] is used for inference. We measure the WERs with and without an external LM. When decoding with an external LM, density ratio LM fusion [34] is used. The external LM is trained on a target domain corpus (Fisher and Switchboard) and the source LM is trained only on the training transcripts. The length perturbation is applied before mix-up and SpecAug, all of which are carried out on the fly in the data loader. We evaluate various hyper-parameter configurations for length perturbation (ps,pp,rs,Ts,rp,Tp) and n-best label smoothing (K and ) on Hub5 2000, Hub5 2001 and RT03 test sets. The data preparation pipeline follows the Kaldi [35] s5c recipe. Table 1 breaks down the performance of length perturbation on frame insertion (2 nd -5 th rows), frame skipping (6 th -9 th rows) and perturbation both ways (10 th -12 th rows), respectively, on the Hub5 2000 test set. The length perturbation is applied in the first 25 epochs and lifted afterwards. From the table, one can observe that both frame insertion and skipping alone can improve WERs. The best WER is obtained when perturbing both ways (avg. 10.7% without using external LM and 9.4% when using external LM.) Table 2 shows the performance of n-best label smoothing under various , which controls the probability to replace the ground truth label with a noisy label, and K, which is the total number of n-best hypotheses considered. Similarly, the label smoothing is applied in the first 25 epochs and lifted afterwards. The best performance (avg. 10.9% without using external LM and 9.5% when using external LM) is achieved when = 0.1 and K = 20.
Experimental results on combining the two techniques are reported in Table 3 where label smoothing is applied up to 15      Table 4 reports the WERs using label smoothing (nbestls), length perturbation (lenpb) and their combination on Hub5 2000, Hub5 2001 and RT03. The external LM is used in the decoding. For comparison, we present the single-model result reported in [8] as one baseline (1 st row) and the baseline used in this work (2 nd row). The difference is the learning rate schedule and the number of epochs. In [8], the maximum learning rate is set to 5e-4 and the OneCycleLR policy [36] is used for 20 epochs. The current baseline gives slightly better performance. The models that give the best performance on Hub5 2000 in Tables 1, 2

JPN500
The RNNT acoustic model for JPN500 has 6 bi-directional LSTM layers in the transcription network with 1,280 cells in each layer (640 cells in each direction). The prediction network is a single-layer uni-directional LSTM with 1,024 cells. The outputs of the transcription network and the prediction network are projected down to a 256-dimensional latent space where they are combined by element-wise multiplication in the joint network. After a hyperbolic tangent nonlinearity followed by a linear transform, it connects to a softmax layer consisting of 3547 output units which correspond to Japanese characters and the null symbol. The acoustic features are 40-dimensional log-Mel features extracted every 10ms and theirs first and second order derivatives. The logMel features are after utterance based mean normalization. Every four adjacent frames are concatenated. This more aggressive frame skipping is to reduce the length mismatch between the feature sequence and character label sequence. The input to the transcription network is 480 in dimensionality.
There is no data augmentation in the training. But dropout is used in the LSTM layers with a dropout rate of 0.25 and the embedding layer with a dropout rate of 0.05. Optimizer AdamW is used for the training. The learning rate starts at 0.0001 in the first epoch and then linearly scales up to 0.001 in the first 10 epochs. It holds for another 6 epochs before being annealed by 1 √ 2 every epoch after the 17 th epoch. The model is obtained after 30 epochs. The batch size is 256 utterances. The same alignment-length synchronous decoder is used for inference. No external LM is used in decoding. Both length perturbation and label smoothing are applied in the first 25 epochs and lifted afterwards, respectively. We evaluate various hyper-parameter configurations for length perturbation (ps,pp,rs,Ts,rp,Tp) and n-best label smoothing (K and ) on 13 real-world test sets from a broad variety of domains and report the average CERs across these test sets. Table 5 and Table 6 show the respective performance of length perturbation and n-best based label smoothing on JPN500 using various hyper-parameter settings. Following a similar trend in SWB300, both techniques help to consistently improve the CERs over the baseline. The length perturbation can reduce the CER from 19.4% in the baseline to 18.5% and the label smoothing can reduce to 18.6%. One interesting observation is that since JPN500 has a more aggressive downsampling strategy (4-frame skipping) in input feature processing compared to that of SWB300 (2-frame skipping) the optimal length perturbation setting for JPN500 tends to favor frame insertion more than frame skipping over SWB300 (Ts = 3, Tp = 5 for JPN500 vs. Ts = 7, Tp = 3 for SWB300). Table 7 shows that the two techniques can also be complementary. In the experiments, the label smoothing is applied up to 15 epochs and length perturbation is applied between 16 to 25 epochs. After 25 epochs both techniques are lifted and the training continues for another 5 epochs. The model used for decoding is after 30 epochs. The combination of the two techniques can achieve a CER of 18.4%, which amounts to 1% absolute improvement over the 19.4% baseline averaging across 13 test sets.   Table 6: N-best label smoothing using various configurations on JPN500.  Table 7: Combination of n-best label smoothing and length perturbation on JPN500.

Discussion
Since the length perturbation perturbs an utterance both ways, it has SpliceOut [11] and DropFrame [10] as a special case of one-way perturbation, which corresponds to the results in Table  1 and Table 5 where only Ts is used (Tp = 0). The length perturbation can be used by itself as shown in the JPN500 case or used together with other data augmentation techniques as shown in the SWB300 case. The implementation of the length perturbation may have numerous variations such as the order of frame skipping and insertion or whether frame skipping and insertion should take place in different utterances. This will be further investigated in the future work.

Summary
In this paper we introduce length perturbation and n-best based label smoothing to improve the generalization of DNN acoustic modeling. We evaluate the two techniques extensively on both SWB300 and JPN500 datasets and show that both techniques can improve accuracy over strong baselines with RNNT acoustic models. The techniques can be complementary. By combining the two techniques, we have obtained state-of-art single-model results on SWB300 using RNNT.