What is Conformer? A speech encoder combining attention and convolution
Conformer combines Transformer self-attention and convolution in a speech encoder to model both global context and local acoustic patterns. Learn its block structure, compute trade-offs, and how to interpret the original paper's benchmark results.
What is Conformer? A speech encoder combining attention and convolution
Conformer is a neural speech encoder that combines self-attention for relationships across a sequence with convolution for nearby acoustic patterns. It places Transformer and CNN components in one block, but the name alone does not specify a decoder, training objective, or streaming behavior. Conformer encoders can be paired with different recognition systems, including CTC, RNN-T, and attention-based decoders.
What is inside a Conformer block?
In the original paper, input features first pass through convolutional subsampling and then through a stack of Conformer blocks. The main block order is:
**First feed-forward module:** transforms representations, with a half-step residual contribution in the Macaron-style design.
**Multi-head self-attention:** lets a position use information from distant positions. The paper uses relative positional information.
**Convolution module:** uses pointwise operations and gating followed by one-dimensional depthwise convolution to capture local time patterns.
**Second feed-forward module:** completes the transformation, with residual connections and normalization shaping the block output.
Conformer is therefore more specific than “a Transformer with a CNN added”: it has a block order and residual design. Implementations can vary in normalization, activations, kernel size, positional encoding, number of blocks, and subsampling.
Balancing global context and local patterns
Self-attention connects information across an input flexibly, but long sequences can make it expensive in computation and memory. Convolution handles nearby patterns efficiently, while deeper layers are needed to combine more distant context. Conformer places both operations in sequence so they can complement each other. This does not mean it always beats a Transformer or CNN: kernel size, model scale, data, training objective, and decoder all matter.
The original paper evaluated several Conformer sizes on LibriSpeech. Its large model had 118.8 million parameters and reported test-clean/test-other WER of 2.1%/4.3%, or 1.9%/3.9% with an external language model under the paper's setup. These are results for particular data, preprocessing, training, and decoding conditions—not guaranteed performance on other languages, noise, or services.
What to check when choosing or evaluating one
**Compare complete systems.** Keep decoder, tokenizer, data splits, and evaluation procedure consistent; distinguish results with and without an external language model.
**Include intended conditions.** Check WER/CER, errors by noise, speaker, accent, and utterance length, plus latency, memory, and throughput.
**Verify streaming constraints.** Full self-attention may use future frames. Streaming variants may limit chunks, look-ahead, caching, or convolution context, which can change accuracy and latency.
**Keep benchmark results in context.** Treat LibriSpeech numbers as examples from the paper's setup and measure again on the target data.
Conformer is a design choice for using both global and local acoustic context. Decide whether it fits by measuring recognition errors and compute costs in the intended deployment.
References
[Gulati et al., Conformer: Convolution-augmented Transformer for Speech Recognition (2020)](https://arxiv.org/abs/2005.08100)
[Google Research, Conformer publication page](https://research.google/pubs/conformer-convolution-augmented-transformer-for-speech-recognition/)