{"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/learning-situation-hyper-graphs-for-video","title":"Learning Situation Hyper-Graphs for Video Question Answering","arxiv_id":"2304.08682","date":"2023-04-18","proceeding":"CVPR 2023 1","authors":["Aisha Urooj Khan","Hilde Kuehne","Bo Wu","Kim Chheu","Walid Bousselham","Chuang Gan","Niels Lobo","Mubarak Shah"],"abstract":"Answering questions about complex situations in videos requires not only capturing the presence of actors, objects, and their relations but also the evolution of these relationships over time. A situation hyper-graph is a representation that describes situations as scene sub-graphs for video frames and hyper-edges for connected sub-graphs and has been proposed to capture all such information in a compact structured form. In this work, we propose an architecture for Video Question Answering (VQA) that enables answering questions related to video content by predicting situation hyper-graphs, coined Situation Hyper-Graph based Video Question Answering (SHG-VQA). To this end, we train a situation hyper-graph decoder to implicitly identify graph representations with actions and object/human-object relationships from the input video clip. and to use cross-attention between the predicted situation hyper-graphs and the question embedding to predict the correct answer. The proposed method is trained in an end-to-end manner and optimized by a VQA loss with the cross-entropy function and a Hungarian matching loss for the situation graph prediction. The effectiveness of the proposed architecture is extensively evaluated on two challenging benchmarks: AGQA and STAR. Our results show that learning the underlying situation hyper-graphs helps the system to significantly improve its performance for novel challenges of video question-answering tasks.","url_abs":"https://arxiv.org/abs/2304.08682v2","url_pdf":"https://arxiv.org/pdf/2304.08682v2.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":"learning-situation-hyper-graphs-for-video","repo_url":"https://github.com/aurooj/shg-vqa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"video-question-answering","task_name":"Video Question Answering"},{"task_slug":"visual-question-answering-1","task_name":"Visual Question Answering"},{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/video-question-answering-on-agqa-2-0-balanced","task":"Video Question Answering","dataset":"AGQA 2.0 balanced","model":"SHG-VQA (trained from scratch)","rank_in_archive_order":6,"of":8,"metrics":{"Average Accuracy":"49.2"},"uses_additional_data":false},{"leaderboard":"/sota/video-question-answering-on-situated","task":"Video Question Answering","dataset":"STAR Benchmark","model":"SHG-VQA (trained from scratch)","rank_in_archive_order":17,"of":17,"metrics":{"Average Accuracy":"39.47"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.08682","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.08682"}},"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/aurooj/shg-vqa","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/aurooj/SHG-VQA","reach":{"status":"ok"}}],"summary":{"ran":8,"unverified":7},"by_repo_kind":{"official":{"samples":15,"ran":8,"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":15,"samples":[{"code_sha256_prefix":"5294ad4cfb6fd592","entry":"BertAttention","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5294ad4cfb6fd592"}},{"code_sha256_prefix":"602576fb49da0fad","entry":"BertCrossattLayer","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"602576fb49da0fad"}},{"code_sha256_prefix":"07fe34e1f674c0cc","entry":"BertIntermediate","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"07fe34e1f674c0cc"}},{"code_sha256_prefix":"454867610f1f0d75","entry":"BertSelfattLayer","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"454867610f1f0d75"}},{"code_sha256_prefix":"55bcd1b73de582b9","entry":"FixedPositionalEncoding","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"55bcd1b73de582b9"}},{"code_sha256_prefix":"bb8b49b7ee5ab76f","entry":"LearnedPositionalEncoding","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bb8b49b7ee5ab76f"}},{"code_sha256_prefix":"6948edf5bd10ffdd","entry":"PrimaryCaps","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6948edf5bd10ffdd"}},{"code_sha256_prefix":"51ace9dd870b213e","entry":"VisualConfig","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"51ace9dd870b213e"}},{"code_sha256_prefix":"35c89d3fc6a77009","entry":"BertLayer","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"35c89d3fc6a77009"}},{"code_sha256_prefix":"c492a4693f826a30","entry":"ConvCaps","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c492a4693f826a30"}},{"code_sha256_prefix":"304514e4ec620c8e","entry":"CrossAndSelfLayer","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"304514e4ec620c8e"}},{"code_sha256_prefix":"2e5ef0dbcca6c565","entry":"CrossLayer","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2e5ef0dbcca6c565"}},{"code_sha256_prefix":"a68f475e70b1e9e5","entry":"LXRTCapsulesEncoder","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a68f475e70b1e9e5"}},{"code_sha256_prefix":"5c2a6eaf5ca58e25","entry":"SelfCrossLayer","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5c2a6eaf5ca58e25"}},{"code_sha256_prefix":"e7159315c7bda9ac","entry":"VisualFeatEncoder","repo":"aurooj/SHG-VQA","repo_kind":"official","path":"AGQA/src/lxrt/modeling_capsbert.py","file_url":"https://github.com/aurooj/SHG-VQA/blob/HEAD/AGQA/src/lxrt/modeling_capsbert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e7159315c7bda9ac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}