Multilingual sequence-to-sequence speech recognition: architecture, transfer learning, and language modeling

Jaejin Cho, Murali Karthick Baskar, Ruizhi Li, Matthew Wiesner, Sri Harish Mallidi, Nelson Yalta, Martin Karafiat, Shinji Watanabe, Takaaki Hori

Introduction

The sequence-to-sequence (seq2seq) model proposed in is a neural architecture for performing sequence classification and later adopted to perform speech recognition in . The model allows to integrate the main blocks of ASR such as acoustic model, alignment model and language model into a single framework. The recent ASR advancements in connectionist temporal classification (CTC) and attention based approaches has created larger interest in speech community to use seq2seq models. To leverage performance gains from this model as similar or better to conventional hybrid RNN/DNN-HMM models requires a huge amount of data . Intuitively, this is due to the wide-range role of the model in performing alignment and language modeling along with acoustic to character label mapping at each iteration.

In this paper, we explore the multilingual training approaches used in hybrid DNN/RNN-HMMs to incorporate them into the seq2seq models. In a context of applications of multilingual approaches towards seq2seq model, CTC is mainly used instead of the attention models. A multilingual CTC is proposed in , which uses a universal phoneset, FST decoder and language model. The authors also use linear hidden unit contribution (LHUC) technique to rescale the hidden unit outputs for each language as a way to adapt to a particular language. Another work on multilingual CTC shows the importance of language adaptive vectors as auxiliary input to the encoder in multilingual CTC model. The decoder used here is a simple argmaxargmax decoder. An extensive analysis on multilingual CTC mainly focusing on improving under limited data condition is performed in . Here, the authors use a word level FST decoder integrated with CTC during decoding.

On a similar front, attention models are explored within a multilingual setup in based on attention-based seq2seq to build a model from multiple languages. The data is just combined together assuming the target languages are seen during the training. And, hence no special transfer learning techniques were used here to address the unseen languages during training. The main motivation and contribution behind this work is as follows:

To incorporate the existing multilingual approaches in a joint CTC-attention (seq2seq) framework, which uses a simple beam-search decoder as described in sections 2 and 4

Investigate the effectiveness of transferring a multilingual model to a target language under various data sizes. This is explained in section 4.3.

Tackle the low-resource data condition with both transfer learning and including a character-based RNNLM trained with multiple languages. Section 4.4 explains this in detail.

Sequence-to-Sequence Model

In this work, we use the attention based approach as it provides an effective methodology to perform sequence-to-sequence (seq2seq) training. Considering the limitations of attention in performing monotonic alignment , we choose to use CTC loss function to aid the attention mechanism in both training and decoding. The basic network architecture is shown in Fig. 1.

Let X=(xtt=1,,T)X=(\mathbf{x}_{t}|t=1,\dots,T) be a TT-length speech feature sequence and C=(cll=1,,L)C=(c_{l}|l=1,\dots,L) be a LL-length grapheme sequence. A multi-objective learning framework Lmol\mathcal{L}_{\text{mol}} proposed in is used in this work to unify attention loss patt(CX)p_{\text{att}}(C|X) and CTC loss pctc(CX)p_{\text{ctc}}(C|X) with a linear interpolation weight λ\lambda, as follows:

The unified model allows to obtain both monotonicity and effective sequence level training.

patt(CX)p_{\text{att}}\left(C|X\right) represents the posterior probability of character label sequence CC w.r.t input sequence XX based on the attention approach, which is decomposed with the probabilistic chain rule, as follows:

where clc_{l}^{*} denotes the ground truth history. Detailed explanations about the attention mechanism is described later.

Similarly, pctc(CX)p_{\text{ctc}}\left(C|X\right) represents the posterior probability based on the CTC approach.

where Z=(ztt=1,,T)Z=(\mathbf{z}_{t}|t=1,\dots,T) is a CTC state sequence composed of the original grapheme set and the additional blank symbol. Z(C)\mathcal{Z}(C) is a set of all possible sequences given the character sequence CC.

The following paragraphs explain the encoder, attention decoder, CTC, and joint decoding used in our approach.

In our approach, both CTC and attention use the same encoder function, as follows:

where ht\mathbf{h}_{t} is an encoder output state at tt. As an encoder function Encoder()\text{Encoder}(\cdot), we use bidirectional LSTM (BLSTM) or deep CNN followed by BLSTMs. Convolutional neural networks (CNN) has achieved great success in image recognition . Previous studies applying CNN in seq2seq speech recognition also showed that incorporating a deep CNNs in the encoder could further boost the performance.

In this work, we investigate the effect of convolutional layers in joint CTC-attention framework for multilingual setting. We use the initial 6 layers of VGG net architecture in table 2. For each speech feature image, one feature map is formed initially. VGG net then extracts 128 feature maps, where each feature map is downsampled to (1/4×1/4)(1/4\times 1/4) images along time-frequency axis via the two maxpooling layers with stride=2stride=2.

