Source-linked AI summary

Re-Reading Improves Reasoning in Large Language Models

Xiaohan Xu, Chongyang Tao, Tao Shen, Can Xu, Hongbo Xu, Guodong Long, Jian-guang Lou, Shuai Ma

arXiv:2309.06275v4cs.CL

TL;DR

LLM reasoning prompts have largely emphasized eliciting reasoning in the output, while input understanding receives less attention. Re2 repeats the question to improve input understanding and can complement thought-eliciting prompts; experiments report generally improved reasoning, with some vanilla ChatGPT exceptions.

  • Problem

    Reasoning prompts have mainly focused on eliciting output reasoning, with less attention to input understanding despite decoder-only models’ unidirectional attention.

    Source: §1 · p. 1
  • Method

    Re2 repeats the question as input so the first pass can provide global information to the second, and it can be combined with thought-eliciting prompts.

    Source: §1 · p. 2, §2.2 · p. 3, §2.3 · p. 3
  • Results

    Across 14 datasets and 112 experiments, Re2 generally improves LLM reasoning, except in some vanilla ChatGPT scenarios.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Re2 offers an input-focused complement to output-oriented thought-eliciting prompts across varied models and reasoning settings.

    Source: §1 · p. 2, §5 · p. 9

    The study is primarily empirical, and Re2 slightly increases input length, reducing efficiency for longer questions.

    Source: §6 · p. 9

Abstract

from arXiv · show

To enhance the reasoning capabilities of off-the-shelf Large Language Models (LLMs), we introduce a simple, yet general and effective prompting method, Re2, i.e., \textbf{Re}-\textbf{Re}ading the question as input. Unlike most thought-eliciting prompting methods, such as Chain-of-Thought (CoT), which aim to elicit the reasoning process in the output, Re2 shifts the focus to the input by processing questions twice, thereby enhancing the understanding process. Consequently, Re2 demonstrates strong generality and compatibility with most thought-eliciting prompting methods, including CoT. Crucially, Re2 facilitates a "bidirectional" encoding in unidirectional decoder-only LLMs because the first pass could provide global information for the second pass. We begin with a preliminary empirical study as the foundation of Re2, illustrating its potential to enable "bidirectional" attention mechanisms. We then evaluate Re2 on extensive reasoning benchmarks across 14 datasets, spanning 112 experiments, to validate its effectiveness and generality. Our findings indicate that, with the exception of a few scenarios on vanilla ChatGPT, Re2 consistently enhances the reasoning performance of LLMs through a simple re-reading strategy. Further analyses reveal Re2's adaptability, showing how it can be effectively integrated with different LLMs, thought-eliciting prompting, and ensemble strategies. Our code is available at \url{https://github.com/Tebmer/Rereading-LLM-Reasoning/}

1 Introduction

LLMs can struggle with reasoning, while prior prompting work has focused more on eliciting reasoning in outputs than on understanding inputs. Re2 repeats the question to support input understanding, and experiments report improved reasoning across varied settings.

1 Introduction

  • Prior reasoning prompts mainly elicit reasoning in the output, while decoder-only models’ unidirectional attention limits each question token to seeing preceding tokens.The authors note that this may impair understanding of words whose significance depends on later words.Source: §1 · pp. 1–2
  • Re2 repeats the question as input, giving second-pass tokens access to later first-pass context and potentially supporting bidirectional understanding.The authors also describe the repeated input as allocating more computational resources to encoding the question.Source: Figure 1 · p. 1, §1 · p. 2, Figure 2 · p. 2
  • Re2 is presented as an input-focused strategy that can complement thought-eliciting prompts such as CoT and PAL.The paper describes the approach as compatible with most thought-eliciting methods.Source: §1 · p. 2
  • Across 14 datasets and 112 experiments, Re2 generally improves LLM reasoning, with exceptions in some vanilla ChatGPT scenarios.The experiments span arithmetic, commonsense, and symbolic reasoning, and include different LLMs and prompting settings.Source: §1 · p. 2

2 Methodology

The methodology frames Chain-of-Thought (CoT) as a baseline, then introduces Re2 as a repeated-input operation. Because it focuses on input understanding, Re2 is presented as a plug-and-play complement to thought-eliciting prompts.

2.1 Vanilla Chain-of-Thought for Reasoning

  • The paper uses CoT as a baseline: a prompted input supports generation of a rationale and then a target answer.The rationale is treated as a sequence of manageable reasoning steps.Source: §2.1 · pp. 2–3

2.2 Re-Reading (RE2) Improves Reasoning

  • Re2 repeats the input query before the thought-eliciting prompt, allowing the first pass to provide global information for the second.The method is intended to allocate more computational resources to input encoding and facilitate bidirectional understanding.Source: §2.2 · p. 3

