TL;DR
This paper introduces A2D2, a novel framework for fine-tuning any-length discrete diffusion models to generate sequences optimized for specific rewards. A2D2 achieves this by jointly optimizing insertion and unmasking policies with an adaptive inference schedule, leading to improved generation quality and efficiency compared to existing methods.
What Problem Does This Paper Address?
Discrete diffusion models have shown great promise for sequence generation, offering advantages like bidirectional context and parallel decoding. While these models have been extended to handle sequences of any length through token insertion, a significant challenge remains: effectively fine-tuning these "any-length" models to generate sequences that satisfy complex, reward-based criteria. This is particularly difficult because the action space for any-length models is much larger (involving both unmasking and variable-length insertions), making it hard to guide generation towards desired outcomes without sacrificing overall sequence quality. The paper aims to bridge this gap by developing a principled method for reward-guided fine-tuning of any-length discrete diffusion models.
Methods
A2D2 introduces a unified framework that tackles the any-length discrete diffusion fine-tuning problem. The core innovation lies in jointly optimizing two key components:
- Insertion and Unmasking Policies: Instead of treating these as separate processes, A2D2 co-optimizes the policies responsible for inserting new tokens and unmasking existing ones. This is achieved through the Adaptive Joint Decoding (AJD) loss, which is derived from the Radon-Nikodym derivative of the joint insertion-unmasking path measures. This theoretical grounding ensures convergence to the desired reward-tilted distribution.
- Adaptive Inference Schedule: A crucial aspect of any-length models is the inference process. A2D2 introduces unmasking quality and insertion quality predictors. These learned predictors guide the inference process by identifying and potentially re-masking low-quality unmasking decisions or removing low-quality insertions, thereby improving the overall generation quality and accuracy.
The training process involves an alternating optimization strategy between the policy and quality predictors to ensure stable convergence.
Datasets
The paper utilizes several datasets for training and evaluation:
- Small Molecule Design: The SAFE dataset, containing approximately 950 million molecules from ZINC20 and Unichem.
- Peptide Generation: A corpus of 11 million peptide SMILES sequences from CycPeptMPDB, SmProt, and modified peptides from Cyclops.
- Language Reasoning: The GSM8K dataset for math word problems and the HumanEval-infill benchmark for code completion.
Key Insights and Ideas
- Joint Optimization is Key: The paper highlights that effectively fine-tuning any-length discrete diffusion models requires jointly optimizing the insertion and unmasking policies, rather than treating them independently. This holistic approach leads to more coherent and high-quality sequence generation.
- Quality Predictors as Guides: Learned quality predictors for unmasking and insertion are crucial for adaptive inference. They allow the model to dynamically adjust its generation process, re-evaluating decisions to ensure high-quality outputs, especially in the complex any-length setting.
- Theoretical Guarantees: The derivation of the Radon-Nikodym derivative for joint insertion-unmasking path measures provides a strong theoretical foundation for A2D2, ensuring convergence to the optimal reward-tilted distribution.
- Efficiency Gains: A2D2 demonstrates that by optimizing the inference schedule, it can achieve comparable or better results with fewer sampling steps compared to previous methods, indicating improved inference efficiency.
Key Results
A2D2 demonstrates significant improvements across various tasks:
- Small Molecule Design: A2D2 achieved state-of-the-art results, raising QED from 0.641 to 0.762 and lowering SA from 3.40 to 2.87, while improving overall quality from 44.2% to 71.3%.
- Peptide Generation: A2D2 outperformed fixed-length baselines on multiple therapeutic properties, showing substantial reward gains and significantly improving sequence validity (e.g., reaching 48.60% validity on TfR).
- Language Reasoning: For GSM8K, A2D2 raised Pass@1 from 35.71% to 60.96% at 128 sampling steps, a 25.3-point improvement, and achieved higher accuracy with fewer steps. For HumanEval-infill, A2D2 improved exact match from 44.14% to 49.37% at 128 steps.
Limitations and Future Work
- Computational Cost: While A2D2 improves efficiency, training and fine-tuning diffusion models can still be computationally intensive.
- Hyperparameter Sensitivity: The paper mentions that the performance can be sensitive to hyperparameters, and further exploration of optimal settings might be beneficial.
- Future Directions: The authors suggest that their framework is a significant step towards more general any-length generation for diverse reward-based tasks. Future work could explore more complex reward functions, larger models, and broader applications.
Summary updated