Task-Adapter: Task-specific Adaptation of Image Models for Few-shot Action Recognition

Congqi Cao, Yueran Zhang, Yating Yu, Qinyi Lv, Lingtong Min, Yanning Zhang

Introduction

Few-shot action recognition (FSAR) involves identifying novel video categories from a limited set of labeled examples, known as the support set. While large-scale pre-trained image models provide a strong foundation, adapting them to specific video tasks remains challenging. Current approaches often suffer from overfitting due to full fine-tuning on small datasets or fail to capture task-specific nuances by delaying adaptation until the final stages of the pipeline.

Example support videos used in few-shot action recognition tasks.

The Task-Adapter Approach

To address these issues, researchers introduced Task-Adapter, a parameter-efficient framework built on the Vision Transformer (ViT). Unlike traditional methods that update the entire backbone, Task-Adapter keeps the original model weights frozen and inserts lightweight, tunable "Adapters."

Task-Specific Multi-head Self-Attention (Task-MSA)

The core innovation is the Task-MSA layer. This module reuses the frozen weights of the pre-trained model but applies them across different videos within the same task. By processing support and query videos simultaneously, the model can emphasize discriminative features—such as specific leg movements in a "High Jump"—before final classification. This "cross-video" attention allows the model to align features based on task-specific similarities during the extraction process itself.

Top-Heavy Adaptation

A key finding of the study is the effectiveness of "top-heavy" adaptation. Ablation experiments revealed that inserting adapters only into the final layers of the ViT backbone yields superior results compared to adapting the entire network. This strategy preserves generic visual features in early layers while specializing later layers for the target task.

Architecture of the Task-Adapter showing frozen backbone layers and tuned task-specific adapters in the final layers.

Performance and Efficiency

Task-Adapter achieves state-of-the-art (SOTA) performance on several benchmarks, particularly on temporally complex datasets like Something-Something v2 (SSv2). On the SSv2-Full split, the model reached 71.3% in 1-shot and 74.2% in 5-shot scenarios, significantly outperforming previous benchmarks.

The method is also highly efficient, tuning only approximately 14 million parameters while keeping the 400 million parameters of the backbone frozen. This balance prevents "catastrophic forgetting" and ensures the model retains its broad pre-trained knowledge while specializing for the few-shot task.

Conclusion

By integrating task-specific adaptation directly into the feature extraction process through Task-MSA and focusing on top-layer tuning, Task-Adapter provides a robust and efficient solution for few-shot action recognition. Future work may involve incorporating multimodal data, such as text prompts, to further enhance performance on scene-dependent datasets.

Summary updated

BibTeX
@inproceedings{cao2024task,
  author = {Congqi Cao and Yueran Zhang and Yating Yu and Qinyi Lv and Lingtong Min and Yanning Zhang},
  title = {{Task-Adapter: Task-specific Adaptation of Image Models for Few-shot Action Recognition}},
  booktitle = {ACM Multimedia},
  year = {2024},
}
Figure