## 3 Materials and Methods
### Model Fusion  
Typically, after model training is completed, to ensure both accuracy and robustness, models from the better-performing training epochs are selected. The weight parameters of these selected models are then averaged using an arithmetic mean, resulting in a new model with improved stability and performance. Figure 5 illustrates the training process curve of a model. By selecting the models \(M=\{M_{1},M_{2},\dots,M_{S}\}\) and corresponding loss values \(L=\{L_{1},L_{2},\dots,L_{S}\}\) from the convergence phase, the arithmetic averaging formula is as follows:  
\[M_{ave}=\frac{\sum_{i=1}^{S}M_{i}}{S} \tag{4}\]  
where \(M_{ave}\) is the newly obtained model after arithmetic averaging, and \(S\) is the number of models. Figure 4: Hybrid CTC/attention model. Although arithmetic averaging is simple and easy to implement in model fusion, it has significant drawbacks when dealing with the following issues: First, arithmetic averaging combines the outputs or parameters of multiple models with equal weights without considering the generalization ability of each model. This means that even if some models have overfitted to their training data, their influence in the ensemble is the same as that of well-performing models. As a result, the effects of overfitting may be retained in the final ensemble model, reducing the accuracy of predictions on new data. Second, when independently trained models are stuck in different local optima within their parameter space, simple arithmetic averaging may cause these local optima to cancel each other out or dilute their effects, especially when these local optima are far apart. This averaging approach can potentially disrupt valuable solutions found by well-performing models within certain local regions. To overcome these shortcomings, we propose a weighted averaging method. We select models from the stage where they are about to converge, calculate weights using loss values as evaluation criteria, and perform a weighted sum to obtain the final weighted average model. The formula for the weighted calculation is as follows:  
\[M^{\prime}{}_{ave}=\frac{\sum_{i=1}^{S}w_{i}\cdot M_{i}}{\sum_{i=1}^{S}w_{i}} \tag{5}\]  
\[w_{i}=\frac{1}{loss_{i}+}\in \tag{6}\]  
where \(M^{\prime}{}_{ave}\) is the new model obtained using weighted averaging, \(w_{i}\) is the weight of each model, \(\in\) is a small constant (set to \(1\times 10^{-6}\)) to avoid division by zero errors, and \(loss_{i}\) is the loss value of model \(M_{i}\). The above approach applies specifically to models with the same structure. When dealing with multiple different models, direct calculation using the entire models is not feasible due to structural differences. First, for the three different models, the model with the best performance, as evaluated by the loss value, is selected as the base model. When calculating across different models, only the structurally identical overlapping parts are weighted and averaged, while the non-overlapping parts are left unchanged. The specific formulas and pseudocode for this approach are as follows:  
First, the selection of the base model is carried out by defining the model with the smallest loss value as the base model \(M_{b}\):  
\[M_{b}=M_{\text{argmin}_{i},Loss_{i}}\;\;where\;\;\;i\in\{1,2,\dots,s\} \tag{7}\]  
Figure 5: Model training example. Next, for the specific structure within the models, the weights \(\omega\) and biases \(b\) of the _l-th_ layer in the base model are calculated as follows:  
\[\omega_{l}^{M}=\frac{\sum_{i=1}^{S}w_{i}\cdot I(l\in M_{b}\cap M_{i})\cdot\omega_ {l}^{i}}{\sum_{i=1}^{S}w_{i}\cdot I(p\in M_{b}\cap M_{i})} \tag{8}\]  
\[b_{l}^{M}=\frac{\sum_{i=1}^{S}w_{i}\cdot I(p\in M_{b}\cap M_{i})\cdot b_{l}^{i} }{\sum_{i=1}^{S}w_{i}\cdot I(p\in M_{b}\cap M_{i})} \tag{9}\]  
where \(I(l\in M_{b}\cap M_{i})\) is an indicator function that equals 1 if \(M_{i}\) shares common structural parameters in layer \(l\) with the base model \(M_{b}\), and 0 otherwise.