TL;DR
Conformer is a neural encoder for speech recognition. Each of its blocks combines a self-attention layer, which lets every audio frame look at the whole utterance, with a convolution layer, which looks closely at neighbouring frames. Two half-weight feed-forward layers sit on either side. On the LibriSpeech benchmark the largest model, with 118.8 million parameters, reached word error rates of 2.1 percent on the clean test set and 4.3 percent on the harder test set without a language model, the best published numbers at the time.
Builds on: Transformer, Depthwise Separable Convolution, Gated Linear Unit (GLU), Automatic Speech Recognition · Leads to: speech systems that use the Conformer encoder as their acoustic model
Why it mattered
Conformer set a new accuracy mark on LibriSpeech, the standard English speech benchmark. Its main claim is about parameters: a 30.7 million parameter Conformer already beat the 139 million parameter Transformer transducer, on both test sets without a language model.
The paper is also a clean study of one design question that many fields faced: how to combine attention with convolution. Its ablation tables show which pieces matter, so later work can reuse the parts that helped and skip the rest.
As of late 2026 the paper had about 5,300 citations on OpenAlex.
The problem
Speech recognition maps a long audio signal, typically one feature vector every 10 milliseconds, to a sequence of words. Two kinds of pattern must be captured. Local patterns are short sounds: a stop consonant lasts a few tens of milliseconds, and its identity depends on the frames right next to it. Global patterns span seconds: the correct spelling of a word may depend on what was said at the start of the sentence.
Before 2020, the two main encoders each covered one kind well. Recurrent networks (Recurrent Neural Network) carried context forward through time, but they were slow to train because each step waited for the one before. Transformers (Transformer) let every position attend to every other in one step, which captures global context and trains in parallel, but a transformer is weaker at fine local detail. Convolutional networks (Convolutional Neural Network) are good at local detail, but a local window only sees a few frames per layer, so reaching global context takes many layers or many parameters.
The question the paper asks is how to get both in one parameter-efficient block.
How it works
The encoder first shortens the input with a convolution subsampling layer, then runs a stack of Conformer blocks (16 or 17 of them, depending on the model size). Each block passes its input through four modules in order. Trace one frame through one block:
flowchart TB X["Input frame x"] --> F1["Half-step FFN: x + 1/2 FFN(x)"] F1 --> A["Multi-head self-attention, residual add"] A --> C["Convolution module, residual add"] C --> F2["Half-step FFN: x + 1/2 FFN(x)"] F2 --> N["Layer normalization"] N --> Y["Output to next block"]
- Start with the frame vector. Suppose the block receives a vector
xfor one frame. It is the output of the previous block, or of the subsampling layer for the first block. - First half-step feed-forward module. A feed-forward module (Feedforward Neural Network) computes a new vector from
x. Its output is multiplied by one half and added back tox. The half weight is the Macaron trick described below. Check: the vector changes a little, not a lot, because only half the update is added. - Multi-head self-attention. The updated vector goes into multi-head self-attention (Multi-Head Attention), which mixes information from all frames of the utterance. The paper uses relative positional information (Positional Encoding) so the attention knows how far apart two frames are, not only their absolute index. The attention output is added back to its input, a residual connection (Residual Connection). Check: a frame can now carry a summary of what the rest of the utterance says.
- Convolution module. The result enters the convolution module, which looks at a window of neighbouring frames. It runs in five small stages, traced below. Its output is again added back to its input. Check: after this step each frame has absorbed information from its neighbours.
- Second half-step feed-forward module, then layer normalization. A second feed-forward module, again weighted by one half and added back, is followed by a layer normalization (Layer Normalization). The normalized vector is the block's output and becomes the input of the next block. Check: the output has the same length as the input, so blocks can be stacked.
The convolution module has five stages, applied to each frame's vector:
- A layer normalization, then a pointwise convolution (Pointwise (1x1) Convolution) that doubles the number of channels from
dto2d. This is a learned mix of the channels at each frame, with no neighbours involved. - A gated linear unit (Gated Linear Unit (GLU)). It splits the
2dchannels into two halves ofdeach. One half is multiplied by a sigmoid of the other, so it works as a gate. Output:dchannels. - A depthwise convolution (Depthwise Separable Convolution) with kernel length 32 over time. Each channel gets its own filter that slides across neighbouring frames. Output: still
dchannels, now with local context. - Batch normalization (Batch Normalization) across the batch, which helps deep stacks train.
- A swish activation (Activation Function), which is a smooth bend that behaves like a ReLU for large positive inputs and lets small negative values through.
The paper's Figure 2 describes this chain. The module's output must have the model width so that it can be added to the block input.
The sandwich of two half-weight feed-forward modules is the design's signature. Feed-forward layers are weighted by one half in both places so that together they contribute about as much as one full-weight feed-forward layer, but the work is split on either side of attention and convolution.
The math
A Conformer block maps an input sequence of vectors to an output sequence of the same shape. It is built from four modules: a feed-forward module , multi-head self-attention , a convolution module , and a second feed-forward module, followed by a layer normalization . Each module is wrapped in a residual connection.
The symbols: is the input to block , and , , are the intermediate vectors after each stage. Each stage adds one module's output to its input.
Step 2 in symbols: the first half-step feed-forward
Step 3 in symbols: attention with a residual
Step 4 in symbols: convolution with a residual
Step 5 in symbols: the closing half-step and layer normalization
The feed-forward module itself is two linear maps with a swish activation between them. Writing for the sigmoid and , the module computes , where expands the width by a factor of 4 and projects it back.
The gate in the convolution module
Split a vector with entries into halves and of length . The gated linear unit is
where is the entrywise product. Each entry of decides, between 0 and 1, how much of the matching entry of passes through.
The depthwise convolution
For channel and kernel length , the depthwise convolution computes
Each channel has its own weights and never mixes with another channel. The parameter count is . A standard convolution that mixes channels needs . The ratio is , which is why the depthwise form is cheap.
Worked examples
Take the vector , so , and .
- Split the vector. The first half is and the second half is .
- Compute the gate. .
- Multiply. .
Interpretation: the gate let about 73 percent of the value through. A larger would let more through, and a very negative would block it almost entirely.
Use scalar values, skip the final layer normalization (on a single number it only rescales), and pick a starting value . Pretend the feed-forward module returns 2 for , attention returns 1, and the convolution returns 0.5.
- First half-step. .
- Attention. .
- Convolution. .
- Second half-step. The feed-forward module applied to returns 1 in this example, so .
Interpretation: the block raised the value from 4 to 7. Each module added its own correction and nothing overwrote the input, which is what a residual connection guarantees. The half weights kept the two feed-forward corrections smaller than a full one would have been.
The medium model has width (Table 1 of the paper) and kernel length .
- A standard convolution from 256 channels to 256 channels with kernel 32 has weights.
- A depthwise convolution with 256 channels and kernel 32 has weights.
- The ratio is , which matches .
- So the depthwise filter spans 32 frames at a cost of about 0.4 percent of a full channel-mixing convolution. Channel mixing is left to the pointwise layers.
Try it: the large model has and . Compute its depthwise weights and its standard-convolution weights, then find the ratio. Answer: depthwise ; standard ; ratio .
Results
The three models were chosen by sweeping depth, width and attention heads, keeping the best one under each parameter budget (Table 1 of the paper).
| Model | Parameters | Encoder layers | Width | Heads |
|---|---|---|---|---|
| Conformer S | 10.3 M | 16 | 144 | 4 |
| Conformer M | 30.7 M | 16 | 256 | 4 |
| Conformer L | 118.8 M | 17 | 512 | 8 |
Word error rates on LibriSpeech (test-clean / test-other, lower is better):
| Model | Parameters | Without LM | With LM |
|---|---|---|---|
| Transformer transducer | 139 M | 2.4 / 5.6 | 2.0 / 4.6 |
| ContextNet (L) | 112.7 M | 2.1 / 4.6 | 1.9 / 4.1 |
| Conformer S | 10.3 M | 2.7 / 6.3 | 2.1 / 5.0 |
| Conformer M | 30.7 M | 2.3 / 5.0 | 2.0 / 4.3 |
| Conformer L | 118.8 M | 2.1 / 4.3 | 1.9 / 3.9 |
What these numbers mean: the medium model beats a model more than four times its size. The large model gives the best numbers in the table. With an external language model the gap to the Transformer transducer on the hard test set is about 15 percent relative (3.9 against 4.6), the improvement the paper highlights. The paper's limits: all results are on one benchmark, LibriSpeech, and the language-model comparisons depend on the particular language model the authors trained.
The ablation tables (test-other word error rate, no language model) show which parts carry the gain:
- Full Conformer L: 4.3.
- Replace the convolution module with nothing: 4.9.
- Replace the relative positional encoding with ordinary positional encoding: 5.6. This is the largest drop in the table.
- Replace the two half-step feed-forward modules with one full feed-forward module (Table 5): 4.5.
- Swap swish for ReLU (Activation Function): 4.5.
Placement also matters. Putting the convolution before attention, or running attention and convolution in parallel, was worse than the chosen order. Kernel length 32 was best or tied for best among the values tried (3, 7, 17, 32, 65). For attention heads, eight (the setting used for Conformer L) gave the best test-other score, 4.3, while four, sixteen and thirty-two heads gave 4.5, 4.4 and 4.5.
Reading guide
The paper is short. Read it in this order, with the lessons each part needs:
- Abstract and Introduction (Sections 1 and the first figure captions). Needs Transformer and Convolutional Neural Network. The question is local versus global context.
- Section 2, the encoder. Needs Multi-Head Attention, Positional Encoding and Layer Normalization for Section 2.1 and 2.3, and Residual Connection for Section 2.4. Figure 1 is the picture to keep open.
- Section 2.2, the convolution module. Needs Pointwise (1x1) Convolution, Gated Linear Unit (GLU), Depthwise Separable Convolution, Batch Normalization and Activation Function. Figure 2 shows the five stages.
- Section 2.4, the block equations. Needs only the residual idea above. Read the four equations together with the walkthrough.
- Section 3, experiments. Needs Automatic Speech Recognition for the task and the word error rate, Language Model for the with-LM rows, and Dropout and Stochastic Gradient Descent for the training setup.
- Section 3.4, ablations. Needs Receptive Field for the kernel-size sweep and Equivariance for why convolution is shift-friendly. Each table answers one design question.
Check yourself
QuestionIn one sentence, what does the convolution module add to a Conformer block that the self-attention module does not provide?Show answer
Local detail: the convolution looks at a short window of neighbouring frames with its own learned filters, which captures fine short-range patterns efficiently. Self-attention already mixes information across the whole utterance, but it is weaker at fine local patterns, so the two together cover both scales.
QuestionA gated linear unit receives the vector (3, 0). Compute its output.Show answer
Split into and . Then , so the output is . A zero gate input lets half of the value through.
QuestionEach Conformer block uses two feed-forward modules with weight one half instead of one full feed-forward module. Why might the half weights help, and what did the paper find when it used full-step residuals instead?Show answer
Each half-step correction is smaller, so the two together add about as much change as one full layer, but the update is split around the attention and convolution modules. This is the Macaron-style design the paper borrows from Macaron-Net. In the paper's ablation, full-step residuals were slightly worse on test-other (4.5 against 4.3), so the half weight is a measured choice, not decoration.
QuestionA product team has a memory budget of about 12 million parameters for an on-device recogniser. Which Conformer size from the paper fits, and what is its no-language-model word error rate on test-other?Show answer
Conformer S, with 10.3 million parameters, is the only model in the paper under 12 million. Its test-other error without a language model is 6.3 percent. Conformer M, at 30.7 million, is too large for the budget.
Sources
- Gulati et al., "Conformer: Convolution-augmented Transformer for Speech Recognition", arXiv:2005.08100, 2020. https://arxiv.org/abs/2005.08100
- Digital object identifier for the same paper: https://doi.org/10.48550/arXiv.2005.08100