Isotropy-Enhanced Conditional Masked Language Models

Pei Guo, Yisheng Xiao, Juntao Li, Yixin Ji, Min Zhang

Introduction: The Anisotropy Bottleneck in NAR Models

Non-autoregressive (NAR) models generate translations in parallel, offering a significant speed advantage over traditional autoregressive (AR) models. However, this speed often comes at the cost of translation quality, frequently characterized by word repetitions and a lack of lexical nuance.

The authors identify anisotropy as a primary cause of this quality gap. In vanilla NAR models, the vector embeddings of different tokens tend to cluster within a narrow cone in the mathematical space. This high similarity makes it difficult for the model to distinguish between distinct words during parallel generation. Crucially, research shows that simply increasing the number of decoding iterations does not resolve this underlying representation problem.

Cosine similarity heatmaps showing that anisotropy (high similarity between different tokens) persists across iterations in standard CMLM models for both EN→RO and EN→DE.

Methodology: Enhancing Isotropy

To "de-cluster" these representations, the paper proposes a two-pronged approach to force the model to learn more distinct, context-aware token representations:

  1. Look Neighbors (LN): Standard NAR models often fail to capture local dependencies because they predict words in parallel. The LN strategy introduces a "neighbor-aware" self-attention mechanism. By concatenating a target word's representation with its immediate neighbors during training, the model is forced to learn dependencies between adjacent tokens, making the representations more informative.
  2. Contrastive Learning (CL): Building on the LN foundation, a contrastive loss function is applied to mathematically "push" the representations of different tokens away from each other. This ensures the model's internal map of the language is spread out and discriminative (isotropic).

Key Results and Insights

The proposed "Isotropy-Enhanced" CMLM was evaluated on standard machine translation benchmarks, including WMT14 (EN↔DE) and WMT16 (EN↔RO), using both raw and distilled data.

  • State-of-the-Art Performance: The model achieved a BLEU score of 26.68 on WMT14 EN→DE, setting a new record for iterative NAR models and outperforming the vanilla CMLM baseline by approximately 1.0 BLEU point across datasets.
  • Efficiency: The model maintains a significant speed advantage, operating at 1.7x to 2.2x the speed of a standard Autoregressive Transformer while achieving comparable quality.
  • Repetition Reduction: There is a direct correlation between anisotropy and word repetition. By making token representations more distinct, the authors observed a significant drop in the repetition ratio in generated translations.
  • The Necessity of Scaffolding: Contrastive learning alone often fails in NAR models because the model struggles to learn any coherent representation initially. The "Look Neighbors" strategy acts as a necessary scaffold, providing the structural dependency needed for contrastive learning to be effective.

Conclusion

This research reinforces the idea that the geometry of the representation space is a primary driver of generation quality in parallel models. By explicitly addressing anisotropy through neighbor-aware attention and contrastive learning, NAR models can achieve high-quality translations that rival autoregressive models while retaining their inherent efficiency. Future work may extend these techniques to fully non-autoregressive (one-pass) models where the repetition problem is even more severe.

Summary updated

BibTeX
@inproceedings{guo2023isotropy,
  author = {Pei Guo and Yisheng Xiao and Juntao Li and Yixin Ji and Min Zhang},
  title = {{Isotropy-Enhanced Conditional Masked Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.555},
}
Figure