acceptodds
Under review as a conference paper at ICLR 2027

SHEAR: Hidden-State Editing for Mid-Thought Reasoning Correction

Abstract

Large reasoning models (LRMs) generate extended chains of thought, but do they internally know when they have already found the correct answer? We investigate this question by probing hidden states during reasoning. A lightweight probe on hidden states identifies per-step reasoning correctness with high accuracy and shows a sharp jump at the moment of answer stabilization, providing strong affirmative evidence. This information is substantially more accessible through hidden states than through token-level signals: in controlled equal-dimension comparisons using the same classifier, hidden-state probes markedly outperform token-level probes. We propose SHEAR (Semantic Hidden-layer Editing with Anchored Reasoning), which directly exploits this hidden knowledge through a semantic confidence probe and a stability-anchored editing direction that jointly determine when and how to intervene. SHEAR achieves the highest or tied-highest results on six mathematical reasoning benchmarks across three LRM scales, with statistically significant improvements against the strongest baseline in most configurations. Reversing the editing direction causes catastrophic collapse, indicating that it operates on genuine reasoning structure. Hidden states are therefore not merely a readout of reasoning quality but a control surface for correcting it mid-thought. Code is available at https://anonymous.4open.science/r/SHEAR-C9A4/.

Primary area:
unsupervised, self-supervised, semi-supervised, and supervised representation learning
Keywords:
large reasoning models, hidden state probing, activation steering, inference-time intervention

Reviews

Among:
Shape:
1234this paper, Top 15%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 3.00 over 3 reviews, above 85% of the others.
Reviewer_fjV2OpenReview ↗
Rating
3
Confidence
4
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes SHEAR, a method that edits hidden states during reasoning while keeping the model weights fixed. It uses a small probe to estimate current answer correctness and a direction extracted from training traces to guide editing. Experiments on three reasoning models report accuracy gains on math, science, and code tasks.

Critical strengths
  1. The motivation makes sense and the writing and experiment settings are generally solid.
  2. The paper connects hidden-state probing with online editing in a clear way. The probe provides feedback to guide the model during generation.
  3. The signal comparison controls both feature size and classifier choice. This provides useful evidence that hidden states contain stronger correctness signals than the tested token statistics.
  4. The evaluation covers three models and several tasks in different domains. Transfer to science and code without extra training, together with repeated sampling runs, provides useful support for the reported gains.
Critical weaknesses
  1. Wrong attempts are not always harmful. Trying a wrong answer, finding the mistake, and changing direction can help reasoning [1, 2]. Labels based on the current answer do not distinguish useful exploration from harmful mistakes, so a low probe score does not necessarily mean editing is needed.
  2. The benefit of hidden-state access is not fully isolated. The paper lacks a direct comparison with a text-based correctness judge using the same editing rule. Comparisons with token statistics do not establish whether the gains require hidden-state information or could come from any reliable correctness signal.
  3. It is unclear what behavior the editing direction changes. I think it is somehow tricky for the method. The score plots and direction ablations do not show how editing changes the actual reasoning text. Paired outputs with and without editing are needed to show whether it corrects reasoning, reduces repetition, or changes stopping behavior.
  4. The treatment of segments without an answer is unclear. The paper does not explain how such segments are labeled or how intermediate and multiple candidate answers are handled. If unfinished reasoning is labeled incorrect, the probe may confuse normal progress with reasoning errors.
  5. The control rule needs more complete ablations. The paper does not separately test the need for high-confidence edits and variance-based scaling, or fully study sensitivity to editing strengths and thresholds. The fixed-positive-edit baseline changes timing, strength, and direction together, so it does not isolate the benefit of adaptive control.

[1] Siyuan Wang, Yanchen Liu, and Xiang Ren. Segment-Level Attribution for Selective Learning of Long Reasoning Traces.ICLR, 2026.
[2] Zhuoshi Pan et al. LEMMA: Learning from Errors for MatheMatical Advancement in LLMs. ACL 2025.

Questions for authors
  1. Can you distinguish harmful mistakes from useful failed attempts and self-correction? Starting from the same reasoning prefix, does editing at a low probe score improve final success compared with letting the model continue without editing?
  2. Can you replace the hidden-state probe with a text-based verifier while keeping the editing direction and control rule fixed? Please compare both accuracy and computational cost.
  3. I would really love to see if you can prove that the method is solid. Can you show paired outputs from the same reasoning prefix, with and without editing, including both successful and harmful edits? What does the direction change in practice: calculations, exploration, repetition, or stopping?
  4. How do you label segments containing no answer, only an intermediate result, or several candidate answers? Do you exclude them, label them incorrect, or reuse an earlier answer?
  5. Can you test each part of the control rule separately and vary its strengths, thresholds, and window size? How many positive and negative edits occur per problem, and how does this depend on difficulty?
