Accelerating Neural Transformer via an Average Attention Network
Biao Zhang, Deyi Xiong, Jinsong Su

TL;DR
This paper introduces an average attention network to replace self-attention in Transformer decoders, significantly speeding up decoding without sacrificing translation quality, demonstrated on multiple language pairs.
Contribution
Proposes an average attention network as a faster alternative to self-attention in Transformer decoders, enabling over four times faster decoding with minimal performance loss.
Findings
Decoding speed increased over four times.
Maintained translation quality comparable to original Transformer.
Effective across six language pairs in WMT17 tasks.
Abstract
With parallelizable attention networks, the neural Transformer is very fast to train. However, due to the auto-regressive architecture and self-attention in the decoder, the decoding procedure becomes slow. To alleviate this issue, we propose an average attention network as an alternative to the self-attention network in the decoder of the neural Transformer. The average attention network consists of two layers, with an average layer that models dependencies on previous positions and a gating layer that is stacked over the average layer to enhance the expressiveness of the proposed attention network. We apply this network on the decoder part of the neural Transformer to replace the original target-side self-attention model. With masking tricks and dynamic programming, our model enables the neural Transformer to decode sentences over four times faster than its original version with…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Multimodal Machine Learning Applications
MethodsLinear Layer · Absolute Position Encodings · Position-Wise Feed-Forward Layer · Residual Connection · Byte Pair Encoding · Dense Connections · Label Smoothing · *Communicated@Fast*How Do I Communicate to Expedia? · Adam · Softmax
