Elamur Research

Learning Deep Transformer Models for Machine Translation

Paper · 2019 · Qiang Wang, Bei Li, Tong Xiao et al.

Summary

For Transformer-based neural machine translation, the usual way to gain quality has been to make the model wider (Transformer-Big). Simply adding encoder layers tended to make training unstable or fail outright. The authors show that depth can beat width if two problems are handled.

First, they place layer normalization at the input of each sub-layer (pre-norm) rather than after the residual sum (post-norm). A gradient analysis explains why this helps: pre-norm keeps a direct identity route for the error signal that does not lengthen as layers are added. With post-norm, gradients must pass through every normalization step.

Second, they introduce DLCL (dynamic linear combination of layers), inspired by linear multi-step ODE solvers. Each layer receives a learned weighted mix of all earlier layer outputs, not only the previous one.

On WMT'16 English-German, NIST OpenMT'12 Chinese-English and WMT'18 Chinese-English, a 30/25-layer encoder gains 1.3–2.4 BLEU over 6-layer Transformer-Base and 0.4–0.6 BLEU over Transformer-Big. It is also 1.6X smaller and 3X faster to train. This makes "thin but deep" a cheaper, practical alternative to wide models.

Key points

  • With a 6-layer encoder, pre-norm and post-norm give comparable BLEU. Pre-norm trained successfully with a 20-layer encoder on WMT English-German, whereas post-norm failed at greater depth.
  • DLCL learns one scalar weight for every pair of receiving layer and earlier layer. It generalizes several earlier schemes:
    • plain residual connections,
    • dense residual connections,
    • multi-layer representation fusion,
    • transparent attention (Bapna et al., 2018, who reached a 16-layer encoder).
  • The 30-layer encoder is described as the deepest reported in NMT at the time. Compared with Transformer-Big, it is 1.6X smaller, 3X faster in training and 10% faster at inference. Code: github.com/wangqiangneu/dlcl.
  • Ablation shows that learnable weights matter:
    • Fixing the weights to constants (All-One or Average) hurts, and All-One hurts most.
    • Dropping the added layer normalization from the Average variant costs 0.28 BLEU.
  • Visualizing the learned weights reveals a consistent pattern:
    • Early layers draw densely on many predecessors, while deeper layers use sparser connections.
    • Large weights cluster on recent layers.
    • A given layer's contribution varies across the layers that consume it.

Interesting ideas

  • I1. Putting normalization before each sub-layer (plus one final normalization on top) keeps an identity path for gradients, so stacks can grow deep without training collapse.
  • I2. Letting every layer read a learned weighted blend of all lower layers keeps early, low-level features reachable high in the stack.
  • I3. The ablation swaps learned weights for fixed uniform or all-one weights to check that learning the weights, not just adding links, brings the gain.
  • I4. Masking tiny values in the learned layer-weight matrix and plotting it turns an opaque mechanism into a readable map of which layers feed which.
  • I5. Spending capacity on a deep encoder while keeping the decoder shallow buys quality at lower training and inference cost, since encoders matter more and cost less.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (tree): If gparse needs more transformer layers for long or tricky sentences, a pre-norm layout should let it deepen without the instability that post-norm stacks show.
  • I2 (tree): gparse's upper layers could keep direct access to near-lexical and morphological signals when choosing arcs and labels, instead of having that information washed out by depth.
  • I3 (learn): Mova's evaluation with negative controls could routinely pit each learned component against a constant-weight twin, proving that the learned part actually earns its keep.
  • I4 (tree): Dumping such thresholded matrices for gparse would support the explainability goal by showing which representation levels each parsing layer relies on.
  • I5 (back): For translation through the meta-world, a rich analysis side paired with a light generation side could be the cheaper design when budgeting the text → graph → text path.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works

 Topics 1Research subjects and languages the work is about.Machine translation · 1,109 works

Appears in

Mentioned in articles aboutShenyang

Cite

Cite as Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong and Lidia S. Chao. 2019. Learning Deep Transformer Models for Machine Translation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/p19-1176

