KerJEPA: Kernel Discrepancies for Euclidean Self-Supervised Learning

Eric Zimmermann, Harley Wiltzer, Justin Szeto, David Alvarez-Melis, Lester MackeyarXiv 2025 · DOI

Abstract

Self-supervised learning (SSL) models often rely on regularization to prevent representation collapse. Recent advancements, such as LeJEPA, utilize "slicing"—random 1D projections—to match embeddings to a Gaussian distribution in Euclidean space. However, this approach introduces estimation variance and limits the choice of target distributions. We introduce KerJEPA, a generalized framework that expands Euclidean SSL to a broader family of kernel discrepancies, including Kernel Stein Discrepancy (KSD). By deriving closed-form solutions for the limit of infinite slices, KerJEPA eliminates projection noise and enables the use of diverse priors such as Laplace and Student-t distributions, offering improved training stability and geometric flexibility.

Introduction

In visual self-supervised learning, models are trained to produce similar embeddings for different augmentations of the same image. A persistent challenge in this paradigm is "representation collapse," where the network maps all inputs to a single constant vector to minimize the loss. Traditional methods prevented this by constraining embeddings to a hypersphere. More recently, methods like LeJEPA have shifted to Euclidean space, regularizing embeddings to follow a specific prior distribution, typically a Gaussian.

To manage high-dimensional data, these methods often employ "slicing," which involves projecting data onto random 1D lines to compare distributions. While computationally efficient, slicing introduces significant estimation variance (noise) that increases with the embedding dimension. To maintain stability, practitioners must increase the number of slices, which negates the efficiency gains. Furthermore, current implementations are often restricted to Gaussian priors, limiting the exploration of alternative embedding geometries.

The KerJEPA Framework

KerJEPA deconstructs and generalizes the regularization techniques used in Euclidean SSL into a unified framework. This approach provides several key mathematical and practical contributions:

1. Generalization to MMD and KSD

The authors demonstrate that the statistical tests used in previous methods (like the Epps-Pulley test) are specific instances of Sliced Maximum Mean Discrepancy (MMD). KerJEPA extends this to Kernel Stein Discrepancy (KSD). Unlike MMD, KSD utilizes the "score function"—the gradient of the log-density—of the target distribution. This allows the model to match complex, non-Gaussian priors exactly without the need for sampling or calculating complex normalization constants.

2. Analytic "Infinite" Slicing

To address the noise inherent in Monte Carlo slicing, KerJEPA introduces analytic slicing. By deriving the exact mathematical limit of an infinite number of random projections, the framework provides a closed-form solution that completely eliminates projection variance. This ensures that the regularization signal remains stable regardless of the embedding dimensionality.

3. Flexible Priors and Kernels

The framework allows for a modular approach to SSL regularization. Practitioners can select from various discrepancies (MMD, KSD), kernels (Gaussian, Inverse Multiquadric), and priors (Gaussian, Laplace, Student-t), allowing for fine-tuned control over the embedding space's geometry.

Key Insights: Geometry and Stability

Implicit Geometric Shifts

A significant theoretical finding of this work is that the act of slicing is not merely a computational shortcut; it fundamentally alters the geometry of the embeddings. Slicing induces a "heavy-tailed" kernel, which places more weight on outliers, and effectively reduces the kernel bandwidth as the dimensionality of the space increases.

The Stability-Complexity Tradeoff

While finite slicing (as seen in LeJEPA) scales linearly $O(n)$ with batch size, it is inherently noisy, leading to instability during the early stages of training. In contrast, the analytic (infinite) slicing method is perfectly stable but requires pairwise comparisons, resulting in quadratic $O(n^2)$ scaling. This suggests a tradeoff between computational speed and training convergence quality.

Experimental Results

Experiments conducted on the ImageNette dataset using a Vision Transformer (ViT-s/8) architecture demonstrate the efficacy of the KerJEPA framework:

  • Performance: KerJEPA variants consistently matched or outperformed the LeJEPA baseline. The highest accuracy was achieved by an unsliced KSD variant using an Inverse Multiquadric (IMQ) kernel and a Gaussian prior, reaching 91.90% top-1 accuracy, compared to 91.13% for LeJEPA.
  • Training Stability: Analytic methods showed significantly smoother convergence curves, particularly in the initial phases of training where finite-sliced methods exhibited high variance.
  • Robustness to Dimensionality: As embedding dimensions increased (e.g., to 1024), the noise from finite slicing began to degrade performance. The analytic KerJEPA methods remained immune to this degradation, maintaining consistent performance across scales.

Discussion and Limitations

While KerJEPA provides a robust toolkit for Euclidean SSL, there are considerations for large-scale deployment. The current study focused on ImageNette; further validation on full-scale ImageNet is required to confirm these benefits at scale. Additionally, the $O(n^2)$ complexity of analytic methods may pose challenges for the massive batch sizes used in industrial SSL. Future research may explore approximation techniques like Random Fourier Features or coresets to mitigate this computational cost. Finally, while the framework enables non-Gaussian priors, the specific downstream advantages of different geometries (e.g., Laplace vs. Gaussian) remain an open area for investigation in tasks like object detection and segmentation.

Summary updated

BibTeX
@misc{zimmermann2025kerjepa,
  author = {Eric Zimmermann and Harley Wiltzer and Justin Szeto and David Alvarez-Melis and Lester Mackey},
  title = {{KerJEPA: Kernel Discrepancies for Euclidean Self-Supervised Learning}},
  year = {2025},
  eprint = {2512.19605},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.19605},
}
Figure