Introduction
Diffusion models have revolutionized continuous domains like image generation, yet their direct application to discrete data—such as text—has consistently underperformed pure discrete formulations. Currently, the field is split between continuous diffusion (adding Gaussian noise to embeddings) and discrete diffusion (masking or swapping tokens).
Paradoxically, continuous diffusion theoretically offers a distinct advantage: it learns a continuous score function (gradient) that allows the model to update all positions in a sequence simultaneously. In practice, however, it lags behind discrete methods like masked diffusion. To understand and bridge this gap, researchers introduce CANDI (Continuous ANd DIscrete diffusion), a hybrid framework that diagnoses and resolves the fundamental mismatch in how Gaussian noise corrupts discrete data.
The Root Cause: Temporal Dissonance
The core insight of the paper lies in a novel analytical framework called Token Identifiability, which breaks down data corruption into two distinct mechanisms:
- Discrete Identity Corruption ($\rho$): The probability of recovering the correct token by taking the
argmaxof the noisy vector. - Continuous Rank Degradation ($r$): The extent to which "wrong" tokens move closer to the noisy latent representation than the "right" token.
The authors discovered that these two mechanisms scale differently. As the vocabulary size ($|V|$) grows, discrete identity is destroyed exponentially faster, while continuous rank degradation remains relatively stable.
This discrepancy creates Temporal Dissonance. At low noise levels, tokens remain identifiable, but the continuous signal hasn't degraded enough to provide a useful learning gradient. Conversely, at high noise levels, the gradient is informative, but the tokens are so heavily corrupted that the model lacks "clean" context to condition its predictions on.
The CANDI Framework
To resolve temporal dissonance, CANDI introduces a hybrid noising kernel that decouples discrete and continuous corruption, enabling the model to learn both simultaneously:
- Structured Noising: A masking process determines which tokens remain "clean" (acting as anchors) and which are corrupted.
- Gaussian Injection: For the corrupted positions, Gaussian noise is applied directly to their one-hot representations.
- Decoupled Schedules: By independently controlling the masking rate and the noise level, CANDI ensures the model always has clean anchor tokens for discrete conditional dependencies while learning continuous gradients from the noisy positions.
- Efficient Sampling: To bypass the massive computational overhead of multiplying large vocabulary matrices during inference, CANDI employs a Monte Carlo approximation. This allows the model to operate efficiently in embedding space while retaining the theoretical benefits of one-hot diffusion.
Experimental Validation
The researchers evaluated CANDI across three distinct scales and domains:
- Text8: A character-level dataset with a small vocabulary ($|V|=27$), establishing baseline behavior where temporal dissonance is minimal.
- OpenWebText (OWT): A large-scale English text corpus ($|V| \approx 50,000$) to stress-test the model against massive vocabularies.
- QM9: A molecular dataset used to evaluate controlled generation (e.g., targeting specific properties like solubility).
Key Results
- Low-NFE Superiority: On OpenWebText, CANDI significantly outperforms masked diffusion (MDLM) at a low Number of Function Evaluations (NFE). The continuous gradient enables coordinated updates across the entire sequence, whereas discrete models require more iterative steps to converge.
- Robust Vocabulary Scaling: While pure continuous diffusion suffers catastrophic failure as vocabulary size increases (collapsing entirely on OWT), CANDI remains stable and highly competitive regardless of $|V|$.
- Plug-and-Play Guidance: Because CANDI learns a continuous score function, it seamlessly supports classifier-based guidance using off-the-shelf classifiers via simple gradient addition. On the QM9 dataset, CANDI achieved a superior Pareto frontier for property optimization compared to discrete methods, which typically require specialized, diffusion-aware classifiers.
Limitations and Future Directions
While CANDI excels at low NFE, it slightly underperforms pure discrete baselines at very high NFE (e.g., 512+ steps), where the advantage of simultaneous continuous updates diminishes. Furthermore, the current implementation relies on simple linear schedules for both corruption types. Future work could explore optimal non-linear schedules to more tightly coordinate discrete and continuous signals, or extend this hybrid approach to other discrete-structured domains like code generation and symbolic mathematics.
Summary updated