1 comment
AuthorsOpenReview ↗

Response to Reviewer fjV2 (4)

Response to Weakness 4 and Question 4

(W4) The treatment of segments without an answer is unclear. ... If unfinished reasoning is labeled incorrect, the probe may confuse normal progress with reasoning errors.

(Q4) How do you label segments containing no answer, only an intermediate result, or several candidate answers? Do you exclude them, label them incorrect, or reuse an earlier answer?

Thank you for the question; the appendix indeed devotes only one sentence to this. The rule follows the actual behavior of extract_segment_answer and train_probe.py: it tries explicit patterns such as \boxed{} and "answer is / = N" in turn, and if none matches, it takes the last number in the segment. Therefore, for a segment containing only an intermediate result, its candidate is its last number, and when there are several candidates, the last one is likewise taken. Empty is returned only if the segment contains no number at all. A step that returns empty is labeled 0 and kept in the training set, and skipped_no_answer is triggered only when the problem itself lacks a gold answer. The statistics of the three types over the 40,492 steps are as follows:

Step typeShareStepsLabelMean csc_sStd. of csc_sEdits triggered
No candidate, empty returned62.40%25,26700.0790.12127.1% of steps fall below τl\tau_l and trigger a push-away; the rest stay neutral
Candidate not equal to gold27.10%10,97300.0770.12329.7% of steps fall below τl\tau_l and trigger a push-away
Candidate equal to gold10.50%4,25210.5450.24394.4% of steps are above τh\tau_h and trigger reinforcement

To your concern that "the probe treats normal progress as an error", the data answer as follows: the probe scores of no-candidate steps and wrong-candidate steps almost completely coincide, with mean scores of 0.079 versus 0.077 and an AUC between the two of only 0.522, which shows that the probe reads whether the answer is correct, not whether an answer has appeared; moreover, among no-candidate steps only 27.1% trigger a push-away, and the rest stay neutral. We also retrained the probe with alternative labeling schemes:

Labeling schemeAMC23GSM8K
A: current scheme, 1 if the running answer equals gold, otherwise 095.095.5
B: exclude no-candidate steps92.594.4
C: steps without an answer reuse the previous answer95.095.6

The current scheme is no weaker than the two alternatives, and it is the simplest. In the final version we will write the rules above into Sec. 3.


Response to Weakness 5 and Question 5

(W5) The control rule needs more complete ablations. The paper does not separately test the need for high-confidence edits and variance-based scaling, or fully study sensitivity to editing strengths and thresholds. The fixed-positive-edit baseline changes timing, strength, and direction together, so it does not isolate the benefit of adaptive control.

(Q5) Can you test each part of the control rule separately and vary its strengths, thresholds, and window size? How many positive and negative edits occur per problem, and how does this depend on difficulty?

Experiment a: ablating each part separately. 7B, single sampling run; each row changes only one factor. Vanilla and full SHEAR are taken from Table 3.

VariantChangeAMC23MATH-500GSM8KOlympiad
Vanilla—85.089.889.256.1
SHEAR (full)—95.094.295.559.4
w/o high-confidence editλ=0\lambda = 092.593.094.058.5
w/o variance amplificationF2≡1F_2 \equiv 190.091.693.658.1
w/o low-confidence editβ=0\beta = 087.591.290.257.2
w/o probeFixed +β+\beta at every step87.592.290.557.0
w/o directionvv replaced by a random unit vector87.592.491.257.9

AMC23 has only 40 problems, so one problem equals 2.5 pt, and the standard deviation reported in Appendix G is 3.0 pt; we therefore do not use this column as standalone evidence. On MATH-500 and GSM8K, the standard deviation of the difference between two single runs is 2σ\sqrt{2}\sigma, and the 95% significance thresholds are about 1.9 pt and 1.1 pt: removing the low-confidence edit costs 3.0 / 5.3 pt, and removing variance amplification costs 2.6 / 1.9 pt, so both exceed the threshold on both benchmarks; removing the high-confidence edit costs 1.2 / 1.5 pt, which exceeds the threshold only on GSM8K and is insufficient to be judged on its own on MATH-500. The sum of the three losses on MATH-500 is 6.8 pt, larger than the end-to-end net gain of 4.4 pt, which indicates that the three parts overlap, so this is not an additive decomposition.

