Abstract
Vision-Language Pretraining (VLP) has achieved remarkable success across various downstream tasks, but such gains are largely driven by scaling up on training data. Yet, literature methods treat image-text pairs as isolated training examples; this neglects the rich relational structure naturally present in many domains, such as e-commerce product co-purchase graphs and social recommendation networks. Inspired by neuroscientific evidence that human encodes knowledge as relationship cognitive maps, we introduce Structure-aware Language-Image Pretraining (SLIP). SLIP integrates a structural contrastive loss to align modalities while also modeling relationships between neighboring entities in a structured graph. To support this paradigm, we construct a large-scale Amazon Product Co-purchase Multimodal Graph Dataset, enabling structured cross-modality supervision at scale. Experiment results show that SLIP consistently outperforms CLIP on cross-modal retrieval and classification tasks in both zero-shot and few-shot settings, showing the value of relational supervision for cross-modal alignment.
Introduction
Most modern Vision-Language Pretraining (VLP) models, such as CLIP, treat training data as a collection of independent pairs. They assume that an image and its caption exist in isolation, ignoring the relational structure inherent in many domains. For instance, in e-commerce, products are naturally linked through co-purchase patterns. In biology, species are connected via taxonomic hierarchies. Ignoring these connections limits a model's ability to capture deep semantic context and makes it sensitive to noisy captions.
SLIP addresses this by mimicking human "cognitive maps," organizing knowledge through relationships. By leveraging graph structures, SLIP moves beyond simple instance-level matching to capture the broader context of how entities relate to one another.
Methodology: The SLIP Framework
The core of SLIP is the integration of structural supervision into the standard contrastive learning objective.
The framework consists of several key components:
- Dual-Encoder Foundation: SLIP utilizes standard image and text encoders to generate initial embeddings.
- Graph Attention Networks (GATs): To incorporate relational data, modality-specific GAT layers aggregate information from a node's neighbors in the graph (e.g., co-purchased products).
- Feature Fusion: Graph-aware embeddings from both modalities are fused into a unified node representation.
- Structural Contrastive Loss: Unlike standard contrastive loss which only matches an image to its specific caption, this loss encourages alignment between nodes that are neighbors in the graph.
- Multi-task Objective: The model is trained on a weighted combination of standard CLIP loss and the new structural alignment loss.
The Amazon Multimodal Graph Dataset
To evaluate SLIP, the authors introduced the Multimodal Amazon Product Co-purchase Graph Dataset. Derived from real-world purchase records, nodes represent product image-text pairs, and edges represent co-purchase events. The dataset spans categories like Electronics, Books, and Clothing, featuring millions of nodes and edges. Rigorous filtering ensures that the graph captures stable consumer behaviors rather than noise.
Experimental Results
SLIP was evaluated against a fine-tuned CLIP baseline, primarily on the Electronics subset. The results demonstrate significant improvements across all key metrics.
Key findings include:
- Retrieval Performance: SLIP achieved a Mean Reciprocal Rank (MRR) of 0.584, a 12.3% relative improvement over CLIP's 0.520.
- Top-1 Recall: SLIP showed an 18.6% relative gain in Top-1 Recall (0.478 vs. 0.403), indicating superior precision in identifying exact matches.
- Error Reduction: The Mean Rank dropped significantly from 133.4 to 93.4, showing that SLIP's incorrect predictions are much closer to the ground truth.
Discussion and Insights
- Relational Distance: The study found that 1-hop neighbors (direct connections) provide the best regularization. These often represent complementary items (e.g., a camera and a lens). Higher-hop neighbors often represent similar items, which can introduce noise if treated as positives.
- Contextual Sharpening: Qualitative analysis shows that SLIP "sharpens" the embedding space, distinguishing exact matches more clearly while clustering related items together.
- Batch Size Requirements: Effective graph-based learning requires large batch sizes (e.g., 1024) to ensure subgraphs are sufficiently dense for the model to learn meaningful relational patterns.
Conclusion
SLIP demonstrates that incorporating relational structure into vision-language pretraining significantly enhances cross-modal alignment. By leveraging the "cognitive map" approach through structural contrastive loss, SLIP provides a more robust and context-aware framework for understanding complex multimodal datasets. Future work may explore temporal graphs to account for evolving trends and investigate the scalability of this approach to less structured web data.
Summary updated