Diffusing Gaussian Mixtures for Generating Categorical Data

Florence Regol, Mark Coates

Introduction

Generating categorical data—such as text, musical notes, or amino acid sequences—presents a unique challenge for generative modeling. Unlike images or audio, which exist on a continuous spectrum, categorical data is nominal; there is no inherent distance or order between categories like "Apple" and "Orange."

Currently, researchers typically rely on two approaches: Autoregressive (AR) models, which are powerful but slow due to their sequential nature, and Continuous Generative Models (Diffusion), which allow for parallel generation but often struggle with the discrete "jump" from continuous noise back to categorical labels. Researchers at McGill University have introduced Gaussian Mixture Categorical Diffusion (GMCD) to bridge this gap, utilizing structured geometry to enable fast, high-quality categorical generation.

Methodology: The GMCD Framework

GMCD addresses the limitations of categorical diffusion through two primary innovations: a sphere-packing encoder and a structured denoising process.

1. Sphere Packing Encoder

To map discrete categories into a continuous latent space, GMCD avoids random embeddings. Instead, it employs a sphere packing algorithm to position category means on the surface of a high-dimensional sphere. This geometric arrangement ensures that every category is equidistant from every other category, maximizing the margin between clusters. By fixing these means, the model provides a stable foundation for the diffusion process, making it significantly easier to distinguish between categories even in the presence of high noise.

2. Structured Denoising with Gaussian Mixtures

Standard diffusion models typically attempt to predict a clean version of a noisy data point. GMCD refines this by recognizing that the target data must reside within one of the fixed Gaussian clusters defined by the encoder.

The model utilizes a non-autoregressive Transformer to predict the probability that a noisy point belongs to a specific category. Because the denoising function is "informed" by the underlying Gaussian Mixture structure, it can converge in far fewer steps than traditional models—typically requiring only 10 to 40 steps, compared to the hundreds or thousands often needed by standard continuous diffusion models.

Experimental Evaluation

The researchers evaluated GMCD across both synthetic and real-world biological datasets:

  • Synthetic Benchmarks: The model was tested on distributions with varying numbers of categories ($K=6, 8, 10$) to measure its ability to recover ground-truth distributions. Even when valid sequences occupied less than 1% of the total search space, GMCD successfully identified and remained within the valid regions.
  • Protein Modeling (Pfam): Protein sequences (families PF00076 and PF00014) served as a complex test case. With 21 amino acid categories, these sequences require the model to capture high-order correlations and long-range dependencies to maintain biological function.

Key Results and Insights

Superior Sample Quality

On synthetic data, GMCD consistently achieved the lowest Hellinger and Total Variation distances, indicating that its generated samples were the most representative of the true data distribution. In protein modeling, GMCD outperformed existing baselines like CDM and argmaxAR in capturing "higher-order covariation"—the complex interactions between amino acids that determine a protein's structure.

Efficiency and Speed

One of the most significant advantages of GMCD is its efficiency. It demonstrated the fastest training and sampling times among the tested models. By generating all elements of a sequence simultaneously (parallelism) and requiring fewer diffusion steps, it offers a scalable alternative to slow autoregressive methods.

Geometric Stability

By fixing the encoding via sphere packing, the authors removed the need for the model to learn an embedding space during training. This simplification provides a stable geometric foundation, allowing the iterative diffusion process to focus entirely on capturing the correlations between sequence elements.

Limitations and Future Work

While GMCD represents a significant step forward, several areas for future research remain:

  • Vocabulary Scaling: Current experiments focused on up to 21 categories. Applying this to Large Language Models (LLMs) with vocabularies in the tens of thousands will require further investigation into how sphere packing scales in extremely high dimensions.
  • Metric Refinement: The authors argue that standard metrics like log-likelihood are often poor indicators of sample quality for categorical data, advocating for the distribution-based metrics used in this study.
  • Data Augmentation: Preliminary findings suggest that injecting noise into training labels (categorical diffusion) can further improve model robustness, hinting at future refinements in how discrete data is "blurred" during training.

Conclusion

GMCD offers a robust framework for categorical data generation by combining the geometric rigor of sphere packing with the efficiency of structured Gaussian Mixture denoising. By enabling high-quality, parallel generation in a fraction of the time required by previous methods, it opens new possibilities for modeling complex discrete sequences in biology, linguistics, and beyond.

Summary updated

BibTeX
@inproceedings{regol2023diffusing,
  author = {Florence Regol and Mark Coates},
  title = {{Diffusing Gaussian Mixtures for Generating Categorical Data}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i8.26145},
}
Figure