Papers › Learning to Compose Dynamic Tree Structures for Visual Contexts

Learning to Compose Dynamic Tree Structures for Visual Contexts

5 Dec 2018CVPR 2019 6arXiv:1812.01880archive 2025-07-28

Kaihua Tang, Hanwang Zhang, Baoyuan Wu, Wenhan Luo, Wei Liu

We propose to compose dynamic tree structures that place the objects in an image into a visual context, helping visual reasoning tasks such as scene graph generation and visual Q&A. Our visual context tree model, dubbed VCTree, has two key advantages over existing structured object representations including chains and fully-connected graphs: 1) The efficient and expressive binary tree encodes the inherent parallel/hierarchical relationships among objects, e.g., "clothes" and "pants" are usually co-occur and belong to "person"; 2) the dynamic structure varies from image to image and task to task, allowing more content-/task-specific message passing among objects. To construct a VCTree, we design a score function that calculates the task-dependent validity between each object pair, and the tree is the binary version of the maximum spanning tree from the score matrix. Then, visual contexts are encoded by bidirectional TreeLSTM and decoded by task-specific models. We develop a hybrid learning procedure which integrates end-task supervised learning and the tree structure reinforcement learning, where the former's evaluation result serves as a self-critic for the latter's structure exploration. Experimental results on two benchmarks, which require reasoning over contexts: Visual Genome for scene graph generation and VQA2.0 for visual Q&A, show that VCTree outperforms state-of-the-art results while discovering interpretable visual context structures.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 14 code samples harvested from 2 repositories linked to this paper: 10 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 1 violated, 7 with no contract checked; 2 where Syntology's instrument failed) · 4 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 14 samples from 2 repositories, 10 ran (8 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

KaihuaTang/Scene-Graph-Benchmark.pytorch mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Unbiased Scene Graph Generation from Biased Training (arXiv:2002.11949; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 4 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
KaihuaTang/VCTree-Scene-Graph-Generation mentioned on GitHubpytorchMITSyntology: 12 samples, 8 ran (1 instrument-failed) · 4 unverified report
KaihuaTang/VCTree-Visual-Question-Answering mentioned on GitHubpytorchSyntology: 2 samples, 2 ran (1 instrument-failed) · 0 unverified report
Karim-53/SGG mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report
ihaeyong/unbiased-sgg mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Unbiased Scene Graph Generation from Biased Training (arXiv:2002.11949; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 4 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
zacharie12/zacharie mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

14 samples harvested: 10 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 1 violated, 7 with no contract checked; 2 where Syntology's instrument failed) · 4 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · violated contract
1ran · our draft was wrong
1ran; the contract check could not run
7ran
4unverified

Licence: 1 of the 14 samples is pointer only, meaning Syntology does not serve that copy's text. For that sample, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

KaihuaTang/VCTree-Scene-Graph-Generation community (archive-listed) 12 samples, 8 ran (1 instrument-failed) · 4 unverified
arTree_to_biTree lib/tree_lstm/graph_to_tree.py ran MIT (permissive) · bacd2c4e4708f3a1 · report fixture: signature arTree:ArTree/0/? · returned BiNode · level recorded 2026-09-26
filter_dets lib/surgery.py ran MIT (permissive) · 23725d7c2832de1b · report fixture: signature boxes:Tensor/2/float, obj_scores:Tensor/1/float, obj_classes:Tensor/1/int, rel_inds:Tensor/2/int, pred_scores:Tensor/2/float, gt_boxes:list/1/list, gt_classes:list/1/int, gt_rels:list/1/list · returned tuple · level recorded 2026-09-26
get_ranking in 11 papers lib/pytorch_misc.py ran MIT (permissive) here; the stored copy is pointer only · a1e587129dd2dfaf · report fixture: signature predictions:Tensor/2/float, labels:Tensor/1/int, num_guesses:int/0/int · returned tuple · level recorded 2026-09-24
optimistic_restore in 6 papers lib/pytorch_misc.py ran MIT (permissive) · 6d0daf87a6ec7e39 · report fixture: signature network:callable/0/?, state_dict:dict/0/? · returned bool · level recorded 2026-09-25
pairwise in 27 papers lib/pytorch_misc.py ran · our draft was wrong MIT (permissive) · fef49730c9e9a2b8 · report fixture: signature iterable:list/1/int · returned zip · level recorded 2026-09-24
path in 5 papers config.py ran MIT (permissive) · 5d64438de6614360 · report fixture: returned str · level recorded 2026-09-25
reporthook in 5 papers lib/word_vectors.py ran MIT (permissive) · b0ccc0da43f7ec20 · report fixture: signature t:tqdm/0/? · returned function · level recorded 2026-09-26
stanford_path config.py ran MIT (permissive) · 081b0b43ff7d9810 · report fixture: returned str · level recorded 2026-09-25
arbitraryForest_to_biForest lib/tree_lstm/graph_to_tree.py unverified MIT (permissive) · cd49722cb881389f · report
gather_res lib/object_detector.py unverified MIT (permissive) · 013f03d1624b019d · report
load_word_vectors in 5 papers lib/word_vectors.py unverified MIT (permissive) · da7576453008a270 · report
vgg_fc lib/resnet.py unverified MIT (permissive) · 16d7f949c9b0c390 · report
KaihuaTang/VCTree-Visual-Question-Answering community (archive-listed) 2 samples, 2 ran (1 instrument-failed) · 0 unverified
apply_attention in 5 papers model.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted MIT (permissive) · fb40006c9cd123ac · report fixture: signature input:Tensor/4/float, attention:Tensor/4/float, use_softmax:bool/0/bool · returned Tensor · level recorded 2026-09-22
tile_2d_over_nd model.py ran · violated contract fingerprinted MIT (permissive) · b3299f7858d7d2f2 · report fixture: signature feature_vector:Tensor/2/float, feature_map:Tensor/4/float · returned Tensor · level recorded 2026-09-22

Tasks

Graph GenerationPanoptic Scene Graph GenerationReinforcement LearningScene Graph GenerationVisual Question Answering (VQA)Visual Reasoning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Panoptic Scene Graph Generation PSG Dataset VCTree R@20 20.6 #7 of 9 Archive leaderboard report
Panoptic Scene Graph Generation PSG Dataset VCTree mR@20 9.70 #7 of 9 Archive leaderboard report
Scene Graph Generation Visual Genome VCTree Recall@50 27.9 #7 of 19 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections