DMT: Comprehensive Distillation with Multiple Self-Supervised Teachers

Yuang Liu, Jing Wang, Qiang Zhou, Fan Wang, Jun Wang, Wei Zhang

TL;DR

DMT (Comprehensive Distillation with Multiple Self-supervised Teachers) is a new framework that compresses large, powerful self-supervised models into smaller, efficient ones by learning from multiple "teachers" simultaneously. By fusing the strengths of different learning paradigms—like Masked Image Modeling and Contrastive Learning—DMT produces student models that significantly outperform those trained with a single teacher or from scratch.

What Problem Does This Paper Address?

Self-supervised learning (SSL) has revolutionized computer vision by allowing models to learn from massive unlabeled datasets. However, two major hurdles remain:

  1. Resource Intensity: Training these models is incredibly expensive, often requiring massive GPU clusters.
  2. Model Size: The best-performing models (like ViT-Base or Large) are often too cumbersome for deployment on edge devices or mobile phones.

While Knowledge Distillation (KD) is a standard way to "shrink" models by having a small student mimic a large teacher, most existing methods focus on supervised learning or use only a single teacher. The authors argue that different SSL methods (e.g., MAE which focuses on reconstructing pixels vs. MoCo which focuses on global image similarity) learn complementary features. Relying on just one teacher leaves valuable knowledge on the table.

Methods

The authors introduce DMT, which utilizes a "Dual Soft Fusion Distillation" strategy to aggregate knowledge from multiple off-the-shelf SSL teachers (specifically MAE, MoCoV3, and iBOT).

  • Teacher Decoders are Removed: To keep the process efficient and unify the latent space, the authors discard the specialized decoders of the teachers and only use their encoders.
  • Soft Token Fusion Distillation (TFD): This focuses on the 1D sequence of tokens. Instead of matching a single teacher, the student aims to match an aggregated "consensus" of all teachers. They use Kullback-Leibler (KL) divergence rather than simple Euclidean distance, as KL better captures the distribution and relationships between different parts of the image.
  • Soft Feature Fusion Distillation (SFD): This treats the tokens as a 3D feature map to capture spatial information. It performs channel-wise distillation, ensuring the student learns the "where" as well as the "what."
  • Lightweight Adapter: Since a student (like ViT-Tiny) has different dimensions than a teacher (like ViT-Base), a small linear layer is used to project the student's features into the teacher's space.

Datasets

The models were evaluated across three major benchmarks:

  • ImageNet-1K: Used for pretraining and evaluating top-1 classification accuracy.
  • MS-COCO: Used to test "dense" downstream tasks like object detection and instance segmentation.
  • ADE20K: Used for semantic segmentation.

Key Insights and Ideas

  • The Power of Diversity: The "aha moment" is that teachers trained with different objectives (reconstruction vs. contrastive) provide a more holistic view of an image. One teacher might be better at local textures, while another excels at global structure.
  • Fusion > Simple Averaging: The authors found that simply averaging the losses from multiple teachers (a naive approach) leads to poor results because the teachers' "guidelines" can be inconsistent. By fusing the knowledge (the embeddings) before calculating the loss, the student receives a unified, stronger signal.
  • KL Divergence is Key: In their ablation studies, switching from Mean Squared Error (MSE) to KL divergence significantly boosted performance. This suggests that the relative distribution of information in the feature space is more important for a student to learn than the exact numerical values.

Key Results

DMT consistently outperformed state-of-the-art SSL distillation methods:

  • ImageNet Classification: A ViT-Tiny (5M parameters) trained via DMT achieved 75.0% Top-1 accuracy, a 3.4% jump over a standard MAE-trained model of the same size.
  • Model Compression: A ViT-Small student achieved 98.8% of the performance of its much larger teachers while using only 25% of the parameters.
  • Dense Tasks: On the MS-COCO dataset, DMT improved the performance of standard SSL models by 4.0% AP, showing that the distilled knowledge transfers exceptionally well to complex tasks like object detection.
  • Base-to-Base: Even when the student and teacher were the same size (ViT-Base), DMT improved the base model's performance by 0.5% to 0.9%, proving it's a viable way to "boost" existing models.

Limitations and Future Work

  • Training Overhead: While the final student model is very fast and small, the training phase requires running multiple large teacher models simultaneously. This increases the memory and power requirements during the distillation process.
  • Teacher Selection: The study focused on three specific teachers. The authors note that while more teachers generally help, there is a point of diminishing returns where the added computational cost outweighs the accuracy gains.
  • Future Directions: The authors suggest that this "comprehensive" approach could be extended beyond vision to other fields, such as Large Language Models (LLMs), where multiple specialized teachers could guide a smaller, general-purpose assistant.

Summary updated

BibTeX
@inproceedings{liu2024dmt,
  author = {Yuang Liu and Jing Wang and Qiang Zhou and Fan Wang and Jun Wang and Wei Zhang},
  title = {{DMT: Comprehensive Distillation with Multiple Self-Supervised Teachers}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=BSfkq5Mi3U},
}
Figure