Papers › EGTR: Extracting Graph from Transformer for Scene Graph Generation

EGTR: Extracting Graph from Transformer for Scene Graph Generation

2 Apr 2024CVPR 2024 1arXiv:2404.02072archive 2025-07-28

Jinbae Im, Jeongyeon Nam, Nokyung Park, HyungMin Lee, Seunghyun Park

Scene Graph Generation (SGG) is a challenging task of detecting objects and predicting relationships between objects. After DETR was developed, one-stage SGG models based on a one-stage object detector have been actively studied. However, complex modeling is used to predict the relationship between objects, and the inherent relationship between object queries learned in the multi-head self-attention of the object detector has been neglected. We propose a lightweight one-stage SGG model that extracts the relation graph from the various relationships learned in the multi-head self-attention layers of the DETR decoder. By fully utilizing the self-attention by-products, the relation graph can be extracted effectively with a shallow relation extraction head. Considering the dependency of the relation extraction task on the object detection task, we propose a novel relation smoothing technique that adjusts the relation label adaptively according to the quality of the detected objects. By the relation smoothing, the model is trained according to the continuous curriculum that focuses on object detection task at the beginning of training and performs multi-task learning as the object detection performance gradually improves. Furthermore, we propose a connectivity prediction task that predicts whether a relation exists between object pairs as an auxiliary task of the relation extraction. We demonstrate the effectiveness and efficiency of our method for the Visual Genome and Open Image V6 datasets. Our code is publicly available at https://github.com/naver-ai/egtr.

PaperPDFConference PDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2404.02072")

Code

Syntology Ran 8 of 17 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

naver-ai/egtr officialmentioned in papermentioned on GitHubpytorchApache-2.0 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.

Code Syntology ran Syntology

17 samples harvested; 8 ran; 1 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
2ran · our draft was wrong
1ran · fixture could not drive it
4ran
9unverified

Licence: 0 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from naver-ai/egtr. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

bbox_iou naver-ai/egtr/lib/evaluation/ap_eval_rel.py official repository ran Apache-2.0 (permissive) · 8b29521250c9137c · report
convert_to_xywh naver-ai/egtr/lib/evaluation/coco_eval.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · f31a58bf6457ced5 · report
evaluate naver-ai/egtr/lib/evaluation/coco_eval.py official repository ran · our draft was wrong Apache-2.0 (permissive) · fe0ddcc2d420c9a0 · report
get_ap naver-ai/egtr/lib/evaluation/ap_eval_rel.py official repository ran fingerprinted Apache-2.0 (permissive) · 68d0b7c3f3d24968 · report
hflip naver-ai/egtr/model/transform.py official repository ran Apache-2.0 (permissive) · 9be9e658b5bd688a · report
inverse_sigmoid naver-ai/egtr/model/deformable_detr.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 83c03ceb1307c6c4 · report
ms_deform_attn_core_pytorch naver-ai/egtr/model/deformable_detr.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · c53ec291fabfc643 · report
prepare_mAP_dets naver-ai/egtr/lib/evaluation/ap_eval_rel.py official repository ran Apache-2.0 (permissive) · 407320cfdd98192d · report
argsort_desc naver-ai/egtr/lib/pytorch_misc.py official repository unverified Apache-2.0 (permissive) · 7d4002289969a288 · report
box_area naver-ai/egtr/model/util.py official repository unverified Apache-2.0 (permissive) · d642ed19bfc91106 · report
build_position_encoding naver-ai/egtr/model/deformable_detr.py official repository unverified Apache-2.0 (permissive) · 72ceaeb9390c2de9 · report
collate_fn naver-ai/egtr/train_egtr.py official repository unverified Apache-2.0 (permissive) · cdb6e23f77eb4b45 · report
crop naver-ai/egtr/model/transform.py official repository unverified Apache-2.0 (permissive) · 2c3f120011363d96 · report
dice_loss naver-ai/egtr/model/util.py official repository unverified Apache-2.0 (permissive) · ca18559102973d9c · report
eval_rel_results naver-ai/egtr/lib/evaluation/oi_eval.py official repository unverified Apache-2.0 (permissive) · e38b3656e1c52b5c · report
intersect_2d naver-ai/egtr/lib/pytorch_misc.py official repository unverified Apache-2.0 (permissive) · 6727d2d8f1d79998 · report
sigmoid_focal_loss naver-ai/egtr/model/util.py official repository unverified Apache-2.0 (permissive) · 728119ce133dfec1 · report

Tasks

Graph GenerationMulti-Task LearningObjectObject DetectionRelation ExtractionScene Graph Generationobject-detection

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEConvolutionDense ConnectionsDetrDropoutFeedforward NetworkLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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