Abstract
Traditional Natural Language Processing (NLP) architectures are often bifurcated into encoders, optimized for understanding, and decoders, optimized for generation. While multilingual encoders like XLM-R demonstrate profound cross-lingual understanding, their application in text generation has been limited by the inherent difficulties of non-autoregressive (NAR) modeling. This paper introduces Semantic-Guided Alignment-then-Denoising (SGA), a novel framework that transforms pre-trained multilingual encoders into efficient generators. By utilizing prompt tuning and a multi-stage refinement process, SGA achieves significant performance gains across machine translation, question generation, and story generation tasks while maintaining the high inference speeds of NAR models.
Introduction
In the current NLP landscape, models typically serve one of two primary functions: understanding or generation. Multilingual encoders (e.g., BERT, XLM-R) excel at discriminative tasks across dozens of languages but struggle with generative tasks. When these encoders are used for generation, they typically operate non-autoregressively, attempting to produce an entire sequence simultaneously. While this approach is computationally efficient, it often yields ungrammatical or incoherent text due to the lack of sequential dependency modeling.
Historically, leveraging an encoder for generation required integrating it into a larger, slower autoregressive (AR) framework. This research explores an alternative: unlocking the latent generative potential already present within multilingual encoders without sacrificing their speed or increasing their parameter footprint significantly.
Methodology: Semantic-Guided Alignment-then-Denoising (SGA)
The proposed SGA method keeps the underlying pre-trained encoder (XLM-R) fixed, introducing only a small set of trainable "prefix" parameters through prompt tuning (adding approximately 8M to 21M parameters to a 550M parameter model). The generation process is divided into three distinct stages:
- Semantic Encoding: The source text is projected into a shared semantic hidden space. This stage ensures that the core meaning of the input is captured in a language-agnostic representation, facilitating cross-lingual transfer.
- Semantic-Guided Alignment: The model receives a sequence of mask tokens ("white noise") and utilizes the semantic hidden states to generate an initial draft of the target sentence. This stage addresses the "alignment gap"—the challenge of mapping source concepts to target language structures in a single pass.
- Semantic-Guided Denoising: Recognizing that the initial NAR draft may contain errors, the model enters an iterative refinement phase. Drawing on the encoder's pre-existing proficiency in Masked Language Modeling (MLM), the model treats the draft as a noisy input and iteratively "denoises" it. This process continues until the output stabilizes or a predefined iteration limit is reached.
Experimental Design
The SGA framework was evaluated across three diverse multilingual generation tasks to test its versatility and robustness:
- Machine Translation (MT): Evaluated using the TED dataset, encompassing 10 high-resource languages for training and 5 low-resource languages (e.g., Kazakh, Basque) for zero-shot evaluation.
- Question Generation (QG): Evaluated via the XGLUE benchmark, requiring the model to generate relevant questions from provided text passages.
- Story Generation: Evaluated using the Multilingual Text Generation (MTG) dataset to assess performance in less constrained, creative generation contexts.
Key Insights and Results
Performance Gains
SGA demonstrated substantial improvements over standard initialization and baseline NAR methods. On the XLM-R$_{large}$ architecture, the method achieved a 9.4 BLEU point increase in machine translation. Similar successes were observed in question generation (+8.1 Rouge-L) and story generation (+5.5 METEOR).
Efficiency and Speed
One of the primary advantages of the SGA approach is its inference efficiency. By maintaining a non-autoregressive structure, SGA achieved a 2.4x speedup compared to traditional autoregressive multilingual Transformers (mTransformer), while simultaneously providing superior output quality.
The Power of Denoising
The iterative denoising step proved critical to the model's success. This stage alone contributed an average gain of 2.8 BLEU points, confirming that the latent knowledge within pre-trained encoders is highly effective at refining rough drafts into high-quality linguistic outputs.
Zero-Shot Capabilities
Notably, the adapted encoders exhibited strong zero-shot performance. The models were able to generate text in languages that were not specifically included in the generative adaptation phase, suggesting that the semantic-guided approach successfully leverages the encoder's internal cross-lingual mappings.
Discussion and Limitations
While SGA represents a significant step forward in making encoders viable generators, it does not yet fully replace dedicated autoregressive models in all contexts. In supervised, high-resource settings, dedicated generators like mBART still maintain a performance lead. This gap indicates that while the "understanding" weights of an encoder contain generative potential, they are not yet a perfect substitute for models pre-trained specifically for sequence-to-sequence tasks.
Conclusion
The SGA framework demonstrates that multilingual encoders are more than just understanding engines; they are efficient, latent generators. By separating the generation process into alignment and denoising stages and utilizing parameter-efficient prompt tuning, researchers can repurpose these models for high-speed, high-quality text generation. Future research will focus on developing new pre-training objectives to further bridge the gap between NAR-adapted encoders and native AR models, as well as scaling these techniques to larger foundation models.
Summary updated