Abstract
The development of Large Vision-Language Models (LVLMs) is striving to catch up with the success of Large Language Models (LLMs), yet it faces more challenges to be resolved. Very recent works enable LVLMs to localize object-level visual contents and ground text to them. Nonetheless, current LVLMs still struggle to precisely understand visual relations due to the lack of relevant data. In this work, we present RelationVLM, a large vision-language model capable of comprehending various levels and types of relations whether across multiple images or within a video. Specifically, we devise a multi-stage relation-aware training scheme and a series of corresponding data configuration strategies to bestow RelationVLM with the capabilities of understanding semantic relations, temporal associations and geometric transforms. Extensive case studies and quantitative evaluations show RelationVLM has strong capability in understanding such relations and emerges impressive in-context capability of reasoning from few-shot examples by comparison. This work fosters the advancements of LVLMs by enabling them to support a wider range of downstream applications toward artificial general intelligence.
Introduction
While Large Vision-Language Models (LVLMs) like LLaVA or MiniGPT-4 have become remarkably good at describing single images or "grounding" text to specific objects, they remain surprisingly "nearsighted." When asked to compare two images, identify a subtle difference in a video, or describe how an object has been rotated and moved, most current models struggle.
The critical gap lies in existing training data, which is largely composed of single image-text pairs. This lacks the "relational" depth needed for tasks like visual retrieval, anomaly detection, or temporal reasoning. RelationVLM aims to bridge this gap by teaching models not just to see objects, but to understand the connections between them across time and space.
Methodology
The researchers developed a three-stage training strategy to bestow RelationVLM with its capabilities:
- Feature Alignment: A standard "warm-up" phase using interleaved image-text pairs to align visual features with the language model's space.
- Relation-Aware Training: The core innovation. The model is trained on a massive, newly curated dataset focused on three types of relations:
- Semantic Relations: Identifying if objects are the same or different (e.g., person re-identification).
- Temporal Associations: Understanding the chronological order of events in video frames.
- Geometric Transforms: Describing spatial changes like rotation, scaling, and translation.
- Instruction Tuning: A final refinement stage using high-quality dialogue data to ensure the model follows user prompts accurately.
The architecture consists of a frozen vision encoder (ViT-based), a learnable linear adapter, and a Vicuna-7B language model fine-tuned using LoRA (Low-Rank Adaptation).
Data Curation and Collection
To avoid the massive cost of manual annotation, the authors used a "Relation-Based Collector" that leverages GPT-4 to transform raw data from existing specialized datasets into natural dialogue. This pipeline processes semantic data (from Market1501, CUHK03), temporal data (from SSv2, WebVid), and synthesized geometric data created by applying random transformations to COCO segments.
Key Results and Insights
RelationVLM demonstrated superior performance across the board compared to SOTA models like Shikra, Kosmos-2, and CogVLM:
- Semantic Contrast: In tasks requiring the model to differentiate between similar images (like person re-id), RelationVLM outperformed the second-best method by nearly 20% in classification accuracy.
- Geometric Understanding: It achieved a 69.7% BBox Accuracy in tracking transformed objects, whereas most baseline models couldn't perform the task at all.
- Few-Shot Generalization: In 8-shot anomaly detection (MVTec AD), it reached 72.0% accuracy, significantly higher than general-purpose models like Open-Flamingo (64.8%) or Otter (67.1%).
A significant finding was the emergent in-context learning capability. Training on general relations allowed the model to perform few-shot reasoning on unseen domains, such as industrial anomaly detection, by simply providing a few "normal" vs. "anomalous" examples in the prompt.
Conclusion
RelationVLM demonstrates that LVLMs do not necessarily need entirely new architectures to understand complex relations; rather, they require better-structured, relational data. By treating multiple images as distinct but related inputs, RelationVLM enables cleaner comparative reasoning and opens doors for advanced applications in visual retrieval and anomaly detection. Future work will focus on expanding relation types and enhancing complex video-based reasoning.
Summary updated