TL;DR
This paper introduces a novel method to improve text style transfer using Masked Diffusion Language Models (MDMs) by employing "verifier-based inference-time scaling." This approach leverages pre-trained sentence embedding models to guide the generation process, leading to higher quality and more semantically consistent text compared to existing autoregressive models.
What Problem Does This Paper Address?
The field of natural language generation (NLG) is currently dominated by autoregressive Large Language Models (LLMs). While powerful, these models suffer from "sampling drifts," where errors accumulate during sequential token generation, degrading output quality. Diffusion models, particularly Masked Diffusion Language Models (MDMs), offer a non-autoregressive alternative that is more scalable and easier to train for discrete data like text. However, effectively controlling the output of these diffusion models for specific tasks like text style transfer (TST) remains a challenge. TST aims to change the style of text (e.g., formality, sentiment) while preserving its core meaning. Existing diffusion guidance methods often require training separate classifiers or are complex to adapt. This paper addresses the need for a simpler, yet effective, method to enhance MDM performance for TST by leveraging external models during inference.
Methods
The core contribution is a verifier-based inference-time scaling method for MDMs. This approach integrates a Soft-Value Diffusion Decoding (SVDD) strategy with pre-trained sentence embedding models acting as "verifiers." Here's a breakdown:
- MDMs: The paper builds upon Masked Diffusion Language Models, which learn to iteratively "unmask" tokens to generate text. This is a non-autoregressive process.
- Classifier-Free Guidance (CFG): The authors utilize CFG, a standard technique in diffusion models, to improve conditional generation by jointly training for conditional and unconditional outputs. This helps ground the generation in the input text.
- Soft-Value Diffusion Decoding (SVDD): This is a derivative-free guidance technique. Instead of relying on gradients from a classifier, SVDD uses an external model (the verifier) to score candidate generations at each denoising step.
- Verifier-based Scaling: The novel aspect is using off-the-shelf pre-trained sentence embedding models (like MPNet) as verifiers. These models provide embeddings for both the input sentence and the generated candidates. The cosine similarity between these embeddings serves as a reward signal, guiding the generation towards outputs that preserve the original sentence's semantic content.
- Sequence-to-Sequence Fine-tuning: MDMs are fine-tuned for TST tasks by treating the input sentence as a condition and the target sentence as the sequence to be generated, similar to standard seq-to-seq models.
Datasets
The paper uses two standard datasets for text style transfer:
- WikiLarge simplicity style transfer dataset: This dataset contains pairs of sentences and their simplified versions.
- Bible prose style transfer dataset: This dataset includes sentence pairs for conversions between different versions of biblical texts, including basic English.
Key Insights and Ideas
- MDMs are a strong alternative for TST: The results demonstrate that MDMs, especially when enhanced with inference-time scaling, can outperform traditional autoregressive models on TST tasks.
- Leveraging pre-trained embeddings as verifiers is effective and simple: Using readily available sentence embedding models as verifiers for SVDD is a powerful and straightforward way to guide MDM generation without requiring task-specific training of the verifier itself. This bypasses the need for gradient computation, making it more flexible.
- Inference-time scaling is crucial for MDM performance: Simply using an MDM without any inference-time scaling (like CFG or SVDD) leads to suboptimal results, particularly in tasks requiring nuanced control like simplification. Scaling the number of denoising steps and the number of candidates for verification significantly impacts performance.
- Autoregressive models can exhibit undesirable behaviors: The paper highlights that autoregressive models can produce out-of-context or hallucinatory text, which is less common in MDMs due to their non-autoregressive nature.
Key Results
The paper reports significant improvements across various metrics on both datasets:
- WikiLarge Simplicity: MDMs with SVDD and CFG consistently outperform baselines, including autoregressive models like SmolLM2 and Qwen2.5, and even the GENIE diffusion model. For instance, with 64 denoising steps and CFG, MDM achieves a BLEU score of 86.567±0.419, significantly higher than GENIE's 71.842±0.774.
- Bible Prose (PUB-BBE & PUB-ASV): Similar gains are observed. For PUB-ASV, MDM with CFG and SVDD at 64 steps achieves a BLEU score of 50.695±0.034, outperforming autoregressive baselines and GENIE.
- Qualitative Improvements: The generated examples show that MDMs with SVDD produce more coherent and semantically aligned text, avoiding the "sampling drifts" and out-of-context issues seen in autoregressive models.
Limitations and Future Work
- Limitations:
- The paper notes that while SVDD improves performance, it relies on the inherent quality of the MDM itself.
- The effectiveness of SVDD can be influenced by the diversity of the MDM's generation. If the MDM produces very similar outputs, SVDD might not find significantly better candidates.
- While static word embeddings showed comparable results to contextual ones on the Bible dataset, contextual embeddings are generally better at capturing semantics.
- Future Work:
- Task-specific verifiers: The authors suggest training external verifiers tailored to specific downstream tasks to potentially achieve even better outputs, though this would incur additional training costs.
- Broader applications: Expanding the methodology to other conditional language generation tasks beyond text style transfer.
- Combining static and contextual embeddings: Exploring hybrid approaches for sentence embeddings to leverage the strengths of both.
Summary updated