HyperConformer: Multi-head HyperMixer for Efficient Speech Recognition

Florian Mai, Juan Zuluaga-Gomez, Titouan Parcollet, Petr Motlícek

Abstract

State-of-the-art Automatic Speech Recognition (ASR) systems have achieved promising results by modeling local and global interactions separately. While the former can be computed efficiently, global interactions are usually modeled via attention mechanisms, which are expensive for long input sequences. Here, we address this by extending HyperMixer, an efficient alternative to attention exhibiting linear complexity, to the Conformer architecture for speech recognition, leading to HyperConformer. In particular, multi-head HyperConformer achieves comparable or higher recognition performance while being more efficient than Conformer in terms of inference speed, memory, parameter count, and available training data. HyperConformer achieves a word error rate of 2.9% on LibriSpeech test-clean with less than 8M neural parameters and a peak memory during training of 5.7GB, hence trainable with accessible hardware. Inference speed is between 38% on mid-length speech and 56% on long speech faster than an equivalent Conformer.

Introduction

The landscape of Automatic Speech Recognition (ASR) has been dominated by the Conformer architecture, which elegantly combines Convolutional Neural Networks (CNNs) for local feature extraction and Multi-Head Self-Attention (MHSA) for global context modeling. However, the quadratic complexity of the self-attention mechanism ($O(N^2)$) presents a significant bottleneck. As input sequences grow—common in long-form speech—the computational and memory requirements scale quadratically, often exceeding the limits of standard hardware.

To overcome this, we introduce HyperConformer. By replacing the computationally heavy self-attention with a novel Multi-head HyperMixer (MHHM), we achieve an architecture with linear complexity ($O(N)$). This transition allows for significantly faster inference and reduced memory footprints without compromising the high accuracy expected from state-of-the-art ASR models.

The HyperConformer Architecture

The core innovation of HyperConformer lies in the integration of the HyperMixer into the established Conformer block structure. While standard MLP-Mixers use fixed weights that cannot adapt to variable-length sequences, the HyperMixer utilizes a small "hypernetwork" to dynamically generate weights for a token-mixing MLP based on the input data itself.

The HyperConformer architecture replaces self-attention with a Multi-head HyperMixer, maintaining the convolution module for local context.

As shown in Figure 1, the HyperConformer block retains the Conformer's sandwich-style structure, featuring feed-forward modules and a convolution module. The critical change is the "Global interaction module," which now employs the Multi-head HyperMixer. By splitting the feature dimensions into multiple parallel heads, the model can learn diverse representations of the data while simultaneously reducing the parameter count of the hypernetworks. This multi-head approach mirrors the benefits of MHSA but maintains the efficiency of the HyperMixer.

Efficiency and Scaling

The primary advantage of the HyperConformer is its scalability. Because the HyperMixer operates with linear complexity relative to the sequence length, its efficiency gains become more pronounced as the audio duration increases.

Comparison of inference time and V-RAM usage across architectures. HyperConformer demonstrates superior scaling for long sequences.

In our evaluations, the HyperConformer encoder demonstrated a 38% speedup on mid-length speech and up to a 56% speedup on long speech (30 seconds) compared to a standard Conformer. Furthermore, the model utilizes approximately 30% less peak memory during training. This memory efficiency is crucial for researchers and developers working with consumer-grade GPUs, such as the RTX 30 or 40 series, making high-performance ASR more accessible.

Experimental Results on LibriSpeech

We evaluated HyperConformer on the LibriSpeech ASR corpus, a benchmark of 960 hours of English speech. Our "small" model variant, containing fewer than 8 million parameters, achieved a Word Error Rate (WER) of 2.9% on the test-clean set, matching or exceeding the performance of the baseline Conformer.

One of the most notable findings was the model's data efficiency. When trained on a 100-hour subset of LibriSpeech, HyperConformer outperformed the standard Conformer by roughly 20%. This suggests that the dynamic MLP structure of the HyperMixer provides a superior inductive bias for speech signals compared to the more data-hungry attention mechanism, especially in low-resource scenarios.

Conclusion and Future Work

HyperConformer represents a significant step toward more efficient and accessible ASR. By proving that dynamic MLPs can replace self-attention for global modeling, we offer a path to processing longer audio sequences with fewer resources. While current results are promising at small and medium scales, future research will explore the scalability of this architecture to "Giant" models and further optimize the hypernetwork configurations. Ultimately, HyperConformer provides a "greener" alternative that maintains state-of-the-art performance while drastically reducing the "quadratic tax" of traditional attention-based models.

Summary updated

BibTeX
@inproceedings{mai2023hyperconformer,
  author = {Florian Mai and Juan Zuluaga-Gomez and Titouan Parcollet and Petr Motlícek},
  title = {{HyperConformer: Multi-head HyperMixer for Efficient Speech Recognition}},
  booktitle = {Interspeech},
  year = {2023},
  url = {https://openreview.net/forum?id=XAkNypOGyO},
}
Figure