Reviewer_17uGOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper investigated whether large reasoning models internally encode intermediate reasoning correctness and proposes SHEAR, which is an inference-time intervention method that combines a lightweight semantic confidence probe with a stability-anchored activation editing direction to steer hidden states at reasoning step boundaries. Experiments across different models on a few mathematical and two cross-domain benchmarks demonstrate consistent accuracy gains over existing inference-time baselines.

Critical strengths
  1. This paper introduced a closed-loop activation steering framework that couples real-time hidden-state probing with adaptive representation editing within a single reasoning trace, adding negligible arithmetic overhead per step.

  2. Controlled equal-dimension comparisons via PCA-reduced hidden states and logistic regression clearly demonstrate that intermediate hidden states preserve reasoning progress signals that are lost at the token-level output projection.

  3. Experimental results across models on math reasoning benchmarks, along with zero-shot transfer to GPQA-Diamond and LiveCodeBench, verify the effectiveness and cross-domain generality of the proposed method.

Critical weaknesses
  1. There is an internal sign inconsistency across Equations 3 and 5, Table 5, and Table 6: the probe-free ablation in Table 5 applies a fixed positive edit along +v at every step and improves accuracy on DeepSeek-R1-7B, whereas flipping the direction in Table 6 steers low-confidence steps along the same +v direction yet causes accuracy to collapse to near zero.

  2. Step-level correctness is labeled by checking whether a step's running answer matches the final gold answer, which conflates valid intermediate algebraic derivations with flawed reasoning and explains why roughly 90 percent of training steps are labeled incorrect despite high baseline solve rates.

  3. The robustness checks in Figures 7a and 7c evaluate the MLP probe against the thresholded predictions rather than ground-truth labels, which tautologically yields an AUC of 1.000, and shuffling step order at evaluation time does not remove positional encodings already embedded inside the transformer hidden states.

  4. Although the introduction motivates the method with examples of post-stabilization overthinking and compares against early-exit baselines, the paper reports no token counts, step counts, or wall-clock latency comparisons to show whether SHEAR actually reduces redundant generation.

  5. The organization of the appendix is fragmented, with Figure 2 depicting direction extraction from pre- and post-stabilization states while Equation 3 defines it using only the stabilization step and post-stabilization states.

Questions for authors
  1. How do you reconcile the sign definitions in Equations 3 and 5 with the empirical results in Table 5 and Table 6, where steering all steps along +v improves performance in the ablation study but steering low-confidence steps along +v in the reverse-editing experiment causes catastrophic collapse?

  2. How is the running answer extracted from intermediate reasoning paragraphs that only compute sub-expressions, and how does the probe distinguish genuinely flawed reasoning steps from valid early derivation steps that have not reached the final numerical answer yet?

  3. How does SHEAR compare to vanilla decoding and early-exit baselines such as DEER and Dynasor-CoT in terms of average generated token length and inference latency across the evaluated benchmarks?

  4. Why is the probe gradient nearly orthogonal to the editing direction in Appendix L if both vectors are intended to capture the transition toward answer stabilization?

  5. It would be helpful to report the end-to-end benchmark accuracy of SHEAR when both the probe and the editing direction are trained on only 20 problems, matching the low-data regime analyzed in Table 16.

2 comments
AuthorsOpenReview ↗

Response to Reviewer 17uG (3)

Response to Weakness 4 and Question 3

(W4) ... the paper reports no token counts, step counts, or wall-clock latency comparisons to show whether SHEAR actually reduces redundant generation.

(Q3) How does SHEAR compare to vanilla decoding and early-exit baselines such as DEER and Dynasor-CoT in terms of average generated token length and inference latency ...?

Thank you for the suggestion. This comparison required rerunning Vanilla and SHEAR in full under the same environment, which did not take long, and we have finished it. The comparison uses the full 500 problems of MATH-500, with Vanilla rerun using --no_steer:

ModelAvg. tokens, Vanilla → SHEARToken reductionAvg. stepsEnd-to-end latency, s/problemLatency reductionExtra cost of probe and edit
7B3629 → 288220.6%81 → 6817.3 → 14.516.2%0.6 ms/step × 68 steps = 0.041 s
1.5B4588 → 329628.2%92 → 8015.5 → 11.724.2%0.4 ms/step × 80 steps = 0.032 s
32B4412 → 346621.4%84 → 7144.3 → 36.717.1%1.1 ms/step × 71 steps = 0.078 s

