How Effective are State Space Models for Machine Translation?

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Pitorro, Hugo, Vasylenko, Pavlo, Treviso, Marcos, Martins, André F. T.
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917714803556352
author Pitorro, Hugo
Vasylenko, Pavlo
Treviso, Marcos
Martins, André F. T.
author_facet Pitorro, Hugo
Vasylenko, Pavlo
Treviso, Marcos
Martins, André F. T.
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2407_05489
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle How Effective are State Space Models for Machine Translation?
Pitorro, Hugo
Vasylenko, Pavlo
Treviso, Marcos
Martins, André F. T.
Computation and Language
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.
title How Effective are State Space Models for Machine Translation?
topic Computation and Language
url https://arxiv.org/abs/2407.05489