MS-HuBERT: Mitigating Pre-training and Inference Mismatch in Masked Language Modelling methods for learning Speech Representations

Hemant yadav, Sunayana Sitaram, Rajiv Ratn Shah

Abstract Self-supervised pre-training methods, particularly HuBERT (Hidden-Unit BERT), have set new benchmarks in learning high-level speech representations from raw audio. However, HuBERT's performance often trails behind models like data2vec due to inherent disparities in pre-training strategies. This paper introduces MS-HuBERT, which addresses the pre-training and inference mismatch through a novel "Swap" method and a Multicluster masked prediction loss. MS-HuBERT outperforms vanilla HuBERT on LibriSpeech benchmarks by an average of 5% and demonstrates that its learned embeddings encode superior word-level information for content-based tasks like Automatic Speech Recognition (ASR).

Introduction

Most modern speech representation models rely on Self-Supervised Learning (SSL) via Masked Language Modelling (MLM). In this paradigm, a model learns by predicting "hidden" segments of an audio signal based on surrounding context. While effective, this approach introduces a fundamental Pre-training/Inference Mismatch: during training, the model processes a special [MASK] token, but during inference, it encounters only clean, unmasked audio. This discrepancy forces the model to perform a task at test time that differs from its training objective. Furthermore, standard HuBERT often underutilizes its capacity by calculating loss against a single set of discrete labels at the final layer.

Methods

MS-HuBERT introduces two primary architectural and objective modifications to the standard HuBERT framework to bridge these gaps.

1. The Swap Method

To mitigate the mismatch between masked training and unmasked inference, MS-HuBERT processes two simultaneous "views" of the same audio clip: a masked view and a clean (unmasked) view. As shown in the architecture diagram below, the model swaps output embeddings at the masked indices between these two views after each transformer layer. This mechanism forces the model to generate consistent representations for any given audio segment, regardless of whether it was masked in the input. This architectural constraint acts as a powerful regularizer without requiring an explicit auxiliary loss function.

Overview of the MS-HuBERT architecture featuring the Swap mechanism and Multicluster prediction.

2. Multicluster Masked Prediction Loss (MPL)

Rather than predicting a single set of labels, MS-HuBERT utilizes a "multi-resolution" approach. It predicts six different sets of labels (ranging from 25 to 1000 clusters) across multiple encoder layers. This forces the model to capture a hierarchy of acoustic features, from coarse-grained sounds to fine-grained phonetic details, more effectively utilizing the model's total capacity.

Experimental Results

The researchers evaluated MS-HuBERT using the LibriSpeech ecosystem, pre-training on 960 hours of unlabeled audio and fine-tuning on various splits (1hr to 960hr).

As detailed in the table below, MS-HuBERT consistently outperforms vanilla HuBERT across all fine-tuning regimes. Notably, on the 100-hour split, MS-HuBERT achieved a Word Error Rate (WER) of 2.4/7.1 (dev-clean/dev-other), a significant improvement over HuBERT’s 2.7/7.8. In high-resource settings (960hr), MS-HuBERT reaches parity with state-of-the-art models like data2vec, proving that discrete-label models can be highly competitive when the pre-training mismatch is addressed.

Comparison of Word Error Rate (WER) across different LibriSpeech fine-tuning splits.

Beyond ASR, MS-HuBERT showed superior performance in Phoneme Recognition (PR) on the SUPERB benchmark, achieving a score of 4.42 compared to HuBERT's 5.41 and data2vec's 4.69.

Key Insights and Discussion

  • Consistency and Robustness: The Swap method ensures that the "masked" path learns to mimic the "clean" path, making the model significantly more robust when masks are absent during inference.
  • Information Density: Analysis using Canonical Correlation Analysis (CCA) revealed that MS-HuBERT encodes substantially more word-level information in its deeper layers than vanilla HuBERT, explaining its superior performance in content-heavy tasks.
  • Efficiency: MS-HuBERT achieves these gains by modifying data flow and loss calculation within existing transformer architectures, avoiding the need for complex down-sampling or hierarchical modules.

Conclusion

MS-HuBERT effectively mitigates the pre-training/inference mismatch in speech SSL. By enforcing consistency through the Swap method and capturing multi-resolution features through Multicluster MPL, it sets a new standard for HuBERT-style models. Future work will explore scaling these improvements to larger parameter counts and streamlining the multi-stage pseudo-labeling pipeline.

Summary updated

BibTeX
@inproceedings{yadav2024ms,
  author = {Hemant yadav and Sunayana Sitaram and Rajiv Ratn Shah},
  title = {{MS-HuBERT: Mitigating Pre-training and Inference Mismatch in Masked Language Modelling methods for learning Speech Representations}},
  booktitle = {Interspeech},
  year = {2024},
  url = {https://openreview.net/forum?id=8n2LPg5osB},
}
Figure