Introduction
Current state-of-the-art Vision-Language Models (VLMs) like CLIP and ALIGN are remarkably effective at matching general images to descriptions. However, they often suffer from a lack of compositional understanding, frequently treating images and text as "bags of words." This leads to failures in distinguishing between similar scenes with different attribute bindings, such as "a red car and a blue truck" versus "a blue car and a red truck."
This limitation arises because these models are typically trained using a coarse-grained contrastive loss that focuses on global embeddings. They miss the fine-grained structure—the specific ways objects, attributes, and actions are linked. ComAlign is introduced as a lightweight "plugin" to address this by extracting and aligning specific entities and relations without requiring massive retraining.
Methodology
ComAlign treats images and text as graphs where objects are nodes and relationships are edges. The process involves three main stages:
- Component Extraction:
- Text: NLP tools (spaCy) extract Entity Components (nouns and adjectives) and Relational Components (subject-action-object triplets).
- Image: An object detector (YOLOv9) identifies candidate regions for entities. "Relation boxes" are created by cropping areas that encompass pairs of interacting objects.
- Lightweight Plugin Architecture: The base VLM (e.g., CLIP) remains frozen. A two-layer transformer is added on top to produce contextualized representations of the fine-grained components.
- Fine-Grained Matching (FGM): The model calculates similarity by seeking the maximum alignment between specific image patches and text tokens, ensuring that descriptive terms in the text (like "red") align with the correct visual pixels.
Experiments and Datasets
The model was trained on the Visual Genome dataset (~100k images) due to its dense annotations for attributes and relationships. Evaluation was performed across several benchmarks:
- Retrieval: MSCOCO and Flickr30K for zero-shot image-to-text (I2T) and text-to-image (T2I) tasks.
- Compositional Understanding: The ARO benchmark (VG-Attribution and VG-Relation) and SVO-Probes were used to test attribute binding and subject-verb-object order.
Key Results
ComAlign demonstrates significant performance boosts across various backbones, including CLIP, NegCLIP, and CoCa. On the MSCOCO dataset, ComAlign improved CLIP-ViT-B32’s image-to-text retrieval (R@1) by 5.60% and text-to-image retrieval by 6.27%. In compositional tests like the VG-Attribution benchmark, it improved CLIP’s performance by 5.55%.
Conclusion
ComAlign proves that efficiency can triumph over scale. By training a tiny plugin on just 100k samples, it outperforms models fine-tuned on hundreds of millions of samples. This suggests that explicitly seeking structural correspondence between modalities is a more effective path toward compositional intelligence than simply increasing data volume. Future work will focus on refining relationship directionality and integrating more complex scene graph topologies.
Summary updated