DINO as a von Mises-Fisher mixture model

Hariprasath Govindarajan, Per Sidén, Jacob Roll, Fredrik Lindsten

Self-supervised learning (SSL) frameworks like DINO have revolutionized representation learning by distilling knowledge from a teacher to a student network without human labels. However, scaling these models reveals a trade-off between flexibility and stability. This paper provides a rigorous probabilistic reinterpretation of DINO by viewing it through the lens of a von Mises-Fisher (vMF) mixture model. By uncovering and restoring a "missing" normalization constant, the authors introduce DINO-vMF, which significantly improves the stability and performance of large-scale Vision Transformers (ViTs).

The Flexibility vs. Stability Trade-off

A core component of DINO is the use of "prototypes"—learned vectors in the latent space representing data clusters. For smaller models (e.g., ViT-Small), using unnormalized prototypes (where vectors have varying lengths) improves performance but often leads to training instability. Conversely, for larger models like ViT-Base, researchers typically force prototypes to be $L^2$-normalized (fixed length) to maintain stability. Unfortunately, this restricts the model's ability to represent clusters with varying "tightness" or precision. The authors sought a formulation offering the flexibility of unnormalized prototypes without sacrificing the stability required for large-scale models.

DINO as a vMF Mixture Model

The researchers demonstrate that DINO’s cross-entropy loss is mathematically equivalent to the log-likelihood of a von Mises-Fisher (vMF) mixture model, a probability distribution designed for data on a unit hypersphere. To address the limitations of standard DINO, they propose DINO-vMF with three key innovations:

  1. Restoring the Normalization Constant: In a standard vMF distribution, the probability density includes a normalization constant that depends on the "concentration" or precision ($\kappa$) of the cluster. Standard DINO implicitly assumes this constant is identical for all clusters. DINO-vMF explicitly calculates and adds this log-normalization constant back into the logit scores.
  2. Differentiable Approximation: Calculating the exact normalization constant involves complex modified Bessel functions, which are computationally expensive and difficult to differentiate. The authors propose a differentiable asymptotic expansion that is highly accurate for the high-dimensional latent spaces (typically $p=256$) used in modern SSL.
  3. Probability-Space Centering: DINO uses "centering" to prevent any single prototype from dominating. While standard DINO centers in the logit space, DINO-vMF centers in the probability space, aligning more closely with the "M-step" of the Expectation-Maximization (EM) algorithm used in classical mixture modeling.

Key Insights

The "Void Prototype" Problem: Standard DINO with ViT-Base often suffers from a collapse where approximately 83% of the prototypes become identical and point away from the data (the "void prototype set"). DINO-vMF effectively eliminates this collapse, ensuring the model utilizes its full capacity.

Precision as a Proxy for Difficulty: In DINO-vMF, the magnitude of a prototype vector corresponds to the precision ($\kappa$) of that cluster. The authors found that data points assigned to high-precision clusters are generally easier to classify. This suggests the model naturally learns to distinguish between "easy" and "hard" concepts.

Accuracy vs Prototype Precision

Key Results

The models were pre-trained on ImageNet-1K and evaluated across a wide array of benchmarks, including k-Nearest Neighbor (kNN), linear probing, few-shot learning, and transfer learning. The proposed modifications yielded consistent improvements, especially for the larger ViT-Base architecture.

Main Results Table
  • ImageNet Accuracy: For ViT-Base, DINO-vMF improved kNN accuracy from 76.11% to 77.40%. When applied to the more recent iBOT framework, iBOT-vMF reached 78.66% (up from 77.10%).
  • Few-Shot Learning: Gains were most dramatic in low-data regimes. For 1-shot ImageNet classification, DINO-vMF outperformed standard DINO by 8.5% (50.3% vs 41.8%).
  • Downstream Tasks: iBOT-vMF achieved state-of-the-art results among DINO-based methods on image retrieval (Oxford/Paris) and video object segmentation (DAVIS-2017).

Limitations and Future Work

  • Diminishing Returns for Small Models: While DINO-vMF provides a massive boost for ViT-Base, improvements for ViT-Small are marginal. Smaller models may lack the capacity to fully exploit the added flexibility of the vMF mixture model.
  • Centering Dynamics: Although the new centering method is theoretically motivated by the EM algorithm, the exact relationship between SSL's "sinkhorn-like" centering and classical EM priors requires further theoretical study.
  • Future Directions: The vMF interpretation could be extended to other SSL methods utilizing inner-product-based prototypes, potentially leading to a more unified probabilistic framework for self-supervised learning.

Summary updated

BibTeX
@inproceedings{govindarajan2023dino,
  author = {Hariprasath Govindarajan and Per Sidén and Jacob Roll and Fredrik Lindsten},
  title = {{DINO as a von Mises-Fisher mixture model}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=cMJo1FTwBTQ},
}
Figure