Abstract
We introduce Categorical Flow Maps, a flow-matching method for accelerated few-step generation of categorical data via self-distillation. Building on recent variational formulations of flow matching and the broader trend towards accelerated inference in diffusion and flow-based models, we define a flow map towards the simplex that transports probability mass toward a predicted endpoint, yielding a parametrisation that naturally constrains model predictions. Since our trajectories are continuous rather than discrete, Categorical Flow Maps can be trained with existing distillation techniques, as well as a new objective based on endpoint consistency. This continuous formulation also automatically unlocks test-time inference: we can directly reuse existing guidance and reweighting techniques in the categorical setting to steer sampling toward downstream objectives. Empirically, we achieve state-of-the-art few-step results on images, molecular graphs, and text, with strong performance even in single-step generation.
Introduction
Generative modeling has seen immense success in continuous domains, such as image and audio synthesis, through diffusion and flow-matching frameworks. However, discrete data—comprising text tokens, chemical bonds, or categorical pixels—presents a unique challenge. Traditional discrete generative processes rely on stochastic "jumps" between states (Markov chains), which are difficult to distill into efficient, few-step deterministic processes. Categorical Flow Maps (CFM) address this by shifting the paradigm from discrete jumps to continuous flows on a probability simplex, enabling high-quality generation in as little as one step.
Methodology: Continuous Flows on the Simplex
The core innovation of CFM is the treatment of categorical states as points on a probability simplex ($\Delta^K$). By interpolating smoothly across this space, the model can leverage calculus-based flow-matching techniques.
Flow Map Parametrization
Unlike standard velocity-based models that learn instantaneous directions, CFM learns a flow map. This function predicts the displacement from any point in time directly to the final destination. By predicting the "denoised" categorical distribution, the model's outputs are geometrically confined to the simplex, ensuring valid probability distributions without the need for post-hoc clipping.
Endpoint-Consistent Lagrangian Distillation (ECLD)
To achieve one-step generation, the authors propose ECLD, a novel distillation objective. While standard distillation often uses Mean Squared Error (MSE) on velocities, ECLD employs a cross-entropy-based loss to align the "student" model's predicted endpoint with that of a "teacher" model. This approach is more stable for categorical data and provides a cleaner gradient for training one-step generators.
Experimental Evaluation
The CFM framework was evaluated across multiple modalities, including molecular graphs (QM9, ZINC250k), categorical images (Binarized MNIST), and text (Text8, LM1B).
Key Results
The performance gains in the few-step regime are substantial. On the ZINC250k dataset, CFM achieved a remarkable 93.5% molecular validity in a single step, significantly outperforming previous one-step baselines like MoFlow (63.1%) and PairFlow (11.2%). In text generation on the LM1B benchmark, CFM outperformed strong discrete diffusion baselines like UDLM, achieving up to 3.5x lower perplexity in low-step settings.
For image synthesis, CFM produced high-quality binarized MNIST samples with an FID of 10.1 in a single step, setting a new benchmark for few-step discrete generation. Overall, the model matches or exceeds the quality of multi-step diffusion models while requiring 50x to 500x fewer function evaluations.
Discussion and Future Work
While CFM demonstrates state-of-the-art performance, some challenges remain. On large-scale text datasets like LM1B, the model exhibited lower entropy than the ground truth, suggesting that while it avoids mode collapse, further refinement is needed to capture the full diversity of natural language. Additionally, the authors found that standard Transformer embedding layers were unstable for this objective, requiring a custom RMS-normalized linear projection. Future research will focus on scaling these continuous flow maps to multi-billion parameter language models.
Summary updated