Abstract
Data imputation and data generation have important applications for many domains, like healthcare and finance, where incomplete or missing data can hinder accurate analysis and decision-making. Diffusion models have emerged as powerful generative models capable of capturing complex data distributions across various data modalities such as image, audio, and time series data. Recently, they have been also adapted to generate tabular data. In this paper, we propose a diffusion model for tabular data that introduces three key enhancements: (1) a conditioning attention mechanism, (2) an encoder-decoder transformer as the denoising network, and (3) dynamic masking. The conditioning attention mechanism is designed to improve the model's ability to capture the relationship between the condition and synthetic data. The transformer layers help model interactions within the condition (encoder) or synthetic data (decoder), while dynamic masking enables our model to efficiently handle both missing data imputation and synthetic data generation tasks within a unified framework. We conduct a comprehensive evaluation by comparing the performance of diffusion models with transformer conditioning against state-of-the-art techniques, such as Variational Autoencoders, Generative Adversarial Networks and Diffusion Models, on benchmark datasets. Our evaluation focuses on the assessment of the generated samples with respect to three important criteria, namely: (1) Machine Learning efficiency, (2) statistical similarity, and (3) privacy risk mitigation. For the task of data imputation, we consider the efficiency of the generated samples across different levels of missing features.
Introduction
Tabular data serves as the foundational structure for critical industries, including finance and healthcare. However, real-world datasets are frequently compromised by missing values or restricted by stringent privacy regulations like GDPR. Historically, researchers have addressed these issues through two distinct lenses: imputation (filling missing values) and synthetic generation (creating privacy-preserving replicas).
Existing solutions, such as Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs), often struggle with tabular data due to training instability or an inability to capture nuanced feature correlations. While Diffusion Models have recently shown promise, early iterations like TabDDPM relied on simpler Multi-Layer Perceptron (MLP) architectures that failed to fully exploit the complex dependencies inherent in high-dimensional tables. This paper introduces MTabGen, a unified diffusion-based framework designed to bridge these gaps.
The MTabGen Framework
MTabGen builds upon the foundations of TabDDPM, utilizing Gaussian diffusion for continuous features and multinomial diffusion for categorical ones. The framework introduces three primary architectural enhancements to improve fidelity and flexibility:
- Encoder-Decoder Transformer: Replacing standard MLPs, the denoising network utilizes a full transformer architecture. The Encoder processes known "conditioning" features, while the Decoder reconstructs the "masked" features (the noisy or missing data).
- Conditioning Attention Mechanism: To reduce learning bias, MTabGen moves beyond simple concatenation. It employs a Query/Key/Value (Q/K/V) attention mechanism where the condition acts as the Key and Value, and the masked features act as the Query. This allows the model to selectively focus on relevant known features to reconstruct specific missing ones.
- Dynamic Masking: During training, the model randomly masks different subsets of features. This strategy forces the network to learn how to predict any feature given any other subset, effectively treating synthetic data generation as a "general case" of imputation where every column is missing.
Experimental Setup
The model was evaluated across 10 diverse benchmark datasets, including HELOC, California Housing, and high-dimensional sets like Gas Concentrations (129 features) and Otto Group (93 features). These datasets were selected to test the model's robustness across binary classification, multi-class classification, and regression tasks.
Performance was measured against three criteria:
- Machine Learning (ML) Efficiency: The ability of synthetic data to train models that perform well on real-world test sets.
- Statistical Similarity: The closeness of synthetic distributions to real distributions using Wasserstein and Jensen-Shannon distances.
- Privacy Risk Mitigation: Ensuring the model does not simply memorize training data, measured via Distance to Closest Record (DCR).
Key Insights and Results
Superior ML Efficiency and Fidelity
In "Train on Synthetic, Test on Real" (TSTR) evaluations, MTabGen I (optimized for generation) achieved an average rank of 1.1 across all datasets, consistently outperforming state-of-the-art baselines like Tabsyn and TabDDPM. Statistical analysis confirmed that MTabGen produced samples with lower distributional distances, indicating higher fidelity to the source data.
Robust Imputation
For data imputation tasks, MTabGen was tested under various missingness scenarios (MCAR, MAR, and MNAR). It consistently outperformed specialized imputation algorithms such as missForest and GAIN. The performance gap was particularly notable as the percentage of missing data increased to 40%, demonstrating the model's resilience in data-sparse environments.
High-Dimensional Advantage
MTabGen showed its most significant gains on datasets with high feature counts. The transformer’s ability to model long-range dependencies between columns provides a clear advantage over MLP-based diffusion models, which often struggle to capture global relationships in wide tables.
Privacy and Limitations
Despite its high accuracy, MTabGen maintains privacy standards comparable to existing models, with DCR metrics suggesting no significant increase in memorization risk. However, the primary trade-off is sampling speed. Due to the iterative nature of diffusion denoising, MTabGen is slower than GANs or VAEs, often requiring 15–30 seconds per batch.
Conclusion
MTabGen represents a significant step forward in tabular data synthesis. By unifying imputation and generation through a transformer-based diffusion architecture, it provides a robust tool for industries requiring high-fidelity, privacy-preserving data. Future work will focus on accelerating the sampling process through techniques like Denoising Diffusion Implicit Models (DDIM) or model distillation.
Summary updated