PHI-S: Distribution Balancing for Label-Free Multi-Teacher Distillation

Mike Ranzinger, Jon Barker, Greg Heinrich, Pavlo Molchanov, Bryan Catanzaro, Andrew Tao

Abstract

Various visual foundation models have distinct strengths and weaknesses, both of which can be improved through heterogeneous multi-teacher knowledge distillation without labels, termed "agglomerative models." We build upon this body of work by studying the effect of the teachers' activation statistics, particularly the impact of the loss function on the resulting student model quality. We explore a standard toolkit of statistical normalization techniques to better align the different distributions and assess their effects. Further, we examine the impact on downstream teacher-matching metrics, which motivates the use of Hadamard matrices. With these matrices, we demonstrate useful properties, showing how they can be used for isotropic standardization, where each dimension of a multivariate distribution is standardized using the same scale. We call this technique "PHI Standardization" (PHI-S) and empirically demonstrate that it produces the best student model across the suite of methods studied.

Introduction

In modern computer vision, "Foundation Models" serve as specialized experts: CLIP excels at vision-language understanding, DINOv2 provides dense features for depth and layout, and SAM (Segment Anything Model) is the industry standard for segmentation. "Agglomerative models" aim to distill this diverse knowledge into a single, efficient student model without the need for human-labeled data.

A significant hurdle in this distillation process is that different teacher models "speak" vastly different statistical languages. For instance, the activation variance of the SAM model can be up to 191 times larger than that of DFN CLIP. When using a standard loss function like Mean Squared Error (MSE), the student model implicitly prioritizes matching the high-variance teacher (SAM) while largely ignoring others. Previous attempts to address this via simple weighting or basic standardization often failed to capture the nuances of the teacher distributions or introduced training instabilities.

Methodology

To solve the distribution imbalance, we propose PHI-S (PCA-Hadamard Isotropic Standardization). This technique transforms the teacher's output into a balanced, "isotropic" space before the student attempts to mimic it.

Overview of the PHI-S training and inference pipeline, showing how teacher distributions are balanced before distillation.

The PHI-S Transform

  1. Standardization vs. Whitening: While whitening (decorrelating features) is theoretically sound, it is often unstable because many teacher models have redundant dimensions (low rank). PHI-S opts for a more robust approach.
  2. The Hadamard Trick: PHI-S utilizes a Hadamard matrix—a special orthogonal matrix of $+1$ and $-1$ values—as a rotation following Principal Component Analysis (PCA).
  3. Isotropic Scaling: This specific rotation spreads the variance of the teacher's features equally across all dimensions. This ensures the student's learning error is distributed evenly, preventing any single dimension or teacher from dominating the optimization landscape.
  4. Invertibility: The transform is mathematically invertible. During inference, the student can "un-rotate" its predictions to recover the exact feature values the original teacher would have produced.

Key Results and Insights

Our empirical evaluation demonstrates that PHI-S consistently produces superior student models. In a head-to-head comparison of 10 normalization methods, PHI-S achieved the best average rank across all benchmarks for both ViT-B and ViT-L student scales.

Training loss curves across different teachers. PHI-S (red) consistently achieves lower loss across diverse teacher distributions compared to the MSE baseline (blue).

Performance Highlights

  • Balanced Learning: As shown in the loss curves, PHI-S is the only method that allows the student to simultaneously minimize error for all four teachers (DFN CLIP, SigLIP, DINOv2, and SAM) without one teacher's loss dominating the others.
  • State-of-the-Art Efficiency: A ViT-L model trained with PHI-S outperformed the previous state-of-the-art "AM-RADIO" model—which uses a much larger ViT-H backbone—on semantic segmentation and several vision-language tasks.
  • Uniform Error Profile: By using Hadamard matrices, we ensure that a small error in the student's normalized prediction has a uniform impact across all dimensions of the original teacher's space, making the optimization landscape easier to navigate.

Conclusion

PHI-S provides a robust framework for multi-teacher distillation by treating the choice of loss function as a statistical balancing act. While currently optimized for high-dimensional vision models, the principles of isotropic standardization via Hadamard transforms offer a promising path for other modalities. Future work may explore the application of PHI-S to "outlier-free" quantization, potentially unlocking higher-fidelity 4-bit or 2-bit model compression by balancing channel variances post-hoc.

Summary updated

BibTeX
@misc{ranzinger2024phi,
  author = {Mike Ranzinger and Jon Barker and Greg Heinrich and Pavlo Molchanov and Bryan Catanzaro and Andrew Tao},
  title = {{PHI-S: Distribution Balancing for Label-Free Multi-Teacher Distillation}},
  year = {2024},
  eprint = {2410.01680},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.01680},
}

Loading related content...

Figure