{"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/case-based-reasoning-with-language-models-for","title":"Case-Based Reasoning with Language Models for Classification of Logical Fallacies","arxiv_id":"2301.11879","date":"2023-01-27","proceeding":null,"authors":["Zhivar Sourati","Filip Ilievski","Hông-Ân Sandlin","Alain Mermoud"],"abstract":"The ease and speed of spreading misinformation and propaganda on the Web motivate the need to develop trustworthy technology for detecting fallacies in natural language arguments. However, state-of-the-art language modeling methods exhibit a lack of robustness on tasks like logical fallacy classification that require complex reasoning. In this paper, we propose a Case-Based Reasoning method that classifies new cases of logical fallacy by language-modeling-driven retrieval and adaptation of historical cases. We design four complementary strategies to enrich input representation for our model, based on external information about goals, explanations, counterarguments, and argument structure. Our experiments in in-domain and out-of-domain settings indicate that Case-Based Reasoning improves the accuracy and generalizability of language models. Our ablation studies suggest that representations of similar cases have a strong impact on the model performance, that models perform well with fewer retrieved cases, and that the size of the case database has a negligible effect on the performance. Finally, we dive deeper into the relationship between the properties of the retrieved cases and the model performance.","url_abs":"https://arxiv.org/abs/2301.11879v2","url_pdf":"https://arxiv.org/pdf/2301.11879v2.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":"case-based-reasoning-with-language-models-for","repo_url":"https://github.com/zhpinkman/cbr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"logical-fallacies","task_name":"Logical Fallacies"},{"task_slug":"misinformation","task_name":"Misinformation"},{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2301.11879","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.11879"}},"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/zhpinkman/cbr","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/zhpinkman/CBR","reach":{"status":"ok"}}],"summary":{"ran":1,"ran_draft_wrong":2},"by_repo_kind":{"official":{"samples":3,"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":3,"samples":[{"code_sha256_prefix":"0d0d04967373a856","entry":"Retriever","repo":"zhpinkman/CBR","repo_kind":"official","path":"cbr_analyser/reasoner/classifier_with_attention_bert.py","file_url":"https://github.com/zhpinkman/CBR/blob/HEAD/cbr_analyser/reasoner/classifier_with_attention_bert.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":"0d0d04967373a856"}},{"code_sha256_prefix":"c0b492a203771d15","entry":"augment_with_similar_cases","repo":"zhpinkman/CBR","repo_kind":"official","path":"cbr_analyser/reasoner/classifier_with_attention_bert.py","file_url":"https://github.com/zhpinkman/CBR/blob/HEAD/cbr_analyser/reasoner/classifier_with_attention_bert.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c0b492a203771d15"}},{"code_sha256_prefix":"e40e71b62a6f836b","entry":"create_augmented_case","repo":"zhpinkman/CBR","repo_kind":"official","path":"cbr_analyser/reasoner/classifier_with_attention_bert.py","file_url":"https://github.com/zhpinkman/CBR/blob/HEAD/cbr_analyser/reasoner/classifier_with_attention_bert.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e40e71b62a6f836b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}