Smooth and Stepwise Self-Distillation for Object Detection

Jieren Deng, Xin Zhou, Hao Tian, Zhihong Pan, Derek Aguiar

Abstract

Self-distillation has emerged as a computationally efficient alternative to traditional teacher-student knowledge distillation. However, existing methods often struggle with noisy supervision signals and static loss weighting. This paper introduces Smooth and Stepwise Self-Distillation (SSSD), a framework that utilizes the Jensen-Shannon (JS) distance for robust feature alignment and a stepwise coefficient schedule to synchronize distillation intensity with the learning rate. Evaluated on the COCO dataset, SSSD consistently outperforms baseline models and previous state-of-the-art self-distillation techniques across multiple detector architectures.

Introduction

Knowledge Distillation (KD) is a widely used technique to improve the performance of compact models by transferring knowledge from a larger, pre-trained "teacher" model. Despite its success, the requirement for a high-capacity teacher introduces significant computational overhead and pre-training costs. Self-distillation addresses this by generating supervision signals internally, often by leveraging label information to guide feature extraction within a single model.

While promising, self-distillation in object detection faces two primary challenges: the fragility of standard loss functions like Mean Squared Error (MSE) when dealing with "imperfect" internal teachers, and the misalignment between static distillation weights and dynamic learning rate schedules. This paper presents SSSD to resolve these issues through a smoother distance metric and an adaptive weighting strategy.

Methodology

The SSSD framework introduces two primary innovations designed to stabilize and optimize the self-distillation process.

1. Smooth Self-Distillation via JS Distance

Traditional self-distillation methods typically employ MSE or Kullback-Leibler (KL) divergence to minimize the discrepancy between feature maps. However, MSE is highly sensitive to outliers and noise, which are prevalent when the "teacher" signal is derived from labels rather than a fully converged expert model.

SSSD replaces these metrics with the Jensen-Shannon (JS) distance. The JS distance offers several advantages:

  • Symmetry and Boundedness: Unlike KL divergence, JS distance is symmetric and bounded between 0 and 1, providing a more stable gradient.
  • Robustness: Its mathematical "smoothness" makes the training process less susceptible to the noisy signals inherent in label-enhanced feature maps.

In practice, the model constructs an implicit teacher by fusing ground-truth labels with features from the Feature Pyramid Network (FPN). The JS distance then guides the backbone feature maps to align with these label-enriched representations.

2. Stepwise Distillation Scheduling

A common oversight in distillation research is the use of a constant coefficient ($\lambda$) for the distillation loss. The authors observed that as the learning rate (LR) decays during training, the relative impact of the distillation signal often weakens, leading to sub-optimal fine-tuning.

SSSD introduces a stepwise $\lambda$ strategy. Rather than a fixed value, $\lambda$ is treated as a step function synchronized with the LR schedule. When the learning rate drops (e.g., at 120,000 iterations), the distillation coefficient is increased. This "boost" ensures that the model continues to receive a strong corrective signal during the final stages of training, allowing for more precise refinement of feature representations.

Experimental Results

The effectiveness of SSSD was validated on the Microsoft COCO dataset using a variety of popular detection frameworks, including Faster R-CNN (two-stage), RetinaNet (one-stage), and FCOS (anchor-free).

Performance Gains

SSSD demonstrated significant improvements across all tested configurations:

  • General Accuracy: The method achieved an Average Precision (AP) increase of 2.0% to 3.6% over baseline models without distillation.
  • Comparison to State-of-the-Art: SSSD outperformed previous leading methods such as LabelEnc and LGD. For instance, it showed a ~1% AP gain over LGD when using Faster R-CNN (ResNet-50) and FCOS (ResNet-101).
  • Small Object Detection: The benefits were particularly pronounced for small objects. In the RetinaNet-R101 setup, SSSD achieved a 5% relative performance gain in $AP_s$ compared to LGD.

Ablation Study: The Stepwise Effect

Ablation experiments confirmed that the stepwise $\lambda$ strategy is a critical component of the system's success. Implementing the stepwise schedule alone provided an additional ~0.5% AP boost compared to a fixed-weight approach, highlighting the importance of balancing loss components throughout the training lifecycle.

Conclusion

Smooth and Stepwise Self-Distillation (SSSD) provides a robust framework for enhancing object detection models without the need for external teacher networks. By adopting the Jensen-Shannon distance and an adaptive stepwise weighting schedule, SSSD effectively manages the noise and dynamic requirements of self-generated supervision. Future research may focus on automating the hyperparameter tuning for the stepwise schedule and extending these principles to other domains such as natural language processing and video analysis.

Summary updated

BibTeX
@inproceedings{deng2023smooth,
  author = {Jieren Deng and Xin Zhou and Hao Tian and Zhihong Pan and Derek Aguiar},
  title = {{Smooth and Stepwise Self-Distillation for Object Detection}},
  booktitle = {ICIP},
  year = {2023},
  doi = {10.1109/icip49359.2023.10222108},
}
Figure