Statistical and Geometrical properties of the Kernel Kullback-Leibler divergence

Anna Korba, Francis Bach, Clémentine ChazalNeurIPS 2024

Measuring the "distance" between two probability distributions is a foundational task in machine learning. While the Kullback-Leibler (KL) divergence is the gold standard in information theory, it struggles in practical, data-driven scenarios. This NeurIPS 2024 paper introduces the Regularized Kernel Kullback-Leibler (KKL) divergence, a sophisticated metric that bridges information theory and kernel methods to overcome the classical limitations of KL divergence.

The Problem with Existing Divergences

When comparing a source distribution $p$ to a target distribution $q$, the standard KL divergence presents two major practical flaws:

  1. Density Ratios: It requires explicit knowledge of the probability density functions, which are rarely available when working with raw empirical data samples.
  2. Disjoint Supports: If $p$ and $q$ do not overlap (e.g., two distinct clusters of points in space), the KL divergence evaluates to infinity, rendering it useless for gradient-based optimization.

To bypass these issues, practitioners often turn to Maximum Mean Discrepancy (MMD), which uses kernel "mean embeddings." However, MMD is a "first-order" metric that can struggle to capture the higher-order moments and complex geometric shapes of a distribution.

The original KKL divergence (introduced by Francis Bach in 2022) improved upon MMD by using "second-order" covariance operators to provide a more discriminative measure. Unfortunately, it still inherited the "disjoint support" problem. This paper provides the mathematical heavy lifting to fix that limitation.

The Solution: Regularized KKL ($\text{KKL}_\alpha$)

The authors propose a regularized variant of the KKL divergence. The core mechanism is "skewing": instead of comparing $p$ directly to $q$, the metric compares $p$ to a mixture of both distributions:

$$\text{KKL}_\alpha(p||q) := \text{KKL}(p || (1-\alpha)q + \alpha p)$$

Here, $\alpha \in (0, 1)$ acts as a regularization parameter. This mixture ensures that the target distribution always "covers" the source distribution, preventing the divergence from blowing up to infinity even when the original supports are completely disjoint.

Key Technical Contributions

  • Closed-Form for Discrete Measures: The authors derive a formula to calculate $\text{KKL}_\alpha$ using only kernel Gram matrices. This is a massive advantage for practitioners, as it allows the divergence to be computed directly from finite data points without any intermediate density estimation.
  • Wasserstein Gradient Flow: They derive the "first variation" (functional derivative) of this divergence. This enables the movement of a set of particles (representing $p$) toward a target (representing $q$) using efficient optimization algorithms like L-BFGS.

Key Insights and Results

By leveraging covariance operators rather than just means, $\text{KKL}_\alpha$ is highly sensitive to the actual shape and structure of the distribution. It behaves similarly to the standard KL divergence (exhibiting displacement convexity for log-concave targets) but enjoys the practical, sample-based benefits of kernel methods.

Furthermore, unlike competing methods such as KALE (Kernelized Annealed Log-Likelihood) that require solving a sub-optimization problem at every step, $\text{KKL}_\alpha$ features a direct analytical gradient. This makes it significantly faster and more robust during optimization.

Statistical Consistency

The authors prove that the error in estimating $\text{KKL}_\alpha$ from $n$ samples decreases at a rate of roughly $1/\sqrt{n}$.

Convergence of KKL divergence estimates across different regularization parameters (alpha) as the number of particles increases.

As demonstrated in the empirical evaluations, the divergence estimate stabilizes smoothly as the number of particles increases, proving robust across several orders of magnitude for the regularization parameter $\alpha$.

Superior Optimization in Generative Tasks

In synthetic benchmarks—such as moving particles to form a "Three Rings" target or transferring a "heart" shape to a "spiral"—KKL particles followed the target support much more faithfully than MMD. Because MMD is less sensitive to support mismatch, it often leaves "stray" particles outside the target area, a problem $\text{KKL}_\alpha$ successfully avoids.

Limitations and Future Work

While powerful, the Regularized KKL divergence comes with computational trade-offs:

  • Computational Complexity: Calculating the KKL involves singular value decompositions (SVD) of matrices, leading to a complexity of $O((n+m)^3)$, where $n$ and $m$ are the number of points. Scaling this to millions of points will require approximation techniques like Nyström features or random Fourier features.
  • Theoretical Guarantees: While empirical results are highly promising, a formal proof that the Wasserstein gradient flow always converges to the global minimum (the exact target distribution) remains an open challenge.
  • Kernel Selection: As with all kernel methods, performance is heavily dependent on choosing an appropriate kernel and bandwidth. Future work may explore adaptive kernel tuning to further automate the process.

Summary updated

BibTeX
@inproceedings{korba2024statistical,
  author = {Anna Korba and Francis Bach and Clémentine Chazal},
  title = {{Statistical and Geometrical properties of the Kernel Kullback-Leibler divergence}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=RxQoIekEa2},
}
Figure