Energy-Based Modelling for Discrete and Mixed Data via Heat Equations on Structured Spaces

Tobias Schröder, Zijing Ou, Yingzhen Li, Andrew B. Duncan

TL;DR

This paper introduces a novel, MCMC-free training method for Energy-Based Models (EBMs) on discrete and mixed data by leveraging "Energy Discrepancy" and a heat equation-based diffusion process. This approach significantly speeds up training and achieves competitive or superior performance across various tasks, including density estimation, tabular data synthesis, and image modeling.

What Problem Does This Paper Address?

Energy-Based Models (EBMs) are powerful for modeling complex data distributions due to their flexible energy function. However, training EBMs on discrete or mixed data has been notoriously difficult. The primary bottleneck is the need for efficient sampling methods (like Markov Chain Monte Carlo - MCMC) to estimate gradients, which are computationally expensive and can lead to biased results, especially in discrete spaces. Existing methods struggle with the intractability of normalization and the difficulty of sampling from discrete distributions. This paper aims to overcome these limitations by developing a training method that bypasses MCMC entirely.

Methods

The core of this work is the application of Energy Discrepancy (ED), a loss function that avoids MCMC by only requiring evaluations of the energy function at data points and their perturbed counterparts. The key innovation lies in how they define these perturbations for discrete data. They simulate a continuous-time diffusion process on the discrete state space, modeled by a heat equation on a graph. This allows them to:

  • Structure-informed perturbations: The graph structure of the discrete space (e.g., cyclical, ordinal) informs the diffusion process, leading to more effective perturbations.
  • Fine-grained control: The continuous-time parameter of the heat equation allows for precise control over the perturbation's magnitude.
  • MCMC-free training: By using ED with these structured perturbations, they eliminate the need for computationally expensive sampling.

They also extend this to mixed data types by applying appropriate perturbations to numerical (Gaussian) and categorical (structured diffusion) components independently.

Datasets

The paper evaluates their method on a variety of datasets:

  • Synthetic Datasets: Used for demonstrating discrete density estimation with varying dimensions and states (e.g., 2D data converted to 32-bit Gray code, 16-dim/5-state, 12-dim/10-state).
  • Tabular Datasets:
    • Synthetic: A synthetic ring dataset with numerical and categorical features.
  • Real-world: Adult, Bank, Cardio, Churn, Mushroom, Beijing.
  • Image Datasets: Static MNIST, Dynamic MNIST, Omniglot.
  • Ising Models: Used to learn connectivity matrices on DxD grids.
  • Graph Datasets: Ego-small dataset for graph generation.

Key Insights and Ideas

  • Energy Discrepancy is a powerful MCMC-free alternative: ED's ability to avoid sampling is a significant advantage for training EBMs on discrete data, offering both speed and theoretical benefits.
  • Heat equations on graphs provide structured perturbations: By modeling diffusion on structured discrete spaces (like cyclical or ordinal data), they can generate more informative perturbations than simple uniform noise. This allows the EBM to learn the underlying data structure more effectively.
  • Unified framework for mixed data: The ability to combine different perturbation strategies (Gaussian for numerical, structured diffusion for categorical) makes ED applicable to complex tabular data.
  • Improved calibration: EBMs trained with ED can lead to better-calibrated classifiers compared to standard methods, suggesting their potential in applications requiring reliable confidence estimates.

Key Results

  • Density Estimation: ED achieved comparable or superior performance to MCMC-based methods (like Gibbs, GWG, EB-GFN) on various discrete datasets, often with significantly less computational cost. For example, on the 16-dim/5-state dataset, ED captured multi-modal distributions better than CD.
  • Tabular Data Synthesis: ED-based models showed robust performance on both synthetic and real-world tabular datasets, outperforming or matching baselines like CTGAN, TVAE, and TabDDPM in terms of AUC and RMSE. They also demonstrated better calibration than deterministic classifiers.
  • Image Modeling: ED achieved comparable performance to contrastive divergence methods on Omniglot, and showed competitive results on MNIST, with a significant advantage in training efficiency.
  • Training Efficiency: ED significantly outperforms contrastive divergence in terms of training time, as it avoids MCMC steps. For instance, ED-Bern and ED-Grid were the fastest options.
  • Ising Models & Graph Generation: ED variants successfully learned the underlying structure of Ising models and generated realistic graph samples, outperforming several baselines in MMD metrics.

Limitations and Future Work

  • Sensitivity to positive distribution assumption: Similar to prior work on ED in continuous spaces, the method is sensitive to the assumption that the data distribution is positive on the whole state space.
  • High-dimensional data challenges: While ED scales to high-dimensional data like images, challenges arise when the data distribution is violated due to the manifold hypothesis, potentially limiting performance compared to methods with many MCMC steps.
  • Future Work:
    • Extending to more complex data structures like molecules, text, and networks.
  • Incorporating more complex structures into the rate function for perturbations.
  • Exploring downstream applications such as table imputation, simulation-based inference, and reweighting language models.

Summary updated

BibTeX
@inproceedings{schroder2024energy,
  author = {Tobias Schröder and Zijing Ou and Yingzhen Li and Andrew B. Duncan},
  title = {{Energy-Based Modelling for Discrete and Mixed Data via Heat Equations on Structured Spaces}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=wAqdvcK1Fv},
}
Figure