2.3 Generality of RE2

  • Re2 can be combined with thought-eliciting prompts beyond CoT, including Plan-and-Solve and Program-Aided Prompt.The paper also identifies few-shot prompting and self-consistency as compatible settings.Source: §2.3 · p. 3

3 Experiments

Experiments evaluate RE2 across arithmetic, commonsense, and symbolic reasoning benchmarks using Vanilla and Chain-of-Thought (CoT) baselines. They report mostly consistent gains, then examine compatibility across prompts and models, re-reading frequency, question complexity, and inference costs.

3.1 Benchmarks

  • The benchmarks span seven arithmetic datasets, commonsense tasks CSQA, StrategyQA, and ARC, and symbolic tasks Date and Coinflip.The arithmetic set includes GSM8K, SVAMP, ASDiv, AQuA, AddSub, MultiArith, and SingelEQ.Source: §3.1 · pp. 3–4

3.3 Evaluation Results

  • Davinci-003 gains averaged 3.81, 2.51, and 1.85 with Vanilla+RE2, and 2.22, 1.23, and 5.25 with CoT+RE2 across arithmetic, commonsense, and symbolic tasks.Tables 1 and 2 cover arithmetic, commonsense, and symbolic benchmarks.Source: Table 1 · p. 4, Table 2 · p. 4, §3.3 · p. 4

3.2 Language Models and Implementations

  • The main experiments compare Vanilla and CoT with their RE2 variants on ChatGPT and davinci-003, using zero-shot settings and greedy decoding at temperature 0.The paper also reports tests on GPT-4o-mini in Appendix C.Source: §3.2 · p. 4

3.3 Evaluation Results

  • RE2 improves ChatGPT on 71% of experiments overall, despite slight Vanilla+RE2 drops on some datasets, including AQUA and MultiArith.On StrategyQA and Coin, Vanilla+RE2 gains were 4.63 and 5.20, respectively.Source: §3.3 · p. 5

3.4 Discussions

  • Performance generally peaks after two or three question readings and declines with more; detailed re-reading instructions outperform direct duplication, while repeating CoT reasoning brings no discernible benefit.Reading twice is optimal in most scenarios.Source: §3.4 · pp. 5, 7
  • RE2 gains generally extend to Plan-and-Solve and PAL prompts, and few-shot experiments report gains for both Vanilla and CoT prompting.Few-shot experiments also repeated questions in the exemplars.Source: §3.4 · pp. 5–6, Table 3 · p. 5, Table 4 · p. 6
  • On non-IFT Llama-2 models, re-reading improves Vanilla and CoT on most arithmetic tasks; with self-consistency, it also contributes gains in most scenarios.The self-consistency study used ChatGPT on GSM with temperature 0.7 and averaged results over 10 runs.Source: §3.4 · pp. 6–7
  • RE2 improves performance across question complexities and raises output n-gram recall, while marginally increasing inference time and memory usage in the tested settings.The complexity analysis counts reasoning steps in ground-truth explanations; the efficiency study used Llama-2 7B and 100 GSM8K instances.Source: §3.4 · pp. 7–8, Figure 4 · p. 7, Figure 5 · p. 8

4 Related Work

Prior LLM reasoning work largely focuses on output-side thought-eliciting strategies, especially Chain-of-Thought, while this paper situates re-reading among input-side and text-understanding approaches. The related work also connects re-reading to query augmentation and knowledge recall.

Reasoning with Large Language Models

  • CoT-based reasoning work varies the chain’s structure, modality, reliability, and decomposition, whereas re-reading is presented as orthogonal and complementary [Wei et al., 2022b; Kojima et al., 2022].The passage gives tree, graph, program, self-consistency, verification, and decomposition as examples of these directions.Source: §4 · p. 8

Re-reading Strategy in NLP

  • Sha et al. found repeated-reading mechanisms improved performance on some tasks—sentiment analysis, semantic relation classification, and event extraction—while multi-level attention effectively recognized implicit discourse relations.Source: §4 · p. 8
  • Re-reading is motivated for decoder-only LLMs because unidirectional attention hinders implicit bidirectional capability, while repeated input has also produced bidirectional embeddings for text embedding tasks [Springer et al., 2024].The passage notes earlier encoder architectures already provide forms of re-reading.Source: §4 · p. 9

Knowledge Recall

  • Prompting is framed as parametric knowledge recall, and repeating an original query resembles query augmentation used in term-based retrieval [Dai and Callan, 2019; Wang et al., 2023b; Shen et al., 2023].The passage contrasts this with non-parametric retrieval such as vector databases [Karpukhin et al., 2020; Izacard et al., 2022].Source: §4 · p. 9

5 Conclusion and Future Works

The paper presents RE2 as a re-reading prompt for LLM reasoning and reports broad experiments supporting its efficacy and versatility. It argues that input-question understanding should complement thought-eliciting prompts and identifies additional application contexts for future study.

