NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CoDi: Co-evolving Contrastive Diffusion Models for Mixed-type Tabular Synthesis

Chaejeong Lee, Jayoung Kim, Noseong Park

Introduction

Generating realistic tabular data remains a significant challenge in machine learning, often described as a "Goldilocks" problem. Tabular datasets are typically "mixed-type," containing both continuous values (e.g., age, income) and discrete categories (e.g., medical diagnosis, job type). Traditional generative models often struggle to balance these types: treating categorical variables as continuous leads to nonsensical sampling errors, while modeling them in isolation destroys the vital correlations between columns.

In the paper "CoDi: Co-evolving Contrastive Diffusion Models for Mixed-type Tabular Synthesis," researchers Chaejeong Lee, Jayoung Kim, and Noseong Park introduce a novel "two-stream" diffusion framework. CoDi allows continuous and discrete variables to evolve together during the generation process, ensuring that the synthetic data maintains the complex dependencies found in real-world tables.

The CoDi Framework

The core innovation of CoDi lies in its dual-stream architecture, which moves away from the common practice of forcing all data types into a single representation space. Instead, it utilizes two specialized diffusion models that operate in parallel:

  1. Continuous Diffusion Stream: This model operates in Euclidean space, utilizing Gaussian noise to model continuous variables.
  2. Discrete Diffusion Stream: This model operates in a discrete space, utilizing categorical distributions and uniform noise to handle discrete variables.

Co-evolution through Mutual Conditioning

Rather than running these streams independently, CoDi implements a co-evolving mechanism. At every denoising step $t$, the continuous model is conditioned on the current state of the discrete model, and the discrete model is simultaneously conditioned on the continuous state. This bi-directional communication ensures that as the data is "denoised" from random noise into structured records, the relationship between different column types is preserved.

Enhancing Correlation with Contrastive Learning

To further strengthen the "binding" between the two streams, the authors introduce a novel contrastive learning objective using a Triplet Loss. This approach is designed to teach the model specifically about inter-column correlations.

  • Anchor: A real pair of (continuous, discrete) data from the training set.
  • Positive Sample: A generated sample where the continuous part is conditioned on the real discrete part.
  • Negative Sample: A sample created by randomly permuting columns between different records.

By using column permutation for negative sampling, the model is forced to learn that even if individual values look realistic, the record is invalid if the correlation between columns is broken. This forces the two diffusion streams to converge on the specific dependencies that define the dataset's structure.

Experimental Evaluation

The researchers evaluated CoDi against eight baseline models, including popular GANs (CTGAN, TVAE), flow-based models (RNODE), and the previous score-based leader, STaSy. The testing suite included 11 real-world datasets covering binary classification, multi-class classification, and regression tasks (e.g., Bank, Heart, Obesity, and Insurance datasets).

Key Results

  • Superior Data Quality: CoDi consistently outperformed baselines in sampling quality. In regression tasks, it was the only method to achieve a positive $R^2$ score across the board, whereas other models often produced impractical results that failed to capture the underlying trends.
  • Improved Diversity: Using the "coverage" metric—which measures the ratio of real samples that have a nearby synthetic neighbor—CoDi significantly outperformed GAN-based methods. This suggests that CoDi effectively avoids "mode collapse," a common issue where generative models repeat a limited set of patterns rather than learning the full distribution.
  • Efficiency and Speed: One of the most practical breakthroughs is CoDi's efficiency. By splitting the problem into specialized streams, the model converges faster and samples nearly 9 to 10 times faster than previous score-based models like STaSy. While GANs remain faster due to their single-pass nature, CoDi makes high-quality diffusion synthesis viable for production environments.

Discussion and Limitations

CoDi demonstrates that treating discrete data as natively discrete—rather than using continuous proxies like one-hot encoding with Gumbel-softmax—results in much more accurate category frequencies. However, the authors note some limitations:

  • Mixed-Type Specialization: CoDi is specifically optimized for mixed-type data. For datasets that are purely continuous or purely discrete, the overhead of the dual-stream architecture may not be necessary.
  • Hyperparameter Tuning: The model requires careful tuning of the coefficients ($\lambda_C, \lambda_D$) for the contrastive loss, which can vary between different datasets.
  • Privacy Considerations: While CoDi produces highly realistic data, the paper does not focus on Differential Privacy (DP). As the realism of synthetic data increases, future work will likely need to integrate DP to ensure that the model does not inadvertently memorize sensitive information from the training set.

Conclusion

CoDi represents a significant step forward in tabular data synthesis by solving the "generative learning trilemma": balancing high sample quality, high diversity, and fast sampling. By allowing continuous and discrete variables to co-evolve, it provides a robust framework for generating synthetic datasets that are both statistically accurate and computationally efficient.

Summary updated

BibTeX
@inproceedings{lee2023codi,
  author = {Chaejeong Lee and Jayoung Kim and Noseong Park},
  title = {{CoDi: Co-evolving Contrastive Diffusion Models for Mixed-type Tabular Synthesis}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=sy9oDku9Lu},
}
Figure