Beyond Eigenfunctions: Divergence Principal Functions for Representation Learning

Ritabrata Ray, Sahil Dharod, Burak Varıcı, Nicholas Matthew Boffi, Pradeep RavikumarNeurIPS 2026

TL;DR

We usually assume that contrastive learning works by implicitly computing the top eigenfunctions of a similarity matrix between data pairs. This paper shows that eigenfunctions are actually a special case tied strictly to squared-error losses, whereas modern objectives (like InfoNCE) warp the underlying mathematical space and prioritize completely different features. By introducing Divergence Principal Functions, the authors reveal how your choice of loss function and parameterization fundamentally dictates which patterns your neural network chooses to remember—and which ones it throws away.

What Problem Does This Paper Address?

In self-supervised learning (SSL), models learn by pulling related "positive pairs" (like two crops of the same image) together and pushing random "negative pairs" apart. Under the hood, the model is estimating a pairwise affinity—essentially how much more likely two items are to appear together than by random chance, often denoted as a density ratio ($K^\star$) or its logarithm ($S^\star$, similar to Pointwise Mutual Information).

Because neural networks compress data into finite-dimensional vectors, they have to create a low-rank approximation of this giant affinity table. Existing theory leans heavily on a classic mathematical hammer: spectral decomposition (like PCA or SVD), which tells us the best low-rank features are the leading eigenfunctions of the affinity operator.

Here is the catch: eigenfunctions are only optimal if you measure approximation error using standard squared-error ($\ell_2$ loss). Modern SSL rarely uses pure squared error; it uses InfoNCE, KL divergence, logistic loss, Hellinger distance, etc. Until now, researchers treated these losses as merely different paths to estimate the same target. This paper asks: When we compress representations into a low-rank bottleneck, do different loss functions actually extract fundamentally different features?

Methods

To untangle the SSL landscape, the authors introduce two main conceptual tools:

  1. A Three-Axis Master Objective: They unify popular SSL and density-ratio losses (InfoNCE, NWJ, KLIEP, uLSIF, NT-Logistic, Spectral Contrastive Loss) by breaking them down into three independent choices:
  2. Discrepancy: The statistical divergence measuring error (e.g., KL, squared loss).
  3. Parameterization: How encoder outputs form the affinity (e.g., dot product vs. exponentiated dot product).
  4. Normalization: Global, per-anchor conditional (like softmax), or penalty-constrained.
  5. Divergence Principal Functions (DPFs): Instead of assuming $\ell_2$ geometry, DPFs define the optimal rank-$r$ representations directly through whatever statistical discrepancy $d$ the training objective uses. Using a third-order Taylor expansion around the true affinity, the authors prove that smooth DPF objectives locally reduce to a weighted spectral approximation problem. The weights aren't uniform—they are dictated by the local curvature (second derivative) of the loss function at the target affinity.

Datasets

Because this is primarily a theoretical paper isolating geometric effects, the main text relies on two controlled synthetic setups:

  1. Anisotropic Kernel: A discrete grid ($n=200$) engineered with two competing components: a broad, low-affinity Gaussian region and a sharp, localized high-affinity Gaussian spike.
  2. Mercer-Product Kernel: A continuous uniform space on $[-1, 1]$ built from orthonormal Legendre polynomials with smoothly decaying eigenvalues.

(Note: The authors mention complementary real-world tabular data evaluations in Appendix D, which is outside the provided main text.)

