MSD: Saliency-aware Knowledge Distillation for Multimodal Understanding

Woojeong Jin, Maziar Sanjabi, Shaoliang Nie, Liang Tan, Xiang Ren, Hamed Firooz

Introduction

Large-scale multimodal models, such as VisualBERT, have set new benchmarks for tasks requiring the integration of vision and language. However, their substantial parameter counts make them computationally expensive and difficult to deploy in real-time environments. Knowledge Distillation (KD) is a common solution, where a compact "student" model is trained to replicate the outputs of a larger "teacher."

Standard KD approaches typically treat multimodal inputs as a single unified signal. This "black box" treatment often overlooks how the teacher model internally weighs different modalities—such as text versus images—for specific samples. This paper introduces Modality-Specific Distillation (MSD), a framework designed to bridge the gap between teacher and student reasoning by explicitly distilling knowledge from individual modalities.

The Modality Gap

A key observation driving this research is the "prediction gap" in standard KD. While a student model might match a teacher's performance on combined multimodal inputs, it often fails to replicate the teacher's behavior when presented with unimodal subsets (text-only or image-only).

Density of predictions across modalities for Teacher, Small model, and KD. Standard KD fails to capture the teacher's unimodal logic.

As shown in Figure 1, the density of predictions for a student trained with standard KD deviates significantly from the teacher on unimodal inputs. MSD aims to narrow this gap by forcing the student to mimic the teacher's logic across all input configurations.

Modality-Specific Distillation (MSD)

MSD introduces auxiliary distillation losses that require the student to mimic the teacher’s predictions for the combined multimodal input ($X$), the text-only input ($X^t$), and the image-only input ($X^v$). The primary challenge lies in determining the relative importance of these auxiliary losses for any given sample. For instance, if an image is irrelevant to a specific classification task, forcing the student to mimic a "confused" image-only prediction could be counterproductive.

The authors propose three weighting strategies to address this:

  1. Population-based: Assigns static, global weights to each modality based on dataset-wide statistics.
  2. Saliency-based: Calculates a per-sample "saliency score" (using metrics like KL-divergence) to estimate the teacher's reliance on a specific modality.
  3. Weight Learning (Meta-learning): Employs a small MLP-based "weight learner" that dynamically assigns optimal weights to each loss term per sample, trained via a meta-learning objective on a validation set.

Experimental Results

The MSD framework was evaluated using VisualBERT (109M parameters) as the teacher and TinyBERT (14.5M parameters) as the student across four benchmarks: Hateful-Memes, MM-IMDB, Visual Entailment (SNLI-VE), and VQA2.

Modality scores for Hateful-Memes and MM-IMDB datasets, illustrating how modality dominance varies by task.

Analysis of modality dominance (Figure 2) reveals that while some datasets like MM-IMDB are heavily text-dominant, others like Hateful-Memes require a more balanced, sample-dependent integration. MSD (Weight Learning) proved particularly effective in these complex scenarios:

  • Hateful-Memes: Accuracy improved to 63.86%, compared to 60.84% for standard KD.
  • MM-IMDB: The Macro F1 score saw a dramatic increase from 41.76 (Standard KD) to 53.12.

Beyond raw accuracy, MSD significantly improved the "Consistency Ratio," meaning the student's predictions change in the same manner as the teacher's when modalities are altered, indicating a deeper capture of the teacher's underlying reasoning.

Conclusion

MSD provides a robust framework for compressing multimodal models without sacrificing the nuanced reasoning capabilities of the teacher. By explicitly distilling modality-specific logic and using meta-learning to weight these signals, MSD achieves superior performance and faster convergence than standard KD. Future work will explore extending this framework to additional modalities like audio and depth, and combining it with structural pruning for further efficiency.

Summary updated

BibTeX
@inproceedings{jin2021msd,
  author = {Woojeong Jin and Maziar Sanjabi and Shaoliang Nie and Liang Tan and Xiang Ren and Hamed Firooz},
  title = {{MSD: Saliency-aware Knowledge Distillation for Multimodal Understanding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.302},
}
Figure