{"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/reasonbert-pre-trained-to-reason-with-distant","title":"ReasonBERT: Pre-trained to Reason with Distant Supervision","arxiv_id":"2109.04912","date":"2021-09-10","proceeding":"EMNLP 2021 11","authors":["Xiang Deng","Yu Su","Alyssa Lees","You Wu","Cong Yu","Huan Sun"],"abstract":"We present ReasonBert, a pre-training method that augments language models with the ability to reason over long-range relations and multiple, possibly hybrid contexts. Unlike existing pre-training methods that only harvest learning signals from local contexts of naturally occurring texts, we propose a generalized notion of distant supervision to automatically connect multiple pieces of text and tables to create pre-training examples that require long-range reasoning. Different types of reasoning are simulated, including intersecting multiple pieces of evidence, bridging from one piece of evidence to another, and detecting unanswerable cases. We conduct a comprehensive evaluation on a variety of extractive question answering datasets ranging from single-hop to multi-hop and from text-only to table-only to hybrid that require various reasoning capabilities and show that ReasonBert achieves remarkable improvement over an array of strong baselines. Few-shot experiments further demonstrate that our pre-training method substantially improves sample efficiency.","url_abs":"https://arxiv.org/abs/2109.04912v1","url_pdf":"https://arxiv.org/pdf/2109.04912v1.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":"reasonbert-pre-trained-to-reason-with-distant","repo_url":"https://github.com/sunlab-osu/reasonbert","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"extractive-question-answering","task_name":"Extractive Question-Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"semantic-parsing","task_name":"Semantic Parsing"}],"methods":[{"method_slug":"reasonbert","method_name":"ReasonBERT"}],"datasets_introduced":[],"methods_introduced":[{"slug":"reasonbert","name":"ReasonBERT","full_name":"ReasonBERT"}],"results":[{"leaderboard":"/sota/question-answering-on-triviaqa","task":"Question Answering","dataset":"TriviaQA","model":"ReasonBERTR","rank_in_archive_order":55,"of":56,"metrics":{"F1":"45.5"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-triviaqa","task":"Question Answering","dataset":"TriviaQA","model":"ReasonBERTB","rank_in_archive_order":56,"of":56,"metrics":{"F1":"37.2"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-parsing-on-graphquestions","task":"Semantic Parsing","dataset":"GraphQuestions","model":"ReasonBERTR","rank_in_archive_order":1,"of":1,"metrics":{"F1 Score":"41.3"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2109.04912","atlas_url":"https://app.syntology.ai/?focus=2109.04912","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.04912"}},"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/sunlab-osu/reasonbert","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":1,"ran_honours":1,"ran_draft_wrong":1,"unverified":8},"by_repo_kind":{"official":{"samples":11,"ran":3,"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":"f6c275d6a18330a9","entry":"exact_match_score","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"model/metric.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/model/metric.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6c275d6a18330a9"}},{"code_sha256_prefix":"fdd9a4d20f5a9d6f","entry":"f1_score","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"model/metric.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/model/metric.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fdd9a4d20f5a9d6f"}},{"code_sha256_prefix":"c6a80c065d2e4851","entry":"normalize_answer","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"model/metric.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/model/metric.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6a80c065d2e4851"}},{"code_sha256_prefix":"ac2fa2763f9ff92e","entry":"MRQA_preprocess","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"data_loader/data_loaders.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/data_loader/data_loaders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac2fa2763f9ff92e"}},{"code_sha256_prefix":"46aaba4ebd9f132b","entry":"cross_entropy_with_onehot","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/model/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"46aaba4ebd9f132b"}},{"code_sha256_prefix":"c2c2e8507e9edd19","entry":"flatten","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"data_loader/tapas_modelling.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/data_loader/tapas_modelling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c2c2e8507e9edd19"}},{"code_sha256_prefix":"ead963170369d948","entry":"gather","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"data_loader/tapas_modelling.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/data_loader/tapas_modelling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ead963170369d948"}},{"code_sha256_prefix":"afba2c06a42074fe","entry":"get_linear_schedule_with_warmup","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"model/loss.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/model/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"afba2c06a42074fe"}},{"code_sha256_prefix":"8c5fc643936371bd","entry":"get_tokenized_loc","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"data_loader/data_loaders.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/data_loader/data_loaders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8c5fc643936371bd"}},{"code_sha256_prefix":"8c2db3d4435816c0","entry":"nll_loss","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"model/loss.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/model/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8c2db3d4435816c0"}},{"code_sha256_prefix":"dd644affb7c645e2","entry":"tmp_func","repo":"sunlab-osu/reasonbert","repo_kind":"official","path":"data_loader/data_loaders.py","file_url":"https://github.com/sunlab-osu/reasonbert/blob/HEAD/data_loader/data_loaders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dd644affb7c645e2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}