Cross-Attention is All You Need: Adapting Pretrained Transformers for Machine Translation

Mozhdeh Gheini, Xiang Ren, Jonathan May
4/18/2021
cs.CL
transformer-attention

Official code: MGheini/xattn-transfer-for-mt (33 stars, Python, MIT, last commit 2021-09-15).

Abstract

We study the power of cross-attention in the Transformer architecture within the context of transfer learning for machine translation, and extend the findings of studies into cross-attention when training from scratch. We conduct a series of experiments through fine-tuning a translation model on data where either the source or target language has changed.

Show full abstract

These experiments reveal that fine-tuning only the cross-attention parameters is nearly as effective as fine-tuning all parameters (i.e., the entire translation model). We provide insights into why this is the case and observe that limiting fine-tuning in this manner yields cross-lingually aligned embeddings. The implications of this finding for researchers and practitioners include a mitigation of catastrophic forgetting, the potential for zero-shot translation, and the ability to extend machine translation models to several new language pairs with reduced parameter storage overhead.

View on arXivView PDF

Code Implementations(1)

MIT

Code and data to accompany the camera-ready version of "Cross-Attention is All You Need: Adapting Pretrained Transformers for Machine Translation" in EMNLP 2021

332Python, ShellSep 7, 20215 years agoMIT

Similar Papers

Cite this paper

@article{gheini2021crossattention,
  title  = {Cross-Attention is All You Need: Adapting Pretrained Transformers for Machine Translation},
  author = {Mozhdeh Gheini and Xiang Ren and Jonathan May},
  year   = {2021},
  eprint = {2104.08771},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.08771}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2104.08771.svg)](https://codeofpaper.com/paper/2104.08771)

Discussion