All projects Generative Models

GAN & EBGAN

Generation as a game — and as energy minimization.

Study & implementation 2022 AdversarialEnergy-basedMinimax
GAN & EBGAN diagram

Motivation

Generative adversarial networks learn an implicit sampler by pitting a generator against a discriminator. The Energy-Based GAN reframes the discriminator as an energy function — low energy near the data manifold, high energy elsewhere — which stabilizes training and connects GANs to the energy-based modeling tradition.

Method

The classic GAN optimizes a minimax objective; at the optimum the generator matches the data distribution and the discriminator is maximally uncertain. EBGAN replaces the binary discriminator with an autoencoder whose reconstruction error acts as energy, trained with a margin loss.

\[ \min_G \max_D\ \mathbb{E}_{x\sim p_{\text{data}}}[\log D(x)] + \mathbb{E}_{z\sim p_z}[\log(1 - D(G(z)))] \]

Mathematical core

Viewing the discriminator as an energy surface makes the geometry of the data manifold explicit and links adversarial training to score-based and diffusion methods, where the learned object is likewise a landscape over data space.