Extracting knowledge from features with multilevel abstraction

Jinhong Lin, Zhaoyang LiarXiv 2021

Introduction

Deep Neural Networks (DNNs) have revolutionized computer vision, yet their deployment on resource-constrained edge devices remains challenging due to high computational costs. While Knowledge Distillation (KD)—where a compact "student" model learns from a high-capacity "teacher"—is a standard solution, the requirement to pre-train a massive teacher model is often prohibitive.

Self-Knowledge Distillation (SKD) addresses this by allowing a model to serve as its own teacher. However, traditional SKD methods typically force shallow layers to mimic deep layers, assuming only the deepest features are "correct." Researchers have proposed LFMA (Extracting Knowledge from Features with Multilevel Abstraction), a framework based on the insight that "dark knowledge"—the subtle relationships between classes—exists at every level of abstraction. By integrating both coarse shallow features and refined deep features, LFMA achieves state-of-the-art performance without an external teacher.

Methodology

The LFMA framework enhances a standard backbone (such as ResNet) through three primary innovations:

  1. Auxiliary Branches: Small convolutional and fully connected layers are attached to intermediate blocks. These branches generate "early predictions" based on features at varying depths.
  2. Ensemble Probability Distribution: Rather than distilling knowledge solely from the final layer, LFMA creates a "global teacher" by calculating a weighted average of predictions from all branches. This ensemble captures a holistic view of the data, combining coarse-grained structural information with fine-grained semantic details.
  3. Feature Map Cutout (FMC): To improve robustness, the authors introduce FMC. Unlike standard input-level Cutout, FMC randomly erases pixels within internal feature maps. This forces the network to develop redundant pathways for classification, enhancing generalization.
The LFMA architecture showing auxiliary branches, the ensemble probability distribution, and the Kullback–Leibler divergence loss used for distillation.

During training, the model optimizes a combination of Cross-Entropy loss for accuracy and Kullback–Leibler (KL) Divergence to align individual branches with the ensemble teacher. Importantly, these auxiliary branches are discarded after training, ensuring the final model retains its original inference speed and size.

Key Results and Insights

LFMA was evaluated across several benchmarks, including CIFAR-100, CUB200 (fine-grained birds), Stanford Dogs, and ImageNet. The method consistently outperformed both standard baselines and existing self-distillation techniques like BYOT and SAD.

Comparison of LFMA against baseline and state-of-the-art self-distillation methods across four major datasets.

As shown in the results, LFMA provides a significant accuracy boost. For instance, on CIFAR-100 with a ResNet18 backbone, it reached 79.71% accuracy compared to the 73.08% baseline. On the challenging CUB200 dataset, it improved performance by nearly 8 percentage points.

Visualization of features using UMAP revealed that while deep layers cluster classes more distinctly, shallow layers capture important similarities between related categories (e.g., different breeds of dogs) that the final layer might discard. LFMA’s ability to preserve this "multilevel dark knowledge" is central to its success.

Conclusion and Future Work

LFMA demonstrates that self-distillation is most effective when it treats the model as a collection of diverse perspectives rather than a simple hierarchy. While the method introduces some training-time overhead and requires careful hyperparameter tuning for the loss components, the zero-cost inference gains make it a highly attractive solution for deploying efficient, high-performance models. Future research may extend this multilevel abstraction approach to more complex tasks such as object detection and semantic segmentation.

Summary updated

BibTeX
@misc{lin2021extracting,
  author = {Jinhong Lin and Zhaoyang Li},
  title = {{Extracting knowledge from features with multilevel abstraction}},
  year = {2021},
  eprint = {2112.13642},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.13642},
}
Figure