@inproceedings{wang2019learning,
  title = {{Learning Deep Transformer Models for Machine Translation}},
  author = {Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong and Lidia S. Chao},
  booktitle = {Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1176},
  url = {https://doi.org/10.18653/v1/p19-1176}
}

References

30 references, 14 of them with a card of ours. Each entry links to our card when we hold the work, else to OpenAlex and Google Scholar searches for it.

  1. Rami Al-Rfou, Dokook Choe, Noah Constant, Mandy Guo, and Llion Jones. 2018. Character-level language modeling with deeper self-attention. arXiv preprint arXiv:1808.04444.
  2. Uri M Ascher and Linda R Petzold. 1998. Computer methods for ordinary differential equations and differential-algebraic equations, volume 61. Siam. OpenAlex ↗ · Scholar ↗
  3. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In In Proceedings of the 3rd International Conference on Learning Representations.
  4. Ankur Bapna, Mia Chen, Orhan Firat, Yuan Cao, and Yonghui Wu. 2018. Training deeper neural machine translation models with transparent attention. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3028–3033. OpenAlex ↗ · Scholar ↗
  5. Denny Britz, Anna Goldie, Thang Luong, and Quoc Le. 2017. Massive exploration of neural machine translation architectures. arXiv preprint arXiv:1703.03906.
  6. J C Butcher. 2003. Numerical Methods for Ordinary Differential Equations. John Wiley & Sons, New York, NY. OpenAlex ↗ · Scholar ↗
  7. Bo Chang, Lili Meng, Eldad Haber, Frederick Tung, and David Begert. 2018. Multi-level residual networks from dynamical systems view. In International Conference on Learning Representations. OpenAlex ↗ · Scholar ↗
  8. Mia Xu Chen, Orhan Firat, Ankur Bapna, Melvin Johnson, Wolfgang Macherey, George Foster, Llion Jones, Niki Parmar, Mike Schuster, Zhifeng Chen, et al. 2018a. The best of both worlds: Combining recent advances in neural machine translation. arXiv preprint arXiv:1804.09849.
  9. Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. 2018b. Neural ordinary differential equations. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 6572–6583. Curran Associate… OpenAlex ↗ · Scholar ↗
  10. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
  11. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016a. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770– 778.
  12. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016b. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer. OpenAlex ↗ · Scholar ↗
  13. Tianyu He, Xu Tan, Yingce Xia, Di He, Tao Qin, Zhibo Chen, and Tie-Yan Liu. 2018. Layer-wise coordination between encoder and decoder for neural machine translation. In Advances in Neural Information Processing Systems, pages 7955–7965. OpenAlex ↗ · Scholar ↗
  14. Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
  15. Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander Rush. 2017. Opennmt: Open-source toolkit for neural machine translation. Proceedings of ACL 2017, System Demonstrations, pages 67–72.
  16. Lajos Lóczi. 2018. Exact optimal values of step-size coefficients for boundedness of linear multistep methods. Numerical Algorithms, 77(4):1093–1116. OpenAlex ↗ · Scholar ↗
  17. Yiping Lu, Aoxiao Zhong, Quanzheng Li, and Bin Dong. 2018. Beyond finite layer neural networks: Bridging deep architectures and numerical differential equations. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 3282… OpenAlex ↗ · Scholar ↗
  18. Zhengdong Lu and Hang Li. 2013. A deep architecture for matching short texts. In Advances in Neural Information Processing Systems, pages 1367–1375. OpenAlex ↗ · Scholar ↗
  19. Thang Luong, Hieu Pham, and D. Christopher Manning. 2015. Effective approaches to attention-based neural machine translation. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1412–1421. Association for Computational Linguistics.
  20. Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. 2018. Scaling neural machine translation. In WMT, pages 1–9. Association for Computational Linguistics.
  21. Tobias Domhan. 2018. How much attention do you need? a granular analysis of neural machine translation architectures. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pages 1799–1808. OpenAlex ↗ · Scholar ↗
  22. Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013. On the difficulty of training recurrent neural networks. In International Conference on Machine Learning, pages 1310–1318. OpenAlex ↗ · Scholar ↗
  23. Zi-Yi Dou, Zhaopeng Tu, Xing Wang, Shuming Shi, and Tong Zhang. 2018. Exploiting deep representations for neural machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4253–4262. OpenAlex ↗ · Scholar ↗
  24. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technolog…
  25. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016a. Improving neural machine translation models with monolingual data. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pages 86–96. OpenAlex ↗ · Scholar ↗
  26. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016b. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers.
  27. Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. 2018. Self-attention with relative position representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), volume 2, pages 46…
  28. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. 2016. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144. OpenAlex ↗ · Scholar ↗
  29. Tong Xiao, Jingbo Zhu, Hao Zhang, and Qiang Li. 2012. Niutrans: an open source toolkit for phrase-based and syntax-based machine translation. In Proceedings of the ACL 2012 System Demonstrations, pages 19–24. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  30. Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. 2016. Deep recurrent models with fast-forward connections for neural machine translation. Transactions of the Association of Computational Linguistics, 4(1):371–383.

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/wang-2019-learning-deep-transformer-models-machine/