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.
翻译:本文研究了大语言模型(LLMs)中一个尚未充分探索的挑战:含噪声推理链的思维链提示,即在用于上下文学习的示例中包含无关或不准确的推理思路。我们构建了专门用于评估在存在噪声推理链情况下推理鲁棒性的NoRa数据集。我们在NoRa数据集上的研究结果表明,当前LLMs普遍对此类噪声存在脆弱性,现有的鲁棒方法(如自我修正和自我一致性)效果有限。值得注意的是,与使用干净推理链的提示相比,基础LLM在包含无关思路时准确率下降1.4%-19.8%,而在包含不准确思路时下降更为显著,达到2.2%-40.4%。应对这一挑战需要外部监督,这在实践中应易于获取。为此,我们提出了基于噪声思维链的对比去噪方法(CD-CoT)。该方法通过将噪声推理链与仅一个干净推理链进行对比来增强LLMs的去噪推理能力,这可能是实现去噪目的提示的最低要求。该方法遵循探索与利用原则:(1)在输入空间中对推理链进行重述和选择,实现显式去噪;(2)在输出空间中探索多样化的推理路径并对答案进行投票。实证结果表明,CD-CoT相较于基础模型在准确率上平均提升17.8%,并展现出比基线方法显著更强的去噪能力。源代码已公开于:https://github.com/tmlr-group/NoisyRationales。