Table of Contents
Fetching ...

Self-Anchor: Large Language Model Reasoning via Step-by-step Attention Alignment

Hongxiang Zhang, Yuan Tian, Tianyi Zhang

TL;DR

Self-Anchor tackles attention misalignment in long LLM reasoning by decomposing problems into plans and reasoning steps and applying dynamic attention steering to align focus with the current plan and the original question. It leverages a planning-based structure and Selective Prompt Anchoring (SPA) to steer logits via $\text{logits}^{\text{steered}} = \omega_i \cdot \text{logits}^{\text{original}} + (1-\omega_i) \cdot \text{logits}^{\text{masked}}$ with a confidence-driven $\omega_i$ computed from $p_{avg} = n / \sum_{i=1}^{n} (1/p_i)$. Evaluations on six benchmarks across six base LLMs show consistent improvements over prompting baselines and competitive performance against RL-enhanced reasoning models, at substantially lower training cost. The results indicate robustness across task complexity and model sizes, while ablations confirm the critical role of attention steering; limitations include residual reasoning and arithmetic errors that require further enhancement. Overall, Self-Anchor provides a practical, training-free pathway to improve complex reasoning in diverse LLMs with limited latency overhead.

Abstract

To solve complex reasoning tasks for Large Language Models (LLMs), prompting-based methods offer a lightweight alternative to fine-tuning and reinforcement learning. However, as reasoning chains extend, critical intermediate steps and the original prompt will be buried in the context, receiving insufficient attention and leading to errors. In this paper, we propose Self-Anchor, a novel pipeline that leverages the inherent structure of reasoning to steer LLM attention. Self-Anchor decomposes reasoning trajectories into structured plans and automatically aligns the model's attention to the most relevant inference steps, allowing the model to maintain focus throughout generation. Our experiment shows that Self-Anchor outperforms SOTA prompting methods across six benchmarks. Notably, Self-Anchor significantly reduces the performance gap between ``non-reasoning'' models and specialized reasoning models, with the potential to enable most LLMs to tackle complex reasoning tasks without retraining.

Self-Anchor: Large Language Model Reasoning via Step-by-step Attention Alignment

TL;DR

Self-Anchor tackles attention misalignment in long LLM reasoning by decomposing problems into plans and reasoning steps and applying dynamic attention steering to align focus with the current plan and the original question. It leverages a planning-based structure and Selective Prompt Anchoring (SPA) to steer logits via with a confidence-driven computed from . Evaluations on six benchmarks across six base LLMs show consistent improvements over prompting baselines and competitive performance against RL-enhanced reasoning models, at substantially lower training cost. The results indicate robustness across task complexity and model sizes, while ablations confirm the critical role of attention steering; limitations include residual reasoning and arithmetic errors that require further enhancement. Overall, Self-Anchor provides a practical, training-free pathway to improve complex reasoning in diverse LLMs with limited latency overhead.

Abstract

To solve complex reasoning tasks for Large Language Models (LLMs), prompting-based methods offer a lightweight alternative to fine-tuning and reinforcement learning. However, as reasoning chains extend, critical intermediate steps and the original prompt will be buried in the context, receiving insufficient attention and leading to errors. In this paper, we propose Self-Anchor, a novel pipeline that leverages the inherent structure of reasoning to steer LLM attention. Self-Anchor decomposes reasoning trajectories into structured plans and automatically aligns the model's attention to the most relevant inference steps, allowing the model to maintain focus throughout generation. Our experiment shows that Self-Anchor outperforms SOTA prompting methods across six benchmarks. Notably, Self-Anchor significantly reduces the performance gap between ``non-reasoning'' models and specialized reasoning models, with the potential to enable most LLMs to tackle complex reasoning tasks without retraining.

Paper Structure

This paper contains 28 sections, 7 equations, 2 figures, 8 tables.

Figures (2)

  • Figure 1: Comparison between existing reasoning methods and Self-Anchor. Due to inherent attention patterns, existing reasoning methods may easily overlook intermediate reasoning and make mistakes. Self-Anchor addresses this by decomposes the task into plans, and takes each plan as a component for attention alignment.
  • Figure 2: Analysis of task complexity and reasoning chain length