Abstract
Self-supervised learning (SSL) has significantly advanced visual representation learning, yet a performance gap persists between large-scale models and their smaller counterparts. Traditional knowledge distillation (KD) methods often rely on static, offline teachers, limiting the potential for mutual information exchange. This paper presents Multi-Mode Online Knowledge Distillation (MOKD), a collaborative training framework where two models learn simultaneously through independent self-distillation and a novel cross-attention-based mutual learning mechanism. MOKD effectively bridges the gap between heterogeneous architectures, such as CNNs and Vision Transformers, achieving state-of-the-art performance across various benchmarks.
Introduction
Self-supervised learning (SSL) has revolutionized computer vision by enabling models to learn robust features from massive unlabeled datasets. Despite these successes, a persistent performance gap remains: while large-scale models like ViT-Base excel in SSL environments, smaller, more efficient architectures—such as ResNet-18 or MobileNet—often underperform significantly compared to their supervised counterparts.
Existing strategies to mitigate this gap typically involve Knowledge Distillation (KD), where a pre-trained "teacher" model guides a "student." However, these methods are predominantly offline and unidirectional; the teacher remains static and cannot benefit from the student's learning process. This lack of synergy is particularly restrictive when pairing heterogeneous architectures (e.g., CNNs and Transformers) that capture distinct visual characteristics. To address these limitations, we introduce Multi-Mode Online Knowledge Distillation (MOKD), a framework designed for collaborative, multi-model self-supervised training.
Methodology
MOKD facilitates an online learning environment where two models are trained from scratch in tandem. The framework operates through two primary distillation modes:
1. Self-Distillation Mode
Each model independently performs a self-supervised task based on the DINO framework. In this mode, a model attempts to match its current online predictions with the outputs of its own "momentum" version—an exponential moving average (EMA) of its previous states. This ensures that each model maintains a stable and consistent internal representation.
2. Cross-Distillation Mode
This mode serves as the collaborative core of MOKD. Model A learns from the momentum version of Model B, and vice versa. To facilitate this exchange between different architectures, the authors developed two key components:
- The T-Head (Transformer Head): A specialized projection head designed to align disparate feature representations, such as a ResNet’s spatial feature maps and a Vision Transformer’s tokens.
- Cross-Attention Feature Search: Within the T-Head, a cross-attention mechanism identifies and aligns semantically relevant features between the two models. This allows the models to converge on shared semantic concepts (e.g., identifying the primary object in a scene) regardless of their structural differences.
The final objective is a weighted sum of self-distillation and cross-distillation losses, allowing both models to preserve their unique architectural strengths while benefiting from their partner's perspective.
Experimental Results
The MOKD framework was evaluated across several standard benchmarks, including ImageNet-1K, ImageNet-100, CIFAR-10/100, and MS COCO for downstream tasks.
Performance on ImageNet-1K
MOKD consistently outperformed both independent baselines and existing SSL-KD methods. When pairing a ResNet-50 with a ViT-Small, the ResNet-50 achieved a linear probing accuracy of 74.1% (a 2.0% improvement over the baseline), while the ViT-Small reached 74.4%.
Boosting Efficient Models
The framework proved exceptionally effective for smaller models. A ResNet-18 trained alongside a ResNet-101 reached 63.6% accuracy, significantly surpassing previous distillation methods such as DisCo (60.6%) and SEED (57.6%).
Downstream Task Generalization
On the MS COCO dataset, MOKD-trained backbones showed superior transferability. A ResNet-34 backbone trained via MOKD improved object detection performance by 0.7 AP over the standard DINO baseline, demonstrating that the collaborative learning process produces more versatile features for complex vision tasks.
Discussion and Key Insights
- Heterogeneous Synergy: A key finding is the complementary nature of CNNs and Vision Transformers. CNNs excel at capturing local patterns, whereas ViTs focus on global context. MOKD allows these models to exchange these biases, resulting in ResNets with better global awareness and ViTs with improved local sensitivity.
- The Advantage of Online Learning: Unlike traditional offline KD, the online nature of MOKD allows the "knowledge" to evolve dynamically. This prevents the student from merely inheriting the teacher's static biases and fosters a more robust and generalized feature space.
- Semantic Alignment: The cross-attention mechanism in the T-Head acts as a semantic filter, enabling models to ignore architecture-specific noise and focus on the underlying concepts essential for high-level generalization.
Conclusion and Future Work
MOKD represents a significant step forward in collaborative self-supervised learning, particularly for improving the performance of smaller models. However, the framework introduces a higher computational cost, as it requires training two models simultaneously. Future research will focus on reducing this overhead, exploring multi-peer distillation involving more than two models, and integrating efficient fine-tuning techniques to make the framework more accessible for resource-constrained environments.
Summary updated