Advancing Textual Prompt Learning with Anchored Attributes

Zheng Li, Yibing Song, Ming-Ming Cheng, Xiang Li, Jian Yang
12/12/2024
41 citations
cs.CV

Official code: zhengli97/ATPrompt (135 stars, Python, last commit 2026-01-28).

Abstract

Textual-based prompt learning methods primarily employ multiple learnable soft prompts and hard class tokens in a cascading manner as text inputs, aiming to align image and text (category) spaces for downstream tasks. However, current training is restricted to aligning images with predefined known categories and cannot be associated with unknown categories.

Show full abstract

In this work, we propose utilizing universal attributes as a bridge to enhance the alignment between images and unknown categories. Specifically, we introduce an Attribute-anchored Textual Prompt learning method for vision-language models, named ATPrompt. This approach expands the learning space of soft prompts from the original one-dimensional category level into the multi-dimensional attribute level by incorporating multiple attribute tokens into the learnable soft prompts. Through this modification, we transform the text prompt from a category-centric form to an attribute-category hybrid form. Additionally, we introduce a straightforward differentiable attribute search method to identify representative and suitable attributes for downstream tasks. As an easy-to-use plug-in technique, ATPrompt can seamlessly replace the existing basic prompt format in textual-based methods, providing general improvements at a negligible computational cost. Extensive experiments across 11 datasets validate the effectiveness of our method. Code is publicly available at https://github.com/zhengli97/ATPrompt.

View on arXivView PDF

Code Implementations(1)

zhengli97/ATPromptOfficial100%

Official PyTorch Code for Anchor Token Guided Prompt Learning Methods: [ICCV 2025] ATPrompt and [Arxiv 2511.21188] AnchorOPT

1353Python, ShellNov 26, 202410 months ago
image-classificationmulti-modal-learningprompt-learningzero-shot-classification

Similar Papers

Cite this paper

@article{li2024advancing,
  title  = {Advancing Textual Prompt Learning with Anchored Attributes},
  author = {Zheng Li and Yibing Song and Ming-Ming Cheng and Xiang Li and Jian Yang},
  year   = {2024},
  eprint = {2412.09442},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.09442v4},
  journal = {ICCV 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.09442.svg)](https://codeofpaper.com/paper/2412.09442)

Discussion