Adaptive Symmetrization of the KL Divergence

Omri Ben-Dov, Luiz F. O. Chamon · Submission to ICLR 2026 · Rejected

TL;DR

Training generative models by minimizing the forward Kullback-Leibler (KL) divergence tends to overfit finite samples and miss sharp modes, while symmetric alternatives like GANs suffer from adversarial instability. This paper introduces a non-adversarial, constrained optimization framework that minimizes the symmetric Jeffreys divergence by pairing a Normalizing Flow (NF) with an Energy-Based Model (EBM) as a density proxy. By dynamically balancing the forward and reverse KL trade-offs via duality theory, the method achieves stable training, better mode coverage, and improved sample efficiency.

What Problem Does This Paper Address?

In generative modeling and density estimation, the goal is to match a parameterized distribution to an unknown data distribution $\pi$ using finite samples. Typically, models are trained by minimizing the forward KL divergence, $D_{\mathrm{KL}}(\pi \parallel p)$, which is equivalent to maximum likelihood estimation (MLE). However, forward KL is asymmetric: it is "mode-covering" (zero-avoiding) and often assigns probability mass to low-density regions between modes or overfits empirical training points.

The reverse KL divergence, $D_{\mathrm{KL}}(p \parallel \pi)$, promotes mode-seeking behavior, making the symmetric Jeffreys divergence ($D_{\mathrm{KL}}(\pi \parallel p) + D_{\mathrm{KL}}(p \parallel \pi)$) an attractive target. Unfortunately, the reverse KL cannot be evaluated directly from data samples without knowing the true density $\pi$. While Generative Adversarial Networks (GANs) approximate symmetric divergences variationally, their zero-sum minimax games are notoriously unstable, hyperparameter-sensitive, and prone to mode collapse.

Methods

The authors propose a collaborative, dual-model constrained learning framework:

  • EBM as a Density Proxy: A primary model $p_\theta$ (a Normalizing Flow) is trained alongside an auxiliary proxy model $q_\psi$ (an Energy-Based Model). The reverse KL $D_{\mathrm{KL}}(p_\theta \parallel \pi)$ is approximated by $D_{\mathrm{KL}}(p_\theta \parallel q_\psi)$.
  • Symbiotic Flow-EBM Coupling: EBMs are highly expressive unnormalized models whose partition functions $\zeta_\psi = \int e^{f_\psi(y)} dy$ are typically intractable, requiring slow MCMC sampling. Because NFs allow rapid exact sampling and exact density evaluation, the EBM’s partition function is efficiently estimated via importance sampling over NF samples: $$\zeta_\psi = \mathbb{E}_{y \sim p_\theta} \left[ e^{f_\psi(y) - \log p_\theta(y)} \right]$$ Constraining $D_{\mathrm{KL}}(p_\theta \parallel q_\psi)$ inherently keeps the proposal and target distributions close, keeping the importance sampling variance low.

  • Adaptive Symmetrization via Resilient Constrained Optimization: Instead of manually tuning heuristic penalty weights, the problem is formulated as a feasibility problem where constraint bounds $\epsilon$ adapt dynamically: $$\min_{\theta, \psi, \boldsymbol{\epsilon} \ge 0} \epsilon_{\mathrm{fw}}^2 + \epsilon_{\mathrm{rv}}^2 + \epsilon_{\mathrm{prx}}^2 \quad \text{s.t.} \quad D_{\mathrm{KL}}(\pi \parallel p_\theta) \le \epsilon_{\mathrm{fw}}, \,\, D_{\mathrm{KL}}(p_\theta \parallel q_\psi) \le \epsilon_{\mathrm{rv}}, \,\, D_{\mathrm{KL}}(\pi \parallel q_\psi) \le \epsilon_{\mathrm{prx}}$$ Additional constraints enforce normalization of the EBM ($1 \le \zeta_\psi \le 1 + \epsilon_\zeta$).

  • Primal-Dual Optimization: Solved via a gradient descent-ascent (GDA) algorithm. In each iteration, slack specifications $\boldsymbol{\epsilon}$ admit closed-form updates ($\boldsymbol{\epsilon} = \frac{1}{2} \boldsymbol{\lambda}$), model parameters $(\theta, \psi)$ take descent steps, and dual variables $\boldsymbol{\lambda}$ ascend.

