Instance-adaptive Zero-shot Chain-of-Thought Prompting

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.

Paper

Similar papers

Peer review

Reviewer 43EH5/10 · confidence 4/52024-06-25

Summary

This paper explores the inside interactions among three components(i.e., question, prompt, rationale) in zero-shot CoT reasoning through the saliency score analysis, and discover the distinct characteristics of good and bad reasoning in terms of information flow. Based on above findings, the authors propose the IAP - an instance-level adaptive prompting strategy designed to enhance CoT reasoning by selecting an appropriate prompt that can guide LLMs to reason correctly from a given set of prompts for each question. To demonstrate the effectiveness of the proposed method, the authors conducted extensive experiments on the LLaMA-3 8B, LLaMA-2 13B, and Qwen14B models across Math, Logic, and Commonsense tasks.

Strengths

* **The motivation of this paper is quite intuitive.** Through the example in Figure 1, the authors illustrate that an instance-wise zero-shot CoT prompt is more plausible for better reasoning and may achieve a cap-breaking performance compared to the task-level optimal prompt, which is easy to understand. * **Using Neuron saliency score to analyze the information flow of the question, prompt, and rationale is innovative and promising.** The authors conduct both qualitative and quantitative analyses on good-bad reasoning instances, discovering different patterns of information flow in good-bad reasoning. They further delve into a deeper analysis from the perspectives of Layer and Head, yielding valuable conclusions. * **Extensive experiments are conducted to validate the effectiveness of proposed method.** The authors test the proposed IAP and comparison methods on LLaMA-3 8B, LLaMA-2 13B, and Qwen14B across Math, Logic, and Commonsense reasoning tasks.

Weaknesses

* **The proposed method is not clearly explained, some details are missing.** For instance, in Sequential Substitution (IAP-ss), it is not specified what the corresponding threshold is or how it was obtained. Similarly, in Majority Vote (IAP-mv), there is no explanation provided for how many top maximum scores are preserved. The lack of details in the proposed methods can be quite confusing. * **The experimental setup is unfair.** For the main "effective" method proposed, IAP-mv, which obtains the final results through Majority Vote (similar to self consistency), it is unreasonable to compare it with baselines that only perform inference once. The improvement brought about by this method could very well be the result of ensemble inference from multiple reasoning paths [1][2][3], rather than the strategy implemented by the author's previous good-bad reasoning findings. * **Some experimental conclusions are missing or somewhat unreasonable.** For instance, in the experiment of Consistency & Complementary, the authors only provide the experimental setup and show the corresponding results in Table 2 without giving any conclusions or analysis. Furthermore, in the analysis experiment for Efficacy, the author demonstrated through Figure 6 that while IAP-ss also incurs additional overhead, its accuracy compared to 0-shot also declines to some extent. Therefore, the conclusion stated by the authors that "the two IAP strategies can be employed as trade-offs in different demand prioritization applications" is not in line with the facts, as IAP-ss does not provide any gain compared to the baseline 0-shot. [1] Making Large Language Models Better Reasoners with Step-Aware Verifier [2] Diversity of Thought Improves Reasoning Abilities of LLMs [3] Answering Questions by Meta-Reasoning over Multiple Chains of Thought

Questions

See weeknesses. Although this paper performs quite well in the section of Information Flow Analysis on Zero-shot CoT, there are numerous flaws in its experiments that fail to convince me. If the authors can address my concerns, I would consider raising my score.

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

I think the authors have addressed their limitations.

Area Chair KsdM2024-08-07

Thank you for your review, The authors responded to your initial review. Please be sure to read it and reply indicating the extent to which the authors have addressed your initial questions and concerns. Best, AC

Reviewer WuYd6/10 · confidence 4/52024-07-04

Summary

The paper introduces an instance-adaptive prompting algorithm for zero-shot Chain-of-Thought (CoT) reasoning in large language models (LLMs). Traditional task-level prompts are insufficient for all instances, so the authors propose a strategy that differentiates good and bad prompts based on information flow from the question to the prompt and rationale. Using neuron saliency score analysis, the study reveals that successful reasoning requires prompts to aggregate semantic information from the question. The proposed instance-adaptive prompting strategy (IAP) demonstrates consistent improvements across multiple reasoning tasks with LLaMA-2, LLaMA-3, and Qwen models.

Strengths

- **Comprehensive Analysis**: Uses neuron saliency scores to understand information flow during reasoning. - **Innovative Approach**: Tailors prompts to individual instances, improving upon uniform task-level prompts.

Weaknesses

