Skip to main content
QUICK REVIEW

[Paper Review] From Multimodal to Unimodal Attention in Transformers using Knowledge Distillation

Dhruv Agarwal, Tanay Agrawal|arXiv (Cornell University)|Oct 15, 2021
Topic ModelingComputer Science27 references5 citations
TL;DR

This paper introduces knowledge distillation in transformers to enable unimodal inference from multimodal pre-trained models, using contrastive representation distillation (CRD) and entropy distillation in attention maps (EDAM). The best configuration improves SOTA accuracy by 3%, reduces parameters by 2.5×, and cuts inference time by 22% while maintaining performance on emotion recognition with only video modality at test time.

ABSTRACT

Multimodal Deep Learning has garnered much interest, and transformers have triggered novel approaches, thanks to the cross-attention mechanism. Here we propose an approach to deal with two key existing challenges: the high computational resource demanded and the issue of missing modalities. We introduce for the first time the concept of knowledge distillation in transformers to use only one modality at inference time. We report a full study analyzing multiple student-teacher configurations, levels at which distillation is applied, and different methodologies. With the best configuration, we improved the state-of-the-art accuracy by 3%, we reduced the number of parameters by 2.5 times and the inference time by 22%. Such performance-computation tradeoff can be exploited in many applications and we aim at opening a new research area where the deployment of complex models with limited resources is demanded.

Motivation & Objective

  • Address the high computational cost and missing modality challenges in multimodal transformers.
  • Enable efficient unimodal inference by distilling knowledge from a multimodal teacher to a unimodal student.
  • Explore optimal distillation levels and methods to preserve performance while reducing model complexity.
  • Establish a new research direction for deploying complex multimodal models under resource constraints.
  • Demonstrate the effectiveness of distillation on attention maps and compare CRD with EDAM for knowledge transfer.

Proposed method

  • Apply knowledge distillation (KD) from a multimodal cross-attention transformer (teacher) to a unimodal self-attention transformer (student).
  • Use Contrastive Representation Distillation (CRD) to transfer knowledge at intermediate feature levels, particularly in attention maps.
  • Introduce Entropy Distillation in Attention Maps (EDAM), applying cross-entropy loss directly on attention maps to transfer attention patterns.
  • Implement two strategies to handle dimension mismatch between teacher (cross-attention) and student (self-attention) attention maps: downsampling (EDAM-S↓) and upsampling (EDAM-T↑).
  • Train student networks using distillation losses at multiple levels: early, mid, and late layers, including linear layers and attention map representations.
  • Evaluate multiple teacher configurations: complete 9-transformer network and individual modality branches (video, audio, language).

Experimental results

Research questions

  • RQ1Can knowledge distillation effectively transfer multimodal knowledge to a unimodal student transformer while maintaining high accuracy?
  • RQ2At which layer in the transformer architecture is knowledge distillation most effective for unimodal inference?
  • RQ3How do different distillation methods—CRD versus EDAM—compare in performance and computational cost?
  • RQ4Does the choice of teacher architecture (e.g., full network vs. individual branches) significantly affect distillation outcomes?
  • RQ5Can distillation on attention maps overcome the challenge of differing attention mechanisms (cross- vs. self-attention) between teacher and student?

Key findings

  • The best configuration achieved a 3% improvement over the state-of-the-art accuracy on emotion recognition using only video modality at inference time.
  • The student model reduced parameters by 2.5 times and inference time by 22% compared to the full multimodal teacher.
  • Entropy Distillation in Attention Maps (EDAM) outperformed CRD, achieving the highest accuracy and F1-score with lower computational overhead.
  • Downsampling the attention maps (EDAM-S↓) worked better than upsampling, as it preserved more relevant features without excessive information loss.
  • Distillation at deeper layers (especially attention maps) yielded better results than at output or early layers, confirming that intermediate representations are more informative for knowledge transfer.
  • The use of individual modality branches as teachers did not significantly affect performance compared to the full teacher network, suggesting modality independence in knowledge transfer.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.