Attention Decoder:

Location aware attention mechanism is used in this work. Equation (5) denotes the output of location aware attention, where alta_{lt} acts as an attention weight.

Here, ql1\mathbf{q}_{l-1} denotes the decoder hidden state, ht\mathbf{h}_{t} is the encoder output state as shown in equation (4). The location attention function represents a convolution function * as in equation (6). It maps the attention weight of the previous label al1a_{l-1} to a multi channel view ft\mathbf{f}_{t} for better representation.

Equation (7) provides the unnormalized attention vectors computed with the learnable vector g\mathbf{g}, linear transformation Lin()\text{Lin}(\cdot), and affine transformation LinB()\text{LinB}(\cdot). Equation (8) computes a normalized attention weight based on the softmax operation Softmax()\text{Softmax}(\cdot). Finally, the context vector rl\mathbf{r}_{l} is obtained by the weighted summation of the encoder output state ht\mathbf{h}_{t} over entire frames with the attention weight as follows:

The decoder function is an LSTM layer which decodes the next character output label clc_{l} from their previous label cl1c_{l-1}, hidden state of the decoder ql1q_{l-1} and attention output rl\mathbf{r}_{l}, as follows:

This equation is incrementally applied to form pattp_{\text{att}}^{*} in equation (2).

Connectionist temporal classification (CTC):

Unlike the attention approach, CTC do not use any specific decoder. Instead it invokes two important components to perform character level training and decoding. First component, is an RNN based encoding module p(ZX)p(Z|X). The second component contains a language model and state transition module. The CTC formalism is a special case of hybrid DNN-HMM framework with an inclusion of Bayes rule to obtain p(CX)p(C|X).

Joint decoding:

Once we have both CTC and attention-based seq2seq models trained, both are jointly used for decoding as below:

Here logphyp\log p_{\text{hyp}} is a final score used during beam search. α\alpha controls the weight between attention and CTC models. α\alpha and multi-task learning weight λ\lambda in equation (1) are set differently in our experiments.

Data details and experimental setup

In this work, the experiments are conducted using the BABEL speech corpus collected from the IARPA babel program. The corpus is mainly composed of conversational telephone speech (CTS) but some scripted recordings and far field recordings are presented as well. Table 1 presents the details of the languages used in this work for training and evaluation.

80 dimensional Mel-filterbank (fbank) features are then extracted from the speech samples using a sliding window of size 25 ms with 10ms stride. KALDI toolkit is used to perform the feature processing. The fbank features are then fed to a seq2seq model with the following configuration:

The Bi-RNN models mentioned above uses a LSTM cell followed by a projection layer (BLSTMP). In our experiments below, we use only a character-level seq2seq model trained by CTC and attention decoder. Thus in the following experiments we intend to use character error rate (% CER) as a suitable measure to analyze the model performance. However, in section 4.4 we integrate a character-level RNNLM with seq2seq model externally and showcase the performance in terms of word error rate (% WER). In this case the words are obtained by concatenating the characters and the space together for scoring with reference words. All experiments are implemented in ESPnet, end-to-end speech processing toolkit .

Multilingual experiments

Multilingual approaches used in hybrid RNN/DNN-HMM systems have been used for for tackling the problem of low-resource data condition. Some of these approaches include language adaptive training and shared layer retraining . Among them, the most benefited method is the parameter sharing technique . To incorporate the former approach into encoder, CTC and attention decoder model, we performed the following experiments:

Stage 0 - Naive training combining all languages

Stage 1 - Retraining the decoder (both CTC and attention) after initializing with the multilingual model from stage-0

Stage 2 - The resulting model obtained from stage-1 is further retrained across both encoder and decoder

In this approach, the model is first trained with 10 multiple languages as denoted in table 1 approximating to 600 hours of training data. data from all languages available during training is used to build a single seq2seq model. The model is trained with a character label set composed of characters from all languages including both train and target set as mentioned in table 1. The model provides better generalization across languages. Languages with limited data when trained with other languages allows them to be robust and helps in improving the recognition performance. In spite of being simple, the model has limitations in keeping the target language data unseen during training.

Table 3 shows the recognition performance of naive multilingual approach using BLSTMP and VGG model against a monolingual model trained with BLSTMP. The results clearly indicate that having a better architecture such as VGG-BLSTM helps in improving multilingual performance. Except Pashto, Georgian and Tokpisin, the multilingual VGG-BLSTM model gave 8.8 % absolute gain in average over monolingual model. In case of multilingual BLSTMP, except Pashto and Georgian an absolute gain of 5.0 % in average is observed over monolingual model. Even though the VGG-BLSTM gave improvements, we were not able to perform stage-1 and stage-2 retraining with it due to time constraints. Thus, we proceed further with multilingual BLSTMP model for retraining experiments tabulated below.

2 Stage 1 - Retraining decoder only

To alleviate the limitation in the previous approach, the final layer of the seq2seq model which is mainly responsible for classification is retrained to the target language.

