TL;DR
Instead of retraining massive, expensive Scene Graph Generation (SGG) models when they underperform, why not just fix the code surrounding them? This paper introduces RoHa-SGG, an agentic system that uses one LLM to diagnose exactly where a model is failing (the "Root-Cause Analysis" agent) and another to write a custom "harness"—a wrapper of post-processing code and external tools—to fix it. It’s a "don't retrain, just repair" approach that boosts performance by up to 26 points while searching for solutions three times faster than unguided methods.
What Problem Does This Paper Address?
Scene Graph Generation (SGG) is the art of turning an image into a structured map of "triplets": (subject, predicate, object), like (man, riding, horse). It’s a complex pipeline involving object detection, classification, and relationship prediction.
The headache for researchers is that when a model’s accuracy drops, it’s hard to tell why. Did it miss the bounding box? Did it misidentify the object? Or did it just fail to realize those two objects were related? Standard metrics tell you that the model failed, but not which component dropped the ball.
Usually, the fix is to retrain the whole model with a new loss function or more data—a "blunt instrument" approach that is computationally expensive and often fails to address the specific bottleneck. The authors argue that we should treat the model as a frozen "black box" and instead optimize the harness: the inference code that prepares inputs, calls the model, and post-processes the results.
Methods
The authors propose RoHa-SGG (Root-cause-guided Harness optimization for SGG), which employs two specialized LLM agents in a feedback loop:
- The RCA (Root-Cause Analysis) Agent: This is the "doctor." It looks at the model's failures and uses Shapley values to attribute the loss in recall to five specific components: bounding boxes, object names, pair proposals, predicates, and final ranking. It then runs "interventions" (like temporarily giving the model ground-truth boxes) to confirm its diagnosis.
- The Proposer Agent: This is the "mechanic." Armed with the RCA's diagnosis, it searches a "harness space"—a library of potential fixes like adding external detectors (e.g., Grounding DINO), applying repeat penalties, or debiasing predicate priors. It writes candidate Python code to implement these fixes.
The system iterates, re-diagnosing the "best" harness found so far to see what errors remain, effectively peeling back layers of failure until the performance plateaus.
Datasets
The authors evaluated RoHa-SGG across five combinations of models and datasets:
- Visual Genome (VG150): The standard, albeit noisy, benchmark for SGG.
- Panoptic Scene Graph (PSG): A more recent dataset focusing on high-quality, dense relationship annotations.
- Models: They tested three distinct architectures: REACT++ (two-stage), EGTR (one-stage), and R1-SGG (a multimodal LLM-based approach).
Key Insights and Ideas
- Failure is Model-Specific: One of the most striking findings is how differently models fail. As shown in the heatmap below, Multimodal LLMs (MLLMs) like R1-SGG lose a massive amount of points at the box component—they are great at "talking" about relationships but struggle with precise localization. In contrast, classic models like REACT++ fail most often at the pair and rank components.
- The "Harness" is Powerful: You don't always need a better brain; sometimes you just need better tools. For the MLLM, the "fix" was often as simple as the Proposer agent deciding to call an external object detector to provide better boxes, rather than relying on the MLLM's internal (and flawed) coordinates.
- Diagnosis Speeds Up Discovery: By telling the Proposer agent exactly what to fix (e.g., "the model is failing at predicate classification because of head-class bias"), the search reaches high-performing code up to 3x faster than a "blind" search that just tries random code snippets.
Key Results
RoHa-SGG improved every metric across all tested model-dataset combinations without a single gradient update to the underlying models:
- MLLM Boost: On VG150, the multimodal LLM (R1-SGG) saw its Mean Recall (mR@100) jump by 15.2 points and its Recall (R@100) by 14.6 points.
- Classic Model Gains: Two-stage and one-stage models saw solid improvements too, with gains of up to 10.1 points in Mean Recall.
- Efficiency: The RCA-guided search often found the "final" best score in just 4 or 5 iterations, whereas unguided searches were still struggling at iteration 12.
Limitations and Future Work
- API Costs: While cheaper than retraining, running high-end LLMs (like Claude 3.5 Opus) for the agents still costs between $260 and $380 per search.
- Inference Overhead: Some fixes involve calling external models (like SAM or Grounding DINO), which can slow down inference time from milliseconds to a few seconds per image.
- Static Evaluation: The current work focuses on the "SGDet" setting (where the model must find everything from scratch). The authors note that extending this to "PredCls" (where boxes are given) is a natural next step.
- Single-Run Variance: The authors acknowledge that because LLM outputs can vary, the results reflect a single search run rather than a statistical average over many runs.
Summary updated