[Paper Review] Branchformer: Parallel MLP-Attention Architectures to Capture Local and Global Context for Speech Recognition and Understanding
Branchformer introduces a two-branch encoder with parallel global (attention) and local (cgMLP) pathways, merging their outputs to capture both long-range and local dependencies for ASR and SLU, yielding strong results and flexible, trainable inference complexity.
Conformer has proven to be effective in many speech processing tasks. It combines the benefits of extracting local dependencies using convolutions and global dependencies using self-attention. Inspired by this, we propose a more flexible, interpretable and customizable encoder alternative, Branchformer, with parallel branches for modeling various ranged dependencies in end-to-end speech processing. In each encoder layer, one branch employs self-attention or its variant to capture long-range dependencies, while the other branch utilizes an MLP module with convolutional gating (cgMLP) to extract local relationships. We conduct experiments on several speech recognition and spoken language understanding benchmarks. Results show that our model outperforms both Transformer and cgMLP. It also matches with or outperforms state-of-the-art results achieved by Conformer. Furthermore, we show various strategies to reduce computation thanks to the two-branch architecture, including the ability to have variable inference complexity in a single trained model. The weights learned for merging branches indicate how local and global dependencies are utilized in different layers, which benefits model designing.
Motivation & Objective
- Motivate the need for flexible, interpretable encoders that explicitly model local and global context in speech processing.
- Propose Branchformer with two parallel branches (global attention and local cgMLP) to capture varied dependency ranges.
- Show that Branchformer outperforms Transformer, cgMLP, and matches or surpasses Conformer across ASR and SLU benchmarks.
- Demonstrate analysis tools to interpret branch usage and provide strategies to reduce inference cost via branch merging and dropout.
Proposed method
- Two-branch encoder per layer where one branch models global context via self-attention (or efficient variants) with relative positional encoding.
- A second branch models local context via cgMLP (MLP with convolutional gating) leveraging depth-wise convolution and linear gating.
- Merge branches by concatenation (default) or weighted average, with optional branch dropout to prune during training for faster inference.
- Use attention-based pooling to summarize branch outputs for weighting in the weighted-average merge.
- Explore efficient attention variants (e.g., Fastformer) to reduce complexity from quadratic to linear in sequence length.
Experimental results
Research questions
- RQ1How can local and global contextual dependencies be modeled in parallel within a single encoder layer?
- RQ2Does a parallel-two-branch design improve interpretability and performance over single-branch Conformer-like architectures?
- RQ3Can the two-branch design enable flexible inference cost (branch dropout) without re-training?
- RQ4What is the effect of different branch merging strategies on performance and interpretability?
- RQ5How do learned branch weights reveal layer-wise usage of local vs. global information across datasets?
Key findings
- Branchformer consistently outperforms Transformer and cgMLP baselines and matches or exceeds Conformer across ASR and SLU benchmarks.
- Two-branch design provides interpretability: learned branch weights reveal layer-wise shifts between local and global dependency usage.
- Flexible inference cost: branch dropout enables faster inference by disabling the attention branch without re-training.
- Efficient attention variants (Fastformer) can reduce compute with only modest performance loss, while full self-attention remains competitive in accuracy.
- Layer-wise analysis shows initial interleaving of local/global blocks and later phases dominated by global or local blocks, indicating dynamic context usage across layers.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.