Abstract
Despite their original goal to jointly learn to align and translate, Neural Machine Translation (NMT) models, especially Transformer, are often perceived as not learning interpretable word alignments. In this paper, we show that NMT models do learn interpretable word alignments, which could only be revealed with proper interpretation methods. We propose a series of such methods that are model-agnostic, are able to be applied either offline or online, and do not require parameter update or architectural change. We show that under the force decoding setup, the alignments induced by our interpretation method are of better quality than fast-align for some systems, and when performing free decoding, they agree well with the alignments induced by automatic alignment tools.
Introduction
Modern Neural Machine Translation (NMT) has largely moved away from the explicit word alignment models central to Statistical Machine Translation (SMT). While NMT models utilize an attention mechanism that was originally intended to mimic alignment, empirical evidence suggests that attention weights often fail to provide interpretable or accurate word-level correspondences. Attention is frequently "smeared" across multiple tokens or focused on functional elements like punctuation rather than semantic equivalents. This lack of interpretability hinders model debugging and limits the utility of NMT in interactive settings like computer-aided translation.
Methodology: From Attention to Saliency
The core contribution of this work is the shift from using attention weights to using gradient-based saliency for interpreting alignments.
Word Saliency
The authors define word saliency as the gradient of the model’s output probability for a target word with respect to the input word embeddings. This "post-decision" metric asks: how much would a small change in a specific source word's representation affect the probability of the word the model just predicted? Unlike attention, which is calculated before a word is chosen, saliency reflects the model's reasoning given its choice.
SmoothGrad
To address the inherent noise in local gradients, the authors employ SmoothGrad. This technique involves adding Gaussian noise to the input embeddings multiple times, calculating the saliency for each noisy version, and averaging the results. This provides a more robust and global view of the input features that drive the model's output.
Experimental Evaluation
The proposed methods were evaluated on three language pairs: German-English (de-en), English-French (en-fr), and Romanian-English (ro-en). The performance was measured using the Alignment Error Rate (AER) against manually aligned gold standards. The interpretation methods are model-agnostic and were tested on various architectures, including LSTMs, Convolutional NMT (FConv), and Transformers.
Key Results and Insights
The experiments yielded several significant findings:
- Superiority over Attention: Saliency-based methods consistently outperformed raw attention. For instance, in a Convolutional NMT model on the de-en task, AER dropped from 37.5 to 22.3 when using saliency with SmoothGrad.
- Transformer Alignment: Transformers, which are notoriously difficult to interpret via attention, saw an AER reduction of over 13 points using the proposed methods.
- Competitive with Specialized Tools: In the Romanian-English task, the saliency-driven alignments outperformed fast-align, a dedicated external alignment tool, by 8.7 AER points.
- The Role of Polarity: By preserving the sign of the gradient, the authors found that negative saliency can identify source words that actively discourage a specific target word prediction, helping to filter out false positive alignments.
Conclusion
This research demonstrates that NMT models implicitly learn high-quality word alignments during training. The perceived lack of interpretability in models like the Transformer is not a failure of the model to learn, but rather a failure of standard attention mechanisms to reveal that knowledge. By using saliency and SmoothGrad, researchers and practitioners can extract clean, interpretable alignments post-hoc without modifying the underlying model architecture.
Summary updated