Distilling Knowledge from Language Models for Video-based Action Anticipation

Sayontan Ghosh, Tanvi Aggarwal, Minh Hoai, Niranjan Balasubramanian · DOI

Introduction

Action anticipation—the ability to predict a person's next move before it happens—is a critical capability for proactive AI systems, such as robotic assistants and augmented reality interfaces. Unlike standard action recognition, anticipation requires understanding the underlying logic and typical sequences of human activities. While computer vision models have made significant strides, they often struggle with the limited scale and diversity of labeled video datasets.

In contrast, large language models (LLMs) are trained on vast corpora of text that implicitly contain "common sense" knowledge about procedural tasks. For example, a model trained on text knows that "washing an onion" is a likely precursor to "chopping" it. This paper explores a novel cross-modal distillation approach to transfer this structured procedural knowledge from the text domain into vision-based anticipation models.

Methodology: Teacher-Student Distillation

The authors propose a framework where a text-based "Teacher" model guides a vision-based "Student" model. This process leverages the strengths of both modalities: the broad procedural knowledge of text and the direct perceptual capabilities of vision.

Overview of the cross-modal distillation process, showing how text-based knowledge from Recipe1M is distilled into a vision-based model.

1. The Teacher Model (Text Modality)

The teacher is a pre-trained Language Model (specifically ALBERT). To tailor it to the target domain, the authors pre-train the LM on Recipe1M, a large-scale cooking dataset, using a Masked Language Modeling (MLM) objective. During the distillation phase, the teacher receives the textual labels of past actions in a video and predicts the probability distribution of the next action.

2. The Student Model (Vision Modality)

The student is an Anticipative Vision Transformer (AVT). Unlike the teacher, the student only processes raw video frames. Its goal is to learn to predict the future action directly from visual cues.

3. Distillation Process

During training, the student is optimized using a dual-loss function:

  • Classification Loss: A standard cross-entropy loss comparing the student's prediction to the ground-truth future action.
  • Distillation Loss: A KL-divergence loss that encourages the student’s output probability distribution to match the teacher’s distribution.
Detailed architecture of the training and inference phases. (a) Teacher training on text labels. (b) Student training using both ground truth and teacher distillation. (c) Inference using only the vision-based student model.

At inference time, the teacher model is discarded. The student model, now imbued with the "wisdom" of the language model, performs anticipation using only visual input.

Key Insights

  • Distributional Guidance: The teacher provides more than just a single "correct" answer. The entire probability distribution (e.g., showing that "fry" and "saute" are both likely after "chop") provides a rich supervisory signal that helps the student generalize.
  • Top-K Filtering: In datasets with thousands of classes, the full distribution can be noisy. The authors found that distilling only the top-50 highest-probability logits from the teacher significantly improved performance.
  • Complementary Knowledge: Even if the teacher's raw accuracy is lower than the student's, its predictions often capture different, complementary aspects of the task sequence, leading to a stronger final model.

Experimental Results

The framework was evaluated on two major egocentric video datasets: EPIC-KITCHENS 55 and EGTEA-GAZE+.

  • EPIC-KITCHENS 55: The model achieved a new state-of-the-art, with a 7.2% relative improvement in many-shot class-mean recall (MS-Rec@5).
  • EGTEA-GAZE+: The approach yielded a 3.5% relative gain in Top-1 accuracy.

Ablation studies confirmed that domain-specific pre-training on Recipe1M was crucial, as it allowed the teacher to better understand the specific vocabulary and flow of culinary activities.

Conclusion and Future Directions

This research demonstrates that language models can serve as powerful priors for visual tasks. By distilling procedural knowledge from text, vision models can overcome the limitations of video data scarcity. Future work may explore zero-shot anticipation by leveraging the semantic embeddings of LMs or addressing potential biases inherited from the text-based training data.

Summary updated

BibTeX
@inproceedings{ghosh2023distilling,
  author = {Sayontan Ghosh and Tanvi Aggarwal and Minh Hoai and Niranjan Balasubramanian},
  title = {{Distilling Knowledge from Language Models for Video-based Action Anticipation}},
  booktitle = {EACL (Findings)},
  year = {2023},
  doi = {10.18653/v1/2023.findings-eacl.141},
}
Figure