Skip to main content
QUICK REVIEW

[论文解读] Instance-adaptive Zero-shot Chain-of-Thought Prompting

Xiaosong Yuan, Chen‐Yang Shen|arXiv (Cornell University)|Sep 30, 2024
Neural Networks and Reservoir ComputingComputer Science被引用 3
一句话总结

本文提出实例自适应提示(IAP),一种零样本思维链(CoT)策略,通过分析大语言模型中的信息流,动态为每个推理实例选择最佳提示。通过识别出强推理需要同时具备从问题到提示以及从问题到理由的信息流,IAP在数学、逻辑和常识推理任务上,使LLaMA-2、LLaMA-3和Qwen模型的准确率提升2%-4%,优于任务级最优提示。

ABSTRACT

Zero-shot Chain-of-Thought (CoT) prompting emerges as a simple and effective strategy for enhancing the performance of large language models (LLMs) in real-world reasoning tasks. Nonetheless, the efficacy of a singular, task-level prompt uniformly applied across the whole of instances is inherently limited since one prompt cannot be a good partner for all, a more appropriate approach should consider the interaction between the prompt and each instance meticulously. This work introduces an instance-adaptive prompting algorithm as an alternative zero-shot CoT reasoning scheme by adaptively differentiating good and bad prompts. Concretely, we first employ analysis on LLMs through the lens of information flow to detect the mechanism under zero-shot CoT reasoning, in which we discover that information flows from question to prompt and question to rationale jointly influence the reasoning results most. We notice that a better zero-shot CoT reasoning needs the prompt to obtain semantic information from the question then the rationale aggregates sufficient information from the question directly and via the prompt indirectly. On the contrary, lacking any of those would probably lead to a bad one. Stem from that, we further propose an instance-adaptive prompting strategy (IAP) for zero-shot CoT reasoning. Experiments conducted with LLaMA-2, LLaMA-3, and Qwen on math, logic, and commonsense reasoning tasks (e.g., GSM8K, MMLU, Causal Judgement) obtain consistent improvement, demonstrating that the instance-adaptive zero-shot CoT prompting performs better than other task-level methods with some curated prompts or sophisticated procedures, showing the significance of our findings in the zero-shot CoT reasoning mechanism.

研究动机与目标

  • 为解决静态、任务级提示在零样本CoT推理中的局限性,尽管整体任务级最优,但可能损害单个实例的性能。
  • 通过分析大语言模型中神经元显著性分数的信息流动动态,探究零样本CoT推理的内在机制。
  • 发现有效推理依赖于提示首先聚合问题语义,然后理由再整合问题和提示信息。
  • 开发一种实例自适应提示策略(IAP),为每个输入实例选择最合适的提示以提升推理准确率。
  • 证明实例级提示自适应在多种模型和推理基准上始终优于任务级最优提示。

提出的方法

  • 在多个大语言模型(LLaMA-2、LLaMA-3、Qwen)和任务上进行神经元显著性分数分析,追踪推理过程中从问题→提示和问题→理由的信息流。
  • 识别出问题到提示与问题到理由路径的显著性均较高时,推理正确;任一路径信息流微弱则导致错误。
  • 设计IAP为两阶段策略:(1) 计算每个提示-实例对的显著性分数,(2) 为每个输入选择信息流最优的提示。
  • 实现两种变体:IAP-ss(基于显著性分数)和IAP-mv(基于平均向量相似度),在准确率与效率之间取得平衡。
  • 使用一组精心筛选的多样化提示(如“让我们一步步思考”、“不要思考,只需感受”)作为动态选择的候选提示。
  • 在标准基准(GSM8K、MMLU、Causal Judgement)上评估IAP,使用LLaMA-2 13B、LLaMA-3 8B和Qwen 14B模型,与任务级最优提示和基线方法进行比较。

实验结果

研究问题

  • RQ1从问题到提示和从问题到理由的信息流如何影响大语言模型中零样本CoT推理的成功?
  • RQ2显著性分数分析能否揭示零样本CoT中正确与错误推理路径之间的系统性差异?
  • RQ3基于实例特定信息流模式动态选择提示,是否能优于使用单一任务级最优提示,从而提升推理性能?
  • RQ4所提出的实例自适应提示策略(IAP)在准确率和效率方面与Self-discover和OPPR等现有方法相比如何?
  • RQ5在IAP中,基于显著性与基于向量相似度的提示选择,在性能与推理成本之间存在何种权衡?

主要发现

  • 显著性分数分析表明,成功的零样本CoT推理依赖于从问题到提示以及从问题到理由的强信息流。
  • 若提示未能吸收问题的语义信息,或理由忽略提示的引导,则会导致错误的推理步骤。
  • IAP在数学、逻辑和常识推理任务上,于多个模型(LLaMA-2 13B、LLaMA-3 8B、Qwen 14B)上均实现相对于最佳任务级提示2%-4%的准确率提升。
  • IAP-mv(计算成本更高的变体)达到最高性能,而IAP-ss在速度与准确率之间提供了良好平衡。
  • IAP优于Self-discover和其他基线方法,证明了实例级自适应优于任务级优化的优越性。
  • 该方法在实际中效率较高,IAP-mv平均每次推理仅增加几秒,具备实际部署可行性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。