[论文解读] Analyzing Chain-of-Thought Prompting in Large Language Models via Gradient-based Feature Attributions
论文使用基于梯度的显著性方法来分析链式思考提示(CoT)如何影响开源大型语言模型的输入令牌重要性,发现CoT并未提升显著性幅度,但提高对提示扰动和输出随机性的鲁棒性。
Chain-of-thought (CoT) prompting has been shown to empirically improve the accuracy of large language models (LLMs) on various question answering tasks. While understanding why CoT prompting is effective is crucial to ensuring that this phenomenon is a consequence of desired model behavior, little work has addressed this; nonetheless, such an understanding is a critical prerequisite for responsible model deployment. We address this question by leveraging gradient-based feature attribution methods which produce saliency scores that capture the influence of input tokens on model output. Specifically, we probe several open-source LLMs to investigate whether CoT prompting affects the relative importances they assign to particular input tokens. Our results indicate that while CoT prompting does not increase the magnitude of saliency scores attributed to semantically relevant tokens in the prompt compared to standard few-shot prompting, it increases the robustness of saliency scores to question perturbations and variations in model output.
研究动机与目标
- 通过理解Chain-of-Thought提示有助于还是有害于模型行为来推动负责任部署。
- 探讨CoT提示是否改变令牌级重要性和Few-shot问答任务中的模型鲁棒性。
- 评估在1–6B参数的多模型及多组QA数据集上效果是否一致。
提出的方法
- 对提示-问题输入应用常规和对比梯度显著性方法(梯度×输入和L1范数)。
- 在四个数据集上对GPT-J(6B)、GPT-Neo(2.7B)和GPT-2 XL(1.5B)进行标准提示与CoT提示的比较。
- 评估对被标注为与问题语义相关的令牌的显著性。
- 通过重复运行检验对问题改写和模型输出随机性的鲁棒性。
- 使用GSM8K、CoinFlip、CSQA、SST各自的50问题子集,采用八-shot提示。
- 报告显著性幅度及其在不同条件下的变异性。

实验结果
研究问题
- RQ1CoT提示是否提高与问题语义相关令牌的显著性幅度?
- RQ2CoT提示是否使相关令牌的显著性对问题改写更鲁棒?
- RQ3CoT提示是否在模型输出的随机性变化中稳定显著性分数?
- RQ4CoT提示对多种开源LLM与多组QA数据集的显著性效应是否具有普遍性?
主要发现
- CoT提示在各数据集和方法中均未增加相关输入令牌的显著性幅度。
- CoT提示使相关令牌的显著性分数对问题扰动和改写更鲁棒。
- CoT提示在不同模型输出下为相关令牌产生更稳定的梯度(方差更小)。
- 在6B参数规模上,CoT提示的准确性提升并未出现,SST是一个显著的例外,准确性有所提高。
- 不同的基于梯度的归因方法会产生显著不同的数值,表明方法学对结果敏感。
- 研究表明可解释性工具可以揭示CoT提示在最终解释之外的机制性方面。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。