MirrorAlign: A Super Lightweight Unsupervised Word Alignment Model via Cross-Lingual Contrastive Learning

Di Wu, Liang Ding, Shuo Yang, Mingyang Li

Abstract

Word alignment is a critical task in machine translation and cross-lingual NLP. Traditional statistical models are efficient but limited, while modern neural models are often heavy and tied to complex translation decoders. MirrorAlign introduces a lightweight, unsupervised approach using cross-lingual contrastive learning and a symmetry-enforcing agreement loss. It achieves state-of-the-art performance with a fraction of the parameters and significantly faster training times.

Introduction

Word alignment—the process of identifying corresponding words between a source sentence and its translation—is fundamental for tasks like machine translation, semantic transfer, and bilingual lexicon induction. Historically, statistical models like GIZA++ and FastAlign dominated the field. While neural models have recently improved accuracy, they typically rely on large Neural Machine Translation (NMT) architectures. These "piggybacked" aligners are computationally expensive and often noisy because they are optimized for generation rather than alignment.

MirrorAlign addresses these issues by proposing a purpose-built, unsupervised neural aligner that is both fast and lightweight. By ditching the generative decoder and focusing on contrastive matching, MirrorAlign reduces parameter counts by 50x compared to Transformer-based alternatives.

Methodology

MirrorAlign's architecture is built on three core pillars:

  1. Cross-Lingual Contrastive Learning: Instead of sequence generation, the model employs Noise Contrastive Estimation (NCE). It learns to maximize the similarity between a source word and its true target counterpart (positive pairs) while minimizing similarity with randomly sampled noise words (negative pairs).
  2. Bidirectional Symmetric Attention: The model computes attention weights in both directions: source-to-target ($A_{s \to t}$) and target-to-source ($A_{t \to s}$).
  3. Agreement Mechanism (Mirror Loss): To enforce the "mirror-like symmetry hypothesis"—the principle that alignment should be consistent regardless of direction—the authors introduce an agreement loss. This loss penalizes discrepancies between the two directional attention maps.
MirrorAlign architecture showing bidirectional contrastive learning and context vector generation.

The model represents sentences using simple mean-pooling over local windows, capturing sufficient context for alignment without the overhead of deep recurrent or self-attention layers.

Experimental Setup

The model was evaluated on three standard benchmarks:

  • English-French (EN-FR): NAACL 2003 shared task.
  • Romanian-English (RO-EN): NAACL 2003 task with Europarl v8 data.
  • German-English (DE-EN): Europarl v7 corpus.

Performance was measured using the Alignment Error Rate (AER).

Results and Discussion

MirrorAlign demonstrates that a specialized, lightweight model can outperform general-purpose NMT-based aligners.

Quantitative Performance

MirrorAlign achieved an AER of 9.2 on the EN-FR dataset, surpassing FastAlign (10.5). Crucially, it is 16.4x faster than GIZA++ and uses only 4 million parameters—a 50x reduction compared to typical Transformer aligners.

The Impact of Symmetry

The agreement loss is vital for performance. As shown in the qualitative comparisons, enforcing symmetry helps the model produce cleaner, more diagonally concentrated attention maps that align closely with human-annotated ground truth.

Comparison of alignment matrices across different loss configurations and baselines. MirrorAlign (c) shows significantly better alignment to Ground Truth (e) than FastAlign (d) or asymmetric losses (a).

Bilingual Embeddings

A notable side effect of the contrastive training is the emergence of high-quality bilingual word embeddings. MirrorAlign effectively clusters semantically related words across languages without explicit supervision, bridging the gap between alignment and cross-lingual representation learning.

Conclusion

MirrorAlign proves that word alignment does not require the complexity of full translation models. By leveraging contrastive learning and symmetry constraints, it provides a highly efficient, accurate, and unsupervised solution for cross-lingual tasks. Future work may involve incorporating syntactic structures or extending the model to more diverse language families.

Summary updated

BibTeX
@inproceedings{wu2022mirroralign,
  author = {Di Wu and Liang Ding and Shuo Yang and Mingyang Li},
  title = {{MirrorAlign: A Super Lightweight Unsupervised Word Alignment Model via Cross-Lingual Contrastive Learning}},
  booktitle = {IWSLT @ ACL},
  year = {2022},
  doi = {10.18653/v1/2022.iwslt-1.8},
}
Figure