Multi-Level Feature Distillation of Joint Teachers Trained on Distinct Image Datasets

Adrian Iordache, Bogdan Alexe, Radu Tudor Ionescu

TL;DR

This paper introduces Multi-Level Feature Distillation (MLFD), a novel framework that distills knowledge from multiple teacher models, each trained on a different dataset, into a single student model. By combining teachers into a "joint teacher" and extracting knowledge at various representation levels, MLFD significantly improves student model performance across diverse datasets and architectures without increasing inference costs.

What Problem Does This Paper Address?

The current paradigm in machine learning often involves training models on single, large datasets. However, no single dataset can fully capture the vast variability and expressiveness of the visual world. Each dataset also carries an implicit bias from its underlying data distribution, which can lead to models that perform poorly when evaluated on different datasets. While combining data from multiple sources is a natural solution, training a single model on all datasets at once presents challenges, especially when datasets have different class labels. This paper addresses the challenge of leveraging knowledge from multiple, distinct datasets to build more robust and generalizable models, overcoming the limitations of single-dataset training and existing multi-dataset approaches.

Methods

The core of this paper is the Multi-Level Feature Distillation (MLFD) framework, which operates in three stages:

  1. Individual Teacher Training: Each teacher model is trained from scratch on its own distinct dataset.
  2. Joint Teacher Training: The individual teachers are combined into a single "joint teacher" architecture. This joint teacher is then trained on samples from all datasets, with the individual teachers' weights frozen. The fusion of teachers occurs at specific representation levels (layers) within the network, creating a richer, more generalized representation.
  3. Multi-Level Feature Distillation: The knowledge acquired by the joint teacher is distilled into dataset-specific student models. This distillation process is performed at multiple representation levels, meaning the student learns not just from the final output (logits) but also from intermediate feature representations of the joint teacher. The loss function for the student includes cross-entropy for class prediction, distillation loss between teacher and student logits, and mean squared error between teacher and student feature embeddings at chosen levels.

A key novelty is the "multi-level" aspect, where knowledge is transferred from various intermediate layers of the joint teacher, not just the output layer. This allows students to learn a more comprehensive understanding of the visual world.

Datasets

The paper evaluates its method on the following datasets for image classification:

  • CIFAR-100: A dataset of 60,000 color images (32x32 pixels) across 100 classes.
  • ImageNet-Sketch: A dataset of 41,088 training and 10,752 test black and white images from 1000 classes, designed to test generalization to out-of-domain data.
  • TinyImageNet: A subset of ImageNet with 100,000 training images from 200 object classes (64x64 pixels).

The authors also mention that their method applies to action recognition and that results on additional datasets and tasks are discussed in the supplementary material.

Key Insights and Ideas

  • Leveraging Diversity is Key: The core idea is that distinct datasets offer complementary views of the visual world. MLFD effectively pools this diverse knowledge.
  • Multi-Level Distillation Matters: Distilling knowledge from multiple intermediate feature levels (not just the final output) significantly boosts student performance. This suggests that intermediate representations capture crucial, generalizable information.
  • Joint Teacher as a Knowledge Hub: The joint teacher acts as a powerful intermediary, consolidating knowledge from specialized teachers into a more generalized form before passing it to students.
  • Flexibility in Architectures: The framework is flexible enough to combine teachers with different architectures, making it adaptable to various scenarios.
  • No Inference Cost Penalty: A significant advantage is that the student models have the same architecture as the individual teachers, meaning there's no added computational cost during inference.

Key Results

The MLFD method consistently outperformed several baselines:

  • Dataset-specific models: Students achieved an average improvement of 3.4% (single-level distillation) and 6.1% (two-level distillation) over models trained solely on their individual datasets.
  • Multi-dataset baselines: MLFD students significantly surpassed both "multi-head multi-dataset" and "joint-head multi-dataset" models, with average improvements ranging from 5% to 27%.
  • Multi-level advantage: In most cases, using two distillation levels (L2) outperformed one level (L1), demonstrating the benefit of multi-level distillation. Students with L2 distillation often surpassed even the joint teacher models.
  • Ablation Study: An ablation study confirmed that using representation levels closer to the output layer (e.g., L1 and L2) yielded better results than using very early layers (L3 and L4), suggesting that later layers capture more relevant, dataset-specific information for the joint teacher.

Limitations and Future Work

  • Layer Selection: The paper acknowledges that the choice of representation levels (layers) for fusion and distillation is crucial. While they performed an ablation study, finding the optimal set of layers might require fine-tuning.
  • Future Work: The authors plan to extend MLFD to other vision tasks like object detection and image segmentation, and explore its application in new domains such as natural language processing. They also aim to further investigate the effectiveness of the learned feature space through t-SNE visualizations.

Summary updated

BibTeX
@inproceedings{iordache2025multi,
  author = {Adrian Iordache and Bogdan Alexe and Radu Tudor Ionescu},
  title = {{Multi-Level Feature Distillation of Joint Teachers Trained on Distinct Image Datasets}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
}
Figure