Scene graph generation (SGG) aims to detect objects in an image and predict the relationships between them. The standard PredCls, SGCls, and SGDet settings show how much performance drops without ground-truth boxes and labels, but not where or why a model fails. Knowing this would allow fixing a model where it fails, without retraining. We propose RoHa-SGG (Root-cause-guided Harness optimization for SGG), which extends agentic harness optimization to SGG. It optimizes the harness, the inference code around a frozen SGG model. RoHa-SGG has two main LLM agents. A root-cause analysis (RCA) agent finds the components where the model fails and diagnoses why, and a proposer agent searches for a harness that fixes these causes. We evaluate RoHa-SGG on Visual Genome and PSG with representative two-stage, one-stage, and multimodal-LLM SGG models. The analysis shows that the components where ground-truth triplets are lost differ across models and datasets. RoHa-SGG improves every metric on all five model-dataset combinations. Graph-constrained R@100 and mR@100 rise by up to 15.8 and 26.4 points for the multimodal LLM and by up to 3.6 and 10.1 points for the two-stage and one-stage models. With root-cause guidance, the harness search reaches the final score of an unguided search up to three times faster.
Figures & tables
Figure 2: RoHa-SGG overview. (1) The RCA agent corrects components of the frozen model M ’s output with ground truth and splits the missed ground-truth triplets over the components. It tests each cause with an intervention. (2) In each iteration, the proposer agent writes three candidate harnesses, at least two of which target diagnosed causes. (3) Each is reviewed, checked and scored on search images. The best harness is re-diagnosed every four iterations. (4) The harness selected on selection images is deployed around the unchanged model.
Figure 3: Where the baselines miss ground-truth triplets. Each cell gives the gc R@20 or mR@20 points that the baseline loses at that component, i.e . its Shapley share ( Eq. 2 ) of the gain of correcting all components with ground truth. A triplet that needs several corrections is split equally among them. VG150 uses 3,000 search and check images, and PSG uses the 790 search images with ground-truth triplets. All cells share one color scale, and bold marks the largest value per row. Each row sums to the gain of correcting all components, within about 1 point of 100−R@20 for gc R@20.
Table 1: Harness space by component. What a harness may change at each component, and the tools and cues it may use. The unguided, knowledge-guided and RCA-guided searches ( Sec. 4.4 ) share this space. For R1-SGG, the harness may also optimize prompts with GEPA [ 1 ] .
Data
Model
Harness
R@20
R@50
R@100
mR@20
mR@50
mR@100
F@100
AP50
VG150
REACT++
baseline
23.39
30.12
34.01
12.25
15.96
18.15
23.67
37.25
YOLOv8m
single-pass (ours)
24.21 (+0.82)
32.09 (+1.97)
37.27 (+3.27)
13.31 (+1.06)
17.46 (+1.50)
20.46 (+2.30)
26.42 (+2.75)
37.72 (+0.47)
multi-pass (ours)
24.48 (+1.09)
31.82 (+1.69)
36.34 (+2.33)
13.54 (+1.29)
17.34 (+1.38)
19.87 (+1.72)
25.69 (+2.02)
37.67 (+0.42)
VG150
EGTR
baseline
24.38
31.04
35.17
5.46
7.97
10.11
15.70
26.75
ResNet-50
single-pass (ours)
25.75 (+1.37)
32.66 (+1.62)
36.90 (+1.74)
9.19 (+3.73)
14.51 (+6.54)
18.77 (+8.66)
24.88 (+9.18)
26.83 (+0.08)
multi-pass (ours)
25.64 (+1.27)
33.29 (+2.25)
38.80 (+3.63)
10.45 (+4.98)
16.09 (+8.11)
20.16 (+10.05)
26.53 (+10.83)
27.09 (+0.35)
Table 2: Main results on the official test sets. All metrics are graph-constrained ( gc ) per-image means. Parentheses give the change against the baseline, computed before rounding. Bold and underline mark the best and second best per model and dataset. Base networks are listed under the models. The bottom rows are published numbers under the authors’ protocols. † R1-SGG’s own protocol, with several predicates per pair and VG150 on its validation split. ‡ Public model card. The R1-SGG baseline writes at most 20 triplets for almost every image, so its R@20, R@50 and R@100 nearly coincide.
Inference time (s per image)
Data
Model
Baseline
Single-pass
Multi-pass
VG150
REACT++
0.017
0.92
1.27
EGTR
0.075
0.076
2.27
R1-SGG
11.7
13.2
29.1
PSG
REACT++
0.015
0.75
1.01
R1-SGG
11.0
12.5
29.7
Table 3: Inference time per image. Wall-clock time of the model’s forward pass (baseline) and, for the selected harness, of that pass plus its extra model calls, external tools and harness computation. Times are medians, measured one image at a time on one RTX PRO 6000. External detectors are not speed-optimized.
Figure 4: Search progress. Best harness so far (by the ranking of Sec. 3.3 ), as a running maximum, in each of the 10 main searches. All ten still improve in round 3. The y -axis shows the gain over the baseline, Δ R@100 +Δ mR@100 ( gc , search split).
Figure 5: Before and after RoHa-SGG, one VG150 test image per model. Each image was chosen for clarity among the 30 largest per-image gains with at least two ground-truth triplets recovered at the cause’s component. For EGTR, it shows a generic predicate replaced by the annotated one on the same detection pair, within the top 30. Fixes are drawn in their cause’s component color, with thick edges and outlined added boxes. Other triplets and objects are grey, and objects the baseline did not box are dashed. R@100 is the per-image gc R@100. The right column gives the cause, its component and the fix.
Figure 6: Selected harnesses for the three models (VG150, single-pass, test). Dots mark unchanged components and chips mark edited ones. A badge marks an edit that follows a diagnosed cause. Dashed chips mark edits with no diagnosed cause in the harness’s records. They come from free candidates or from earlier steps, which may themselves have followed a cause. Bars show the share of recovered ground-truth triplets that the baseline first lost at each component. The right column shows test gc Δ R@100 and Δ mR@100.
Figure 7: Unguided, knowledge-guided and RCA-guided search (VG150, single-pass). Best harness so far (by the ranking of Sec. 3.3 ) per iteration, as a running maximum. The y -axis shows the gain over the baseline, Δ R@100 +Δ mR@100 ( gc , search split). The shaded area marks the lead of the RCA-guided search over the better other setting, and the arrow marks its final lead.
VG150
PSG
Search
REACT++
EGTR
R1-SGG
REACT++
R1-SGG
Single-pass
$270
$325
$347
$263
$320
Multi-pass
$318
$314
$376
$295
$296
Table 4: Search cost. API spend of one RCA-guided search in US dollars, including its root-cause analyses ($62–105). The harness makes no API call at inference.
Learning-driven Scene Graph Generation (SGG) models excel on frequent relation types but degrade sharply under annotation sparsity, failing to capture reliable visual commonsense knowledge. We propose a model-agnostic, semantically-guided knowledge refinement framework that systematically mines commonsense-grounded constraints from training data - capturing spatial, functional, and qualitative relational regularities - and uses general declarative commonsense reasoning to correct and refine ranked SGG predictions at inference time. The framework requires no manual rule authoring, no model retraining, and transfers across datasets and architectures. On three standard benchmarks, we obtain consistent improvements over strong baselines, demonstrating that structured visual commonsense reasoning over deep scene semantics is a practical and effective complement to purely learning-based scene graph generation.
Maëlic Neau, Salim Baloch, Jakob Suchan +2
Computing Science Department, Umeå University, Umeå, Sweden · School of Computer Science & Engineering, Constructor University, Bremen, Germany · CoDesign Lab EU., Örebro, Sweden +1
Scene Graph Generation (SGG) structures visual scenes as graphs of objects and their relations. While Multimodal Large Language Models (MLLMs) have advanced end-to-end SGG, current methods are hindered by both a lack of task-specific structured reasoning and the challenges of sparse, long-tailed relation distributions, resulting in incomplete scene graphs characterized by low recall and biased predictions. To address these issues, we introduce SGG-R3, a structured reasoning framework that integrates task-specific chain-of-thought (CoT)-guided supervised fine-tuning (SFT) and reinforcement learning (RL) with group sequence policy optimization (GSPO), designed to engage in three sequential stages to achieve end-to-end unbiased scene graph generation. During the SFT phase, we propose a relation augmentation strategy by leveraging an MLLM and refined via embedding similarity filtering to alleviate relation sparsity. Subsequently, a stage-aligned reward scheme optimizes the procedural reasoning during RL. Specifically, we propose a novel dual-granularity reward which integrates fine-grained and coarse-grained relation rewards, simultaneously mitigating the long-tail issue via frequency-based adaptive weighting of predicates and improving relation coverage through semantic clustering. Experiments on two benchmarks show that SGG-R3 achieves superior performance compared to existing methods, demonstrating the effectiveness and generalization of the framework.
Jiaye Feng, Qixiang Yin, Yuankun Liu +2
School of Software and Microelectronics, Peking University, Beijing, China · Zhongguancun Academy, Beijing, China
Scene Graph Generation (SGG) unifies object localization and visual relationship reasoning by predicting boxes and subject-predicate-object triples. Yet most pipelines treat SGG as a one-shot, deterministic classification problem rather than a genuinely progressive, generative task. We propose FlowSG, which recasts SGG as continuous-time transport on a hybrid discrete-continuous state: starting from a noised graph, the model progressively grows an image-conditioned scene graph through constraint-aware refinements that jointly synthesize nodes (objects) and edges (predicates). Specifically, we first leverage a VQ-VAE to quantize a scene graph (e.g., continuous visual features) into compact, predictable tokens; a graph Transformer then (i) predicts a conditional velocity field to transport continuous geometry (boxes) and (ii) updates discrete posteriors for categorical tokens (object features and predicate labels), coupling semantics and geometry via flow-conditioned message aggregation. Training combines flow-matching losses for geometry with a discrete-flow objective for tokens, yielding few-step inference and plug-and-play compatibility with standard detectors and segmenters. Extensive experiments on VG and PSG under closed- and open-vocabulary protocols show consistent gains in predicate R/mR and graph-level metrics, validating the mixed discrete-continuous generative formulation over one-shot classification baselines, with an average improvement of about 3 points over the state-of-the-art USG-Par.
Xin Hu, Ke Qin, Wen Yin +3
The Laboratory of Intelligent Collaborative Computing of UESTC · Monash University · Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)