Abstract
Social relation reasoning—the ability to identify whether individuals in an image are friends, colleagues, or family members—is a high-level cognitive task that requires both visual perception and social common sense. Traditional approaches rely on end-to-end supervised learning, which often results in "black box" models that lack interpretability and struggle to generalize across different artistic domains. This paper introduces SocialGPT, a modular framework that translates visual scenes into structured "social stories" for Large Language Models (LLMs). By combining Vision Foundation Models (VFMs) with a novel Greedy Segment Prompt Optimization (GSPO) technique, SocialGPT achieves state-of-the-art zero-shot performance, outperforming fully supervised models while providing transparent, human-readable reasoning for its classifications.
Introduction
Identifying social relationships is a fundamental aspect of human visual understanding. While deep learning has made significant strides in object detection and image classification, social relation recognition (SRR) remains challenging because it involves nuanced cues such as body language, setting, and cultural context. Existing SRR models are typically trained on specific datasets, making them rigid and prone to failure when presented with out-of-distribution data, such as sketches or cartoons.
SocialGPT addresses these limitations by reframing SRR as a reasoning task rather than a simple pattern-matching problem. By leveraging the vast internal knowledge of LLMs, the framework can infer complex relationships without requiring extensive task-specific training. However, effectively bridging the gap between raw pixels and linguistic reasoning requires sophisticated prompt engineering and visual-to-text translation.
The SocialGPT Framework
SocialGPT operates through a two-stage pipeline: a Perception Phase that converts visual data into text, and a Reasoning Phase that optimizes the interaction with the LLM.
1. Perception Phase: Generating the Social Story
To enable an LLM to "see" a scene, SocialGPT first decomposes the image into its constituent parts:
- Segmentation: The Segment Anything Model (SAM) is used to isolate individuals and relevant objects within the frame.
- Captioning: BLIP-2 generates two types of descriptions: "dense captions" for specific segments and "task-oriented captions" that focus on social indicators like age, gender, and the nature of the event.
- Symbol-Based Referencing: A critical innovation in SocialGPT is the replacement of raw numerical coordinates with symbolic identifiers (e.g., referring to individuals as $<P1>$ and $<P2>$). Since LLMs often struggle with spatial arithmetic, this symbolic mapping allows the model to focus on the relational logic rather than parsing pixel locations. These elements are fused into a coherent "social story" that serves as the input for the reasoning engine.
2. Reasoning Phase: Greedy Segment Prompt Optimization (GSPO)
Standard prompt optimization techniques often fail when prompts become excessively long, as is common in complex visual descriptions. To solve this, the authors developed Greedy Segment Prompt Optimization (GSPO).
Instead of optimizing at the token level, GSPO operates on discrete functional segments: System, Expectation, Context, and Guidance. The method uses gradient information to identify the most effective substitutions from a candidate pool of instructions, performing a greedy search to find the optimal combination. This ensures that the LLM receives the most effective instructions for the specific reasoning task at hand.
Experimental Results
The framework was evaluated on two benchmark datasets: PIPA (16 relationship categories) and PISC (6 broad categories).
Performance and Generalization
Despite being a zero-shot method, SocialGPT (using a Vicuna-13B backbone) achieved 66.7% accuracy on the PIPA dataset. This performance notably exceeds the previous state-of-the-art supervised model, TRGAT (65.3%), which was explicitly trained on PIPA's labels.
Furthermore, the GSPO technique provided a consistent performance boost, increasing accuracy by an average of 2.38% on PIPA and 3.18% on PISC across different LLM backbones, including Llama2.
Cross-Domain Robustness
One of the most significant advantages of the SocialGPT approach is its ability to generalize. Traditional models often fail when applied to non-photographic styles. For instance, in tests involving AI-generated sketches of classrooms, traditional models misidentified students as professional colleagues. SocialGPT, by reasoning about the "classroom setting" described in its social story, correctly identified the relationships, demonstrating the power of common-sense reasoning over simple visual feature extraction.
Discussion and Interpretability
Unlike traditional neural networks, SocialGPT is inherently interpretable. Every prediction is accompanied by a "Reason" field, where the LLM explains its logic. For example, the model might note that the proximity of two individuals in a domestic setting, combined with their age difference, suggests a parent-child relationship.
Because the system is modular, it is also future-proof. As more powerful Vision Foundation Models or LLMs are developed, they can be integrated into the SocialGPT framework to further enhance its perceptual and reasoning capabilities.
Conclusion and Future Work
SocialGPT demonstrates that converting visual perception into a structured linguistic narrative allows LLMs to excel at complex social reasoning tasks. By outperforming supervised models in a zero-shot setting, the framework highlights the potential of modular, reasoning-based AI. Future work will focus on refining the social story fusion process to handle more crowded scenes and addressing potential societal biases inherited from the underlying foundation models.
Summary updated