Diffusion Glancing Transformer for Parallel Sequence-to-Sequence Learning

Lihua Qian, Mingxuan Wang, Yang Liu, Hao Zhou

Introduction: The Multi-Modality Challenge

In sequence-to-sequence learning, particularly machine translation, the dominant paradigm has long been autoregressive (AR) generation. AR models predict tokens sequentially, which ensures high quality but results in significant latency. Non-autoregressive (NAR) models aim to generate all tokens in parallel to achieve massive speedups. However, they historically struggle with the multi-modality problem: because tokens are predicted simultaneously without inter-token dependencies, the model may mix elements from different valid translations, leading to incoherent "word salad."

To overcome this, most NAR models rely on knowledge distillation from AR teachers. DIFFGLAT (Diffusion Glancing Transformer) breaks this ceiling by treating multi-modality as a denoising diffusion process, allowing it to outperform AR models directly on raw data while maintaining a significant speed advantage.

The DIFFGLAT Framework

DIFFGLAT is built upon the DA-Transformer (Directed Acyclic Transformer) backbone, which provides a flexible structure for handling variable-length sequences and aligning predictions with targets. The architecture integrates a novel diffusion mechanism and an adaptive sampling strategy to refine predictions iteratively.

The overall architecture of DIFFGLAT, featuring the DA-Transformer backbone and integrated Residual Glancing Sampling.

Core Innovations: MDP and RGS

The model introduces two primary technical contributions within a Denoising Diffusion Implicit Model (DDIM) framework:

1. Modality Diffusion Process (MDP)

Unlike standard image diffusion that adds Gaussian noise, MDP "diffuses" the target distribution itself. It constructs a sequence of intermediate targets that transition from the model's initial, potentially noisy predictions toward the clean ground-truth data. This process effectively smooths the learning landscape, enabling the model to capture simple patterns before resolving complex multi-modal distributions.

The Modality Diffusion Process (MDP) gradually transitions from the model's predictions to the clean ground-truth data.

2. Residual Glancing Sampling (RGS)

Building on the Glancing Transformer (GLAT) method, RGS introduces an adaptive mechanism for training. During the diffusion steps, the model identifies specific tokens it is struggling to predict correctly. It then "glances" at these ground-truth tokens to provide a residual signal for the next layer. This ensures the model focuses its learning capacity on the remaining unresolved modalities across its depth.

Key Results and Performance

DIFFGLAT was evaluated across multiple benchmarks, including WMT machine translation, MS-COCO image captioning, and the QQP paraphrasing dataset.

  • Translation Quality: On the WMT14 English-German benchmark, DIFFGLAT (using 3 iterations) achieved a BLEU score of 27.91, surpassing the strong AR Transformer baseline of 27.18.
  • Efficiency: The model demonstrates exceptional speedups compared to AR models:
  • 13.0x faster in a single-pass decoding setting.
  • 7.2x faster when using three iterations for maximum quality.
  • Synthetic Benchmarks: In controlled tests with four distinct modalities where vanilla NAR models failed completely (0% accuracy), the DIFFGLAT approach achieved over 90% accuracy, proving its ability to navigate complex multi-modal spaces.

Discussion and Future Directions

While DIFFGLAT successfully closes the gap with AR models on standard benchmarks, some limitations remain. The model currently lags slightly behind in COMET scores, likely due to a distribution mismatch between NAR outputs and the data used to train neural metrics. Additionally, the training pipeline is more complex than standard maximum likelihood estimation.

Future research will explore scaling DIFFGLAT to the multi-billion parameter level seen in modern Large Language Models (LLMs) to determine if the benefits of parallel, bi-directional context generation hold at massive scales.

Summary updated

BibTeX
@inproceedings{qian2024diffusion,
  author = {Lihua Qian and Mingxuan Wang and Yang Liu and Hao Zhou},
  title = {{Diffusion Glancing Transformer for Parallel Sequence-to-Sequence Learning}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.271},
}
Figure