Knowledge-enhanced feature editing reconstruction distillation

Tao Song, Jingtao Zhang, Weiwei Li, Mingfu Zhao, Ran Lu, D Ye, Yichen Yang, Dan YueJournal of Image and Graphics 2025

TL;DR

The paper introduces KE-FERD (Knowledge-Enhanced Feature Editing Reconstruction Distillation), a novel framework designed to squeeze high-performance object detection capabilities into smaller "student" models. By enhancing the teacher's "dark knowledge" through attention mechanisms and forcing the student to reconstruct masked features using teacher-provided priors, the method significantly bridges the performance gap between heavy-duty and lightweight detectors.

What Problem Does This Paper Address?

Knowledge Distillation (KD) has been a staple for model compression in image classification, where a small student model learns to mimic a large teacher. However, applying KD to object detection is notoriously difficult for two reasons:

  1. Complexity: Detection requires both classification and precise localization across multiple scales, making the "dark knowledge" (hidden feature relationships) harder to transfer.
  2. The Capacity Gap: If the teacher is significantly more powerful than the student, the student often fails to "understand" or replicate the teacher's complex feature representations, leading to saturated or even degraded performance.

Existing methods usually perform simple layer-to-layer imitation, which fails to capture multi-scale context or address the inherent representational disparity between models.

Methods

The authors propose a two-pronged architecture called KE-FERD:

1. Knowledge Enhancement Module (KEM)

Instead of just handing over raw features, the KEM "boosts" the teacher's knowledge. It uses spatial and channel attention to perform multi-scale feature fusion.

  • Bottom-Up Path: Uses spatial attention to pass fine-grained positional information from lower layers to higher ones.
  • Top-Down Path: Uses channel attention to pass rich semantic information from higher layers back down. This ensures the teacher provides a more comprehensive "syllabus" for the student to follow.

2. Feature Editing and Reconstruction Module (FERM)

Inspired by Masked Autoencoders (MAE), this module changes the distillation paradigm from "mimicry" to "reconstruction":

  • Prior Fusion: A portion of the teacher's enhanced features is fused directly into the student's features as "hints" or prior knowledge. This narrows the initial capability gap.
  • Feature Editing (Masking): The student's features (specifically edges and contours) are randomly masked at the pixel level.
  • Reconstruction: The student is then forced to use its remaining features plus the teacher's priors to reconstruct the missing details through a simple convolutional block. This "learning by doing" approach encourages the student to develop more robust representational capabilities.

Datasets

The researchers evaluated KE-FERD on two distinct benchmarks to prove its versatility:

  • VOC2007 (Visual Object Classes): A standard general-purpose dataset containing 20 categories of everyday objects.
  • NEU-DET (Northeastern University Surface Defect Database): A specialized industrial dataset featuring six types of steel surface defects (e.g., crazing, inclusions, scratches). This tests the model's performance in high-noise, high-precision industrial environments.

Key Insights and Ideas

  • Bridging the Gap with Priors: One of the most effective "aha" moments is the realization that students shouldn't just look at the teacher's output; they should use a piece of it as a scaffold. By fusing teacher features as priors, the student doesn't get "overwhelmed" by the teacher's complexity.
  • Reconstruction > Imitation: Simply copying a teacher's feature map is a passive task. By masking the student's features and requiring reconstruction, the framework turns distillation into an active self-supervised task, which leads to better feature extraction.
  • Attention-Guided Fusion: The use of dual attention (spatial and channel) for both bottom-up and top-down paths ensures that the "dark knowledge" isn't just a single layer's output but a holistic view of the entire feature pyramid.

Key Results

The authors tested the method across three popular detector types: RetinaNet (one-stage), Faster R-CNN (two-stage), and FCOS (anchor-free), using ResNet-101 as the teacher and ResNet-50 as the student.

  • VOC2007 Improvements: mAP increased by 2.1% for RetinaNet, 2.7% for Faster R-CNN, and a significant 3.8% for FCOS compared to baseline student models.
  • NEU-DET Improvements: mAP increased by 2.7%, 2.6%, and 2.1% respectively.
  • Qualitative Gains: Feature map visualizations showed that distilled students focused much more accurately on foreground objects (like people or defects) and were significantly less distracted by background noise compared to students trained with standard KD methods.

Limitations and Future Work

While KE-FERD shows impressive results, the authors note a few areas for further exploration:

  • Scope of Distillation: The current method focuses primarily on the backbone (the feature extractor) of the detector. The authors suggest that future research should look into how to effectively distill knowledge from the neck (e.g., FPN) and the detection heads (classification/regression layers).
  • Computational Overhead: Although the final student model is lightweight, the training process involves complex attention-based fusion and reconstruction modules. Optimizing the training efficiency of the distillation process itself remains a potential area for improvement.

Summary updated

Abstract

目的知识蒸馏作为一种有效可行的模型压缩方法现已在图像分类领域得到了广泛的研究。由于目标检测网络的复杂性加大了知识蒸馏的难度,现有应用于目标检测的知识蒸馏方法效果并不理想。为此,提出一种适用于目标检测任务的知识蒸馏方法,即基于知识增强的特征编辑重建蒸馏,实现对目标检测模型的有效压缩。方法针对现有方法只在教师模型和学生模型的对应特征层之间进行蒸馏,无法充分利用教师模型中隐藏的“暗知识”的问题,通过空间注意力和通道注意力分别对教师特征进行自下而上和自上而下的多尺度特征融合以进行知识增强;针对当教师模型和学生模型能力差距过大时,学生模型无法理解教师模型的知识导致蒸馏性能受限的问题,通过将教师模型的部分特征作为先验知识融合到学生模型的特征中,以缩小教师模型和学生模型之间的表征能力差距,并删除学生模型特征的边缘、轮廓等细节信息,实现特征编辑,然后迫使学生模型利用剩余特征结合先验知识通过一个简单的卷积块来恢复删除的细节信息,进行特征重建,使学生模型在此过程中得到正向的反馈,从而学习到更好的特征。结果实验在两个数据集上采用基于ResNet50(residual network)的RetinaNet(retina network)、Faster R-CNN(faster region-based convolutional neural network)、FCOS(fully convolutional one-stage object detection)3种不同类型的检测器与最新的4种方法进行了比较,VOC2007(visual object classes 2007)测试集的平均精度均值(mean average precision,mAP)对比基线分别提高了2.1%、2.7%和3.8%;NEU-DET(Northeastern University surface defect database)测试集的mAP对比基线分别提高了2.7%、2.6%和2.1%,均高于当前性能最优的算法。结论本文所提出的方法能充分挖掘出教师模型的能力,有效提升学生模型的性能,同时适用于多种类型的目标检测器。
BibTeX
@article{song2025knowledge,
  author = {Tao Song and Jingtao Zhang and Weiwei Li and Mingfu Zhao and Ran Lu and D Ye and Yichen Yang and Dan Yue},
  title = {{Knowledge-enhanced feature editing reconstruction distillation}},
  journal = {Journal of Image and Graphics},
  year = {2025},
  doi = {10.11834/jig.230890},
}
Figure