In previous works related to hybrid DNN/RNN models and CTC based models the softmax layer is only adapted. However in our case, the attention decoder and CTC decoder both have to be retrained to the target language. This means the CTC and attention layers are only updated for gradients during this stage. We found using SGD optimizer with initial learning rate of 1e41e^{-4} works better for retraining compared to AdaDelta.

The learning rate is decayed in this training at a factor of 1e11e^{-1} if there is a drop in validation accuracy. Table 4 shows the performance of simply retraining the last layer using a single target language Assamese.

3 Stage 2 - Finetuning both encoder and decoder

Based on the observations from stage-1 model in section 4.2, we found that simply retraining the decoder towards a target language resulted in degrading %CER the performance from 45.6 to 61.3. This is mainly due to the difference in distribution across encoder and decoder. So, to alleviate this difference the encoder and decoder is once again retrained or fine-tuned using the model from stage-1. The optimizer used here is SGD as in stage-1, but the initial learning rate is kept to 1e21e^{-2} and decayed based on validation performance. The resulting model gave an absolute gain of 1.6% when finetuned a multilingual model after 4th epoch. Also, finetuning a model after 15th epoch gave an absolute gain of 4.3%.

To further investigate the performance of this approach across different target data sizes, we split the train set into \sim5 hours, \sim10 hours, \sim20 hours and \simfull set. Since, in this approach the model is only finetuned by initializing from stage-1 model, the model architecture is fixed for all data sizes. Figure 2 shows the effectiveness of finetuning both encoder and decoder. The gains from 5 to 10 hours was more compared to 20 hours to full set.

Table 5 tabulates the % CER obtained by retraining the stage-1 model with \simfull set of target language data. An absolute gain is observed using stage-2 retraining across all languages compared to monolingual model.

4 Multilingual RNNLM

In an ASR system, a language model (LM) takes an important role by incorporating external knowledge into the system. Conventional ASR systems combine an LM with an acoustic model by FST giving a huge performance gain. This trend is also shown in general including hybrid ASR systems and neural network-based sequence-to-sequence ASR systems.

The following experiments show a benefit of using a language model in decoding with the previous stage-2 transferred models. Although the performance gains in %CER are also generally observed over all target languages, the improvement in %WER was more distinctive. The results shown in the following Fig. 3 are in %WER. “whole” in each figure means we used all the available data for the target language as full set explained before.

We used a character-level RNNLM, which was trained with 2-layer LSTM on character sequences. We use all available paired text in the corresponding target language to train the LM for the language. No external text data were used. All language models are trained separately from the seq2seq models. When building dictionary, we combined all the characters over all 15 languages mentioned in table 1 to make them work with transferred models. Regardless of the amount of data used for transfer learning, the RNNLM provides consistent gains across all languages over different data sizes.

As explained already, language models were trained separately and used to decode jointly with seq2seq models. The intuition behind it is to use the separately trained language model as a complementary component that works with a implicit language model within a seq2seq decoder. The way of RNNLM assisting decoding follows the equation below:

β\beta is a scaling factor that combines the scores from a joint decoding eq.(11) with RNN-LM, denoted as plmp_{\text{lm}}. This approach is called shallow fusion.

Our experiments for target languages show that the gains from adding RNNLM are consistent regardless of the amount of data used for transfer learning. In other words, in Figure 3, the gap between two lines are almost consistent over all languages.

Also, we observe the gain we get by adding RNN-LM in decoding is large. For example, in the case of assamese, the gain by RNN-LM in decoding with a model retrained on 5 hours of the target language data is almost comparable with the model stage-2 retrained with 20 hours of target language data. On average, absolute gain \sim6% is obtained across all target languages as noted in table 6.

Conclusion

In this work, we have shown the importance of transfer learning approach such as stage-2 multilingual retraining in a seq2seq model setting. Also, careful selection of train and target languages from BABEL provide a wide variety in recognition performance (%CER) and helps in understanding the efficacy of seq2seq model. The experiments using character-based RNNLM showed the importance of language model in boosting recognition performance (%WER) over all different hours of target data available for transfer learning.

Table 5 and 6 summarizes, the effect of these techniques in terms of %CER and %WER. These methods also show their flexibility in incorporating it in attention and CTC based seq2seq model without compromising loss in performance.

Future work

We could use better architectures such as VGG-BLSTM as a multilingual prior model before transferring them to a new target language by performing stage-2 retraining. The naive multilingual approach can be improved by including language vectors as input or target during training to reduce the confusions. Also, investigation of multilingual bottleneck features for seq2seq model can provide better performance. Apart from using the character level language model as in this work, a word level RNNLM can be connected during decoding to further improve %WER. The attention based decoder can be aided with the help of RNNLM using cold fusion approach during training to attain a better-trained model. In near future, we will incorporate all the above techniques to get comparable performance with the state-of-the-art hybrid DNN/RNN-HMM systems.

References