Enhancing Zero-shot Chain of Thought Prompting via Uncertainty-Guided Strategy Selection
Shanu Kumar, Saish Mendke, Karody Lubna Abdul Rahman · 2024
Read Enhancing Zero-shot Chain of Thought Prompting via Uncertainty-Guided Strategy Selection by Shanu Kumar, Saish Mendke, Karody Lubna Abdul Rahman (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2412-00353.txt.
Introduction
Shanu Kumar and co-authors present a 2024 paper on improving chain-of-thought prompting. Chain-of-thought prompts make language models reason in steps. Their weak points are known: hand-written examples cost expert time, and fixed trigger phrases misfire. The proposed method, ZEUS, uses model uncertainty to pick good demonstrations in the zero-shot setting. It needs no access to model weights. Uncertainty scores separate helpful example questions from harmful ones with high sensitivity.
Across four hard reasoning benchmarks, ZEUS beats existing chain-of-thought strategies. AI practitioners get a selection method that travels between models since it stays black-box. Prompt quality swings outcomes more than many model upgrades, so a reliable picker has outsized value. Uncertainty is cheap to estimate compared with human curation. The approach also hints at a general rule: let the model's own doubt grade its study material.
Catalog record
| CREATOR | Shanu Kumar, Saish Mendke, Karody Lubna Abdul Rahman |
|---|---|
| YEAR | 2024 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 32 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2412-00353
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Enhancing Zero-shot Chain of Thought Prompting via Uncertainty-Guided Strategy Selection Shanu Kumar, Saish Mendke, Karody Lubna Abdul Rahman Abstract Chain-of-thought (CoT) prompting has significantly enhanced the capability of large language models (LLMs) by structuring their reasoning processes. However, existing methods face critical limitations: handcrafted demonstrations require extensive human expertise, while trigger phrases are prone to inaccuracies. In this paper, we propose the Ze ro-shot U ncertainty-based S election ( ZEUS ) method, a novel approach that improves CoT prompting by utilizing uncertainty estimates to select effective demonstrations without needing access to model parameters. Unlike traditional methods, ZEUS offers high sensitivity in distinguishing between helpful and ineffective questions, ensuring more precise and reliable selection. Our extensive evaluation shows that ZEUS consistently outperforms existing CoT strategies across four challenging reasoning benchmarks, demonstrating its robustness and scalability. 1 Introduction Large Language Models (LLMs) have achieved remarkable performance in a wide range of natural language processing tasks Brown et al. 2020 ; Touvron et al. 2023 ; Thoppilan et al. 2022 . However, they often struggle with tasks that require complex reasoning Rae et al. 2021 ; Liang et al. 2022 . The "chain-of-thought" (CoT) prompting technique Wei et al. 2022 ; Feng et al. 2024 has been proposed to address this limitation by generating intermediate rationales ( r ) along with the final answer ( a ) for a given question ( q ). In this context, few-shot in-context examples, referred to as demonstrations D={(q_{j},r_{j},a_{j})}_{j=1}^{k} , consist of k example questions q_{j} , manually crafted rationales r_{j} , and answers a_{j} . This approach, known as Manual-CoT , relies on handcrafted rationales to guide the model. Building on Manual-CoT , Zero-Shot-CoT Kojima et al. 2022 presents a novel prompting method where LLMs generate rationales using a trigger phrase t (e.g., "Let’s think step by step" ) appended to the input question q , without requiring manually crafted demonstrations. While Zero-Shot-CoT is cost-effective, its performance often falls short compared to Manual-CoT due to the absence of effective demonstrations. Crafting rationales manually is typically labor-intensive and time-consuming, particularly for tasks demanding intricate reasoning. To mitigate this, Auto-CoT Zhang et al. 2022 combines Manual-CoT and Zero-Shot-CoT, thereby reducing the performance gap while minimizing manual effort. Auto-CoT employs self-supervised learning on a set of unlabeled questions Q=\{{q_{j}}\}_{j=1}^{m} to generate rationales and answers. Demonstrations are created by clustering Q into k groups and selecting a representative question, rationale, and answer from each cluster. This clustering approach aims to maintain diversity in the demonstrations, which can help mitigate the impact of any errors in the generated rationales. In this work, we seek to enhance the creation of demonstrations that improve LLM performance solely using unlabeled questions Q without any rationale and answer. The selection process of examples q_{j} in demonstrations D has been to significantly influence LLM performance Wan et al. 2023 , and generating consistent rationales Wang et al. 2022 is crucial. Recent CoT prompting methods Diao et al. 2024 ; Bayer and Reuter 2024 have utilized Active Learning (AL) Fu et al. 2013 ; Settles and Craven 2008 ; Rotman and Reichart 2022 ; Kumar et al. 2022 to identify examples for human annotation, showing that annotating the most uncertain examples yields the best performance. Drawing on these principles, we propose several selection strategies based on the uncertainty of unlabeled questions. To estimate uncertainty, we adopt perturbation-based methods Ribeiro et al. 2020 ; Kuhn et al. 2023 ; Gao et al. 2024 ; Tomani et al. 2024 , which operate on the principle that incorrect predictions can be detected by resampling rationales through perturbations, such as temperature adjustments. If the LLM is confident in its prediction, perturbations are unlikely to affect the outcome. However, if the LLM’s prediction is uncertain, different perturbations can lead to varied responses. Our initial experiments reveal that while temperature-based perturbation estimates are well-calibrated, they lack sufficient sensitivity. 1 1 1 Sensitivity is a measure of the degree of change in accuracy by a unit change in the confidence score. To address this, we propose a robust method for estimating uncertainty that exhibits near-ideal linearity with accuracy. Our primary contributions are threefold: i) We present ZEUS , 2 2 2 We have uploaded code and datasets for reproducibility. a method for estimating LLM uncertainty that is both well-calibrated and sensitive. ii) We leverage these uncertainty estimates to guide the selection of most informative demonstrations and show that these strategies outperform existing prompting methods across four challenging reasoning tasks. iii) We demonstrate that the performance of ZEUS correlates strongly with few-shot uncertainty estimates on the unlabeled set, providing actionable recommendations for creating effective demonstrations. 2 Related Work Chain-of-Thought (CoT) prompting has significantly influenced various advanced techniques designed to enhance reasoning capabilities. These include Tree of Thoughts Yao et al. 2023 , Role Play Kong et al. 2024 , and Collaborative Prompting Zhu et al. 2023 ; Yin et al. 2023 ; Liang et al. 2023 ; Wang et al. 2023 , each building on the CoT methodology to improve model performance in complex reasoning tasks. Concurrently, Active Learning (AL)-based methods have gained traction in few-shot prompting scenarios. Diao et al. 2023 enhance CoT prompting within an AL framework by actively selecting questions based on an uncertainty metric and manually constructing demonstrations. Shum et al. 2023 work with labeled questions devoid of rationales, generating rationales through pruning and using an AL-inspired variance-reduced policy gradient strategy to select the most informative examples. Similarly, Bayer and Reuter 2024 apply uncertainty-based AL methods to identify the most valuable questions for annotation. Unlike these studies, our work addresses a more challenging scenario where neither human-annotated labels nor rationales are available. Our method relies on accurate uncertainty estimation due to the lack of human supervision. Estimating uncertainty is a well-explored challenge, with methods ranging from Bayesian approaches and ensemble methods to more recent perturbation-based techniques Hendrycks and Gimpel 2016 ; Gal and Ghahramani 2016 ; Lakshminarayanan et al. 2017 ; Guo et al. 2017 ; Van Amersfoort et al. 2020 ; Ovadia et al. 2019 . Perturbation-based methods, which include techniques like temperature adjustments and question rephrasing, have shown promise in recent studies Gao et al. 2024 . These methods, while effective, may not be universally applicable to LLMs due to their generative nature Vashurin et al. 2024 . Other recent work has explored uncertainty estimation for specific tasks, such as hallucination detection in LLMs Kuhn et al. 2023 ; Tomani et al. 2024 . We extend these perturbation techniques by enhancing their sensitivity to capture finer distinctions between questions, thereby improving uncertainty estimation in LLMs. Figure 1: Overview of ZEUS : Uncertainty for a question q_{j} is calculated using a pool of answers generated using various prompts, including trigger phrases, non-zero temperature-based decoding, and rephrasing of q_{j} . Subsequently, questions with uncertainty within a certain range are selected and used for constructing demonstrations. 3 ZEUS : Ze ro-shot U ncertainty-based S election We propose the ZEUS method, which aims to construct useful demonstrations containing a specific level of required uncertainty. It is comprised of three stages: (i) uncertainty estimation, (ii) uncertainty-based question selection, and (iii) demonstration construction. We have illustrated all the stages of ZEUS in Figure 1 .