- **Limited Scope of Neuron Saliency Score Analysis**: The neuron saliency score analysis in Section 2 is conducted on only one LLM (not state in paper, personal guess) and one dataset, GSM8K. More evidence and diverse datasets are needed to support this analysis comprehensively. Additionally, Section 2.3, "Head Analysis," lacks a comparative study between good and bad reasoning instances. - **Insufficient Experimental Details**: The experimental details provided are not sufficiently clear. Based on lines 263-264, my understanding is that IAP uses 9 different zero-shot CoT prompts to compute the S score. For IAP-ss, the process stops and uses the current result upon encountering the first prompt that meets the threshold. For IAP-mv, results from all 9 prompts are saved, and the top K are used for voting. This raises several questions: 1. How does the performance of IAP-mv compare to directly using a majority vote across the 9 prompt results? 2. What is the distribution of results for each method? For instance, which prompts tend to have higher S scores? This analysis could reveal conclusions such as "Let’s think step by step" being more suitable for math questions, while "Don’t think. Just feel." may be better for MMLU, aligning more closely with the instance-wise topic. - **Figure 1 Inconsistency**: Figure 1 does not align with the rest of the paper. The figure and its description suggest addressing an overly complex problem, which is not the case in practice. - **More Model Variants**: There is a need for experiments on larger model sizes to validate the findings. - **Terminology Inconsistency**: The terminology used is inconsistent. In Figure 3, the terms "Good reasoning" and "Bad reasoning" are used, while in Figure 4, the terms change to "Good prompt" and "Bad prompt."

Questions

N/A

Rating

6

Confidence

4

Soundness

3

Presentation

2

Contribution

3

Limitations

N/A

Area Chair KsdM2024-08-07

Thank you for your review, The authors responded to your initial review. Please be sure to read it and reply indicating the extent to which the authors have addressed your initial questions and concerns. Best, AC

Reviewer UGUn8/10 · confidence 4/52024-07-09

Summary

This paper analyzed the mechanism of the large language models (LLMs) zero-shot Chain-of-Thought (CoT) reasoning, in which the authors found a pattern to discriminate a good reasoning path and a bad one with the saliency scores. Based on the findings, this paper proposed a set of instance-adaptive prompting approaches for zero-shot CoT reasoning. Experimental results on various tasks with distinct LLMs demonstrated the effectiveness of the proposed methods, validating the correctness of the findings.

Strengths

1. This paper is well-written and easy to follow. 2. This paper emphasized the instance-level CoT prompting rather than the task-level, providing a novel and fine-grained research object for LLM reasoning, which had not been explored in earlier works. 3. This work employed an interesting information flow analysis to delve into the mechanism of zero-shot CoT during the LLM inference, encouraging relevant CoT research. 4. The authors presented two simple yet effective instance-adaptive zero-shot CoT prompting approaches based on elaborative analysis, and empirical results verified their observations.

Weaknesses

1. Experiments only covered 7B and 13/14B models, involving larger model in the experiments would be more marvelous. 2. In Section 4.3, the authors didn’t interpret the results of consistency and complementary results in detail.

Questions

1. Why did the authors choose the saliency score instead of the widely used attribution score as the information flow analysis method? 2. What did some results with underlines in Table 1 mean? 3. Should the colon after the “remains” in the line 44 be removed? 4. Should the “and” in the “, and Tracking Shuffled Objects …” in line 258 be removed? 5. In Table 3 in the Appendix, why didn’t the authors highlight the best results and explain the results more? All my concerns have been addressed by the authors' rebuttal.

Rating

8

Confidence

4

Soundness

4

Presentation

4

Contribution

3

Limitations

The authors have adequately clarified the limitations of this work.

Area Chair KsdM2024-08-07

Thank you for your review, The authors responded to your initial review. Please be sure to read it and reply indicating the extent to which the authors have addressed your initial questions and concerns. Best, AC

Reviewer dc7a7/10 · confidence 4/52024-07-11

Summary

The authors argue that a single, task-level prompt is insufficient for addressing the diverse needs of different instances within a dataset. To overcome this limitation, they propose an instance-adaptive prompting (IAP) algorithm that differentiates between effective and ineffective prompts for individual instances. The authors also provide a detailed examination of the information flow at different layers and heads of the LLMs, offering insights into the internal mechanisms that contribute to reasoning quality. The proposed IAP strategy is shown to be effective across multiple models and tasks, highlighting its potential for advancing zero-shot reasoning in LLMs.

Strengths

