{"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/a-semantic-based-method-for-unsupervised","title":"A Semantic-based Method for Unsupervised Commonsense Question Answering","arxiv_id":"2105.14781","date":"2021-05-31","proceeding":"ACL 2021 5","authors":["Yilin Niu","Fei Huang","Jiaming Liang","Wenkai Chen","Xiaoyan Zhu","Minlie Huang"],"abstract":"Unsupervised commonsense question answering is appealing since it does not rely on any labeled task data. Among existing work, a popular solution is to use pre-trained language models to score candidate choices directly conditioned on the question or context. However, such scores from language models can be easily affected by irrelevant factors, such as word frequencies, sentence structures, etc. These distracting factors may not only mislead the model to choose a wrong answer but also make it oversensitive to lexical perturbations in candidate answers. In this paper, we present a novel SEmantic-based Question Answering method (SEQA) for unsupervised commonsense question answering. Instead of directly scoring each answer choice, our method first generates a set of plausible answers with generative models (e.g., GPT-2), and then uses these plausible answers to select the correct choice by considering the semantic similarity between each plausible answer and each choice. We devise a simple, yet sound formalism for this idea and verify its effectiveness and robustness with extensive experiments. We evaluate the proposed method on four benchmark datasets, and our method achieves the best results in unsupervised settings. Moreover, when attacked by TextFooler with synonym replacement, SEQA demonstrates much less performance drops than baselines, thereby indicating stronger robustness.","url_abs":"https://arxiv.org/abs/2105.14781v1","url_pdf":"https://arxiv.org/pdf/2105.14781v1.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":"a-semantic-based-method-for-unsupervised","repo_url":"https://github.com/heylinsir/semantic-based-qa","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"semantic-similarity","task_name":"Semantic Similarity"},{"task_slug":"semantic-textual-similarity","task_name":"Semantic Textual Similarity"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.14781","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.14781"}},"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/heylinsir/semantic-based-qa","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":5},"by_repo_kind":{"listed":{"samples":5,"ran":0,"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":"e57d410ad181fe8a","entry":"generate","repo":"heylinsir/semantic-based-qa","repo_kind":"listed","path":"src/run_SEQA_generation.py","file_url":"https://github.com/heylinsir/semantic-based-qa/blob/HEAD/src/run_SEQA_generation.py","link_basis":"harvester_set","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":"e57d410ad181fe8a"}},{"code_sha256_prefix":"a6129e1b4cbc4d2f","entry":"load_and_cache_examples","repo":"heylinsir/semantic-based-qa","repo_kind":"listed","path":"src/run_SEQA_generation.py","file_url":"https://github.com/heylinsir/semantic-based-qa/blob/HEAD/src/run_SEQA_generation.py","link_basis":"harvester_set","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":"a6129e1b4cbc4d2f"}},{"code_sha256_prefix":"a36518da7ffbc858","entry":"load_and_cache_examples","repo":"heylinsir/semantic-based-qa","repo_kind":"listed","path":"src/run_SEQA_voting.py","file_url":"https://github.com/heylinsir/semantic-based-qa/blob/HEAD/src/run_SEQA_voting.py","link_basis":"harvester_set","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":"a36518da7ffbc858"}},{"code_sha256_prefix":"84b544800b69d42e","entry":"scale_scores","repo":"heylinsir/semantic-based-qa","repo_kind":"listed","path":"src/run_SEQA_voting.py","file_url":"https://github.com/heylinsir/semantic-based-qa/blob/HEAD/src/run_SEQA_voting.py","link_basis":"harvester_set","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":"84b544800b69d42e"}},{"code_sha256_prefix":"c64126d84009e5c5","entry":"upper_first_word","repo":"heylinsir/semantic-based-qa","repo_kind":"listed","path":"src/run_SEQA_voting.py","file_url":"https://github.com/heylinsir/semantic-based-qa/blob/HEAD/src/run_SEQA_voting.py","link_basis":"harvester_set","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":"c64126d84009e5c5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}