How Effective Are State Space Models for Machine Translation?

Hugo Pitorro, Pavlo Vasylenko, Marcos Treviso, André Martins


Abstract
Transformers are the current architecture of choice for NLP, but their attention layers do not scale well to long contexts. Recent works propose to replace attention with linear recurrent layers - this is the case for state space models, which enjoy efficient training and inference. However, it remains unclear whether these models are competitive with transformers in machine translation (MT). In this paper, we provide a rigorous and comprehensive experimental comparison between transformers and linear recurrent models for MT. Concretely, we experiment with RetNet, Mamba, and hybrid versions of Mamba which incorporate attention mechanisms. Our findings demonstrate that Mamba is highly competitive with transformers on sentence and paragraph-level datasets, where in the latter both models benefit from shifting the training distribution towards longer sequences. Further analysis show that integrating attention into Mamba improves translation quality, robustness to sequence length extrapolation, and the ability to recall named entities.
Anthology ID:
2024.wmt-1.111
Volume:
Proceedings of the Ninth Conference on Machine Translation
Month:
November
Year:
2024
Address:
Miami, Florida, USA
Editors:
Barry Haddow, Tom Kocmi, Philipp Koehn, Christof Monz
Venue:
WMT
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1107–1124
Language:
URL:
https://aclanthology.org/2024.wmt-1.111
DOI:
Bibkey:
Cite (ACL):
Hugo Pitorro, Pavlo Vasylenko, Marcos Treviso, and André Martins. 2024. How Effective Are State Space Models for Machine Translation?. In Proceedings of the Ninth Conference on Machine Translation, pages 1107–1124, Miami, Florida, USA. Association for Computational Linguistics.
Cite (Informal):
How Effective Are State Space Models for Machine Translation? (Pitorro et al., WMT 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.wmt-1.111.pdf