Simplifying Knowledge Transfer in Pretrained Models

Siddharth Jain, Shyamgopal Karthik, Vineet Gandhi

Abstract

Pretrained models are ubiquitous in the current deep learning landscape, offering strong results on a broad range of tasks. Recent works have shown that models differing in various design choices exhibit categorically diverse generalization behavior, resulting in one model grasping distinct data-specific insights unavailable to the other. In this paper, we propose to leverage large publicly available model repositories as an auxiliary source of model improvements. We introduce a data partitioning strategy where pretrained models autonomously adopt either the role of a student, seeking knowledge, or that of a teacher, imparting knowledge. Experiments across various tasks demonstrate the effectiveness of our proposed approach. In image classification, we improved the performance of ViT-B by approximately 1.4% through bidirectional knowledge transfer with ViT-T. For semantic segmentation, our method boosted all evaluation metrics by enabling knowledge transfer both within and across backbone architectures. In video saliency prediction, our approach achieved a new state-of-the-art. We further extend our approach to knowledge transfer between multiple models, leading to considerable performance improvements for all model participants.

Introduction

Traditional Knowledge Distillation (KD) typically follows a unidirectional paradigm: a fixed, high-performing "teacher" model supervises a smaller "student" model. While effective for model compression, this approach assumes the teacher is superior across the entire data distribution. However, different architectures and training recipes often result in models with complementary strengths and "blind spots." A smaller model might capture specific nuances that a larger model misses due to its unique inductive biases.

This paper introduces Bi-KD (Bidirectional Knowledge Distillation), a framework designed to unlock the latent knowledge within pretrained model repositories. Instead of freezing one model as a permanent teacher, Bi-KD allows models to learn from each other's unique strengths simultaneously, improving both participants in a single training stage.

Methodology: Dynamic Data Partitioning

The core of Bi-KD is a dynamic data partitioning strategy that assigns roles on a per-sample basis. Rather than a static hierarchy, the model that demonstrates higher confidence or lower loss for a specific data point is designated as the teacher for that sample.

Comparison of standard KD, KL+DP, and the proposed Bi-KD framework.

For image classification, role assignment is based on Confidence-Based Roles: the model producing the highest prediction probability for the ground-truth class becomes the teacher. In dense prediction tasks like semantic segmentation or video saliency, the model with the lowest loss on a specific sample provides the soft targets for its partner. This bidirectional flow ensures that each model acts as a student exactly when its partner has a better grasp of the underlying data.

Experimental Results

The effectiveness of Bi-KD was validated across ImageNet classification, ADE20K semantic segmentation, and video saliency prediction benchmarks (DHF1K and Hollywood-2).

One of the most significant findings is that model diversity—pairing models with different training methodologies—yields the highest gains. For instance, pairing a self-supervised DINOv2 model with a supervised MAE model leads to substantial improvements because their errors are largely uncorrelated.

Performance comparison between the baseline KL+DP and Bi-KD (Ours) across various model pairs on ImageNet.

As shown in the results table, Bi-KD consistently outperforms existing methods like KL+DP. Notably, pairing a ViT-Base (ViT-B) with a much smaller ViT-Tiny (ViT-T) improved the ViT-B's top-1 accuracy by 1.385%, demonstrating that even "weaker" models possess valuable data-specific insights that can benefit larger architectures.

Conclusion

Bi-KD simplifies knowledge transfer by treating pretrained models as collaborative partners rather than static targets. By allowing models to dynamically swap roles based on sample-level expertise, the framework achieves state-of-the-art results in video saliency and significant gains in classification and segmentation. Future work will explore extending this logic to unsupervised settings and investigating model merging techniques to combine these mutually improved models into unified architectures.

Summary updated

BibTeX
@article{jain2025simplifying,
  author = {Siddharth Jain and Shyamgopal Karthik and Vineet Gandhi},
  title = {{Simplifying Knowledge Transfer in Pretrained Models}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=eQ9AVtDaP3},
}
Figure