Online Predictive Coding for Dual-Mode Self-Supervised Speech Model

Keita Goto, Takashi Maekaku, Jin Sakuma, Jinchuan Tian, Yusuke Shinohara, Shinji WatanabearXiv 2026

TL;DR

Dual-mode self-supervised speech models can handle both streaming (online) and non-streaming (offline) speech processing simultaneously, but they suffer from a performance gap due to an "attention mismatch" caused by missing future context in streaming mode. This paper introduces Online Predictive Coding (OPC)—which forces special "online register" tokens to explicitly predict future offline representations—and Dual-mode Layer Normalization to stabilize training. Together, these techniques significantly narrow the online-offline performance gap without adding any algorithmic latency.

What Problem Does This Paper Address?

Self-supervised speech models (S3Ms) like wav2vec 2.0 excel at offline tasks where the model can look at an entire audio recording at once. However, when deployed in real-time streaming applications (like live transcription), they process audio chunk-by-chunk and cannot access future context.

To avoid maintaining two separate models, researchers use "dual-mode" frameworks that share parameters between online and offline pathways. The core challenge here is attention mismatch: the offline mode looks at everything, while the online mode is blind to the future.

Figure 1: Online vs. offline self-attention visibility. The figure il- lustrates the case where the chunk size is Nc = 4, with Nr = 2 registers per chunk and no lookahead (Nl = 0). Offline at- tention attends to all frames in X, whereas online attention is restricted to the chunk Ci and its online registers Ri.

While previous work introduced "online registers" (extra learnable tokens appended to each chunk to act as a placeholder for future information), they weren't explicitly forced to learn future context robustly, leaving a substantial performance gap between streaming and non-streaming modes.

Methods

The authors propose two primary enhancements to the dual-mode wav2vec 2.0 architecture:

  1. Online Predictive Coding (OPC): Inspired by Contrastive Predictive Coding (CPC), OPC turns the online registers into active future-predictors. During pre-training, the representations of the online registers ($\hat{R}_i^{on}$) are projected forward to predict $N_f$ future frames of the offline pathway ($\hat{X}^{off}$). By minimizing the cosine distance between these predictions and the actual future offline features, the registers are forced to encode meaningful context about the upcoming, unseen audio. A stop-gradient operation is applied to the offline targets to prevent the offline model from collapsing.
  2. Dual-mode Layer Normalization: Because online registers develop highly distinct activation patterns compared to standard speech frames, sharing normalization statistics across modes destabilizes training. The authors introduce separate LayerNorm affine parameters ($\gamma$ and $\beta$) for the online and offline pathways, which effectively mitigates mode-specific distribution shifts.
Figure 2: Overview of Online Predictive Coding (OPC) for the case of Nc = 4, Nr = 2 registers per chunk, no lookahead (Nl = 0), and Nf = 4 future prediction steps. For the i-th chunk, the online registers jointly predict four future offline rep- resentations at subsequent time steps. The OPC loss is com- puted over all chunks.

Datasets

  • Pre-training: The 960-hour unlabeled LibriSpeech corpus.
  • Fine-tuning & Evaluation:
  • LibriSpeech (960h): Evaluated on standard test-clean and test-other sets for automatic speech recognition (ASR).
  • Wall Street Journal (WSJ): Used for cross-domain evaluation (test_eval92 and test_eval93) to see how well the pre-trained features generalize to a different acoustic domain.

Key Insights and Ideas

  • The Predictive Sweet Spot: There is a goldilocks zone for predicting the future. Setting the model to predict too few ($N_f = 2$) or too many ($N_f = 8$) future frames degrades performance. Predicting 4 frames ($N_f = 4$) works best, suggesting that trying to look too far ahead introduces an overly difficult auxiliary task that disrupts the primary self-supervised learning objective.
  • Mutual Benefit: Stabilizing the online pathway via OPC actually improves offline performance as well. Because the encoder parameters are shared, helping the model resolve attention mismatches prevents the online training steps from pulling the shared weights away from an optimal configuration.
  • Decoupling Stats is Crucial: Simply separating the LayerNorm parameters across the two modes provides the necessary flexibility to handle the unique statistical distributions introduced by the online registers.

Key Results

When evaluated in a low-latency streaming setup (160 ms chunk size, zero lookahead) on LibriSpeech, the proposed method yields substantial improvements:

  • Online Word Error Rate (WER): Dropped from 3.65% to 3.40% on test-clean and from 10.15% to 9.65% on test-other compared to the dual-mode baseline.
  • Closing the Gap: The combination of online registers and OPC achieves comparable accuracy at a 160 ms latency to the baseline operating at a much slower 320 ms latency.
Word error rate (WER, %) on LibriSpeech test-clean under different online latency settings, showing that OPC provides the largest gains at smaller chunk sizes.

Additionally, the model outperformed other dual-mode self-supervised baselines like UFO2, achieving an online WER of 3.1% vs UFO2's 3.8% on test-clean under a comparable 640 ms latency setting.

Limitations and Future Work

While OPC consistently narrowed the online-offline gap, the authors noted a slight degradation in offline performance during cross-domain evaluation on the Wall Street Journal (WSJ) dataset (a 1.2% relative increase in WER compared to using registers without OPC). This implies that the future-prediction task might inadvertently bake in some domain-specific biases from the LibriSpeech pre-training data.

Future work could explore ways to make the predictive coding mechanism more domain-agnostic or investigate adaptive prediction horizons that change depending on the complexity of the speech signal.

Summary updated

BibTeX
@misc{goto2026online,
  author = {Keita Goto and Takashi Maekaku and Jin Sakuma and Jinchuan Tian and Yusuke Shinohara and Shinji Watanabe},
  title = {{Online Predictive Coding for Dual-Mode Self-Supervised Speech Model}},
  year = {2026},
  eprint = {2606.21268},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.21268},
}
Figure