Latency is measured with static batching at batch = 8, where the wall-clock time of a batch is determined by the longest sequence in the batch, so the reduction is smaller than the token reduction. On AMC23, GSM8K, AIME24, AIME25, and Olympiad, the average tokens of 7B and 1.5B also all decrease, with reductions between 19.1% and 40.6%.

For the comparison with DEER and Dynasor-CoT, their tokens and Pass@1 are taken from the numbers reported by ReBalance under the same models, benchmarks, and protocol, and we did not re-measure the latency of these two baselines. The table below gives the average change relative to each one's own Vanilla over the six benchmarks:

ModelMethodAvg. ΔPass@1Avg. Δ#Tokens
7BDEER+0.9 pt−27.9%
7BDynasor-CoT−0.1 pt−17.7%
7BSHEAR+8.4 pt−24.5%
1.5BDEER−5.0 pt−36.5%
1.5BDynasor-CoT+3.4 pt−9.0%
1.5BSHEAR+9.6 pt−27.2%

DEER is more aggressive in token compression, reducing tokens by 36.5% on 1.5B, but at the cost of a 5.0 pt drop in Pass@1; SHEAR saves about a quarter of the tokens while improving accuracy, so the two sit at different trade-off points.


Response to Weakness 5

(W5) The organization of the appendix is fragmented, with Figure 2 depicting direction extraction from pre- and post-stabilization states while Equation 3 defines it using only the stabilization step and post-stabilization states.

Thank you for pointing this out; this is an error in the figure caption. Eq. 3 uses only the stabilization step s∗s^* and the steps after it, so "pre- and post-s∗s^*" in the caption should read "s∗s^* and post-s∗s^*". We will correct the caption and state that the text follows Eq. 3.


Response to Question 4

(Q4) Why is the probe gradient nearly orthogonal to the editing direction in Appendix L if both vectors are intended to capture the transition toward answer stabilization?

Your intuition is right. The hidden dimension of 7B is D=3584D = 3584, and the standard deviation of the cosine between random unit vectors is about 1/3584≈0.0171/\sqrt{3584} \approx 0.017, so −0.02-0.02 is statistically indistinguishable from random orthogonality and should not be stated as a guarantee. All steps share the same vv, so the cosines across steps are not independent. We therefore replace vv with a random unit vector on the same steps, repeat 5,000 times, and in each repetition compute the step mean over all 40,492 steps, which yields the null distribution:

QuantityValue
cos⁡(∇f,v)\cos(\nabla f, v) step mean (observed)−0.021
Null distribution (random vv, step mean)−0.001±0.015-0.001 \pm 0.015
z-score−1.33
cos⁡(v,dcs)\cos(v, d_{cs}), where dcsd_{cs} is the mean of correct steps minus the mean of wrong steps0.042
cos⁡(∇f,dcs)\cos(\nabla f, d_{cs})0.683

∣z∣=1.33<1.96|z| = 1.33 < 1.96, so the observed value cannot be distinguished from a random direction. A more fundamental explanation is that v=hs∗−mean(hpost)v = h_{s^*} - \text{mean}(h_{\text{post}}), and s∗s^* and the redundant steps after it are mostly correct steps themselves, so vv is not a discriminative axis between "correct and wrong", and being approximately orthogonal to it is expected; the gradient of the probe, by contrast, clearly lies along dcsd_{cs}, with a cosine of 0.683. In the final version we will change "guarantee" in the appendix to "observation", and add the random baseline and the z-score.


AuthorsOpenReview ↗

Response to Reviewer 17uG (4)

Response to Question 5

(Q5) ... report the end-to-end benchmark accuracy of SHEAR when both the probe and the editing direction are trained on only 20 problems, matching the low-data regime analyzed in Table 16.

Thank you for the suggestion. On 7B, for each size we take 3 different random subsets, train the probe and extract the direction from each, and report the mean ±\pm standard deviation. Vanilla on the three benchmarks is 85.0, 89.8, and 89.2, respectively:

Training problemsProbe AUCAMC23MATH-500GSM8K
200.932±0.0040.932 \pm 0.00490.8±2.990.8 \pm 2.992.2±0.392.2 \pm 0.392.9±0.292.9 \pm 0.2
500.925±0.0050.925 \pm 0.00592.5±2.592.5 \pm 2.592.8±0.292.8 \pm 0.293.4±0.193.4 \pm 0.1
1000.920±0.0030.920 \pm 0.00394.2±1.494.2 \pm 1.493.4±0.393.4 \pm 0.394.4±0.194.4 \pm 0.1
500 (default)—95.094.295.5