1. The IAP algorithm is a creative solution that addresses the limitations of previous prompt strategy. The originality lies in the adaptive differentiation of prompts for individual instances and the use of information flow analysis to understand and enhance reasoning mechanisms within LLMs. 2. The quality of the experimental design is high, with comprehensive testing across different models and reasoning tasks.

Weaknesses

1. As the number of available prompts grows, the strategy for selecting the best prompt could become increasingly complex. 2. The titles of some figures are verbose (e.g. Figure 2). Keeping the title concise and giving a detailed explanation of the figures in the main text will make the paper better.

Questions

1. How were the saliency score thresholds determined, how do these thresholds affect the results? 2. In some paragraphs, full stops are missing, for example, at the end of the "Experiments" section and at the end of the first paragraph in the "Preliminary analysis" section.

Rating

7

Confidence

4

Soundness

3

Presentation

2

Contribution

2

Limitations

it appears that the authors have made an effort to address the limitations of their work.

Area Chair KsdM2024-08-07

Thank you for your review, The authors responded to your initial review. Please be sure to read it and reply indicating the extent to which the authors have addressed your initial questions and concerns. Best, AC

Reviewer WuYd2024-08-08

Thank you for the authors' response. I have reviewed your feedback and noted that most of our concerns have been addressed. However, I observed an issue with your supplementary experiment on IAP-mv VS majority voting, which shows unusual performance. According to Table 1 in the paper and the new table, nearly every score for Majority Vote is around the lower bound of the baseline scores in Table 1 with 9 prompt candidates. In my personal experience, the Majority Vote should not exhibit this behavior. Therefore, I am wondering if there might be a mistake in your experimental setup or if prompts #8 and #9 negatively influence the Majority Vote method. Could you please check the Majority Vote experiment again and provide updated scores excluding prompts #8 and #9?

Authorsrebuttal2024-08-08

