{"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/spartqa-a-textual-question-answering","title":"SpartQA: : A Textual Question Answering Benchmark for Spatial Reasoning","arxiv_id":"2104.05832","date":"2021-04-12","proceeding":null,"authors":["Roshanak Mirzaee","Hossein Rajaby Faghihi","Qiang Ning","Parisa Kordjmashidi"],"abstract":"This paper proposes a question-answering (QA) benchmark for spatial reasoning on natural language text which contains more realistic spatial phenomena not covered by prior work and is challenging for state-of-the-art language models (LM). We propose a distant supervision method to improve on this task. Specifically, we design grammar and reasoning rules to automatically generate a spatial description of visual scenes and corresponding QA pairs. Experiments show that further pretraining LMs on these automatically generated data significantly improves LMs' capability on spatial understanding, which in turn helps to better solve two external datasets, bAbI, and boolQ. We hope that this work can foster investigations into more sophisticated models for spatial reasoning over text.","url_abs":"https://arxiv.org/abs/2104.05832v1","url_pdf":"https://arxiv.org/pdf/2104.05832v1.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":"spartqa-a-textual-question-answering","repo_url":"https://github.com/HLR/SpartQA_generation","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"spatial-reasoning","task_name":"Spatial Reasoning"}],"methods":[],"datasets_introduced":[{"slug":"spartqa","name":"SPARTQA","full_name":"SPAtial Reasoning on Textual Question Answering"}],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2104.05832","atlas_url":"https://app.syntology.ai/?focus=2104.05832","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.05832"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/HLR/SpartQA_generation","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":13},"by_repo_kind":{"official":{"samples":15,"ran":2,"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":0,"samples":[{"code_sha256_prefix":"8c1ae295e11d5bdd","entry":"forbid","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Find_Relations.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Find_Relations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c1ae295e11d5bdd"}},{"code_sha256_prefix":"d69e73359d1aa097","entry":"obj_obj_relation","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Find_Relations.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Find_Relations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d69e73359d1aa097"}},{"code_sha256_prefix":"471651d79ce54356","entry":"B","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Creating_story.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Creating_story.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"471651d79ce54356"}},{"code_sha256_prefix":"67d12a7be1b07cd6","entry":"B0","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Creating_story.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Creating_story.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67d12a7be1b07cd6"}},{"code_sha256_prefix":"1b61b695e4b1591b","entry":"blocks","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Annotation.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Annotation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b61b695e4b1591b"}},{"code_sha256_prefix":"d6229884b540daa0","entry":"change_words","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Change_Words.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Change_Words.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d6229884b540daa0"}},{"code_sha256_prefix":"8bf1ca2d5402acbb","entry":"change_words_ans","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Change_Words.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Change_Words.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8bf1ca2d5402acbb"}},{"code_sha256_prefix":"e1ba4d64b3969bd1","entry":"choose_between_rels","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Random_choice.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Random_choice.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e1ba4d64b3969bd1"}},{"code_sha256_prefix":"541abab8fb2b7ac0","entry":"creating_annotation","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Annotation.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Annotation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"541abab8fb2b7ac0"}},{"code_sha256_prefix":"606cc962682d5541","entry":"objects","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Annotation.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Annotation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"606cc962682d5541"}},{"code_sha256_prefix":"21f5044baf23737b","entry":"one_obj","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Creating_questions.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Creating_questions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"21f5044baf23737b"}},{"code_sha256_prefix":"8d5dfad0949f2da3","entry":"one_obj_restricted","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Creating_questions.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Creating_questions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d5dfad0949f2da3"}},{"code_sha256_prefix":"5af880837188dad5","entry":"relation","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Change_Words.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Change_Words.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5af880837188dad5"}},{"code_sha256_prefix":"62a58ac46329a860","entry":"scene_obj_relation","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Find_Relations.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Find_Relations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"62a58ac46329a860"}},{"code_sha256_prefix":"453eb61b94e9f7ba","entry":"total_number_func","repo":"HLR/SpartQA_generation","repo_kind":"official","path":"Random_choice.py","file_url":"https://github.com/HLR/SpartQA_generation/blob/HEAD/Random_choice.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"453eb61b94e9f7ba"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}