Mask-Align: Self-Supervised Neural Word Alignment

Chi Chen, Maosong Sun, Yang Liu

Abstract

Word alignment is a fundamental task in machine translation, yet modern neural approaches often struggle with a "context gap" inherent in autoregressive modeling. We present MASK-ALIGN, a self-supervised word alignment model that leverages bidirectional context through a masked language modeling strategy. By treating alignment as a "fill-in-the-blank" task and introducing architectural innovations like Static-KV and Leaky Attention, MASK-ALIGN achieves state-of-the-art performance across multiple language pairs without requiring expensive pre-computed labels or guided alignment.

Introduction

Identifying correspondences between words in parallel sentences—word alignment—remains a cornerstone of machine translation (MT). While modern Neural Machine Translation (NMT) models have largely moved toward end-to-end architectures, explicit word alignment is still vital for model interpretability, imposing lexical constraints, and developing computer-aided translation tools.

Traditional statistical tools like GIZA++ have long been the industry standard. Recent neural aligners, however, often suffer from a "context gap." Because most are based on autoregressive NMT models that predict words sequentially, they lack access to "future" context when aligning a word in the middle of a sentence. This limitation leads to noisy alignments. Furthermore, many neural models only surpass statistical baselines when supervised by the very tools they aim to replace.

The MASK-ALIGN Approach

MASK-ALIGN addresses these challenges by reframing alignment as a masked modeling task rather than a translation task.

Masked Modeling for Alignment

The core intuition behind MASK-ALIGN is that the source word most responsible for recovering a masked target word is likely its translation. The model masks each target token in parallel and attempts to reconstruct it using the entire source sentence and all other target tokens. This approach provides the model with full bidirectional context.

Conceptual overview of masked modeling for word alignment.

Architectural Innovations

To implement this effectively, the authors introduced several key architectural features:

  1. Static-KV Attention: In standard Transformers, information about a masked token can "leak" through layers. MASK-ALIGN keeps the Keys (K) and Values (V) static across all decoder layers, ensuring the model relies solely on context rather than the identity of the masked word.
  2. Leaky Attention: Neural models often exhibit a "garbage collector" effect, where irrelevant tokens (like punctuation) attract high attention. MASK-ALIGN introduces a learnable "leak" position—similar to a NULL token—to absorb this noise.
  3. Agreement Training: The system trains two models (Source → Target and Target → Source) simultaneously, using an agreement loss to ensure symmetric attention matrices.
The MASK-ALIGN architecture featuring Static-KV and Leaky Attention.

Experimental Results

The model was evaluated on four standard language pairs: German-English (De-En), English-French (En-Fr), Romanian-English (Ro-En), and Chinese-English (Zh-En).

MASK-ALIGN established new state-of-the-art results for unsupervised alignment:

  • Classical Baselines: It outperformed GIZA++ by 1.7 to 6.5 Alignment Error Rate (AER) points.
  • Neural Baselines: On De-En, it achieved an AER of 14.4, significantly better than the previous best neural model, SHIFT-ATT (17.9).
  • Self-Sufficiency: Unlike many competitors, MASK-ALIGN does not require "guided alignment" from statistical tools to reach peak performance.

Conclusion

MASK-ALIGN demonstrates that bidirectional context is essential for high-quality word alignment. By moving away from autoregressive translation toward a self-supervised masked modeling framework, the model achieves superior accuracy and efficiency. Future work may involve unifying the directional models into a single architecture to further streamline the alignment process.

Summary updated

BibTeX
@inproceedings{chen2021mask,
  author = {Chi Chen and Maosong Sun and Yang Liu},
  title = {{Mask-Align: Self-Supervised Neural Word Alignment}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.369},
}
Figure