TL;DR
Deploying large dense image prediction models on resource-constrained edge devices is challenging due to high computational costs. This paper introduces Boundary and Context Knowledge Distillation (BCKD), a targeted distillation framework that helps compact student models accurately capture sharp object boundaries and maintain regional connectivity without adding any inference overhead.
What Problem Does This Paper Address?
While large, state-of-the-art vision models excel at dense image prediction tasks (like semantic segmentation and object detection), running them on edge AI chips is often impractical. Knowledge Distillation (KD) is typically used to compress these large "teacher" models into smaller "student" models.
However, standard KD approaches usually focus on mimicking general, task-agnostic features. The authors point out that small student models actually resolve the main bodies of objects quite well on their own; where they consistently fail is in maintaining boundary region completeness and ensuring target region connectivity (resulting in fragmented predictions, as seen in Figure 1). Traditional KD ends up being redundant by reinforcing what the student already knows while ignoring these critical edge and context details.
Methods
To bridge this specific performance gap, the authors propose BCKD, which introduces two tailored distillation components:
- Boundary Distillation: Instead of relying on noisy, pre-extracted ground-truth edge masks like previous methods, BCKD computes the semantic affinity similarity between pixel pairs directly from the hierarchical feature maps. This allows the student to learn clean, context-aware object boundaries from the teacher.
- Context Distillation: Rather than performing traditional layer-to-layer feature matching, BCKD uses a "whole-to-whole" approach. It concatenates multi-scale feature maps and leverages self-relations (pixel-level contexts) as a bridge to transfer global scene structure, ensuring that internal object regions stay smoothly connected.
Additionally, the authors implement an Annealed Convergence training strategy. A time-dependent weight-decay function reduces the influence of the distillation losses over the training epochs, shifting the student model's focus toward the actual ground-truth labels as training wraps up.
Datasets
The framework was rigorously evaluated across five representative benchmarks spanning three distinct tasks:
- Semantic Segmentation: Pascal VOC 2012, Cityscapes, ADE20K, and COCO-Stuff 10K.
- Instance Segmentation & Object Detection: MS-COCO 2017.
Key Insights and Ideas
- General KD is Redundant for EDIPs: Small models don't need help finding the center of a large object; they need help figuring out where it ends and how its parts connect. Targeted KD is far more efficient than blanket feature imitation.
- Ditching Ground-Truth Edges: Traditional boundary-guided KD methods require pre-extracting edge maps from ground-truth masks, which often introduces non-semantic background noise. Extracting boundaries directly from the teacher's deep features preserves semantic context (as illustrated in Figure 4).
- Whole-to-Whole over Layer-to-Layer: Layer-by-layer feature matching can introduce architectural alignment noise. Concatenating features into a unified space before computing self-relations provides a cleaner signal for context transfer.
Key Results
BCKD consistently outperformed state-of-the-art KD methods across various architectures (including CNN-based backbones like MobileNetV2/EfficientNet and Transformer-based ones like SegFormer):
- Semantic Segmentation: On Pascal VOC 2012, BCKD boosted the baseline student model (PSPNet-18) by 3.87% mIoU, outperforming top SOTA methods like IFVD and SSTKD.
- Object Detection & Instance Segmentation: On MS-COCO 2017, it achieved notable improvements in average precision ($AP^m$ and $AP^b$) across GFL, Cascade Mask R-CNN, and RetinaNet baselines.
- Complementary Nature: BCKD can successfully coexist with other KD frameworks. Combining BCKD with existing methods like BPKD yielded a cumulative performance top-up (e.g., reaching 29.60% mIoU on COCO-Stuff 10K).
- Zero Overhead: Because the distillation mechanisms are only active during training, the student model retains its original compact size and fast inference speed during deployment.
Limitations and Future Work
Despite significant improvements, the authors noted that BCKD can still struggle with incomplete predictions in highly complex scenes, occasionally tripped up by spurious dataset correlations (such as confusing a "helmet" and a "person").
Moving forward, the team plans to extend BCKD to other dense vision tasks like pose estimation and image synthesis. They also aim to adapt the framework to emerging architectures like Vision Mamba and explore how lightweight edge models can better synergize with large foundation models like SAM (Segment Anything Model).
Summary updated