Thanks a lot for your instant reply, and we are glad to hear that most of your concerns were addressed. You raised a great question, the majority vote is quite an important tool and we have checked the settings again for the supplementary experiments. Your judgment is right, zero-shot prompts-based majority vote (short for Zero-shot-mv) has some unusual results, raising by involving extra bad prompts (#8 and #9). According to your advice, we conducted experiments with the other 7 zero-shot prompts (#1-7), the results were enhanced, and we further selected top-3 prompts with the highest accuracy (top-3 prompts) for corresponding LLMs and datasets. With a better prompt combination, the performance of the Zero-shot-mv could be promoted. Taking LLaMA-3 8B as an example, Zero-shot-mv (with top-3 prompts) surpassed the best task-level single zero-shot prompts on most datasets, at least comparable. However, IAP-mv still outperforms all, demonstrating that IAP-mv can select instance-adaptive good prompts by analyzing the information flow, which is more adaptive and effective than the fixed Zero-shot-mv. Next, we will provide a detailed explanation of the experiments. | Method (LLaMA-3 8B) | GSM8K | SVAMP | C-Judge. | T-Obj. | CSQA | MMLU | | ------ | ----- | ----- | ------- | ------ | ---- | ---- | | single optimal prompt | 64.52 | 76.00 | 16.04 | 40.00 | 64.95 | 56.67 | | Zero-shot-mv (all prompts) | 52.54 | 74.33 | *17.06* | 12.60 | 62.41 | 52.53 | | Zero-shot-mv (#1-7) | 57.82 | *77.00* | *18.13* | 20.80 | *65.03* | 41.23 | | Zero-shot-mv (fixed 3 prompts) | *65.10* | *76.67* | *18.72* | 33.60 | *67.65* | *56.84* | | IAP-mv | **66.34** | **77.33** | **19.25** | **42.40** | **68.39** | **59.65** | | Method (Qwen 14B) | GSM8K | SVAMP | C-Judge. | T-Obj. | CSQA | MMLU | | ------ | ----- | ----- | ------- | ------ | ---- | ---- | | single optimal prompt | 60.50 | 72.00 | 28.34 | 23.20 | 63.23 | 76.84 | | Zero-shot-mv (all prompts) | 28.22 | 51.33 | 26.10 | 1.44 | 46.52 | 52.46 | | Zero-shot-mv (#1-7) | 57.98 | 55.33 | 27.50 | 8.80 | 57.70 | 63.86 | | Zero-shot-mv (fixed 3 prompts) | *61.91* | 71.66 | *28.34* | 20.80 | **66.01** | 74.38 | | IAP-mv | **62.81** | **73.33** | **29.95** | **25.60** | *65.68* | **78.95** | The **bolded numbers** are the best results, and the *italic* are the results that outperform the task-level optimal prompt. ### **Zero-shot-mv without misleading prompts** This table demonstrated that without misleading prompt candidates (#8 and #9), the performance of Zero-shot-mv can be improved compared to the all prompts-based setting, indicating that some prompts are harmful to the consistency, which is in line with your assumption. We present a schematic case to exemplify why the Zero-shot-mv(#1-7) performs better than the all prompts-based setting (supposed there are only two answers, right or wrong): | Method | #1 | #2 | #3 | #4 | #5 | #6 | #7 | #8 | #9 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Zero-shot-mv(all prompts) | ✔ | ✔ | ✗ | ✔ | ✗ | ✗ | ✔ | ✗ | ✗ | | Zero-shot-mv(#1-7) | ✔ | ✔ | ✗ | ✔ | ✗ | ✗ | ✔ | | | We can see that the Zero-shot-mv(all prompts) gets the wrong answer because the number of wrong answers is more. For the Zero-shot-mv(#1-7), it can get the correct result with the answers ensemble after we eliminate 2 misleading prompts. ### **Zero-shot-mv with fixed 3 prompts** We further testified the top-3 prompts with the highest accuracy of corresponding LLMs and datasets (fixed 3 prompts), and we found that with better prompt candidates, the Zero-shot-mv can improve further. Even though, the IAP-mv still outperforms Zero-shot-mv(fixed 3 prompts), the IAP-mv can take advantage of both consistency and complementary among those prompts at the instance level. Here, we present another schematic case to exemplify why the IAP-mv can outperform Zero-shot-mv(fixed 3 prompts, #1-3 in the table below, suppose there are only two answers, right or wrong): | Method | #1 | #2 | #3 | #4 | #5 | #6 | #7 | #8 | #9 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Zero-shot-mv(all prompts) | ✔ | ✗ | ✗ | ✗ | ✗ | ✗ | ✔ | ✔ | ✗ | | Zero-shot-mv(fixed 3 prompts) | ✔ | ✗ | ✗ | | | | | | | | IAP-mv | ✔ | ✗ | | | | | | ✔ | | In this case, the IAP-mv can get the correct answer with more-grained recognition for suitable prompts dynamically in the instance level, thereby outperforming the fixed 3 prompts. Furthermore, the Zero-shot-mv depends on picking fixed prompts, requiring prior knowledge and inflexibility, thus such methods are not easy to obtain in a real-world scenario. In contrast, IAP-mv is more generalizable and can be applied to any new task adaptively without handcraft selection.

Reviewer WuYd2024-08-08

Thank you for the authors' response. I feel that your response has addressed my concerns and provided me with a deeper understanding of your paper. I thoroughly enjoyed our discussion stage; it felt like a very productive academic exchange! I will be raising my score. I hope the authors can expedite the open-sourcing of the code for this work and provide an easy-to-use repository. I am very much looking forward to it!

Authorsrebuttal2024-08-09

Thank you very much for your valuable comments, we also enjoyed the process of responding to your questions and really gained a lot from that! We will release the algorithm and experimental code once this paper is accepted.

Reviewer 43EH2024-08-09

Response to Rebuttal by Authors

Thank you for your responses. After reading your rebuttal, I still have the following two major concerns: (1) IAP-ss needs to obtain the corresponding threshold on the training set. For the realistic inference scenarios, there is often no training set for parameter tuning, making the practical application scenarios of IAP-ss very limited. (2) The experiment setup for comparing self-consistency. The rebuttal does not provide a specific implementation explanation for self-consistency, which makes me confused. I hope the authors can give further explanations.

Authorsrebuttal2024-08-10

Thanks a lot for your instant reply, and we are glad to respond to your concerns. ### **Concern 1** Your question is of practice value, IAP-ss needs to search thresholds with corresponding training sets, however, we want to briefly retrospect IAP, and provide detailed explanations to your question. IAP consists of IAP-ss and IAP-mv, IAP-mv aims to select the top-k prompts with highest saliency scores. Though k is also a hyperparameter, it is a relatively discrete number and is more easily obtained (the simple way is to observe it directly from Figure 4 in the paper). Besides, as mentioned in our previous rebuttal, under our setup of 9 prompts combination, for different datasets, k can be set to 3 to achieve consistent improvements. Hence, extending IAP-mv to real scenarios is relatively straightforward. Regarding your IAP-ss question, we provide an idea of threshold transfer, i.e., using an existing threshold to other datasets. To this end, we conducted IAP-ss experiments with GSM8K threshold to verify the transferability of thresholds. | threshold (LLaMA-3 8B) | GSM8K | SVAMP | C-Judge. | T-Obj. | CSQA | MMLU | | ---- | ---- | ---- | ---- | ---- | ---- | --- | | single optimal prompt | 64.52 | 76.00 | 16.04 | 40.00 | 64.95 | 55.79 | | from own training set | 66.43 | **77.33** | 16.57 | 38.80 | **65.68** | **56.49** | | from GSM8K training set | **66.43** | 74.00 | **17.64** | **40.80** | 64.95 | 55.09 | In the above table, we assumed all other datasets are real-world scenarios (without training sets, no knowledge of task-level best prompt), and we can see results based on GSM8K threshold, approaching or even surpassing the results of other datasets at their own thresholds (this is reasonable as threshold is successive value which usually does not cover a large tuning range; also, under few-shot prompt scenarios, demonstrations from GSM8K are commonly transferred in other datasets, indicating the adaptivity for other datasets) or under best prompts though we may not know which prompt is task-level best. Therefore, we can conclude that IAP-ss is still a potential choice without training sets. Furthermore, we recommend in practical scenarios, one can choose a dataset setting more similar to specific contexts, or draw on methods such as online learning. ### **Concern 2** We are sorry for not explaining more details of zero-shot Majority Vote (short for Zero-shot-mv) experiments earlier. We would like to first explain the details of the Zero-shot-mv experiments in former rebuttals, then clarify the self-consistency (SC) [4] you mentioned. At last, we extend supplementary experiments and discuss further. As introduced in former rebuttals, Zero-shot-mv performs inference on 9 prompts individually and then uses majority voting based on the 9 results, which is a common ensemble method. You mentioned SC uses majority voting, but it expands decoding reasoning paths by modifying greedy sampling, and we refer to it as SC-mv. Their paper also stated: "Self-consistency is completely compatible with other ensemble strategies", shown in Table 7 in the paper. In addition, the papers you cited before(for example, [1][2]) further expand the prompt diversity, which is also compatible with Zero-shot-mv. Now, back to Zero-shot-mv, we conducted additional experiments based on the suggestions of **Reviewer WuYd**, and we would like to make a deeper explanation for you. We conducted Zero-shot-mv with the other 7 zero-shot prompts (#1-7) first, and further selected top-3 prompts with the highest accuracy (fixed 3 prompts) for corresponding LLMs and datasets. | Method (LLaMA-3 8B) | GSM8K | SVAMP | C-Judge. | T-Obj. | CSQA | MMLU | | ------ | ----- | ----- | ------- | ------ | ---- | ---- | | single optimal prompt | 64.52 | 76.00 | 16.04 | 40.00 | 64.95 | 56.67 | | Zero-shot-mv (all prompts) | 52.54 | 74.33 | *17.06* | 12.60 | 62.41 | 52.53 | | Zero-shot-mv (#1-7) | 57.82 | *77.00* | *18.13* | 20.80 | *65.03* | 41.23 | | Zero-shot-mv (fixed 3 prompts) | *65.10* | *76.67* | *18.72* | 33.60 | *67.65* | *56.84* | | IAP-mv | **66.34** | **77.33** | **19.25** | **42.40** | **68.39** | **59.65** | The **bolded numbers** are best results, *italic* are results outperform task-level optimal prompts. Taking LLaMA-3 8B as an example, the results of Zero-shot-mv (#1-7) improved a lot compared to all prompts, indicating some prompts were harmful to consistency. Also, Zero-shot-mv (fixed 3 prompts) surpassed best task-level single prompts on most datasets, at least comparable, showing with better prompts combination, the Zero-shot-mv can improve further. However, IAP-mv still outperforms all, demonstrating IAP-mv can select instance-adaptive good prompts by analyzing the information flow, which is more adaptive and effective than fixed Zero-shot-mv. We also depicted a schematic case in the discussions with **Reviewer WuYd** to illustrate that, and you can refer to that. [4] Self-Consistency Improves Chain-of-Thought Reasoning.

Reviewer UGUn2024-08-10

Response to the authors' rebuttal

Thank you for the authors' responses. I have read the rebuttal and all my concerns have been addressed. This paper analyzed the inner machanism of zero-shot CoT and proposed a novel instance-adaptive prompting strategy. I also reviewed the comments from the other reviewers, and believe this is quite a solid work. I will raise the score from 7 to 8.

Authorsrebuttal2024-08-13

Thanks a lot for your valuable reply, we appreciate the time and effort you invested, and we are so glad to know that your concerns have been addressed.

Reviewer dc7a2024-08-12

Response to the authors

Thanks to the authors for resolving my concern. I will change me score from 6 to 7.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC