Introduction
State-of-the-art Automatic Speech Recognition (ASR) systems rely heavily on Transformer-based language models (LMs). While powerful, these models are massive—often containing hundreds of millions of parameters. Because standard Transformers use fixed, "deterministic" parameter estimates, they are highly susceptible to over-fitting, especially when training data is limited or when adapting to a new domain. Currently, the industry relies on "dropout" to prevent over-fitting, but this is a heuristic technique lacking a rigorous mathematical framework. Researchers from The Chinese University of Hong Kong have introduced a full Bayesian learning framework for Transformer LMs to address these limitations by treating model parameters as probability distributions.
Methodology: The Bayes Transformer
The proposed Bayesian Transformer LM replaces fixed weights with latent parameter posterior distributions. Instead of learning a single value for each weight, the model learns the parameters of a distribution (typically a diagonal Gaussian).
Key technical components include:
- Variational Inference (VI): Since calculating the exact posterior distribution is intractable, VI is used to approximate it with a simpler distribution.
- ELBO Optimization: The model is trained by maximizing the Evidence Lower Bound (ELBO), balancing data likelihood with KL divergence from a prior belief.
- Selective Bayesian Modeling: To manage computational costs, Bayesian estimation is applied selectively to specific modules: the Embedding (EMB) layer, Multi-Head Attention (MHA), or Feed-Forward (FF) modules.
- Reparameterization Trick: This ensures the model remains end-to-end trainable via standard back-propagation despite the stochastic sampling process.
Experimental Setup
The approach was evaluated on two distinct corpora:
- Switchboard & Fisher: A large-scale (34M words) conversational telephone speech corpus used for general-purpose ASR.
- DementiaBank Pitt: A small (167k words) specialized dataset of elderly speech, used for cross-domain adaptation testing.
Key Insights and Results
The researchers found that applying Bayesian estimation only to the lowest Transformer block (closest to the input) yielded the best results, likely because input-level data exhibits the highest variability. Among modules, making the Feed-Forward (FF) layers Bayesian provided the most significant gains in both perplexity and Word Error Rate (WER).
On the Switchboard benchmark, the Bayesian Transformer achieved a 3.18% relative reduction in WER compared to the baseline. In low-resource domain adaptation (DementiaBank), it outperformed standard fine-tuning by 0.37% absolute WER. Crucially, as shown in the figure above, the Bayesian model maintains its performance edge as model complexity (FF dimension) increases, whereas standard models—even those using dropout—show sharper increases in perplexity as they over-fit.
Conclusion and Future Work
By treating model parameters as probability distributions, this framework provides a principled method for regularizing large-scale Transformer LMs. While it introduces some computational overhead during training, the gains in robustness and performance are significant. Future research will explore scaling these techniques to "Giant" Transformers and training from scratch without deterministic priors.
Summary updated