VeCAF: Vision-language Collaborative Active Finetuning with Training Objective Awareness

Rongyu Zhang, Zefan Cai, Huanrui Yang, Zidong Liu, Denis A. Gudovskiy, Tomoyuki Okuno, Yohei Nakata, Kurt Keutzer, Baobao Chang, Yuan Du, Li Du, Shanghang Zhang

TL;DR

This paper introduces VeCAF, a novel approach to finetune pretrained vision models more efficiently by intelligently selecting training data. By leveraging language descriptions of images and the finetuning objective itself, VeCAF significantly reduces training time and improves performance, even in challenging out-of-distribution scenarios.

What Problem Does This Paper Address?

Finetuning large, pretrained vision models (PVMs) is a standard practice for adapting them to specific downstream tasks. However, the common approach of randomly sampling data for finetuning is inefficient, requiring many training batches and potentially leading to suboptimal performance. This is especially true when aiming for a specific performance target or dealing with limited computational resources. Existing active learning methods, while improving data selection, often struggle with the pretraining-finetuning paradigm and meeting user-defined objectives. The paper addresses this gap by proposing a method that actively selects data based on both the finetuning objective and the rich semantic information available in image-text pairs.

Methods

VeCAF introduces two core innovations:

  • Objective-aware Data Selection (ODS): Instead of random sampling, VeCAF uses a parameterized model to select data points that are predicted to contribute most to achieving the finetuning objective (e.g., minimizing loss). This is achieved by formulating data selection as an optimization problem that balances data loss and diversity.
  • Vision-language Collaborative Active Finetuning (VeCAF): This is the overarching framework. It leverages natural language captions associated with images (either from existing datasets or generated by LLMs). These captions are converted into text embeddings, which are then used to augment the image features extracted by the PVM. This augmentation, performed via a Cross-attentive Embedding Augmentation (CEA) mechanism, enriches the image representations with semantic information from the text, leading to better data selection and finetuning.

The process is iterative: ODS selects a subset, CEA augments features, the PVM is finetuned on this subset, and the process repeats for a specified number of loops.

Datasets

The paper uses the following datasets for training and evaluation:

  • CIFAR-10: A standard image classification dataset with 10 categories.
  • Caltech101: A dataset of images from 101 object categories, noted for being class-unbalanced.
  • ImageNet-1K: A large-scale image classification dataset with 1,000 categories.
  • ImageNet-C: Used for out-of-distribution (OOD) evaluation, consisting of corrupted versions of the ImageNet validation set.

Key Insights and Ideas

  • Language is a powerful guide for data selection: By incorporating text descriptions, VeCAF can better understand the semantic content of images and select data that is truly informative for the downstream task, even if the visual features alone are ambiguous.
  • Objective awareness is crucial for efficient finetuning: Simply selecting "uncertain" data isn't enough. VeCAF's ODS component directly optimizes for faster convergence towards a specific performance goal, making the finetuning process more targeted.
  • Augmenting image features with text embeddings helps bridge the semantic gap: The CEA mechanism effectively enriches image representations, making them more robust and informative for both data selection and the actual finetuning.
  • VeCAF excels in OOD scenarios: The ability to manipulate text prompts (e.g., adding "snowy day" to captions) allows VeCAF to guide data selection towards specific domain characteristics, improving generalization to unseen conditions without requiring new labeled data.

Key Results

  • Significant efficiency gains: On ImageNet-1K, VeCAF uses up to 3.3x fewer training batches to reach a target performance compared to full finetuning.
  • Improved accuracy: VeCAF achieves an accuracy improvement of 2.7% over state-of-the-art active finetuning methods on ImageNet-1K with the same number of batches.
  • Superior OOD performance: VeCAF improves accuracy by over 6% on the corrupted ImageNet-C dataset compared to other active learning methods.
  • Robustness across PVMs and LMs: The framework demonstrates versatility, working effectively with various pretrained vision models (DeiT, Swin Transformer, XciT) and language encoders (CLIP, BERT, mT5, GPT2).

Limitations and Future Work

  • Computational overhead of CEA: While VeCAF significantly reduces training batches, the CEA process adds some computational overhead per loop. The paper notes this is a small percentage (4.5%) of the finetuning cost and justifiable by the benefits.
  • Dependency on caption quality: The effectiveness of VeCAF in OOD scenarios relies on the quality and relevance of the generated or available text captions.
  • Future work: The authors suggest further exploring text-domain augmentation for improved fine-grained performance metrics and extending active data selection to active data generation for even greater performance and efficiency gains.

Summary updated

BibTeX
@inproceedings{zhang2024vecaf,
  author = {Rongyu Zhang and Zefan Cai and Huanrui Yang and Zidong Liu and Denis A. Gudovskiy and Tomoyuki Okuno and Yohei Nakata and Kurt Keutzer and Baobao Chang and Yuan Du and Li Du and Shanghang Zhang},
  title = {{VeCAF: Vision-language Collaborative Active Finetuning with Training Objective Awareness}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3681135},
}
Figure