Introduction
Vision-language models (VLMs) like CLIP have revolutionized zero-shot classification. However, adapting these models to specific downstream tasks often requires prompt learning. While initial methods like CoOp utilized static learnable contexts, subsequent iterations like CoCoOp introduced dynamic conditioning on input images to improve generalization.
Despite these advances, CoCoOp suffers from significant instance bias. For example, if a training set primarily contains red apples, the learned prompt may inadvertently associate the "apple" class with the color red. Consequently, the model may fail to recognize a yellow apple in a new domain. AAPL (Adding Attributes to Prompt Learning) addresses this by disentangling high-level class identity from low-level visual attributes, such as color, rotation, or texture.
Methodology
AAPL introduces a novel framework to "de-bias" the prompt learning process through two primary mechanisms:
The Delta Meta Token ($\Delta\pi$)
To isolate attributes from class identity, AAPL employs a "difference vector" approach. The model processes two differently augmented versions of the same image. By subtracting the original image's features from the augmented features, the resulting delta meta token captures the specific attribute of the augmentation (e.g., a color shift) rather than the object's identity. This mathematical decomposition allows the model to learn what "redness" or "blur" looks like independently of the object being modified.
Adversarial Triplet Loss (AdTriplet)
To ensure that these delta tokens represent pure attributes without class-specific noise, the authors implement an Adversarial Triplet Loss. This loss function is designed to "push" tokens of the same class but different augmentations apart, while "pulling" tokens with the same augmentation but different classes together. This forces the Meta-Net to prioritize attribute alignment over class-specific details.
Weighted Random Sampling (WRS)
In datasets where attributes are subtle—such as satellite imagery (EuroSAT) or textures (DTD)—AAPL utilizes Weighted Random Sampling. By calculating "silhouette scores" to identify augmentations the model finds difficult, the training process can dynamically focus on these challenging samples, improving robustness across diverse data types.
Key Insights and Visual Evidence
A critical finding of the study is the superior interpretability of AAPL's latent space. While standard meta tokens in CoCoOp often result in overlapping, messy clusters, AAPL’s delta tokens exhibit near-perfect clustering based on the type of augmentation applied. This visual evidence confirms that the model successfully isolates visual attributes from class information.
Experimental Results
AAPL was evaluated across 11 diverse classification datasets, ranging from generic objects (ImageNet) to fine-grained categories (StanfordCars) and specialized tasks (EuroSAT).
- Generalization: AAPL achieved a harmonic mean of 76.01% in base-to-new class generalization, outperforming CoCoOp's 75.83%.
- Domain Robustness: The model demonstrated enhanced stability when faced with domain shifts. On ImageNet-R (renditions), AAPL showed a +0.69% improvement over the baseline.
- Specialized Performance: The introduction of WRS led to a dramatic 10.10% improvement in harmonic mean on the EuroSAT satellite dataset, highlighting the framework's adaptability to non-object-centric data.
Conclusion
AAPL represents a significant step forward in making prompt learning more robust and generalizable. By treating attributes as learnable "delta" components, the framework prevents models from over-fitting to specific training instances. While the method requires careful selection of augmentations for specialized datasets, its success in disentangling visual features provides a promising path for future multi-modal model development.
Summary updated