Training on only 20 problems gives +5.8, +2.4, and +3.7 pt on AMC23, MATH-500, and GSM8K, which is about 55% to 59% of the full gain, where the full gains are +10.0, +4.4, and +6.3, respectively; with 100 problems it is about 82% to 92%. End-to-end accuracy converges monotonically as the number of training problems grows, while the probe AUC is nearly flat between 20 and 100 problems, between 0.920 and 0.932, so the end-to-end convergence does not depend on it.


We sincerely thank you for these comments, and we believe they make this work more solid. We hope the arguments above, together with the new experiments, fully address your concerns.

Reviewer_5xHmOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
3
Soundness
3(+1)
Read review
Paper summary

This paper addresses two questions that concern reasoning LLMs: (1) Can a probe on internal activations predict when the model has found a correct answer?; (2) Can we use this probe and detection of correct answers in intermediate reasoning steps to construct a steering direction that improves model performance?

The paper answers both questions affirmatively. To predict whether a model has found the correct answer, the paper derives labels on math problems by checking in each step whether the ground-truth answer appears, and then trains a MLP on hidden activations to predict this label, which yields good performance. To construct a steering vector, the paper proposes to substract the activations after the step when the model has converged on the correct answer from the step activation before, and steer a model using this steering vector, and a steering coefficient based on the confidence of the trained probe. This yields substantial improvements on multiple math tasks (in terms of Pass@1 accuracy) and the vector derived from math CoTs transfers to other domains, in particular Question Answering and Coding.

Critical strengths

The main strength of the paper is extending training a probe to detect when a model has converged on the right answer to deriving a steering vector that can improve reasoning and performance on multiple tasks of different domains. The achieved gains are substantial, which is also a strong argument in favor of acceptance.

Critical weaknesses

I find two major weaknesses that support rejection:

(W1) The paper lists answering whether reasoning LLMs know when they found the correct answer as a major contribution (abstract, line 099). However, this was already shown with essentially the same methods in [1]. It is the more surprising that the paper lists this as contribution and allocates so much space to this finding, as [1] is actually known to the authors (the paper is cited in line 140). Therefore, this finding and the analysis in Sec. 3 don't qualify as a major contribution, unless the authors can convincingly explain what their experiments add beyond the findings in [1].

(W2) Given the substantial improvements enabled by steering, which also works across domains, I was surprised that the paper contains no analysis what drives these improvements. Clearly, reasoning quality must have improved significantly, but is this due to avoiding switching to a wrong answer after the correct one had already been found? Or does the steering make CoTs longer so steered reasoning can use more test-time compute? Given the large (and for a steering method surprising) performance improvement, a deeper analysis how this is achieved would be in order. At the very least, the paper should ablate the two components, i.e., the contribution of the control function and the vector itself.

In this regard, I also have some novelty concerns wrt. the ReBalance baseline [2]. At its core, the method is very similar, only the choice of control function and steering vector are different. At the same time, some key definitions like the stability index (Eq. 1) and the term "control function" are identical to [2] without this being made transparent in the text.

Finally, I found concerning that ReBalance is the only baseline whose performance improves above the base model for every task, which questions the choice of baselines. Unfortunately, although an anonymous link to code was provided, the linked repository was already expired at the time of reviewing, so I could not check any implementation details.


References:
[1] Zhang et al.: "Reasoning Models Know When They’re Right: Probing Hidden States for Self-Verification" COLM, 2025
[2] Li et al.: "Efficient Reasoning with Balanced Thinking" ICLR, 2026


Post-Rebuttal Update

The authors agree on (W1) and now make clear in the uploaded, revised version that this insight has been presented in other works before. Regarding (W2), the authors have provided extensive experiments and eventually converged on the claim that the method prevents a model to "go autopilot" after generating an intermediate, wrong solution and taking it for correct, although internally there is sufficient signal that it is not correct. While the quantitative evidence of this claim could be extended, I now believe that the impact of this finding, even if for now only implicated in the main paper, is relevant and interesting enough for the paper to be recommended for acceptance, which otherwise is technically sound, clear, and insightful.

Questions for authors

To better assess the paper, I would like to ask the following questions:

(Q1) What additional insights does the analysis in Sec. 3 provide beyond the results in [1]?

(Q2) What are the main factors that explain how performance increases so greatly through steering? I think the ReBalance paper [2] has a quite intuitive storyline for this. Something similar is missing from the present paper.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.