
Conformer
Audio and speech259 ops361K params
Attention and a depthwise convolution between two half-step feed-forward layers; the speech encoder of the 2020s.
Audio and speech · 291 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
About this model's family
Conformer is a convolution-augmented Transformer for speech recognition, built to get the best of both worlds from attention and convolution. The premise is that Transformer models are good at capturing content-based global interactions, while CNNs exploit local features effectively. The paper studies how to combine the two to model both local and global dependencies of an audio sequence in a parameter-efficient way.
A Conformer block stacks four modules: a feed-forward module, a self-attention module, a convolution module, and a second feed-forward module at the end. The two feed-forward modules sandwich attention and convolution, a structure inspired by Macaron-Net with its two half-step feed-forward layers. Self-attention is multi-headed and borrows the relative sinusoidal positional encoding scheme from Transformer-XL. The authors found that two Macaron-style feed-forward layers give a significant improvement over a single feed-forward module.
On LibriSpeech, Conformer reaches word error rates of 2.1%/4.3% without a language model and 1.9%/3.9% with an external language model on test/testother. A small model of only 10M parameters still reaches 2.7%/6.3%. Three sizes, small, medium and large, were chosen at 10M, 30M and 118M parameters by sweeping depth, model dimension and attention heads. One of the saved implementations is SpeechBrain's ConformerEncoder. Its convolution module replaces the BatchNorm of the original Conformer with a LayerNorm.
Key idea. Sandwiching multi-headed self-attention and a convolution module between two half-step feed-forward modules, so one block models both local and global dependencies of an audio sequence.
AI-written summary, checked automatically against its sources; not reviewed by a person. Corrections welcome.
@misc{gulati2020conformerconvolutionaugmentedtransformerspeech,
title={Conformer: Convolution-augmented Transformer for Speech Recognition},
author={Anmol Gulati and James Qin and Chung-Cheng Chiu and Niki Parmar and Yu Zhang and Jiahui Yu and Wei Han and Shibo Wang and Zhengdong Zhang and Yonghui Wu and Ruoming Pang},
year={2020},
eprint={2005.08100},
archivePrefix={arXiv},
primaryClass={eess.AS},
url={https://arxiv.org/abs/2005.08100},
}