{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/relvit-concept-guided-vision-transformer-for-1","title":"RelViT: Concept-guided Vision Transformer for Visual Relational Reasoning","arxiv_id":"2204.11167","date":"2022-04-24","proceeding":"ICLR 2022 4","authors":["Xiaojian Ma","Weili Nie","Zhiding Yu","Huaizu Jiang","Chaowei Xiao","Yuke Zhu","Song-Chun Zhu","Anima Anandkumar"],"abstract":"Reasoning about visual relationships is central to how humans interpret the visual world. This task remains challenging for current deep learning algorithms since it requires addressing three key technical problems jointly: 1) identifying object entities and their properties, 2) inferring semantic relations between pairs of entities, and 3) generalizing to novel object-relation combinations, i.e., systematic generalization. In this work, we use vision transformers (ViTs) as our base model for visual reasoning and make better use of concepts defined as object entities and their relations to improve the reasoning ability of ViTs. Specifically, we introduce a novel concept-feature dictionary to allow flexible image feature retrieval at training time with concept keys. This dictionary enables two new concept-guided auxiliary tasks: 1) a global task for promoting relational reasoning, and 2) a local task for facilitating semantic object-centric correspondence learning. To examine the systematic generalization of visual reasoning models, we introduce systematic splits for the standard HICO and GQA benchmarks. We show the resulting model, Concept-guided Vision Transformer (or RelViT for short) significantly outperforms prior approaches on HICO and GQA by 16% and 13% in the original split, and by 43% and 18% in the systematic split. Our ablation analyses also reveal our model's compatibility with multiple ViT variants and robustness to hyper-parameters.","url_abs":"https://arxiv.org/abs/2204.11167v2","url_pdf":"https://arxiv.org/pdf/2204.11167v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"relvit-concept-guided-vision-transformer-for-1","repo_url":"https://github.com/NVlabs/RelViT","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"human-object-interaction-detection","task_name":"Human-Object Interaction Detection"},{"task_slug":"object","task_name":"Object"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"systematic-generalization","task_name":"Systematic Generalization"},{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":"visual-reasoning","task_name":"Visual Reasoning"},{"task_slug":"zero-shot-human-object-interaction-detection","task_name":"Zero-Shot Human-Object Interaction Detection"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/human-object-interaction-detection-on-hico-1","task":"Human-Object Interaction Detection","dataset":"HICO","model":"RelViT","rank_in_archive_order":4,"of":8,"metrics":{"mAP":"43.98"},"uses_additional_data":false},{"leaderboard":"/sota/visual-question-answering-on-gqa","task":"Visual Question Answering (VQA)","dataset":"GQA","model":"RelViT","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"65.54"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2204.11167","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.11167"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/NVlabs/RelViT","reach":null}],"summary":{"ran":1,"ran_honours":2,"ran_fixture":3,"unverified":4},"by_repo_kind":{"official":{"samples":10,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":10,"samples":[{"code_sha256_prefix":"4df4c993c5727035","entry":"Buffer","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4df4c993c5727035"}},{"code_sha256_prefix":"0c638badfdf212a4","entry":"comp_sample_prob","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0c638badfdf212a4"}},{"code_sha256_prefix":"332c5303b119ea46","entry":"compute_acc_gqa","repo":"NVlabs/RelViT","repo_kind":"official","path":"train_gqa.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/train_gqa.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"332c5303b119ea46"}},{"code_sha256_prefix":"b6e1619d9365b133","entry":"gather_score_label","repo":"NVlabs/RelViT","repo_kind":"official","path":"train_gqa.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/train_gqa.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b6e1619d9365b133"}},{"code_sha256_prefix":"75e49409a0d5bc35","entry":"gather_score_label","repo":"NVlabs/RelViT","repo_kind":"official","path":"train_hico.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/train_hico.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"75e49409a0d5bc35"}},{"code_sha256_prefix":"0a8ca463ea529cb4","entry":"token_level_esvit","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0a8ca463ea529cb4"}},{"code_sha256_prefix":"5b8d7f4ee9f98aa7","entry":"MoCo","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5b8d7f4ee9f98aa7"}},{"code_sha256_prefix":"3a43770048acb61a","entry":"RCL","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3a43770048acb61a"}},{"code_sha256_prefix":"979ae321e669e678","entry":"dequeue_with_concept","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"979ae321e669e678"}},{"code_sha256_prefix":"8aed60786f3eb5e0","entry":"enqueue_with_concept","repo":"NVlabs/RelViT","repo_kind":"official","path":"utils/relvit.py","file_url":"https://github.com/NVlabs/RelViT/blob/HEAD/utils/relvit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8aed60786f3eb5e0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}