{'fraction_non_alphanumeric': 0.037333333333333336, 'fraction_numerical': 0.019666666666666666, 'mean_word_length': 4.660691823899371, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improving the Training Recipe for a Robust Conformer-based Hybrid Model

Speaker adaptation is important to build robust automatic speech recognition (ASR) systems. In this work, we investigate various methods for speaker adaptive training (SAT) based on feature-space approaches for a conformer-based acoustic model (AM) on the Switchboard 300h dataset. We propose a method, called Weighted-Simple-Add, which adds weighted speaker information vectors to the input of the multi-head self-attention module of the conformer AM. Using this method for SAT, we achieve 3.5% and 4.5% relative improvement in terms of WER on the CallHome part of Hub5'00 and Hub5'01 respectively. Moreover, we build on top of our previous work where we proposed a novel and competitive training recipe for a conformer-based hybrid AM. We extend and improve this recipe where we achieve 11% relative improvement in terms of word-error-rate (WER) on Switchboard 300h Hub5'00 dataset. We also make this recipe efficient by reducing the total number of parameters by 34% relative.


Introduction & Related Work
Hybrid neural network (NN)-Hidden Markov model (HMM) has been widely used to build competitive automatic speech recognition (ASR) systems on different datasets [1,2,3]. The system consists of an acoustic model (AM) and a language model (LM). Due to the tremendous success of deep learning, NN architectures are used for acoustic modeling. Such NN architectures include Bidirectional long short-term long memory (BLSTM) [4], convolution neural networks (CNN) [5], and time-delay neural networks (TDNN) [6]. The NN acoustic models are often trained with cross-entropy using a frame-wise alignment generated by a Gaussian mixture model (GMM)-HMM system.
Recently, self-attention models [7], specifically, conformerbased models [8], have achieved state-of-the-art performance on different datasets [8,9]. In [1], we proposed a novel and competitive training recipe for building conformer-based hybrid-NN-HMM systems. We studied different training methods to improve performance as well as to speed up training time. In this work, we extend and improve our training recipe by making it more efficient in terms of training speed and memory consumption as well as having a significant improvement in terms of word-error-rate (WER).
Moreover, speaker adaptation methods have been used to build robust ASR systems [10]. These methods can be classified as feature-space approaches and model-space approaches. Feature-space approaches include using speaker adaptive features [11] or augmenting speaker information such as i-vectors * Equal contribution Figure 1: Overview of the proposed conformer block. [12] or x-vectors [13] into the network. On the other hand, the model-space approaches modify the acoustic model to match the testing conditions by learning a speaker or environment dependent linear transformation to transform the input, output, or hidden representations of the network [14,15,16]. There have been some attempts to apply feature-space approaches to state-of-the-art conformer-based models [9]. In [9], they concatenate i-vectors to the input of each feed-forward layer in the conformer block, however, this gives only minor improvements and adds many additional parameters. In addition, there has been other work related to multi-accent adaptation which studied also different ways to integrate accent information into the network [17,18,19,20]. However, in all these approaches, the conformer architecture was not used. Therefore, in this work, we focus on feature-space approaches and we investigate better ways to integrate speaker information into the conformer AM.
The main contributions of this paper are: (1) We improve our training recipe for conformer-based hybrid-HMM-NN models [1] which lead to 11% relative improvement in terms of WER on Switchboard 300h Hub5'00 dataset, (2) We build an efficient conformer AM with 34% relative reduction of the total number of parameters compared to our previous baseline [1], (3) We propose a better method to integrate i-vectors into the conformer AM and achieved 3.5% relative improvement in terms of WER on CallHome part of Switchboard 300h. We call this method Weighted-Simple-Add and it adds weighted speaker information vectors to the input of the multi-head selfattention module of the conformer AM.

Model Architecture
Our AM is a variant of the conformer architecture [8]. The training recipe is built on top of our previous work [1]. The main differences are: (1) we replace all batch normalization (BN) [21] layers with layer normalization (LN) [22] layers, (2) we add another convolution module following Macaron style [8]. Each conformer block consists of one or more of these modules: feed-forward (FFN) module, multi-head self-attention (MHSA) module, and convolution (Conv) module. The proposed conformer block is illustrated in Figure 1. More details and experimental results are discussed in Section 5.

Speaker Adaptation
The main goal of speaker adaptation is to reduce the mismatch between train and test data by adapting the model to the unseen speakers of the test data. In this way, these methods adapt the speaker-independent model to be more robust to different speakers observed in the test data. In this work, we focus on feature-space adaptation methods.
Feature-space methods adapt the features of the network to be speaker-dependent. I-vectors [12] have been successfully applied to NN-based ASR systems [10,23]. However, the integration of such vectors depends on the model architecture itself and it is not always clear what is the best way to do such an integration. For the BLSTM model, it was observed that concatenating the i-vectors to the network features gives significant improvement [24]. But this did not work well for the conformer model as observed in [9]. In this work, we investigate and propose better ways to integrate the i-vectors into the conformer AM. We develop a method to combine i-vectors into the MHSA module of the conformer AM which gives the best improvement.
Let z T 1 be the input to a module in some conformer block (more details can be found in Section 5.2), and let v represents a speaker representation vector such as i-vector or x-vector for the input utterance. The methods to integrate v into the network can be defined as: • Concat: concatenate the hidden representation zt with ṽ • Simple-Add: U and b are trainable parameters.
• Complex-Add: W , U , and b are trainable parameters.
• Gated-Add: learn a scale and shift parameters conditioned on the speaker information v [25,26].
• Weighted-Simple-Add: The idea is to compute a score between each hidden representation zt and the speaker representation vector v. Sigmoid function is used to get a score between 0 and 1. Inspired from [19], we also apply a threshold k on the learned weights. We use a value of 0.4 for k.
where σ is the sigmoid function. · and are the dotproduct and element-wise product operations respectively. W , U , b1, and b2 are trainable parameters.
Note that the representation capability (learnable space of parameters) is almost similar in nature between methods Concat, Simple-Add, and Complex-Add (see Section 5.2).

Experimental Setup
Experiments are conducted on the Switchboard 300h dataset [27] which consists of English telephony conversations. We use Hub5'00 as a development set for tuning the search hyperparameters. It consists of both Switchboard (SWB) and CallHome (CH) parts. CH part is much noisier. We use Hub5'01 as test set. RETURNN [28] is used to train the acoustic models and RASR [29] is used for decoding. All our configs files and code to reproduce our results can be found online 1 .

Baseline
We use the baseline from our previous work [1]. It has 12 conformer blocks and we do time down-sampling by a factor of 3. Up-sampling is applied to the output layer using transposed convolution [30] to match the target fixed alignment. The total number of parameters is 88M. More details regarding hyperparameters and training methods can be found in [1]. We noticed that the momentum and epsilon parameters used in the BN layer were not optimal. After updating these parameters, our baseline achieves now WER of 11.7% on Hub5'00. The details for applying speaker adaptation are explained in Section 5.2.

I-vectors Extraction
Our i-vector extraction pipeline follows the recipe described in [24]. To train the universal background model (UBM), 40-dimensional Gammatone features [31] with a context of 9 frames are concatenated and then reduced to a dimension of 60 using linear discriminant analysis (LDA). Normalization and LDA are usually applied after the extraction. We do not scale the i-vectors as done in [24] since we found this is crucial to get improvement. The same observation is also stated in [32]. For the final LDA dimension reduction, we have compared using i-vectors with dimensions 100, 200, and 300. Using 200dimensional i-vectors is the best for our settings.

Sequence Discriminative Training (seq. train)
We use the lattice-based version of state-level minimum Bayes risk (sMBR) criterion [33]. The lattices are generated using a bigram LM. A small constant learning rate with value 1e-5 is used. At the final output layer, we use CE loss smoothing with a factor of 0.1. The sMBR loss scale is set to 0.9.

Language Models
In recognition, we use 4-gram count-based language model (LM) and LSTM LM as first pass decoding [34]. The LSTM LM has 51.3 perplexity (PPL) on Hub5'00 dataset. We use a transformer (Trafo) LM for lattice rescoring having PPL of 48.1 on Hub5'00 dataset.

Improved Baseline
Our conformer acoustic model training recipe is built on top of our previous work [1]. The improved results are reported in Table 1. We replace BN with LN for all convolution modules. This also makes the model fits better for streaming mode. This leads to 3% relative improvement in terms of WER on Hub5'00. Moreover, we study the effect of adding another convolution module in each conformer block following the Macaron style as suggested in [8]. This improves the system by 4% relative in terms of WER on Hub5'00. In addition, we reduce the number of parameters by 40% relative which makes training more efficient and requires less memory usage. To achieve that, we use an attention dimension of value 384 with 6 attention heads. The dimension of the feed-forward module is 1536. We also remove LongSkip [1]. The total number of parameters is then only 58M . The initial learning value is set to 1e-5. We apply linear warmup over 5 epochs with a peak learning rate of 8e-4. Table 2 shows that the improved baseline with reduced dimensions is 27% relatively faster in terms of training speed.

Speaker Adaptation Results
We use the best conformer AM as described in Section 5.1 for speaker adaptive training (SAT). We apply SAT by integrating i-vectors into the network. We load the pretrained model and continue training with i-vectors while adapting SpecAugment and applying learning rate reset to escape from a local optimum as described in [2]. We also do not apply any learning rate warmup because we start from a pretrained model. In Table 3, we compare different methods to integrate ivectors into the conformer AM which are described in Section 3. First, we can observe that we get more improvement on CH part compared to SWB part since CH part is much noisier and contains more unseen speakers. We can observe that Weighted-Simple-Add gives the larger improvement. Using this method, we achieve 3.5% relative improvement in terms of WER on CH part of Hub5'00 and 3% relative improvement overall. On SWB part, all methods give a similar improvement which is only 0.1% absolute.
For all SAT methods, we integrate the i-vectors into the first conformer block. In Table 4, we compare integrating i-vectors at different blocks of the conformer where Block 0 refers to the front-end VGG network. We can observe that integrating ivectors at the first conformer block gives the best improvement and the performance degrades as we use deeper blocks. We can also observe that integrating at many blocks at the same time does not help. These results are done using the best method Weighted-Simple-Add.
Furthermore, we integrate i-vectors into the input of the MHSA module of the first conformer block. This means zt in the equations of Section 3 represents the input to the MHSA module. We decide to use this module since it captures global context which can potentially carry more speaker information. To measure this experimentally, we report in Table 5 the speaker error rates when adding a speaker identification loss on top of each module in the first conformer block. We can observe that the largest relative improvement is achieved at MHSA module. The settings for speaker identification experiments are described in Section 6.

Comparison between i-vector and x-vector
The x-vectors are generated following the TDNN architecture in [13]. The training data is split into train and dev sets. We use attentive pooling [35] instead of statistical pooling which improves the speaker identification accuracy from 87.5% to  93.2% on the dev set. The comparison between using i-vectors and x-vectors for speaker adaptation using Weighted-Simple-Add method is reported in Table 6. Using x-vectors did not improve the performance but instead, lead to minor degradation on CH part. On possible explanation is that x-vectors mainly focus on the speaker characteristics whereas i-vectors are designed to capture both speaker and channel characteristics which might be important in this case [26]. Further investigations are needed for experiments with x-vectors.

Overall Results
We summarize our results in Table 7 and compare with different modeling approaches and architectures from the literature. Compared to our previous work [1], this work achieves 11.0% and 4.1% relative improvement with transformer LM on Hub5'00 and Hub5'01 datasets respectively. Moreover, our model outperforms a well-optimized BLSTM attention system [36] by 3% and 5% with LSTM LM on Hub5'00 and Hub5'01 datasets respectively. In addition, our model outperforms the TDNN baseline by 9% relative on Hub5'00 dataset. Our best conformer AM is still behind the state-of-the-art results but not with a big margin. We argue that our baseline can be further improved by applying speed perturbation [36] and also longer training. Surprisingly, sequence training only give minor improvement which requires further investigation.

Speaker Identification Error Analysis
It has been observed empirically that the improvement by speaker adaptation is not significant when using a conformerbased AM [9]. However, BLSTM-based AMs benefit much more from speaker adaptation [24]. We argue that the reason behind this is that the conformer model is able to better learn speaker information in the lower layers which make it already robust to different speakers. To verify this, we conduct the fol-  lowing experiment using the Switchboard 300h training dataset. We added a speaker identification loss on top of the output of each layer for both the conformer model and BLSTM model. The BLSTM model consists of 6 layers following [1,24]. Then, we freeze all the AM parameters except the speaker identification loss parameters. We use an attention mechanism as [39] to get a soft speaker representation from the last output layer of the AM. This can also learn to skip unnecessary information such as silence. The total number of speakers is 520. We split the training dataset into train and dev parts. The speaker identification error rates on the dev set are reported in Figure 2. We can observe that the conformer model has a much better speaker identification accuracy using the lower layers compared to the BLSTM model. It was able to achieve using the second block a speaker identification error rate of 13% while the lowest error rate that the BLSTM achieves is 43%. These figures also show that lower layers are more important for learning speaker representations. For the conformer, we also observe that having the speaker loss on top of the MHSA module is enough to achieve such a low speaker error rate. This also explains why the proposed method to integrate the i-vectors into the MHSA module works the best for us. Moreover, the speaker error starts to increase for higher layers which is most probably because the model starts to filter out unnecessary speaker information to learn high-level features.

Conclusions & Future Work
In this work, we improved our training recipe for conformerbased hybrid Neural Network-Hidden Markov Model. We achieved 11% relative improvement in terms of word-errorrate (WER) on the Switchboard 300h Hub5'00 dataset. We also developed an efficient training recipe with 34% relative reduction in total number of parameters. Moreover, we investigated different ways to apply speaker adaptive training (SAT) for conformer-based acoustic models. We propose a method, called Weighted-Simple-Add to add weighted speaker information vectors to the input of multi-head self-attention module of the conformer AM. Using this method for SAT, we achieve 3.5% and 4.5% relative improvement in terms of WER on the CallHome part of Hub5'00 and Hub5'01 respectively. We also perform some analysis and showed that the conformer-based AM is already good enough for speaker identification task. For future work, we plan to apply our recipe to a noisier dataset  [36] LAS LSTM LSTM no no 6.5 13.0 9.8 10.1 [9] LAS Conf. such as CHiME-4 [40] as well as applying model-space SAT approaches [41].

Acknowledgements
This work was partially supported by the project HYKIST funded by the German Federal Ministry of Health on the basis of a decision of the German Federal Parliament (Bundestag) under funding ID ZMVI1-2520DAT04A. We thank Wilfried Michel, Zoltán Tüske, and Wei Zhou for useful discussions. We also thank Alexander Gerstenberger for performing lattice rescoring with Transformer.