Datasets

  • Synthetic 2D Benchmarks: 40-component Gaussian mixture model (GMM), 5x5 Gaussian mixture grid, Gaussian mixture ring (8 modes), concentric rings, two moons, and spiral datasets.
  • Image Generation: 100-dimensional latent representations of CelebA (downscaled to $64 \times 64$, compressed via a convolutional autoencoder).
  • Simulation-Based Inference (SBI): Two standard benchmark tasks with stochastic simulators and uniform priors: conditional Two Moons and conditional Gaussian Mixture.

Key Insights and Ideas

  • Cooperation Over Competition: Unlike GANs, where the discriminator and generator repel each other (leading to oscillatory training dynamics), both the NF and EBM are pulled toward the data distribution $\pi$ and toward each other. This mutual attraction stabilizes training across learning rates.
  • Adaptive Weighting Beats Grid Search: Fixed-weight penalty formulations often fail or require extensive tuning. By treating constraint thresholds as optimization variables in the dual domain, the system dynamically prioritizes whichever objective is falling behind (e.g., pulling back on reverse KL if the proxy hasn't learned the data well yet).
  • Closed-Loop Variance Reduction: The very term driving the reverse KL alignment ($D_{\mathrm{KL}}(p_\theta \parallel q_\psi) \le \epsilon_{\mathrm{rv}}$) ensures the NF acts as an optimal importance sampler for the EBM's normalizer, eliminating the need for slow Langevin dynamics during training.

Key Results

  • Stability and Robustness: On the 40-component GMM, the dual approach outperformed all 25 tested fixed-weight combinations in Negative Log-Likelihood (NLL). When compared to WGAN-GP across learning rates ($10^{-3}$ and $10^{-5}$), our method converged stably to lower NLLs, whereas WGAN-GP diverged at the higher learning rate.
  • Density Estimation: On complex 2D datasets, the model consistently prevented test-set overfitting compared to a standalone NF. For example, on the Gaussian mixture grid, the framework achieved an NLL of $\sim 0.40$ compared to the pure NF's $\sim 0.90$.
  • Simulation-Based Inference: In C2ST evaluation (classifier two-sample test, where $0.5$ is optimal/indistinguishable), the proposed method reached C2ST scores near $0.5$ using significantly fewer simulated trajectories than standard NF-based NPE. On the SBI Two Moons benchmark at 1,000 simulations, the method scored $\approx 0.58$ C2ST versus $\approx 0.65$ for NF.
  • Image Generation: On CelebA latents, the model attained an FID score of 48.07, slightly outperforming the standard NF baseline (48.99).
  • Compute Overhead: Importance sampling over the partition function does not scale steeply with sample size because it uses stop-gradients. Per-epoch wall-clock time was close to GANs and only modestly slower than pure NFs.

Limitations and Future Work

  • High-Dimensional Scaling: In high dimensions, importance sampling over unnormalized distributions can suffer from weight degeneracy and gradient explosion in the EBM. While the authors mitigated this using latent autoencoders, temperature scaling, and warm-starts, direct pixel-space modeling remains challenging.
  • Future Directions:
  • Scaling to high dimensions via rectangular flows or implicit density estimators.
  • Extending the adaptive symmetrization framework to score-based diffusion models using the Fisher divergence, replacing expensive Hessian traces with the score of a tractable proxy model.
  • Incorporating explicit fairness, safety, or privacy constraints directly into the dual formulation.

Summary updated

BibTeX
@misc{bendov2025adaptive,
  author = {Omri Ben-Dov and Luiz F. O. Chamon},
  title = {{Adaptive Symmetrization of the KL Divergence}},
  year = {2025},
  eprint = {2511.11159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.11159},
}
Figure