5 Conclusion and Future Works

  • RE2 is presented as a simple prompting method that improves LLM reasoning by re-reading the question.The paper reports experiments across reasoning benchmarks, LLM types, task settings, and compatibility assessments with other prompting methods.Source: §5 · p. 9
  • The authors encourage prioritizing deeper understanding of input questions as a complement to existing thought-eliciting prompting strategies.They identify multi-turn dialogue and multimodal reasoning as future contexts to explore.Source: §5 · p. 9

6 Limitations

The study is primarily empirical, and the authors identify theoretical analysis as future work. They also note a slight inference-efficiency cost for longer questions because RE2 increases input length.

6 Limitations

  • The investigation is primarily empirical, with more theoretical analysis identified as future work.The authors situate this empirical emphasis alongside other prompting research.Source: §6 · p. 9
  • RE2 marginally increases input length, slightly reducing inference efficiency for longer questions.Source: §6 · p. 9

7 Ethics

The experiments cover mathematical, commonsense, and symbolic reasoning benchmarks. The paper also reports dataset licensing information and states that its prompts do not use personal information or threaten safety or well-being.

7 Ethics

  • The evaluation includes seven mathematical, three commonsense, and two symbolic reasoning benchmarks.The listed datasets include GSM8K, SVAMP, CSQA, StrategyQA, ARC, Date Understanding, and Coinflip.Source: §7 · p. 9
  • Licenses are specified for several datasets, while the licenses for the remaining datasets are unspecified.The passage names MIT, Apache-2.0, and CC-BY-SA-4.0 among the reported licenses.Source: §7 · p. 9
  • The authors state that their prompts neither collect nor use personal information about others and pose no threat to safety or well-being.Source: §7 · p. 9

A Datasets

This appendix identifies the reasoning benchmarks and documents the prompting methods and answer-format instructions used.

A Datasets

  • Table 10 provides statistics and examples for the reasoning benchmarks considered.The caption classifies them as arithmetic, commonsense, and symbolic reasoning benchmarks.Source: A Datasets · p. 14

B Specific Prompting Methods

  • Tables 11–13 document the specific prompting methods and task answer-format instructions.Tables 11 and 12 cover prompt variants; Table 13 covers answer-format instructions.Source: B Specific Prompting Methods · p. 14

C GPT-4o-mini Experiments

The authors tested RE2 on GPT-4o-mini and report that it remains effective on this newer, more advanced model.

C GPT-4o-mini Experiments

  • RE2 continues to perform effectively on GPT-4o-mini, tested with version gpt-4o-mini-2024-07-18.The reported results are presented in Figures 8 and 9.Source: C GPT-4o-mini Experiments · p. 14

D Attention Analysis

Attention visualizations show that re-reading lets second-pass question tokens attend to earlier question tokens and increases attention to the question during generation.

D Attention Analysis

  • Figure 6 contrasts CoT’s single question pass with CoT+RE2’s first and second passes; matrix rows are query tokens and columns are key tokens.Source: Figure 6 · p. 14
  • In CoT+RE2, second-pass tokens attend to later-position tokens from the first pass, which the authors interpret as enabling “bidirectional” question understanding.The attention visualization averages weights across all heads and layers in Llama-2.Source: D Attention Analysis · p. 14, Figure 6 · p. 14
  • Question-token attention during generation rises from 0.32 to 0.40 with RE2.The authors interpret this increase as greater focus on the question during reasoning.Source: D Attention Analysis · p. 14

E Perplexity Analysis

The appendix examines how repeated reading relates to output likelihood, illustrates CoT+RE2 explanations in two examples, and provides additional examples across prompting setups.

E Perplexity Analysis

  • The GSM8K perplexity experiment varies question repetitions as input and measures perplexity for generating either the question or its ground-truth response.It uses Llama 2; lower perplexity indicates a higher likelihood of generating a sequence.Source: E Perplexity Analysis · pp. 14–15
  • As reading times increase, question-generation perplexity decreases, while ground-truth-response perplexity increases overall except at two readings.The authors say this aligns with optimal performance when the question is read twice; Figure 7 summarizes the perplexity results.Source: Figure 7 · p. 14, E Perplexity Analysis · p. 15

F Case Study

  • In two GSM examples, CoT+RE2 better aligns question evidence with explanation hints and highlights important evidence before explaining.The authors cite examples involving feed amounts and a bonus worth half a month’s salary.Source: F Case Study · p. 15

G More Cases

  • Vanilla ChatGPT directly answers Coin Flip and Date Understanding examples but still produces CoT outputs on some other datasets, including MultiArith and AQUA.The additional examples are presented in Tables 21–24.Source: G More Cases · p. 15, Table 21 · p. 26, Table 22 · p. 26
Loading 2309.06275v4…