Directly Training Joint Energy-Based Models for Conditional Synthesis and Calibrated Prediction of Multi-Attribute Data

Jacob Kelly, Richard S. Zemel, Will GrathwohlarXiv 2021

TL;DR

This paper introduces a novel method for training Energy-Based Models (EBMs) to jointly predict multiple attributes of an input and generate new data conditioned on those attributes. By directly optimizing the joint distribution of data and labels, their approach enables high-quality synthesis of novel attribute combinations, a capability lacking in prior methods.

What Problem Does This Paper Address?

Multi-attribute classification, where an input can have multiple associated labels (e.g., an image of a person having attributes like "smiling," "wearing glasses," "blond hair"), presents significant challenges. Accurately predicting these attributes and, crucially, quantifying the uncertainty in these predictions is difficult. Furthermore, existing methods struggle to generate new data samples that exhibit specific, potentially rare or unseen, combinations of these attributes. This limitation hinders applications requiring flexible data generation based on complex attribute specifications.

Methods

The core of this work lies in reinterpreting existing multi-attribute classifiers as Joint Energy-Based Models (JEMs). While prior JEM approaches focused on maximizing a factorized likelihood (separately modeling data and conditional labels), this paper proposes directly maximizing the joint likelihood of data and labels. This is achieved by adapting recent advancements in EBM training to directly optimize the unnormalized joint distribution $p(x, y)$.

To enable this direct joint training, the authors introduce a sampling strategy called Langevin-Within-Gibbs (LWG). LWG combines Gibbs sampling for discrete attributes with Langevin dynamics for continuous data. Specifically, when conditioning on a subset of attributes, they iteratively update the data samples using Langevin dynamics while sampling the remaining attributes using Gibbs sampling. This approach allows for the generation of samples conditioned on attribute combinations that might not have been present in the training data.

Datasets

The proposed methods were evaluated on two standard image datasets:

  • UT Zappos50K: A dataset of shoe images with various attributes.
  • CelebA: A dataset of celebrity faces with numerous attributes.

The authors also conducted experiments on "held-out" attribute combinations for CelebA, effectively creating a novel benchmark for evaluating the model's ability to synthesize unseen attribute combinations.

Key Insights and Ideas

  • Joint Training is Key for Synthesis: Directly training the joint distribution $p(x, y)$ is crucial for enabling the synthesis of novel attribute combinations, a capability that factorized training approaches lack.
  • LWG for Flexible Sampling: The Langevin-Within-Gibbs (LWG) sampling strategy effectively bridges the gap between discrete attribute sampling and continuous data generation, allowing for conditional synthesis.
  • Beyond Rare Attributes: The method goes beyond simply handling rare attributes; it can generate samples for attribute combinations that were never observed together during training.
  • Calibration Matters: The proposed Gibbs-JEM model not only achieves competitive accuracy but also provides significantly better calibrated predictions compared to standard supervised baselines.

Key Results

  • Accurate and Calibrated Predictions: The Gibbs-JEM model achieved competitive accuracy and F1 scores on both UT Zappos50K and CelebA, while significantly outperforming baselines in calibration, AUROC, and AUPRC. For instance, on CelebA, the Gibbs-JEM model achieved an ECE (Expected Calibration Error) of 2.84%, compared to 32.39% for the supervised baseline.
  • High-Quality Conditional Synthesis: The model demonstrated the ability to generate high-quality samples conditioned on various attributes, including novel combinations. Even when conditioning on attribute combinations not seen during training, the model could produce plausible samples, though quality slightly degraded.
  • Improved Sampling Stability: The direct joint training approach, combined with techniques like Persistent Contrastive Divergence (PCD) and reservoir buffers, led to more stable training and sampling compared to traditional JEMs.

Limitations and Future Work

  • Sampling Stability: While improved, training EBMs remains less stable than ideal. The authors found that using larger step sizes (as suggested in prior work) led to model divergence, forcing them to use a small step size of 1. Figuring out how to achieve stable sampling with larger step sizes is identified as a crucial area for future work to improve sample quality.
  • Extending to New Domains: The authors suggest extending their approach to new data domains and settings with limited or partial supervision as a promising future direction.
  • Compositional Generation: The paper notes that their techniques could be applied to compositional generation tasks, potentially expanding the range of problems addressable by EBMs.

Summary updated

BibTeX
@misc{kelly2021directly,
  author = {Jacob Kelly and Richard S. Zemel and Will Grathwohl},
  title = {{Directly Training Joint Energy-Based Models for Conditional Synthesis and Calibrated Prediction of Multi-Attribute Data}},
  year = {2021},
  eprint = {2108.04227},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.04227},
}
Figure