Learning Equivariant Energy Based Models with Equivariant Stein Variational Gradient Descent

Priyank Jaini, Lars Holdijk, Max Welling

TL;DR

This paper introduces Equivariant Stein Variational Gradient Descent (E-SVGD) and Equivariant Energy-Based Models (E-EBMs) to efficiently sample from and learn probability distributions with built-in symmetries. By incorporating group-equivariant kernels into SVGD, particles repel each other across entire symmetry orbits rather than just local Euclidean neighborhoods, drastically improving sample efficiency, mixing, and generalization.

What Problem Does This Paper Address?

Many real-world systems exhibit physical or geometric symmetries. For example, a molecule’s energy does not change if it is rotated or translated in space, nor does an image's label change under certain transformations.

Standard generative modeling and sampling approaches struggle with such distributions:

  • MCMC and vanilla SVGD do not encode group symmetries. Vanilla SVGD relies on localized repulsive forces; as a result, particles often cluster along the same symmetry orbit or collapse into nearby local modes, requiring huge numbers of particles to cover the space.
  • Equivariant Normalizing Flows can enforce symmetries, but they require invertible architectures with tractable Jacobians and cannot easily generate samples when only given an unnormalized target density $\pi(x)$.

The authors address how to leverage known symmetry groups to sample efficiently from invariant densities and learn unnormalized equivariant energy-based models from data.

Methods

The paper's framework combines geometric deep learning with particle-based variational inference:

  1. Equivariant SVGD (E-SVGD):
  2. Standard SVGD updates particles via a combination of an attractive force (score function driving particles to high-density areas) and a repulsive force (kernel-driven particle dispersion).
  3. The authors prove (Proposition 1) that if the initial particle distribution is symmetric and the positive-definite kernel $k(x, x')$ is group-invariant (or a matrix-valued kernel $K(x, x')$ is group-equivariant), the resulting SVGD velocity field is equivariant. Thus, intermediate push-forward densities remain invariant at every step.
  4. For finite groups, invariant kernels can be formed by summing over group orbits; for continuous groups (like $SO(2)$), kernels operate on invariant coordinate projections (e.g., Euclidean norms) or integrate over the group Haar measure.
  5. Equivariant Energy-Based Models (EBMs):
  6. Energy functions are parameterized using group-equivariant neural network architectures (e.g., steerable CNNs, Equivariant Graph Neural Networks).
  7. Models are trained using Contrastive Divergence, where the negative phase samples are generated using E-SVGD rather than standard Langevin dynamics or vanilla SVGD.
  8. Extended to Equivariant Joint Energy Models (JEMs) to simultaneously handle semi-supervised learning, classification, and generative modeling under input transformations.

Datasets

The authors evaluated their framework across synthetic distributions, physical simulations, molecules, and images:

  • Synthetic 2D Densities: A mixture of four Gaussians ($C_4$ rotational symmetry) and two concentric circles ($SO(2)$ symmetry).
  • DW-4 (Double-Well 4-Particle System): A physical particle system invariant to 3D rotations, translations, and particle permutations, characterized by 5 metastable energy states.
  • QM9: A benchmark of over 145,000 molecules. The authors focused on generating constitutional isomers of $\text{C}_5\text{H}_8\text{O}_1$.
  • FashionMNIST: Standard training images paired with an evaluation test set where images are randomly rotated by multiples of $90^\circ$ ($C_4$ group).

Key Insights and Ideas

  • Long-Range Repulsion Across Orbits: In vanilla SVGD, particles only repel each other within small Euclidean distances. In E-SVGD, using an equivariant kernel allows a particle at $x$ to exert a repulsive force on any point residing in the orbit $\mathcal{O}(x)$. This prevents multiple particles from redundantly covering the same symmetric configuration.
  • Factorized Space Exploration: Sampling an invariant distribution is equivalent to sampling its factorized space (orbit space) and randomly transforming it. E-SVGD natively spaces particles evenly throughout this factorized space, avoiding the "particle collapse" typical of vanilla SVGD.
  • Symmetric Contrastive Divergence: Pairing an equivariant energy network with an equivariant sampler prevents the negative sampler from being the bottleneck during contrastive divergence training, speeding up model convergence.

Key Results

  • Sample Efficiency on Concentric Circles: E-SVGD converged to the true log-likelihood in fewer than 100 iterations. Vanilla SVGD failed to reach ground-truth log-likelihood even when granted 32× more particles and 5,000 iterations.
  • Robustness to Initialization: On $C_4$-Gaussians, vanilla SVGD collapsed to local modes depending heavily on initial placement, while E-SVGD consistently converged to the true distribution across random initializations.
  • Particle System Recovery (DW-4): Trained on only a single configuration per metastable state, an equivariant EBM trained with E-SVGD generalized to discover new, valid low-energy configurations. Vanilla SVGD simply memorized and regurgitated the training points.
  • Molecular Structure Generation (QM9): Using an E(n)-equivariant graph neural network (E-GNN) as the energy function, E-SVGD generated realistic 3D $\text{C}_5\text{H}_8\text{O}_1$ isomers containing aromatic rings whose interatomic distances and bond angles closely matched true distributions.
  • Classification Under Rotations: On rotated FashionMNIST, the equivariant joint model trained with E-SVGD achieved higher classification accuracy and faster convergence than both non-equivariant baselines and equivariant models trained with vanilla SVGD.

Limitations and Future Work

  • Kernel Hyperparameter Sensitivity: Like standard SVGD, performance is sensitive to bandwidth and kernel choices; automated or learnable kernel hyperparameter strategies are needed.
  • Multimodal Factorized Spaces: If the underlying factorized orbit space itself has separated, narrow modes, E-SVGD can still favor one mode. The authors note that annealing strategies or adding stochastic Langevin noise may be necessary.
  • Contrastive Divergence Instabilities: Relying on short-run MCMC/SVGD chains for contrastive divergence remains notoriously tricky and prone to instability in large-scale deep architectures.

Summary updated

BibTeX
@inproceedings{jaini2021learning,
  author = {Priyank Jaini and Lars Holdijk and Max Welling},
  title = {{Learning Equivariant Energy Based Models with Equivariant Stein Variational Gradient Descent}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=M0mPukrTqm},
}
Figure