NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Attribute-based Visual Reprogramming for Vision-Language Models

Chengyi Cai, Zesheng Ye, Lei Feng, Jianzhong Qi, Feng Liu

TL;DR

Attribute-based Visual Reprogramming (AttrVR) moves beyond simple class labels to repurpose Vision-Language Models (VLMs) like CLIP. By dynamically aligning images with fine-grained descriptive and distinctive attributes generated by LLMs, AttrVR significantly improves classification accuracy and class separability across diverse downstream tasks.

The Challenge of Label-Based Reprogramming

Visual Reprogramming (VR) offers an efficient way to adapt pre-trained models to new tasks without altering their internal weights. Instead of fine-tuning millions of parameters, VR introduces a small, trainable noise pattern to the input images. This noise "reprograms" the input space, allowing a frozen model to perform a new downstream task.

When applying VR to Vision-Language Models like CLIP, standard practice relies on simple text templates, such as "This is a photo of [label]", to guide the optimization. However, this label-based approach has a significant drawback. Because many class labels share similar syntactic structures, their text embeddings in CLIP's latent space often end up very close together. This proximity leads to overlapping clusters and misclassifications—for instance, the model might easily confuse a 'British Shorthair' cat with a 'Russian Blue'.

Comparison of t-SNE visualizations: (a) Image features using standard prompted labels show significant overlap. (b) The proposed Descriptive and Distinctive attribute embeddings provide much clearer class separation.

The AttrVR Method

To overcome the limitations of generic labels, the authors propose AttrVR, which leverages a rich set of visual attributes to guide the reprogramming process. The approach consists of three main components:

  1. Attribute Generation: An LLM (e.g., GPT-3.5) is used to generate two distinct types of attributes for every class:
  2. Descriptive Attributes (DesAttrs): Common features shared by most members of a class (e.g., "a medium-sized cat with a solid, muscular build").
  3. Distinctive Attributes (DistAttrs): Unique features that distinguish a class from its close neighbors (e.g., "a distinctive coat of short, dense, and plush blue-gray fur").
  4. Dynamic $k$-Nearest Neighbor Selection: Recognizing that not every image of a class exhibits all possible attributes, AttrVR dynamically selects the $k$ most relevant attributes for each specific image during training. This allows the VR pattern to adapt to the unique visual features present in individual samples.
  5. Iterative Optimization: The VR noise pattern is optimized to maximize the similarity between the "reprogrammed" image and its dynamically selected attributes, rather than a static, generic class label.

Key Insights and Theoretical Grounding

  • Attributes Outperform Labels: Text embeddings for specific, detailed attributes are much more spread out and discriminative in CLIP's latent space compared to generic "photo of [label]" embeddings. This provides a clearer, more distinct target for the VR noise optimization.
  • Sample-Specific Flexibility: The dynamic $k$-nearest neighbor approach acknowledges intra-class variance. By allowing different images of the same class to align with different relevant attributes, the model can group images more tightly and accurately.
  • Increased Separability: Theoretical analysis demonstrates that AttrVR effectively increases class separability. By pushing the mean embeddings of different classes further apart and pulling samples of the same class closer together, the decision boundaries become significantly easier for the model to navigate.

Empirical Results

The researchers evaluated AttrVR across 12 diverse downstream classification benchmarks, including fine-grained objects (e.g., FGVCAircraft, Flowers102), general objects (ImageNet), textures, and specialized domains like satellite imagery.

  • Superior Accuracy: AttrVR outperformed state-of-the-art VR methods across all 12 datasets, achieving an average improvement of 2%.
  • Fine-Grained Success: The performance gains were particularly notable in fine-grained tasks where subtle visual details are crucial, such as Flowers (+7.0%), Aircraft (+4.9%), and Textures (+3.6%).
  • Robustness: The method proved effective across various CLIP backbones, including ResNet-50, ResNet-101, ViT-B/32, ViT-B/16, and ViT-L/14. Furthermore, AttrVR maintained a strong performance advantage even in few-shot scenarios (e.g., training with only 1 to 8 samples per class).

Limitations and Future Directions

While highly effective, AttrVR's reliance on an external LLM for attribute generation means the quality of the reprogramming is tied to the LLM's capabilities. Additionally, like other VR methods, its performance can be constrained by input resolution, particularly in datasets requiring extremely high detail where downscaling might obscure important features. Future work could explore integrating Multimodal Large Language Models (MLLMs) to generate attributes directly from the images themselves, potentially refining the sample-specific optimization even further.

Summary updated

BibTeX
@inproceedings{cai2025attribute,
  author = {Chengyi Cai and Zesheng Ye and Lei Feng and Jianzhong Qi and Feng Liu},
  title = {{Attribute-based Visual Reprogramming for Vision-Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=j964C6y92q},
}
Figure