Lightweight Model Pre-Training via Language Guided Knowledge Distillation

Mingsheng Li, Lin Zhang, Mingzhen Zhu, Zilong Huang, Gang Yu, Jiayuan Fan, Tao Chen

This paper, recently published by researchers from Fudan University and Tencent, introduces a clever way to make small neural networks punch above their weight class by using language as a "tutor" during the training process.

TL;DR

The authors propose Language Guided Distillation (LGD), a framework that uses textual category names to focus the knowledge transfer from a large "Teacher" model to a lightweight "Student" model. By anchoring visual features to semantic concepts, they achieve state-of-the-art performance for small models across classification, detection, and segmentation tasks.

What Problem Does This Paper Address?

Lightweight models (like ResNet-18 or MobileNetV2) are essential for mobile and edge devices, but they often struggle with accuracy compared to their massive counterparts. A common solution is Self-Supervised Distillation (SSD), where a small "Student" model tries to mimic the internal representations of a large, pre-trained "Teacher" model.

The challenge is "capacity gap." A small model simply doesn't have enough parameters to learn everything the big teacher knows. Existing methods treat all knowledge as equal, often overwhelming the student with redundant or irrelevant information. The authors argue that we need a way to tell the student: "Focus on the features that actually help distinguish between categories."

Methods

The core innovation is using natural language to provide a semantic "map" for the distillation process.

  1. Textual Semantics Bank (TSB): The authors use a frozen, pre-trained text encoder (from CLIP) to generate embeddings for category names (e.g., "a photo of a cat"). These embeddings are fixed and act as semantic anchors.
  2. Visual Semantics Bank (VSB): To bridge the gap between text and images, they create a dynamic bank of visual "anchors." As the teacher model processes images, a Language-Guided Knowledge Aggregation (LGKA) module uses the TSB to classify those images and update the VSB with representative visual features for each category.
  3. Dual Alignment Losses: Instead of just mimicking the teacher's raw output, the student is trained to match the teacher’s similarity distribution across both the TSB (textual space) and the VSB (visual space). This forces the student to learn the same conceptual relationships that the teacher understands.

Crucially, while this uses category names, it does not require labeled images for pre-training. It uses the names of classes expected in downstream tasks to guide the self-supervised process.

Datasets

The models were pre-trained on the unlabeled ImageNet-1k dataset. To prove the model's versatility, it was evaluated on a wide array of downstream benchmarks:

  • Classification: ImageNet-1k and Caltech-256.
  • Object Detection & Instance Segmentation: COCO 2017 and LVIS v1 (a challenging long-tailed dataset).
  • Semantic Segmentation: ADE20K and Cityscapes.
  • Point Cloud Classification: ModelNet40 (to test generalization beyond 2D images).

Key Insights and Ideas

  • Language as a Filter: The "aha moment" here is that language provides a natural hierarchy of importance. By using category names, the distillation process filters out "background noise" and focuses the student's limited capacity on discriminative features.
  • Task-Specific Distillation: Unlike standard pre-training, LGD allows you to "prime" a model for a specific task. If you know you're going to deploy a model for city navigation, you can use Cityscapes category names during the final stages of distillation to refine the student's focus.
  • Efficiency over Volume: LGD is remarkably data-efficient. The authors found that their model trained for only 90 epochs outperformed previous state-of-the-art methods that were trained for 200 epochs.
  • Memory Friendliness: Previous methods required maintaining massive "queues" of thousands of image features to provide contrast. LGD only needs to store one "anchor" per category in its VSB, making it much lighter on hardware during training.

Key Results

The results show a consistent "lift" across the board:

  • ImageNet-1k: A ResNet-18 student reached 67.2% Top-1 accuracy, significantly higher than previous leaders like SEED (62.7%) and BINGO (64.0%).
  • Transferability: On the Caltech-256 dataset, the LGD-trained model showed a +3.5% improvement in zero-shot classification over previous methods.
  • Segmentation: On the Cityscapes dataset, the model achieved a +2.4 mIoU (mean Intersection over Union) improvement over standard supervised pre-training, proving that the semantic guidance helps with spatial understanding, not just labels.

Limitations and Future Work

The authors acknowledge that LGD relies on a high-quality, pre-trained text encoder (like CLIP). If the text encoder has biases or lacks knowledge of a specific niche domain, the distillation quality might suffer.

Additionally, while the method works well when the teacher and student are both CNNs or both Transformers, the "mismatch" between different architectures (e.g., distilling a ViT teacher into a CNN student) still presents challenges in feature alignment that the authors hope to address in future iterations. They also suggest exploring how this language-guided approach could be applied to even smaller "tiny" models or other modalities like audio.

Summary updated

BibTeX
@article{li2024lightweight,
  author = {Mingsheng Li and Lin Zhang and Mingzhen Zhu and Zilong Huang and Gang Yu and Jiayuan Fan and Tao Chen},
  title = {{Lightweight Model Pre-Training via Language Guided Knowledge Distillation}},
  journal = {IEEE Trans. Multimedia},
  year = {2024},
  url = {https://openreview.net/forum?id=amVKLkxu84},
}
Figure