TagAlign: Improving Vision-Language Alignment with Multi-Tag Classification

Qinying Liu, Kecheng Zheng, Wei Wu, Zhan Tong, Yu Liu, Wei Chen, Zilei Wang, Yujun ShenarXiv 2023 · DOI

Abstract

Current vision-language models (VLMs) like CLIP excel at global image-text matching but often lack the spatial-semantic precision required for fine-grained tasks. This "coarse alignment" problem is particularly evident when models fail to correctly map specific attributes to objects within a scene. We introduce TagAlign, a framework that utilizes Large Language Models (LLMs) to automatically parse captions into fine-grained object and attribute tags. By augmenting the standard contrastive loss with a multi-tag classification objective, TagAlign significantly enhances the model's ability to localize concepts. Our approach yields a 5.2% average improvement in zero-shot semantic segmentation across ten diverse benchmarks.

Introduction: The Challenge of Coarse Alignment

While contrastive learning has enabled VLMs to learn powerful representations from massive web-scale datasets, the training objective typically aligns a global image embedding with a global text embedding. This often results in a lack of fine-grained localization. For instance, given the prompt "a black cat on a red sofa," a standard model might identify the presence of both a cat and a sofa but struggle to precisely attribute "black" to the cat's pixels or "red" to the sofa's. This limitation hinders performance in downstream tasks like zero-shot semantic segmentation and referring expression comprehension.

Methodology

TagAlign addresses the coarse alignment problem through two primary innovations:

1. LLM-Aided Tag Parsing

Traditional rule-based parsers (e.g., NLTK) often struggle with the nuances of natural language, frequently misidentifying compound nouns or failing to associate attributes correctly. TagAlign employs a Large Language Model (Vicuna-33b) to parse image captions into structured lists of objects and their corresponding attributes. This automated process provides cleaner, more context-aware supervision signals without requiring manual human annotation.

2. Multi-Tag Classification Loss

In addition to the standard image-text contrastive loss, TagAlign introduces a multi-label classification task. The model is trained to predict the presence of the extracted tags within the image. To maintain an open-vocabulary capability, the classification head uses fixed weights generated by the CLIP text encoder (e.g., embeddings for "A photo of a {tag}"). A Balanced Softmax strategy is employed to mitigate the impact of the long-tailed distribution of tags found in large-scale datasets like CC12M.

Experimental Results

The effectiveness of TagAlign was evaluated across a wide range of benchmarks.

Quantitative Performance

TagAlign was trained on the Conceptual 12M (CC12M) dataset and tested on ten semantic segmentation benchmarks, including PASCAL VOC, COCO-Stuff, and ADE20K. The model achieved an average improvement of 5.2% mIoU over baseline methods. Notably, on the RefCOCO+ referring segmentation dataset, the inclusion of attribute supervision boosted performance from 16.04% to 19.24% mIoU, highlighting the model's improved understanding of descriptive language.

Qualitative Analysis

Visualizations of similarity maps demonstrate that TagAlign provides significantly tighter and more accurate localizations compared to vanilla CLIP.

Comparison of localization accuracy between CLIP and TagAlign variants for 'Cat' and 'Black Cat' queries.

As shown in the figure above, while CLIP and TagAlign(obj) might highlight both cats when queried for "Black Cat," the full TagAlign(obj+attr) model correctly isolates the specific pixels corresponding to the black cat, demonstrating the power of attribute-level supervision.

Discussion and Future Work

TagAlign demonstrates that fine-grained supervision can be effectively scaled using LLMs. However, some challenges remain. The current "bag of tags" approach still struggles with complex spatial relationships (e.g., "the person to the left of the horse"). Future research will focus on integrating more complex relational modeling to further refine the spatial-semantic alignment of vision-language models.

Summary updated

BibTeX
@misc{liu2023tagalign,
  author = {Qinying Liu and Kecheng Zheng and Wei Wu and Zhan Tong and Yu Liu and Wei Chen and Zilei Wang and Yujun Shen},
  title = {{TagAlign: Improving Vision-Language Alignment with Multi-Tag Classification}},
  year = {2023},
  eprint = {2312.14149},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.14149},
}
Figure