{"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/can-language-models-perform-robust-reasoning","title":"Can Language Models Perform Robust Reasoning in Chain-of-thought Prompting with Noisy Rationales?","arxiv_id":"2410.23856","date":"2024-10-31","proceeding":null,"authors":["Zhanke Zhou","Rong Tao","Jianing Zhu","Yiwen Luo","Zengmao Wang","Bo Han"],"abstract":"This paper investigates an under-explored challenge in large language models (LLMs): chain-of-thought prompting with noisy rationales, which include irrelevant or inaccurate reasoning thoughts within examples used for in-context learning. We construct NoRa dataset that is tailored to evaluate the robustness of reasoning in the presence of noisy rationales. Our findings on NoRa dataset reveal a prevalent vulnerability to such noise among current LLMs, with existing robust methods like self-correction and self-consistency showing limited efficacy. Notably, compared to prompting with clean rationales, base LLM drops by 1.4%-19.8% in accuracy with irrelevant thoughts and more drastically by 2.2%-40.4% with inaccurate thoughts. Addressing this challenge necessitates external supervision that should be accessible in practice. Here, we propose the method of contrastive denoising with noisy chain-of-thought (CD-CoT). It enhances LLMs' denoising-reasoning capabilities by contrasting noisy rationales with only one clean rationale, which can be the minimal requirement for denoising-purpose prompting. This method follows a principle of exploration and exploitation: (1) rephrasing and selecting rationales in the input space to achieve explicit denoising and (2) exploring diverse reasoning paths and voting on answers in the output space. Empirically, CD-CoT demonstrates an average improvement of 17.8% in accuracy over the base model and shows significantly stronger denoising capabilities than baseline methods. The source code is publicly available at: https://github.com/tmlr-group/NoisyRationales.","url_abs":"https://arxiv.org/abs/2410.23856v1","url_pdf":"https://arxiv.org/pdf/2410.23856v1.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":"can-language-models-perform-robust-reasoning","repo_url":"https://github.com/tmlr-group/noisyrationales","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"can-language-models-perform-robust-reasoning","repo_url":"https://github.com/dsubuntu/scie","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.23856","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.23856"}},"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":"deterministic:regex_extraction","url":"https://github.com/tmlr-group/NoisyRationales","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dsubuntu/scie","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tmlr-group/noisyrationales","reach":{"status":"ok"}}],"summary":{"ran":1,"ran_fixture":2,"ran_draft_wrong":3,"ran_violates":1,"unverified":4},"by_repo_kind":{"official":{"samples":8,"ran":4,"repositories":1},"listed":{"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":11,"samples":[{"code_sha256_prefix":"8d8eb27b3b39c622","entry":"CDCoT","repo":"tmlr-group/noisyrationales","repo_kind":"official","path":"method/CD_CoT/CDCoT.py","file_url":"https://github.com/tmlr-group/noisyrationales/blob/HEAD/method/CD_CoT/CDCoT.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":"8d8eb27b3b39c622"}},{"code_sha256_prefix":"d7b6dcfe63bfe59b","entry":"apply_rotary_emb","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/llama/model.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/llama/model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d7b6dcfe63bfe59b"}},{"code_sha256_prefix":"e75617767e91eea8","entry":"get_LLM_answer","repo":"dsubuntu/scie","repo_kind":"listed","path":"prepare_data_2.py","file_url":"https://github.com/dsubuntu/scie/blob/HEAD/prepare_data_2.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e75617767e91eea8"}},{"code_sha256_prefix":"261d38fb0cfeadcd","entry":"get_numeric_answer","repo":"dsubuntu/scie","repo_kind":"listed","path":"prepare_data_2.py","file_url":"https://github.com/dsubuntu/scie/blob/HEAD/prepare_data_2.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"261d38fb0cfeadcd"}},{"code_sha256_prefix":"04a1fa63d6d4b8e4","entry":"precompute_freqs_cis","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/llama/model.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/llama/model.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"04a1fa63d6d4b8e4"}},{"code_sha256_prefix":"1d31f1da783c7f25","entry":"process_dataset","repo":"dsubuntu/scie","repo_kind":"listed","path":"prepare_data_2.py","file_url":"https://github.com/dsubuntu/scie/blob/HEAD/prepare_data_2.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":"1d31f1da783c7f25"}},{"code_sha256_prefix":"5a639d78ada17fee","entry":"reshape_for_broadcast","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/llama/model.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/llama/model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5a639d78ada17fee"}},{"code_sha256_prefix":"a545199428fb7160","entry":"init_api_key_handling","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/multiple_key.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/multiple_key.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":"a545199428fb7160"}},{"code_sha256_prefix":"8033c5939d6e5458","entry":"lower_versions","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/my_gpt/my_gpt.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/my_gpt/my_gpt.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":"8033c5939d6e5458"}},{"code_sha256_prefix":"e28848558038eee4","entry":"sample_top_p","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/llama/generation.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/llama/generation.py","link_basis":"plan_row","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":"e28848558038eee4"}},{"code_sha256_prefix":"5b79a3dd0d929418","entry":"version_tuple","repo":"tmlr-group/NoisyRationales","repo_kind":"official","path":"llm_model/my_gpt/my_gpt.py","file_url":"https://github.com/tmlr-group/NoisyRationales/blob/HEAD/llm_model/my_gpt/my_gpt.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":"5b79a3dd0d929418"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}