Abstract
Semantic segmentation is a critical yet computationally intensive task in computer vision. While Knowledge Distillation (KD) offers a path toward efficient models, traditional methods often rely on cumbersome pre-trained teachers or homogeneous student architectures. This paper presents a novel collaborative learning framework that leverages the complementary inductive biases of Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs). By introducing Heterogeneous Feature Distillation (HFD) and Bidirectional Selective Distillation (BSD), we enable these diverse architectures to exchange reliable knowledge dynamically. Experimental results across multiple benchmarks, including PASCAL VOC 2012 and Cityscapes, demonstrate significant performance gains, allowing compact models to achieve state-of-the-art results without the need for a static teacher model.
Introduction
Semantic segmentation—the process of assigning a categorical label to every pixel in an image—serves as a cornerstone for applications ranging from medical imaging to autonomous driving. However, the high computational cost of high-performing models often precludes their use in real-time environments. Knowledge Distillation (KD) has emerged as a solution, typically involving a large "teacher" model guiding a smaller "student."
Despite its success, traditional KD faces two primary hurdles. First, the requirement for a high-capacity, pre-trained teacher model adds significant training overhead. Second, existing "online" KD methods, where multiple students learn simultaneously, usually employ identical architectures. This homogeneity limits the diversity of information exchanged. CNNs are inherently biased toward local texture and spatial hierarchies, whereas ViTs excel at capturing long-range dependencies and global context. This research explores how these two distinct architectures can collaboratively learn, turning their structural differences into a mutual advantage.
Methodology
The proposed framework facilitates a peer-learning environment where a CNN and a ViT act as mutual students. To overcome the challenge of aligning their fundamentally different internal representations, the authors introduce two key mechanisms.
Heterogeneous Feature Distillation (HFD)
Because CNNs and ViTs process information differently in their early layers, their feature maps are not directly comparable. HFD bridges this gap by employing transformation layers, such as 1x1 convolutions and pooling operations, to align the feature spaces. This allows the CNN to incorporate global context from the ViT’s early representations, while the ViT benefits from the CNN’s focus on local, low-level details. This alignment ensures a common foundation before the models diverge into their specialized high-level processing.
Bidirectional Selective Distillation (BSD)
A significant risk in collaborative learning is the propagation of errors; if one student is incorrect, it may mislead its peer. BSD acts as a "reliability filter" to ensure that knowledge transfer only occurs when one model demonstrates superior accuracy relative to the ground truth. This is implemented at two levels:
- Region-wise BSD: The framework evaluates specific image regions. If the CNN exhibits a lower Cross-Entropy loss in a particular area compared to the ViT, the ViT is encouraged to mimic the CNN’s features for that region, and vice versa.
- Pixel-wise BSD: At the final output (logit) stage, the system determines which model’s prediction for an individual pixel is more accurate. The more reliable prediction then serves as the target for the other student’s refinement.
Experimental Evaluation
The framework was rigorously tested on four major semantic segmentation benchmarks:
- PASCAL VOC 2012: A standard dataset featuring 21 object categories.
- Cityscapes: High-resolution urban street scene imagery.
- CamVid: A dataset focused on real-time urban scene segmentation.
- ADE-20K: A complex dataset encompassing a wide variety of indoor and outdoor environments.
Quantitative and Qualitative Results
The collaborative approach consistently outperformed existing state-of-the-art online distillation methods, such as Deep Mutual Learning (DML) and Knowledge Distillation via Collaborative Learning (KDCL). On the PASCAL VOC dataset, the combination of a MobileNetV2 (CNN) and MiT-B1 (ViT) achieved a combined mean Intersection over Union (mIoU) improvement of +2.72% over independent training.
Qualitatively, the models produced significantly cleaner segmentation masks. The collaborative students showed marked improvement in delineating complex object boundaries and reducing "noisy" predictions in ambiguous regions, areas where standard models typically struggle.
Discussion and Conclusion
The core insight of this work is that CNNs and ViTs are natural partners. Their complementary strengths—local precision versus global awareness—allow for a more robust learning process when mediated by a reliability-aware distillation mechanism. By using ground-truth labels to dynamically direct the flow of information, the BSD module ensures that the students only learn from "reliable" peer data.
Limitations and Future Work
While the framework is highly effective, the authors noted the occurrence of "unbalanced gains," where one student architecture may benefit more significantly than the other depending on the specific task or dataset. Future research will focus on extending this collaborative framework to other dense prediction tasks, such as depth estimation, and exploring multi-task learning environments where students can share knowledge across different but related objectives.
Summary updated