Skip to content

UNIC: Universal Classification Models via Multi-teacher Distillation

Conference: ECCV 2024
arXiv: 2408.05088
Code: Yes (Project Page)
Area: Model Compression
Keywords: Multi-teacher distillation, universal classification model, ladder of projectors, teacher dropping, knowledge fusion

TL;DR

This paper proposes the UNIC framework, which integrates knowledge from multiple complementary pre-trained models into a single student model through improved multi-teacher distillation strategies (including a ladder of projectors and teacher dropping techniques), achieving cross-task universal classification.

Background & Motivation

Limitations of Prior Work

Limitations of Prior Work: Background: Pre-trained models have become fundamental infrastructure in computer vision—different pre-training paradigms (such as CLIP contrastive learning, DINOv2 self-distillation, MAE masked reconstruction, etc.) have yielded models with distinct, complementary strengths. For example, CLIP excels at zero-shot classification and image-text retrieval, DINOv2 performs outstandingly on dense prediction and fine-grained classification, while supervised pre-training (such as models trained on ImageNet) still retains advantages on specific tasks.

The core problem is: Can a single model be trained to simultaneously inherit the respective strengths of multiple different pre-trained models? This is more attractive than simply using the best single model because: (1) the advantages of different models are complementary across different tasks, and no single model is best for all tasks; (2) deploying multiple large models incurs high computational overhead, whereas a single model is much more efficient; (3) knowledge fusion has the potential to produce a student that outperforms any single teacher.

Knowledge distillation is a natural candidate to achieve this goal, but standard multi-teacher distillation faces challenges: the feature spaces of different teacher models are inconsistent, learning objectives may conflict, and a dominant teacher might drive the learning process, causing the student to ignore the contributions of other teachers.

Method

Overall Architecture

The training workflow of UNIC is as follows: (1) select multiple pre-trained teacher models with complementary advantages (e.g., CLIP, DINOv2, supervised models, etc.); (2) employ a standard distillation setting where the student model learns to match the feature representations of each teacher; (3) optimize the distillation process using enhanced strategies such as a ladder of projectors and teacher dropping. The student model shares the same parameter scale as any single teacher.

Key Designs

  1. Ladder of Expendable Projectors:

    • Function: Enhance the influence of intermediate features during the distillation process.
    • Mechanism: Light-weight projectors are added to multiple intermediate layers of the student encoder. Each projector maps the intermediate features of its corresponding layer to the teacher's feature space for matching. These projectors form a "ladder" structure—each layer directly aligns with the teacher during training, and the projectors are discarded (expendable) after training, incurring no additional inference cost.
    • Design Motivation: Standard distillation only matches final-layer features, leaving intermediate feature quality without direct supervision. The ladder of projectors ensures high-quality features from shallow to deep layers through direct intermediate alignment.
  2. Teacher Dropping:

    • Function: Gain a better balance of the influences from multiple teachers.
    • Mechanism: In each training step, the distillation loss of some teachers is randomly "dropped" with a certain probability. Akin to the effect of Dropout on neurons, teacher dropping prevents the student from over-relying on a single dominant teacher, forcing the student to learn knowledge from each teacher in a balanced manner.
    • Design Motivation: In standard multi-teacher distillation, teachers with larger losses (typically those with the most significant divergence from the student) dominate the gradient direction, causing the knowledge of other teachers to be neglected. Teacher dropping breaks this imbalance via a randomized masking mechanism.
  3. Systematic Distillation Analysis:

    • Function: Provide best practices for multi-teacher distillation.
    • Mechanism: The authors first systematically analyze the behavior of standard multi-teacher distillation—including the effects of different teacher combinations, methods of feature alignment (MSE vs. cosine), and the choice of projector architectures. Based on the analysis, they progressively refine the distillation setup, eventually arriving at the full UNIC framework.
    • Design Motivation: Multi-teacher distillation is a complex optimization problem, and blind combination may perform worse than single-teacher distillation. Systematic analysis helps understand key factors.

Loss & Training

  • Multi-teacher MSE distillation loss: Mean squared error between student features and each teacher's features, with dimensions aligned via projectors.
  • Ladder distillation loss: Additional distillation losses from the intermediate-layer projectors.
  • Teacher dropping ratio: Typically \(0.3\text{--}0.5\), serving as a regularization parameter.
  • Training data: Distillation is conducted using the ImageNet-1K training set.
  • Student architecture: Same backbone as the largest teacher (e.g., ViT-B/L).

Key Experimental Results

Main Results

Dataset Metric Ours (UNIC) Best Single Teacher Gain
ImageNet Top-1 Acc \(\ge\) Best DINOv2 Maintained or slightly superior
COCO Det AP \(\ge\) Best DINOv2 Maintained
ADE20K Seg mIoU \(\ge\) Best DINOv2 Maintained
Zero-shot Classification Avg Acc \(\ge\) Best CLIP Maintained or improved
Multi-task Integration Avg Rank 1st Mixed strengths Best overall

Ablation Study

Configuration Key Metric Description
Standard Multi-teacher Distillation Imbalanced Dominant teachers perform well; knowledge from other teachers is lost
+ Ladder of Projectors Better intermediate features Significant improvements in dense prediction tasks
+ Teacher Dropping More balanced Performance across all tasks is more balanced
Different Teacher Combinations CLIP+DINOv2 Optimal The combination with the strongest complementarity

Key Findings

  • A single UNIC model can achieve or exceed the performance of the best teacher on each task.
  • The ladder of projectors yields the most significant improvements for dense prediction tasks (detection, segmentation).
  • Teacher dropping effectively prevents unbalanced learning among teacher models.
  • CLIP and DINOv2 constitute the most complementary combination of teachers.

Highlights & Insights

  • The goal of "one model to outperform all teachers" is highly practical on a deployment level.
  • The ladder of projectors is an elegant design—employed during training and discarded for inference, incurring zero extra cost.
  • Teacher dropping draws inspiration from Dropout, representing an innovative transfer of the concept to the teacher level.
  • The systematic analysis-and-improvement methodology is much more convincing than simply presenting a method directly.

Limitations & Future Work

  • Distillation training still requires substantial computational resources.
  • The choice of teacher models relies on heuristic experience, lacking automated selection methods.
  • Evaluated only on classification and dense prediction tasks; the transferability of generative task knowledge remains unexplored.
  • Dynamic teacher weight allocation could be explored as an alternative to random dropping.
  • Combining this framework with model quantization/pruning could further improve deployment efficiency.
  • CRD / FitNet: Classic knowledge distillation methods, but designed for single-teacher settings.
  • CLIP / DINOv2 / MAE: Representative pre-training paradigms, each with distinct advantages.
  • Theia: A concurrent work that also explores multi-model knowledge fusion.
  • Insights: Multi-teacher distillation is an efficient way to leverage the pre-trained model ecosystem, and the design of the ladder of projectors is highly generalizable.

Rating

  • Novelty: ⭐⭐⭐⭐ The ladder of projectors and teacher dropping are creative designs.
  • Experimental Thoroughness: ⭐⭐⭐⭐⭐ The systematic analysis combined with multi-task evaluation is highly comprehensive.
  • Writing Quality: ⭐⭐⭐⭐ The analysis-then-improvement narrative structure is clear and persuasive.
  • Value: ⭐⭐⭐⭐ Makes a practical contribution to the fields of model merging and knowledge fusion.