Key Insights and Ideas

  • Losses dictate which errors matter: Choosing a loss isn't just about statistical efficiency; it defines the geometry of compression. A loss with high curvature in high-affinity regions forces the finite-capacity encoder to nail strong positive pairs, happily ignoring errors elsewhere.
  • Fitting $K^\star$ vs. $\log K^\star$ is a geometric fork in the road: Before compression, estimating a density ratio ($K^\star$) and its log-score ($S^\star = \log K^\star$) are mathematically equivalent. Under a low-rank bottleneck, they diverge dramatically. For any smooth $f$-divergence, fitting the ratio locally weights errors by $1/K^\star$ (emphasizing rare, low-affinity regions), whereas fitting the log-score weights errors by $K^\star$ (emphasizing high-probability positive pairs).
  • Parameterization can flip the geometry: The NWJ mutual information bound natively stems from a ratio-coordinate divergence (which should weight by $1/K^\star$). However, because practitioners parameterize the critic with an exponential ($K_\theta = \exp(S_\theta)$), the low-rank dot-product bottleneck sits on the score, flipping the local curvature weight to $K^\star$.
  • When standard eigenfunctions survive: If the curvature weights happen to be roughly constant across data pairs, the weighted problem collapses back into standard $\ell_2$ spectral approximation—explaining why different SSL losses sometimes learn nearly identical features anyway.

Key Results

  • Divergent Feature Recovery: On the synthetic anisotropic kernel, rank-1 encoders trained on the exact same affinity split into two camps. Squared-error ratio fitting (uLSIF) captured the broad, low-affinity component (0.958 cosine similarity). Conversely, InfoNCE, NT-Logistic, KLIEP, Hellinger, and exponentially-parameterized NWJ all locked onto the localized, high-affinity spike (0.996–0.997 cosine similarity).
  • The Parameterization Flip: Swapping NWJ's exponential link for a softplus parameterization caused its learned representation to completely abandon the localized spike (similarity dropped from 0.996 to 0.482) and align with the broad component instead (0.954 similarity).
  • Loss-Invariance Regime: On the Legendre polynomial kernel—where target affinities hover near $1$ and curvature weights barely fluctuate (coefficient of variation $\le 0.09$)—SCL, NWJ, InfoNCE, and NT-Logistic all recovered the same top four eigenfunctions, each achieving an average mean-squared error below 0.04.

Limitations and Future Work

  • Local Approximations & Optimization: The curvature theory relies on second-order local Taylor expansions near an exact fit. Globally, DPF landscapes are nonconvex, meaning finite-sample quirks and SGD dynamics might deviate from pure geometric predictions.
  • PSD Constraints: Standard symmetric dot-product encoders ($\langle \Phi(x), \Phi(x') \rangle$) can only express positive semidefinite kernels, whereas true PMI-like log-affinities in the wild can be indefinite.
  • Scope of SSL: Reconstruction methods (like Masked Autoencoders and autoregressive LLMs) and non-contrastive algorithms (like BYOL, Barlow Twins, and JEPA) fall outside this pairwise-affinity framework. Extending DPF theory to non-contrastive methods, designing dedicated solvers for weighted spectral problems, and testing these geometric predictions on large-scale vision and language pretraining are flagged as prime next steps.

Summary updated

Abstract

Recent work has shown that contrastive representation learning can be understood as estimating a positive-pair, PMI-like kernel, and that spectral factorization of this kernel yields useful eigenfunction representations. This paper asks what happens beyond squared-error spectral geometry. Modern representation learning objectives are rarely pure $\ell_2$ kernel-approximation objectives: they use conditional KL, InfoNCE, JS/NCE, Brier, Hellinger, least-squares ratio fitting, and other statistical discrepancies. We show that these discrepancies do not merely provide alternative estimators of the same affinity; they induce different local geometries for the extraction of low-rank representations. To formalize this, we introduce divergence principal functions, a geometry-aware generalization of eigenfunctions. Eigenfunctions are recovered as the special case corresponding to squared-error geometry. For smooth discrepancies, we show that divergence principal functions locally solve a weighted spectral approximation problem, with weights given by the curvature of the divergence at the target affinity. This provides a loss-consistent bridge from positive-pair learning objectives to representation geometry and clarifies when spectral/eigenfunction representations are appropriate and when they are mismatched to the training objective.
BibTeX
@inproceedings{ray2026beyond,
  author = {Ritabrata Ray and Sahil Dharod and Burak Varıcı and Nicholas Matthew Boffi and Pradeep Ravikumar},
  title = {{Beyond Eigenfunctions: Divergence Principal Functions for Representation Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=M4JVbTCh2k},
}
Figure