techlist.io
OpenAI2019-03-203 min read

Curated summary

Implicit generation and generalization methods for energy-based models

Read original(opens in new tab)

Energy-based Models: Sampling Through Iterative Refinement

OpenAI's research on energy-based models (EBMs) argues that they can match GAN-level sample quality at low temperatures while keeping the mode coverage of likelihood-based models. The approach generates samples implicitly through iterative refinement, which trades extra compute for better outputs. The authors also report better out-of-distribution generalization and adversarial robustness than comparable likelihood models, and they present early evidence that EBMs compose well.

How Energy-based Models Work

  • EBMs assign an unnormalized probability scalar (an "energy") to each input, so any model that outputs a real number can serve as an energy function.
  • Sampling is the hard part. Samples are produced with Langevin dynamics, which performs noisy gradient descent on the energy function to reach low-energy configurations.
  • Unlike GANs, VAEs, and flow-based models, EBMs need no separate generator network. Samples are generated implicitly.

Key Advantages

  • Adaptive computation time: Running refinement longer yields sharper, more diverse samples, while shorter runs give coarser, less diverse ones. In the limit of infinite steps, the procedure theoretically produces true samples from the model.
  • No generator bottleneck: VAEs and flow-based models must map a continuous space onto possibly disconnected data modes, which demands large capacity. EBMs can assign low energy to disjoint regions directly.
  • Built-in compositionality: Because each model defines an unnormalized distribution, models can be combined through a product of experts or other hierarchical structures.

Generation Results

  • With longer test-time refinement, EBMs produce high-quality images. Iterative optimization enables image auto-completion and morphing between classes, such as truck to frog.
  • On robot dynamics, EBMs generate stable trajectories over many timesteps and produce diverse possible futures, whereas feedforward models collapse to a mean prediction.

Generalization Results

  • On several out-of-distribution datasets, EBMs outperform other likelihood models, including flow-based and autoregressive models.
  • Conditional EBMs generalize well to adversarial perturbations. Despite never being trained for classification, they outperform models explicitly trained against adversarial examples.

Lessons from Training

  • Vanilla HMC is hard to apply because optimal step sizes and leapfrog step counts shift considerably during training. Adaptive HMC is suggested as future work.
  • Ensembles of energy functions helped slightly but did not justify the added complexity.
  • A gradient penalty term hurt model capacity and sampling quality.
  • The authors caution that these observations are tentative. More details appear in Section A.8 of the paper.

Compositionality Experiments

  • One model was trained on shapes of varying sizes at a fixed position, and another on fixed-size shapes at varying positions.
  • Combining them via a product of experts produced shapes of different sizes at different locations, even though the model never saw examples of both variations together.

Continue with another curated summary.