Beyond Confidence: Stability-Aware Test-Time Adaptation for LLM Reasoning

arXiv cs.AI Papers

Summary

This paper proposes TASCO, a framework for test-time adaptation in LLMs that incorporates local stability into confidence-based optimization to improve reasoning accuracy and token efficiency without updating model parameters.

arXiv:2609.11393v1 Announce Type: new Abstract: Test-time adaptation has emerged as a lightweight alternative to costly post-training for improving the reasoning capabilities of Large Language Models (LLMs) on downstream tasks. Predictive entropy provides a model-derived signal for such adaptation, guiding models toward higher-confidence reasoning states without external verifiers or reward models. However, higher confidence does not necessarily imply correctness, as LLMs may remain highly confident along incorrect reasoning trajectories. We observe that high-confidence reasoning is more likely to be correct when confidence remains stable under local perturbations. Based on this observation, we propose Test-Time Adaptation via Stability-Aware Confidence Optimization (TASCO), a framework that incorporates local stability into confidence-based test-time adaptation while keeping the LLM frozen. TASCO operationalizes local stability by optimizing a lightweight task-level prefix under two alternative perturbation strategies: Random Perturbation promotes distributional stability across trajectories induced by nearby perturbed prefixes, whereas Sharpness-Aware Perturbation targets worst-case local sensitivity. Experiments demonstrate that TASCO improves reasoning accuracy and token efficiency across diverse LLMs and reasoning benchmarks, while behavioral analyses show that it maintains stable confidence under local perturbations without prematurely concentrating the model's predictive distribution.
Original Article
View Cached Full Text

Cached at: 09/12/26, 08:27 AM

# Beyond Confidence: Stability-Aware Test-Time Adaptation for LLM Reasoning
Source: [https://arxiv.org/html/2609.11393](https://arxiv.org/html/2609.11393)
###### Abstract

Test\-time adaptation has emerged as a lightweight alternative to costly post\-training for improving the reasoning capabilities of Large Language Models \(LLMs\) on downstream tasks\. Predictive entropy provides a model\-derived signal for such adaptation, guiding models toward higher\-confidence reasoning states without external verifiers or reward models\. However, higher confidence does not necessarily imply correctness, as LLMs may remain highly confident along incorrect reasoning trajectories\. We observe that high\-confidence reasoning is more likely to be correct when confidence remains stable under local perturbations\. Based on this observation, we proposeTest\-TimeAdaptation viaStability\-AwareConfidenceOptimization \(TASCO\), a framework that incorporates local stability into confidence\-based test\-time adaptation while keeping the LLM frozen\. TASCO operationalizes local stability by optimizing a lightweight task\-level prefix under two alternative perturbation strategies: Random Perturbation promotes distributional stability across trajectories induced by nearby perturbed prefixes, whereas Sharpness\-Aware Perturbation targets worst\-case local sensitivity\. Experiments demonstrate that TASCO improves reasoning accuracy and token efficiency across diverse LLMs and reasoning benchmarks, while behavioral analyses show that it maintains stable confidence under local perturbations without prematurely concentrating the model’s predictive distribution\.

1Key Laboratory of Dependable Service Computing in Cyber Physical Society, Chongqing University, China

2King’s College London, London, UK

3Griffith University, Brisbane, Australia

gaomin@cqu\.edu\.cn,

## Introduction

Large Language Models \(LLMs\) have demonstrated strong reasoning capabilities on complex tasks such as mathematical reasoning and code generation\([Guo et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib6);[Jaech et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib5)\)\. Traditionally, adapting these models to downstream tasks relies on post\-training methods that update model parameters, such as supervised fine\-tuning or reinforcement learning\([Shao et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib41);[Lambert et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib42)\)\. Although effective, these methods require substantial computational resources, motivating recent work to keep model parameters frozen and instead optimize continuous inputs or internal representations at inference time\([Hu et al\. 2025b](https://arxiv.org/html/2609.11393#bib.bib25)\)\.

One effective paradigm is to optimize a small set of continuous variables, including soft prompts, steering vectors, and latent representations, to guide a frozen LLM toward task\-specific reasoning states\([Xu et al\. 2025b](https://arxiv.org/html/2609.11393#bib.bib4);[Li et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib2);[Sinii et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib30)\)\. These approaches differ mainly in the source of their optimization signals\. Some rely on external verifiers or reward models to score answers or reasoning trajectories\([Khalifa et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib12);[Nguyen and Le 2026](https://arxiv.org/html/2609.11393#bib.bib46)\), whereas verifier\-free methods use the model’s output entropy as an intrinsic confidence signal\([Ye et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib3)\)\.

However, entropy\-based test\-time optimization assumes that an LLM is more likely to answer correctly when its predictive entropy is lower during reasoning\([Agarwal et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib36)\)\. This assumption can fail on complex reasoning tasks, where LLMs can be poorly calibrated and remain highly confident along incorrect reasoning trajectories\([Jurayj et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib43);[Huang et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib44)\)\. When confidence is the only test\-time objective, entropy minimization cannot distinguish high confidence associated with reliable reasoning from spurious confidence along an incorrect trajectory, potentially steering the model toward a locally fragile high\-confidence state\([Chen et al\. 2026a](https://arxiv.org/html/2609.11393#bib.bib28);[Zhao et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib27)\)\.

![Refer to caption](https://arxiv.org/html/2609.11393v1/intro2.png)Figure 1:Comparison of confidence\-only and stability\-aware optimization under prefix perturbations across trajectories yielding correct and incorrect answers\.How can we guide an LLM toward a high\-confidence state that supports reliable reasoning? Inspired by the connection between flat minima and generalization\([Keskar et al\. 2016](https://arxiv.org/html/2609.11393#bib.bib31)\), we examine the local stability of high\-confidence states\. Specifically, high confidence that remains stable under local perturbations to the steering variable is more likely to stem from reliable reasoning than from a fragile overconfident state \(Fig\.[1](https://arxiv.org/html/2609.11393#Sx1.F1)\)\. We measure this stability using trajectory\-level confidence variance\. As shown in Fig\.[2](https://arxiv.org/html/2609.11393#Sx1.F2), the low\-variance group consistently achieves higher answer accuracy than the high\-variance group across representative models from three families\. Further analysis shows that the low\-variance group remains more accurate among queries with comparable mean confidence \(see Appendix B for details\)\. Together, these results suggest that local stability complements confidence magnitude in characterizing reasoning reliability\.

Figure 2:Answer accuracy for low\- and high\-variance query groups defined by the median trajectory\-confidence variance\.Guided by this observation, we propose Test\-Time Adaptation via Stability\-Aware Confidence Optimization \(TASCO\), a label\-free framework for guiding frozen LLMs toward reliable high\-confidence reasoning\. Concretely, TASCO optimizes a task\-level prefix shared across unlabeled test queries to stabilize confidence during reasoning\. Once optimized, this prefix is prepended to each query embedding, thereby steering the frozen model throughout trace generation\. Since local stability of reasoning confidence can manifest as either variation across nearby perturbed prefixes or sensitivity to the most adversely perturbed prefix, TASCO operationalizes it using two complementary strategies: Random Perturbation measures distributional stability through confidence variation across trajectories independently decoded under Gaussian\-perturbed prefixes, while Sharpness\-Aware Perturbation targets worst\-case local sensitivity by applying a single gradient\-guided perturbation along the most sensitive direction in the prefix space for the current trajectory\. By optimizing the prefix with these two schemes, TASCO improves accuracy by up to 17\.2% while generating up to 28\.1% fewer tokens across diverse LLMs and reasoning benchmarks\. Behavioral analyses show TASCO promotes stable confidence under local perturbations without prematurely narrowing reasoning directions\. The learned prefix improves reasoning on unseen datasets without further optimization\.

Our contributions are summarized as follows:

- •We introduce a stability\-aware perspective on confidence\-driven test\-time optimization, identifying local stability as a complementary signal for assessing the reliability of high\-confidence reasoning\.
- •We propose TASCO, a label\-free framework that uses two alternative perturbation strategies to guide frozen LLMs toward high\-confidence states that remain stable under local perturbations\. We further characterize how both strategies control local prefix sensitivity\.
- •Extensive experiments across diverse LLMs and reasoning benchmarks demonstrate that TASCO improves reasoning accuracy and efficiency while promoting stable confidence under local perturbations\.

## Related Work

### Reasoning in Large Language Models

Chain\-of\-thought \(CoT\) prompting\([Wei et al\. 2022](https://arxiv.org/html/2609.11393#bib.bib17)\)improves LLM reasoning by eliciting explicit intermediate steps\. Building on this paradigm, subsequent methods enhance reasoning through trajectory aggregation\([Wang et al\. 2022](https://arxiv.org/html/2609.11393#bib.bib13)\), structured search\([Yao et al\. 2023](https://arxiv.org/html/2609.11393#bib.bib19)\), and step\-level verification\([Zhang et al\. 2025b](https://arxiv.org/html/2609.11393#bib.bib18)\)\. Reasoning models further extend explicit CoT by performing longer inference\-time deliberation\([Chen et al\. 2026b](https://arxiv.org/html/2609.11393#bib.bib20)\)\. In parallel, continuous reasoning methods move part of the intermediate computation from token space into latent space\. COCONUT\([Hao et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib1)\)and CODI\([Shen et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib21)\), for example, replace explicit reasoning tokens with latent states, while SoftCoT\([Xu et al\. 2025b](https://arxiv.org/html/2609.11393#bib.bib4)\)and SemCoT\([He et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib22)\)use auxiliary modules to construct continuous rationales that are subsequently aligned with and injected into the target model\([Wei et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib23)\)\. Together, these methods establish latent states as an interface for steering reasoning without backbone updates\.

### Test\-Time Adaptation for Reasoning

Test\-time adaptation improves LLM reasoning using inference\-time signals\. TTRL\([Zuo et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib14)\)derives majority\-vote pseudo\-rewards from rollouts\. Entropy\-based approaches either use negative token entropy for policy optimization\([Prabhudesai et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib16)\)or minimize output entropy to adapt model parameters on unlabeled samples\([Gao et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib15)\)\. Such updates add computation and risk catastrophic forgetting\([Hu et al\. 2025a](https://arxiv.org/html/2609.11393#bib.bib24)\)\. Recent methods instead optimize continuous variables while freezing the model\. Some rely on external verifiers or reward models to guide intermediate reasoning states\([Han et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib37);[Chen et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib29)\), whereas others use model\-derived entropy to optimize continuous vectors\([Kang et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib26);[Ye et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib3)\)\. MTI selectively guides high\-entropy tokens during decoding\([Yang et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib45)\)\. However, confidence\-driven methods rarely assess whether the resulting states are reliable, despite evidence that LLM confidence can be misaligned with correctness\([Agarwal et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib36)\)\. Perturbation\-based studies instead use sensitivity diagnostically: CCPS predicts answer correctness from changes in hidden representations\([Khanmohammadi et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib32)\), while Wen et al\. identify uncertain reasoning steps through embedding perturbations\([Wen et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib33)\)\. Unlike these approaches, TASCO optimizes local stability to promote reliable reasoning\.

![Refer to caption](https://arxiv.org/html/2609.11393v1/framework1.png)Figure 3:Overview of TASCO\. TASCO optimizes a shared prefix for confidence and stability\. Random Perturbation penalizes local confidence variance, while Sharpness\-Aware Perturbation targets worst\-case sensitivity\.

## Method

In this section, we present TASCO, a stability\-aware framework that optimizes a continuous prefix at test time while keeping the LLM frozen\. We first formulate the optimization problem and define the confidence objective\. We then introduce two alternative strategies for characterizing local stability from distributional and worst\-case perspectives\. We further analyze how these strategies guide confidence optimization\. Figure[3](https://arxiv.org/html/2609.11393#Sx2.F3)provides an overview of TASCO\.

### Preliminaries

##### Problem Formulation\.

LetMθM\_\{\\theta\}denote a pretrained LLM with frozen parametersθ\\theta, and let𝒟test=\{X1,…,XN\}\\mathcal\{D\}\_\{\\mathrm\{test\}\}=\\\{X\_\{1\},\\dots,X\_\{N\}\\\}be an unlabeled test set\. Our goal is to improve the reasoning performance ofMθM\_\{\\theta\}on𝒟test\\mathcal\{D\}\_\{\\mathrm\{test\}\}without updating its parameters\. To this end, we optimize a shared continuous prefixV∈ℝL×dV\\in\\mathbb\{R\}^\{L\\times d\}\. Here,LLanddddenote the prefix length and embedding dimension\. Given a queryXXwith token embeddingsE⁡\(X\)E\(X\), we prependVVto form the prefix\-conditioned inputE′​\(X\)=\[V;E⁡\(X\)\]E^\{\\prime\}\(X\)=\[V;E\(X\)\], using\[⋅;⋅\]\[\\cdot;\\cdot\]to denote concatenation along the sequence dimension\. The frozen model then autoregressively generates a reasoning trajectoryY=\(y1,…,yT\)Y=\(y\_\{1\},\\dots,y\_\{T\}\)\. At decoding steptt, its next\-token distribution ispθ\(⋅∣E′\(X\),y<t\)p\_\{\\theta\}\(\\cdot\\mid E^\{\\prime\}\(X\),y\_\{<t\}\)\. TASCO optimizesVVusing only label\-free signals derived fromMθM\_\{\\theta\}, without external supervision or auxiliary models\.

##### Confidence Objective\.

We use predictive entropy as a label\-free confidence signal\. For a generated trajectoryY=\(y1,…,yT\)Y=\(y\_\{1\},\\dots,y\_\{T\}\), the confidence loss is defined as the average token\-level entropy:

ℒconf\(V;X,Y\)=1T∑t=1TH\(pθ\(⋅∣E′\(X\),y<t\)\),\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(V;X,Y\)=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}H\\left\(p\_\{\\theta\}\(\\cdot\\mid E^\{\\prime\}\(X\),y\_\{<t\}\)\\right\),\(1\)whereH\(p\)=−∑w∈𝒱p\(w\)logp\(w\)H\(p\)=\-\\sum\_\{w\\in\\mathcal\{V\}\}p\(w\)\\log p\(w\)denotes the entropy over the vocabulary𝒱\\mathcal\{V\}\. In practice, we compute this loss using one generated trajectory per input and treat the generated tokens as fixed\.

### Confidence Optimization with Local Stability

Although entropy minimization offers a label\-free objective for prefix optimization, it may steer the prefix toward a locally fragile high\-confidence state\. TASCO therefore introduces two local\-stability strategies: \(1\) Random Perturbation for distributional stability and \(2\) Sharpness\-Aware Perturbation for worst\-case directional stability\.

#### Random Perturbation\.

We promote distributional stability by examining reasoning trajectories decoded under nearby prefixes\. At each optimization step, we drawKKGaussian perturbations around the current prefix:

V\(k\)=V\+ϵ\(k\),ϵ\(k\)∼𝒩⁡\(0,σ2​I\),V^\{\(k\)\}=V\+\\epsilon^\{\(k\)\},\\quad\\epsilon^\{\(k\)\}\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\),\(2\)whereσ\\sigmais the standard deviation of the Gaussian noise applied to each prefix element\. For each inputXX, the model greedily decodes a trajectoryY\(k\)Y^\{\(k\)\}under every perturbed prefixV\(k\)V^\{\(k\)\}\. We summarize each rollout by the average log\-likelihood of its generated tokens:

c\(k\)=1Tk​∑t=1Tklog⁡pθ​\(yt\(k\)∣E′\(k\)​\(X\),y<t\(k\)\)\.c^\{\(k\)\}=\\frac\{1\}\{T\_\{k\}\}\\sum\_\{t=1\}^\{T\_\{k\}\}\\log p\_\{\\theta\}\\left\(y\_\{t\}^\{\(k\)\}\\mid E^\{\\prime\(k\)\}\(X\),y\_\{<t\}^\{\(k\)\}\\right\)\.\(3\)
Variation in\{c\(k\)\}k=1K\\\{c^\{\(k\)\}\\\}\_\{k=1\}^\{K\}reflects local behavioral instability and may capture trajectory switching because each perturbed prefix is re\-decoded\. We quantify the behavioral sharpness ofVVonXXby the sample variance:

𝒮⁡\(V,X\)=1K−1​∑k=1K\(c\(k\)−c¯\)2,c¯=1K​∑k=1Kc\(k\)\.\\mathcal\{S\}\(V;X\)=\\frac\{1\}\{K\-1\}\\sum\_\{k=1\}^\{K\}\\left\(c^\{\(k\)\}\-\\bar\{c\}\\right\)^\{2\},\\quad\\bar\{c\}=\\frac\{1\}\{K\}\\sum\_\{k=1\}^\{K\}c^\{\(k\)\}\.\(4\)For a mini\-batchℬ\\mathcal\{B\}, the random\-perturbation regularizer is obtained by averaging this quantity across inputs,ℒrand​\(V\)=\|ℬ\|−1​∑X∈ℬ𝒮⁡\(V,X\)\\mathcal\{L\}\_\{\\mathrm\{rand\}\}\(V\)=\|\\mathcal\{B\}\|^\{\-1\}\\sum\_\{X\\in\\mathcal\{B\}\}\\mathcal\{S\}\(V;X\)\. Combining it with the batch\-averaged confidence loss gives:

ℒRP=ℒconf​\(V\)\+λrand​ℒrand​\(V\),\\mathcal\{L\}\_\{\\mathrm\{RP\}\}=\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(V\)\+\\lambda\_\{\\mathrm\{rand\}\}\\mathcal\{L\}\_\{\\mathrm\{rand\}\}\(V\),\(5\)whereλrand\\lambda\_\{\\mathrm\{rand\}\}balances predictive confidence and local stability\. Thus,ℒconf\\mathcal\{L\}\_\{\\mathrm\{conf\}\}encourages low predictive entropy, whereasℒrand\\mathcal\{L\}\_\{\\mathrm\{rand\}\}reduces behavioral variation across nearby prefixes\.

#### Sharpness\-Aware Perturbation\.

Unlike Random Perturbation, Sharpness\-Aware Perturbation avoids generating multiple trajectories by constructing a single gradient\-guided perturbation\. At each update, we fix the trajectoryYYdecoded underVVwhile minimizing the worst\-case confidence loss:

minV⁡max‖ϵ‖F≤ρ​ℒconf​\(V\+ϵ,X,Y\),\\min\_\{V\}\\max\_\{\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\}\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(V\+\\epsilon;X,Y\),\(6\)whereρ\\rhodefines the perturbation radius under the Frobenius norm\. Since the inner maximization in Eq\.[6](https://arxiv.org/html/2609.11393#Sx3.E6)is generally intractable, we use a first\-order approximation of the confidence loss aroundVV, based on

g=∇Vℒconf​\(V,X,Y\)\.g=\\nabla\_\{V\}\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(V;X,Y\)\.\(7\)
The linearized inner problem yields the following worst\-case perturbation and perturbed prefix:

V^=V\+ϵ⋆,ϵ⋆=ρ​g‖g‖F,\\widehat\{V\}=V\+\\epsilon^\{\\star\},\\quad\\epsilon^\{\\star\}=\\rho\\frac\{g\}\{\\\|g\\\|\_\{F\}\},\(8\)whereϵ⋆\\epsilon^\{\\star\}is the perturbation along the steepest ascent direction under‖ϵ‖F≤ρ\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\. We then evaluate the confidence loss atV^\\widehat\{V\}using the same trajectoryYY:

ℒSAP=ℒconf​\(V^,X,Y\)\.\\mathcal\{L\}\_\{\\mathrm\{SAP\}\}=\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(\\widehat\{V\};X,Y\)\.\(9\)When updatingVVwithℒSAP\\mathcal\{L\}\_\{\\mathrm\{SAP\}\}, we treatϵ⋆\\epsilon^\{\\star\}as constant to avoid second\-order derivatives throughgg\.

The variants trade off neighborhood coverage and computation: Random Perturbation captures variation across sampled perturbations, whereas SAP targets worst\-case sensitivity with one gradient\-guided perturbation\. Complete algorithms appear in Appendix D\.

### Theoretical Analysis

We analyze how the two objectives control local confidence sensitivity to prefix perturbations\. Random Perturbation captures confidence variation across perturbed rollouts, whereas SAP targets worst\-case sensitivity along a fixed trajectory\.

#### Random Perturbation

Forϵ∼𝒩⁡\(0,σ2​I\)\\epsilon\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\), letZZdenote the greedy trajectory decoded underV\+ϵV\+\\epsilon, and letC=c⁡\(V\+ϵ\)C=c\(V\+\\epsilon\)denote its trajectory\-level confidence\. The sample variance in Eq\.[23](https://arxiv.org/html/2609.11393#A4.E23)is an unbiased estimator of the following population behavioral sharpness:

𝒮σ​\(V,X\)=Varϵ∼𝒩⁡\(0,σ2​I\)⁡\[c⁡\(V\+ϵ\)\]\.\\mathcal\{S\}\_\{\\sigma\}\(V;X\)=\\operatorname\{Var\}\_\{\\epsilon\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\)\}\\left\[c\(V\+\\epsilon\)\\right\]\.\(10\)Because each perturbed prefix is independently re\-decoded, the law of total variance gives:

𝒮σ​\(V,X\)=\\displaystyle\\mathcal\{S\}\_\{\\sigma\}\(V;X\)=\{\}𝔼Z​\[Var⁡\(C∣Z\)\]\+VarZ⁡\(𝔼⁡\[C∣Z\]\)\.\\displaystyle\\mathbb\{E\}\_\{Z\}\\\!\\left\[\\operatorname\{Var\}\(C\\mid Z\)\\right\]\+\\operatorname\{Var\}\_\{Z\}\\\!\\left\(\\mathbb\{E\}\[C\\mid Z\]\\right\)\.\(11\)The first term captures variation among perturbations yielding the same trajectory, whereas the second captures variation in mean confidence across decoded trajectories, without differentiating through decoding\.

For the within\-trajectory term, consider a local neighborhood in which greedy decoding remainsYY, and letfY​\(V\)f\_\{Y\}\(V\)denote the teacher\-forced confidence ofYYin Eq\.[22](https://arxiv.org/html/2609.11393#A4.E22)\. IffYf\_\{Y\}is sufficiently smooth, then, asσ→0\\sigma\\to 0:

Varϵ⁡\[fY​\(V\+ϵ\)\]=σ2​‖∇VfY​\(V\)‖F2\+𝒪⁡\(σ4\)\.\\operatorname\{Var\}\_\{\\epsilon\}\[f\_\{Y\}\(V\+\\epsilon\)\]=\\sigma^\{2\}\\\|\\nabla\_\{V\}f\_\{Y\}\(V\)\\\|\_\{F\}^\{2\}\+\\mathcal\{O\}\(\\sigma^\{4\}\)\.\(12\)Thus, away from stationary points, Random Perturbation penalizes first\-order confidence sensitivity to isotropic perturbations\. At a stationary point offYf\_\{Y\}, the corresponding expansion is:

Varϵ⁡\[fY​\(V\+ϵ\)\]=σ42​‖∇V2fY​\(V\)‖F2\+o⁡\(σ4\)\.\\operatorname\{Var\}\_\{\\epsilon\}\[f\_\{Y\}\(V\+\\epsilon\)\]=\\frac\{\\sigma^\{4\}\}\{2\}\\\|\\nabla\_\{V\}^\{2\}f\_\{Y\}\(V\)\\\|\_\{F\}^\{2\}\+o\(\\sigma^\{4\}\)\.\(13\)The latter reflects aggregate local curvature, while Eq\.[11](https://arxiv.org/html/2609.11393#Sx3.E11)additionally captures between\-trajectory variation\.

#### Sharpness\-Aware Perturbation

For a trajectoryYYheld fixed within an update, defineℓ⁡\(V\)=ℒconf​\(V,X,Y\)\\ell\(V\)=\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(V;X,Y\)\. Its worst\-case local increase over a Frobeniusρ\\rho\-ball is:

Δρ​\(V\)=max‖ϵ‖F≤ρ⁡\[ℓ⁡\(V\+ϵ\)−ℓ⁡\(V\)\]\.\\Delta\_\{\\rho\}\(V\)=\\max\_\{\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\}\\left\[\\ell\(V\+\\epsilon\)\-\\ell\(V\)\\right\]\.\(14\)Assume thatℓ\\ellhas aβ\\beta\-Lipschitz\-continuous gradient on this ball, and letg=∇Vℓ​\(V\)g=\\nabla\_\{V\}\\ell\(V\)\. Then:

\|Δρ​\(V\)−ρ​‖g‖F\|≤β​ρ22\.\\left\|\\Delta\_\{\\rho\}\(V\)\-\\rho\\\|g\\\|\_\{F\}\\right\|\\leq\\frac\{\\beta\\rho^\{2\}\}\{2\}\.\(15\)Thus, the gradient norm provides a first\-order approximation to the worst\-case local increase\. Forg≠0g\\neq 0, the perturbationϵ⋆\\epsilon^\{\\star\}in Eq\.[8](https://arxiv.org/html/2609.11393#Sx3.E8)satisfies:

\|ℓ⁡\(V\+ϵ⋆\)−ℓ⁡\(V\)−ρ​‖g‖F\|≤β​ρ22\.\\left\|\\ell\(V\+\\epsilon^\{\\star\}\)\-\\ell\(V\)\-\\rho\\\|g\\\|\_\{F\}\\right\|\\leq\\frac\{\\beta\\rho^\{2\}\}\{2\}\.\(16\)Together, Eqs\.[15](https://arxiv.org/html/2609.11393#Sx3.E15)and[16](https://arxiv.org/html/2609.11393#Sx3.E16)show that the induced increaseℓ⁡\(V\+ϵ⋆\)−ℓ⁡\(V\)\\ell\(V\+\\epsilon^\{\\star\}\)\-\\ell\(V\)approximatesΔρ​\(V\)\\Delta\_\{\\rho\}\(V\)with𝒪⁡\(ρ2\)\\mathcal\{O\}\(\\rho^\{2\}\)error\.

Separately, ifVVis a stationary point andℓ\\ellis twice continuously differentiable in a neighborhood ofVV, the ideal inner problem admits the following expansion asρ→0\\rho\\to 0:

Δρ​\(V\)=ρ22​\[λmax​\(∇V2ℓ​\(V\)\)\]\+\+o⁡\(ρ2\),\\Delta\_\{\\rho\}\(V\)=\\frac\{\\rho^\{2\}\}\{2\}\\left\[\\lambda\_\{\\max\}\\\!\\left\(\\nabla\_\{V\}^\{2\}\\ell\(V\)\\right\)\\right\]\_\{\+\}\+o\(\\rho^\{2\}\),\(17\)where\[a\]\+=max⁡\(a,0\)\[a\]\_\{\+\}=\\max\(a,0\)\. Thus, the leading term of the ideal worst\-case increase is governed by the largest positive local curvature\.

Together, the two objectives control local confidence sensitivity under sampled and worst\-case perturbations\. These results characterize robustness rather than correctness; the empirical relationship between stability and answer accuracy is examined in Appendix B\.

## Experiments

Table 1:Main performance comparison across three models and five reasoning benchmarks \(accuracy, %\)\.Δ\\Deltadenotes the absolute percentage\-point change relative to Zero\-Shot CoT\. Best results are inbold; second\-best results areunderlined\.### Experimental Setup

##### Models\.

We evaluate TASCO on five open\-source LLMs covering both general and reasoning models\. General LLMs include Qwen2\.5\-Math\([Yang et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib34)\)in two sizes \(1\.5B and 7B\) and LLaMA3\.1\-8B\-Instruct\([Grattafiori et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib35)\)\. Reasoning LLMs include DeepSeek\-R1\-Distill\-Qwen in two sizes \(1\.5B and 7B\)\([Guo et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib6)\)\.

##### Datasets\.

We evaluate on six reasoning benchmarks\. For mathematics, we use MATH\-500\([Hendrycks et al\. 2021](https://arxiv.org/html/2609.11393#bib.bib7)\), AMC23, AIME24\([Li et al\. 2024](https://arxiv.org/html/2609.11393#bib.bib9)\), and AIME25\([Balunovic et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib10)\), spanning high\-school to olympiad\-level problems\. For science, we use Minerva Math\([Lewkowycz et al\. 2022](https://arxiv.org/html/2609.11393#bib.bib8)\), with undergraduate\-level STEM problems, and GPQA Diamond\([Rein et al\. 2023](https://arxiv.org/html/2609.11393#bib.bib11)\), with graduate\-level questions written by domain experts\.

##### Baselines\.

For general LLMs, we include CoT\([Wei et al\. 2022](https://arxiv.org/html/2609.11393#bib.bib17)\)as the standard prompting baseline\. We compare with SLOT\([Hu et al\. 2025b](https://arxiv.org/html/2609.11393#bib.bib25)\)and LatentSeek\([Li et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib2)\), which perform test\-time adaptation through final\-layer or latent representations\. We also compare with LTPO\([Ye et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib3)\)and TTSV\([Kang et al\. 2026](https://arxiv.org/html/2609.11393#bib.bib26)\), which optimize continuous latent variables using model\-internal confidence signals while keeping the backbone frozen\. For reasoning LLMs, we compare with s1\([Muennighoff et al\. 2025](https://arxiv.org/html/2609.11393#bib.bib38)\), CoD\([Xu et al\. 2025a](https://arxiv.org/html/2609.11393#bib.bib39)\), andα​1\\alpha 1\([Zhang et al\. 2025a](https://arxiv.org/html/2609.11393#bib.bib40)\), which control reasoning behavior at test time\.

##### Implementation Details\.

For general LLMs, we use a shared prefix of lengthL=20L=20and a maximum generation length of 3,072 tokens\. For reasoning\-enhanced LLMs, we useL=10L=10and allow up to 8,192 tokens for longer reasoning traces\. We optimize the prefix using AdamW with a batch size of 16\. Random Perturbation usesK=8K=8perturbed rollouts withσ=0\.01\\sigma=0\.01, while Sharpness\-Aware Perturbation uses a perturbation radius ofρ=0\.8\\rho=0\.8\. We further analyze sensitivity toσ\\sigmaandρ\\rho\. All experiments run on a single NVIDIA A800 GPU\. More details are provided in Appendix A\.

##### Evaluation\.

We report accuracy on all benchmarks\. For mathematical reasoning benchmarks, we extract the final answer and determine correctness using dataset\-specific normalization and equivalence rules\. For AMC23 and AIME24, we independently sample eight responses for each problem and report the mean accuracy across the 8 generations\.

### Main Results

Tables[1](https://arxiv.org/html/2609.11393#Sx4.T1)and[2](https://arxiv.org/html/2609.11393#Sx4.T2)compare TASCO with baselines on general and reasoning\-enhanced LLMs, respectively, showing accuracy gains across both model types\. Furthermore, steering the model toward high\-confidence reasoning states yields shorter outputs, improving token efficiency\.

##### Performance Improvement\.

Tables[1](https://arxiv.org/html/2609.11393#Sx4.T1)and[2](https://arxiv.org/html/2609.11393#Sx4.T2)show TASCO improves both general and reasoning\-enhanced LLMs\. On Qwen2\.5\-Math\-1\.5B and Qwen2\.5\-Math\-7B, TASCO raises average accuracy from 22\.0% to 36\.8% and from 31\.2% to 48\.4%, gains of 14\.8 and 17\.2 percentage points over Zero\-Shot CoT\. TASCO further outperforms TTSV by 2\.9 and 4\.8 points, respectively\. TASCO also improves LLaMA3\.1\-8B\-Instruct from 26\.0% to 29\.7%, demonstrating applicability beyond Qwen\. On reasoning\-enhanced models, TASCO improves the four\-benchmark average from 45\.8% to 52\.6% on DeepSeek\-R1\-Distill\-Qwen\-1\.5B and from 59\.5% to 65\.5% on DeepSeek\-R1\-Distill\-Qwen\-7B, gains of 6\.8 and 6\.0 percentage points\. It surpasses the strongest reasoning\-control baseline by 4\.3 and 2\.5 points, respectively\. Overall, incorporating local stability into confidence optimization improves test\-time reasoning across model families and reasoning paradigms\.

Figure 4:Accuracy\-token trade\-off across general LLMs, averaged over all benchmarks\.Figure 5:Impact of optimized prefixes on MATH500 and Minerva\. The results indicate that the gains of TASCO come from learning stability\-aware task\-level prefixes rather than simply adding extra prefix positions\.
##### Token Efficiency\.

TASCO also improves token efficiency\. Figure[4](https://arxiv.org/html/2609.11393#Sx4.F4)shows that TASCO\-R and TASCO\-S reduce average generation length by 28\.1% and 24\.0%, respectively, across general LLMs compared with CoT\. Similar gains on reasoning\-enhanced LLMs are reported in Appendix E\. These reductions lower inference cost and suggest that TASCO improves accuracy without requiring longer reasoning traces\. Instead, the optimized prefix promotes concise, reliable reasoning while improving accuracy\.

Table 2:Evaluation on reasoning\-enhanced LLMs using DeepSeek\-R1\-Distill models as backbones\. TASCO results are obtained with the TASCO\-SAP variant\.

### Analyses of TASCO

##### Ablation of Prefix Optimization\.

We exam whether TASCO’s gains arise from using local stability to improve confidence\-guided reasoning\. CoT\-Unk and Confidence Only test whether additional prefix positions or confidence optimization alone suffice\. Perturbed Confidence uses the sameKKtrajectories as TASCO\-RP but removes the stability objective, isolating additional rollout computation; Stability Only removes the confidence objective, testing whether stability regularization alone explains the gains\. As shown in Fig\.[5](https://arxiv.org/html/2609.11393#Sx4.F5), TASCO\-RP outperforms both controlled variants\. Together with the improvements of both TASCO variants over Confidence Only, these results show that the gains arise neither from additional computation nor from stability regularization in isolation, but from using local stability to guide optimization toward reliable high\-confidence reasoning\.

##### Behavioral Effects of Stability\-Aware Optimization\.

We examine how TASCO affects local robustness and confidence formation on Qwen2\.5\-Math\-7B\. To assess local robustness, we add Gaussian noise withσ=0\.01\\sigma=0\.01to each learned prefix and generateK=8K=8perturbed rollouts per input\. As shown in Table[3](https://arxiv.org/html/2609.11393#Sx4.T3), confidence\-only optimization produces higher trajectory\-confidence variance and lower answer consistency across datasets, whereas TASCO reduces this variation and improves consistency\. We further analyze confidence formation on MATH500 by tracking the mean next\-token entropy and top\-1 probability over the first5%5\\%of decoding steps\. Figure[7](https://arxiv.org/html/2609.11393#Sx4.F7)shows that confidence\-only optimization rapidly concentrates probability mass early in generation, whereas TASCO retains higher entropy and lower top\-1 probability before the gap narrows later\. Together, these results show that TASCO produces reasoning behavior that is more stable under local perturbations and less prone to premature confidence concentration\.

Table 3:Local stability under prefix perturbations on Qwen2\.5\-Math\-7B\. Lower variance and higher consistency indicate more stable reasoning behavior\.Figure 6:Cross\-distribution generalization of TASCO on Qwen2\.5\-Math\-7B, measured by accuracy gains over Zero\-Shot CoT\.Figure 7:Mean next\-token entropy \(left\) and top\-1 probability \(right\) over the first5%5\\%of decoding steps for Qwen2\.5\-Math\-7B on MATH500\.
##### Analysis of Cross\-Distribution Generalization\.

To assess the transferability of the guidance learned by TASCO, we optimize a prefix on one source benchmark and directly apply it to target benchmarks without re\-optimization\. As shown in Fig\.[6](https://arxiv.org/html/2609.11393#Sx4.F6), the transferred prefixes consistently outperform Zero\-Shot CoT across all evaluated source\-target pairs, indicating that the learned guidance is not confined to its optimization distribution\. This transferability stems from TASCO’s stability\-aware objective: by promoting confidence that remains stable under local perturbations, TASCO guides the model to learn reliable reasoning patterns shared across mathematical tasks rather than merely increasing confidence on the source distribution\.

##### Performance Across Query Difficulty\.

We first estimate query difficulty from eight responses sampled by the unadapted model: queries answered correctly 0–2, 3–5, and 6–8 times are categorized as hard, medium, and easy, respectively\. The resulting groups contain 195, 130, and 175 queries for Qwen2\.5\-Math\-7B and 216, 92, and 192 queries for LLaMA3\.1\-8B\-Instruct\. We then compare TASCO with confidence\-only optimization within the same groups\. As shown in Table[4](https://arxiv.org/html/2609.11393#Sx4.T4), TASCO yields clear gains on hard and medium queries across both models while maintaining comparable performance on easy queries\. These results suggest that TASCO does more than reinforce solutions the model already finds easy; it learns reasoning guidance that supports more reliable reasoning on challenging problems\.

Table 4:Accuracy \(%\) of confidence\-only optimization and TASCO\-RP across MATH500 difficulty groups\.
##### Sensitivity to Perturbation Scale\.

We evaluate sensitivity to the perturbation scale on Qwen2\.5\-Math\-1\.5B with MATH500\. For Random Perturbation, we vary the Gaussian scaleσ\\sigma; for Sharpness\-Aware Perturbation, we vary the radiusρ\\rho, while fixing all other settings\. Figure[8](https://arxiv.org/html/2609.11393#Sx4.F8)shows that both variants outperform confidence\-only optimization across a broad range of nonzero scales\. Accuracy peaks near the selected defaults and decreases only when the perturbation becomes excessively large, indicating that TASCO does not rely on narrow hyperparameter tuning\. Additional sensitivity analyses are provided in Appendix E\.

Figure 8:Sensitivity of TASCO to the perturbation scale on Qwen2\.5\-Math\-1\.5B with MATH500\.

## Conclusion

We observed that high\-confidence reasoning is more likely to yield correct answers when it remains stable under local perturbations\. Based on this observation, we proposed TASCO, a label\-free framework that optimizes a shared task\-level prefix for confidence and stability while keeping the LLM frozen\. Random Perturbation captures distributional variation across nearby behaviors, whereas Sharpness\-Aware Perturbation targets worst\-case local sensitivity\. Experiments across diverse LLMs and reasoning benchmarks show that stability\-aware confidence optimization improves reasoning accuracy and generation efficiency without parameter updates or external supervision\.

## References

- Agarwalet al\.\(2026\)S\. Agarwal, Z\. Zhang, L\. Yuan, J\. Han, and H\. PengThe unreasonable effectiveness of entropy minimization in llm reasoning\.Advances in Neural Information Processing Systems38,pp\. 107150–107180\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p3.1),[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Balunovicet al\.\(2026\)M\. Balunovic, J\. Dekoninck, I\. Petrov, N\. Jovanović, and M\. VechevMatharena: evaluating llms on uncontaminated math competitions\.Advances in Neural Information Processing Systems38\.Cited by:[Datasets\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px2.p1.1)\.
- Chenet al\.\(2026a\)G\. Chen, S\. Niu, D\. Chen, J\. Yang, Z\. Zhang, M\. Tan, P\. Wu, and Z\. ShenZeroSiam: an efficient asymmetry for test\-time entropy optimization without collapse\.InThe Fourteenth International Conference on Learning Representations,Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p3.1)\.
- Chenet al\.\(2026b\)Q\. Chen, L\. Qin, J\. Liu, D\. Peng, J\. Guan, P\. Wang, M\. Hu, Y\. Zhou, T\. Gao, and W\. CheTowards reasoning era: a survey of long chain\-of\-thought for reasoning large language models\.Science China Information Sciences69\(6\),pp\. 161101\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Chenet al\.\(2025\)R\. Chen, Z\. Zhang, J\. Hong, S\. Kundu, and Z\. WangSeal: steerable reasoning calibration of large language models for free\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Gaoet al\.\(2025\)Z\. Gao, L\. Chen, H\. Luo, J\. Zhou, and B\. DaiOne\-shot entropy minimization\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Grattafioriet al\.\(2024\)A\. Grattafiori, A\. Dubey, A\. Jauhri, A\. Pandey, A\. Kadian, A\. Al\-Dahle, A\. Letman, A\. Mathur, A\. Schelten, A\. Vaughan,et al\.The llama 3 herd of models\.Cited by:[Models\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px1.p1.1)\.
- Guoet al\.\(2025\)D\. Guo, D\. Yang, H\. Zhang, J\. Song, P\. Wang, Q\. Zhu, R\. Xu, R\. Zhang, S\. Ma, X\. Bi,et al\.Deepseek\-r1: incentivizing reasoning capability in llms via reinforcement learning\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p1.1),[Models\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px1.p1.1)\.
- Hanet al\.\(2026\)P\. Han, X\. Xu, K\. Xuan, P\. Song, S\. Ouyang, R\. Tian, Y\. Jiang, C\. Qian, P\. Jiang, J\. Sun,et al\.Steer2Adapt: dynamically composing steering vectors elicits efficient adaptation of llms\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Haoet al\.\(2024\)S\. Hao, S\. Sukhbaatar, D\. Su, X\. Li, Z\. Hu, J\. Weston, and Y\. TianTraining large language models to reason in a continuous latent space\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Heet al\.\(2026\)Y\. He, W\. Zheng, Y\. Zhu, Z\. Zheng, L\. Su, S\. Vasudevan, Q\. Guo, L\. Hong, and J\. LiSemCoT: accelerating chain\-of\-thought reasoning through semantically\-aligned implicit tokens\.Advances in Neural Information Processing Systems38,pp\. 43455–43485\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Hendryckset al\.\(2021\)D\. Hendrycks, C\. Burns, S\. Kadavath, A\. Arora, S\. Basart, E\. Tang, D\. Song, and J\. SteinhardtMeasuring mathematical problem solving with the math dataset\.Cited by:[Datasets\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px2.p1.1)\.
- Huet al\.\(2025a\)J\. Hu, Z\. Zhang, G\. Chen, X\. Wen, C\. Shuai, W\. Luo, B\. Xiao, Y\. Li, and M\. TanTest\-time learning for large language models\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Huet al\.\(2025b\)Y\. Hu, X\. Zhang, X\. Fang, Z\. Chen, X\. Wang, H\. Zhang, and G\. QiSlot: sample\-specific language model optimization at test\-time\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p1.1),[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Huanget al\.\(2025\)C\. Huang, L\. Huang, J\. Leng, J\. Liu, and J\. HuangEfficient test\-time scaling via self\-calibration\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p3.1)\.
- Jaechet al\.\(2024\)A\. Jaech, A\. Kalai, A\. Lerer, A\. Richardson, A\. El\-Kishky, A\. Low, A\. Helyar, A\. Madry, A\. Beutel, A\. Carney,et al\.Openai o1 system card\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p1.1)\.
- Jurayjet al\.\(2025\)W\. Jurayj, J\. Cheng, and B\. Van DurmeIs that your final answer? test\-time scaling improves selective question answering\.InProceedings of the 63rd Annual Meeting of the Association for Computational Linguistics \(Volume 2: Short Papers\),pp\. 636–644\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p3.1)\.
- Kanget al\.\(2026\)X\. Kang, D\. Shi, and L\. ChenModel whisper: steering vectors unlock large language models’ potential in test\-time\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.40,pp\. 31392–31400\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1),[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Keskaret al\.\(2016\)N\. S\. Keskar, D\. Mudigere, J\. Nocedal, M\. Smelyanskiy, and P\. T\. P\. TangOn large\-batch training for deep learning: generalization gap and sharp minima\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p4.1)\.
- Khalifaet al\.\(2025\)M\. Khalifa, R\. Agarwal, L\. Logeswaran, J\. Kim, H\. Peng, M\. Lee, H\. Lee, and L\. WangProcess reward models that think\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p2.1)\.
- Khanmohammadiet al\.\(2025\)R\. Khanmohammadi, E\. Miahi, M\. Mardikoraem, S\. Kaur, I\. Brugere, C\. Smiley, K\. S\. Thind, and M\. M\. GhassemiCalibrating llm confidence by probing perturbed representation stability\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 10459–10525\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Lambertet al\.\(2024\)N\. Lambert, J\. Morrison, V\. Pyatkin, S\. Huang, H\. Ivison, F\. Brahman, L\. J\. V\. Miranda, A\. Liu, N\. Dziri, S\. Lyu,et al\.Tulu 3: pushing frontiers in open language model post\-training\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p1.1)\.
- Lewkowyczet al\.\(2022\)A\. Lewkowycz, A\. Andreassen, D\. Dohan, E\. Dyer, H\. Michalewski, V\. Ramasesh, A\. Slone, C\. Anil, I\. Schlag, T\. Gutman\-Solo,et al\.Solving quantitative reasoning problems with language models\.Advances in neural information processing systems35,pp\. 3843–3857\.Cited by:[Datasets\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px2.p1.1)\.
- Liet al\.\(2025\)H\. Li, C\. Li, T\. Wu, X\. Zhu, Y\. Wang, Z\. Yu, E\. H\. Jiang, S\. Zhu, Z\. Jia, Y\. N\. Wu,et al\.Seek in the dark: reasoning via test\-time instance\-level policy gradient in latent space\.arXiv preprint arXiv:2505\.13308\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p2.1),[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Liet al\.\(2024\)J\. Li, E\. Beeching, L\. Tunstall, B\. Lipkin, R\. Soletskyi, S\. Huang, K\. Rasul, L\. Yu, A\. Q\. Jiang, Z\. Shen,et al\.Numinamath: the largest public dataset in ai4maths with 860k pairs of competition math problems and solutions\.Hugging Face repository13\(9\),pp\. 9\.Cited by:[Datasets\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px2.p1.1)\.
- Muennighoffet al\.\(2025\)N\. Muennighoff, Z\. Yang, W\. Shi, X\. L\. Li, L\. Fei\-Fei, H\. Hajishirzi, L\. Zettlemoyer, P\. Liang, E\. Candès, and T\. B\. HashimotoS1: simple test\-time scaling\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 20286–20332\.Cited by:[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Nguyen and Le \(2026\)T\. Nguyen and T\. LeATLAS: adaptive test\-time latent steering with external verifiers for enhancing llms reasoning\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p2.1)\.
- Prabhudesaiet al\.\(2025\)M\. Prabhudesai, L\. Chen, A\. Ippoliti, K\. Fragkiadaki, H\. Liu, and D\. PathakMaximizing confidence alone improves reasoning\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Reinet al\.\(2023\)D\. Rein, B\. L\. Hou, A\. C\. Stickland, J\. Petty, R\. Y\. Pang, J\. Dirani, J\. Michael, and S\. R\. BowmanGpqa: a graduate\-level google\-proof q&a benchmark\.Cited by:[Datasets\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px2.p1.1)\.
- Shaoet al\.\(2024\)Z\. Shao, P\. Wang, Q\. Zhu, R\. Xu, J\. Song, X\. Bi, H\. Zhang, M\. Zhang, Y\. Li, Y\. Wu,et al\.Deepseekmath: pushing the limits of mathematical reasoning in open language models\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p1.1)\.
- Shenet al\.\(2025\)Z\. Shen, H\. Yan, L\. Zhang, Z\. Hu, Y\. Du, and Y\. HeCodi: compressing chain\-of\-thought into continuous space via self\-distillation\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 677–693\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Siniiet al\.\(2025\)V\. Sinii, A\. Gorbatovski, A\. Cherepanov, B\. Shaposhnikov, N\. Balagansky, and D\. GavrilovSteering llm reasoning through bias\-only adaptation\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 9213–9222\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p2.1)\.
- Wanget al\.\(2022\)X\. Wang, J\. Wei, D\. Schuurmans, Q\. Le, E\. Chi, S\. Narang, A\. Chowdhery, and D\. ZhouSelf\-consistency improves chain of thought reasoning in language models\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Weiet al\.\(2022\)J\. Wei, X\. Wang, D\. Schuurmans, M\. Bosma, F\. Xia, E\. Chi, Q\. V\. Le, D\. Zhou,et al\.Chain\-of\-thought prompting elicits reasoning in large language models\.Advances in neural information processing systems35,pp\. 24824–24837\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1),[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Weiet al\.\(2025\)X\. Wei, X\. Liu, Y\. Zang, X\. Dong, Y\. Cao, J\. Wang, X\. Qiu, and D\. LinSIM\-cot: supervised implicit chain\-of\-thought\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Wenet al\.\(2026\)Q\. Wen, J\. Wang, Y\. Nan, P\. He, R\. Tandon, and H\. XuEmbedding perturbation may better reflect the uncertainty in llm reasoning\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Xuet al\.\(2025a\)S\. Xu, W\. Xie, L\. Zhao, and P\. HeChain of draft: thinking faster by writing less\.Cited by:[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Xuet al\.\(2025b\)Y\. Xu, X\. Guo, Z\. Zeng, and C\. MiaoSoftcot: soft chain\-of\-thought for efficient reasoning with llms\.InProceedings of the 63rd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 23336–23351\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p2.1),[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Yanget al\.\(2024\)A\. Yang, B\. Zhang, B\. Hui, B\. Gao, B\. Yu, C\. Li, D\. Liu, J\. Tu, J\. Zhou, J\. Lin,et al\.Qwen2\. 5\-math technical report: toward mathematical expert model via self\-improvement\.Cited by:[Models\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px1.p1.1)\.
- Yanget al\.\(2026\)Z\. Yang, M\. Zhang, F\. Chen, G\. Ding, L\. Hou, X\. Tao, and Y\. ChenLess is more: improving llm reasoning with minimal test\-time intervention\.InProceedings of the 64th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 20124–20137\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.
- Yaoet al\.\(2023\)S\. Yao, D\. Yu, J\. Zhao, I\. Shafran, T\. Griffiths, Y\. Cao, and K\. NarasimhanTree of thoughts: deliberate problem solving with large language models\.Advances in neural information processing systems36,pp\. 11809–11822\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Yeet al\.\(2025\)W\. Ye, Y\. Liang, and L\. ShanThinking on the fly: test\-time reasoning enhancement via latent thought policy optimization\.arXiv preprint arXiv:2510\.04182\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p2.1),[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1),[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Zhanget al\.\(2025a\)J\. Zhang, R\. Dong, H\. Wang, X\. Ning, H\. Geng, P\. Li, X\. He, Y\. Bai, J\. Malik, S\. Gupta,et al\.Alphaone: reasoning models thinking slow and fast at test time\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 11340–11365\.Cited by:[Baselines\.](https://arxiv.org/html/2609.11393#Sx4.SSx1.SSSx2.Px3.p1.1)\.
- Zhanget al\.\(2025b\)Y\. Zhang, X\. Wang, L\. Wu, and J\. WangEnhancing chain of thought prompting in large language models via reasoning patterns\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.39,pp\. 25985–25993\.Cited by:[Reasoning in Large Language Models](https://arxiv.org/html/2609.11393#Sx2.SSx1.p1.1)\.
- Zhaoet al\.\(2026\)C\. Zhao, E\. Yang, Y\. Liu, J\. Zhao, and G\. GuoECHO: entropy\-confidence hybrid optimization for test\-time reinforcement learning\.Cited by:[Introduction](https://arxiv.org/html/2609.11393#Sx1.p3.1)\.
- Zuoet al\.\(2026\)Y\. Zuo, K\. Zhang, L\. Sheng, S\. Qu, G\. Cui, X\. Zhu, H\. Li, X\. Long, E\. Hua, B\. Qi,et al\.Ttrl: test\-time reinforcement learning\.Advances in Neural Information Processing Systems38,pp\. 131459–131483\.Cited by:[Test\-Time Adaptation for Reasoning](https://arxiv.org/html/2609.11393#Sx2.SSx2.p1.1)\.

## Appendix AAppendix

## Appendix BA\. Experimental Details

This section provides the implementation details of TASCO and the compared baselines\. We first describe the prefix optimization and perturbation procedures, followed by the baseline implementations and evaluation protocol\.

Table 5:Model\-specific optimization and generation settings\. “Conf\. tokens” denotes the maximum number of generated tokens used to compute the confidence objective\.##### Optimization and Generation Settings\.

We optimize only the continuous prefixVVusing AdamW while keeping all parameters ofMθM\_\{\\theta\}frozen\. During optimization, trajectories are generated using the model\-specific temperature, top\-pp, and repetition penalty reported in Table[5](https://arxiv.org/html/2609.11393#A2.T5)\. The confidence objective is computed from at most the firstToptT\_\{\\mathrm\{opt\}\}generated tokens, reported as “Conf\. tokens\.” Final evaluation uses greedy decoding subject to the corresponding maximum generation length\.

##### Prefix Initialization\.

TASCO can be optimized directly from a freshly initialized prefix\. We use model\-family\-specific initialization\. Prefixes for Qwen\-based models, including DeepSeek\-R1\-Distill\-Qwen, are sampled from𝒩⁡\(0,I\)\\mathcal\{N\}\(0,I\)\. For LLaMA models, we first encode the unlabeled optimization set and compute the per\-dimension empirical mean and variance of the resulting token embeddings\. Each prefix vector is then sampled from the Gaussian distribution parameterized by these statistics\. Since perturbation\-based stability optimization requires additional rollouts, applying it before the prefix has been guided toward higher\-confidence reasoning may be inefficient\. In addition to direct optimization from scratch, we also support an initial confidence\-only stage of 10 epochs, followed by five epochs of TASCO optimization\. All stages use the same learning rate reported in Table[5](https://arxiv.org/html/2609.11393#A2.T5)\.

##### Perturbation Settings\.

For Random Perturbation, we drawK=8K=8Gaussian perturbations withσ=0\.01\\sigma=0\.01at each optimization step\. We set the stability weight toλrand=20\\lambda\_\{\\mathrm\{rand\}\}=20for Qwen2\.5\-Math andλrand=5\\lambda\_\{\\mathrm\{rand\}\}=5for LLaMA3\.1\-Instruct and DeepSeek\-R1\-Distill\-Qwen\. For Sharpness\-Aware Perturbation, we use a perturbation radius ofρ=0\.8\\rho=0\.8\. The two variants are optimized and evaluated separately\.

##### Trajectory Generation and Updates\.

At each optimization step, the model generates one trajectory for every input in the current mini\-batch using the current prefix\. The generated tokens are held fixed during backpropagation, and gradients are computed only with respect toVV\. New trajectories are generated after each prefix update\. Random Perturbation independently decodes a trajectory under each perturbed prefix, whereas SAP evaluates its gradient\-guided perturbation using the trajectory fixed within the current update\.

### Baseline Implementation Details

We use the official implementations and follow the configurations reported by the original authors whenever available\.

##### Chain\-of\-Thought\.

CoT elicits explicit step\-by\-step reasoning through natural\-language instructions without modifying the model\.

##### SLOT\.

SLOT adapts each test query by optimizing a sample\-specific vector added to the model’s final hidden representations\.

##### LatentSeek\.

LatentSeek uses policy gradients and self\-generated rewards to iteratively optimize instance\-specific latent reasoning representations\.

##### LTPO\.

LTPO optimizes latent thought vectors at test time using an intrinsic confidence reward while keeping the LLM frozen\.

##### TTSV\.

TTSV learns a task\-level continuous prefix by minimizing predictive entropy over the unlabeled test set\.

##### s1\.

s1 applies budget forcing to extend reasoning by inserting additionalwaittokens before the model terminates its thinking process\.

##### Chain of Draft\.

CoD encourages concise reasoning by prompting the model to express each intermediate step using only a few words\.

##### α​1\\alpha 1\.

α​1\\alpha 1controls the transition from slow to fast reasoning through a dynamically scheduledα\\alpha\-moment\.

##### Prompt Design\.

We use fixed model\-family\-specific prompt templates throughout optimization and evaluation\. Table[11](https://arxiv.org/html/2609.11393#A7.T11)provides a complete example of theqwen25\-math\-cotprompt, the embedding\-level prefix placement, and the resulting response format\. The remaining templates are included in the released implementation\.

##### Evaluation\.

For MATH500, Minerva Math, and GPQA, the main tables report results from a single run\. For AMC23 and AIME24, whose smaller test sets produce greater accuracy fluctuations, we independently run each experiment with eight random seeds and report the mean accuracy\.

## Appendix CB\. Exploring Local Confidence Stability

We investigate whether local confidence stability is associated with answer correctness and whether this relationship persists after accounting for confidence magnitude and query difficulty\. We first establish the basic association and then examine these two alternative explanations\.

### Experimental Setup\.

We conduct the analysis on the full MATH500 benchmark using five models from three families: Qwen2\.5\-Math\-1\.5B and 7B, LLaMA3\.1\-8B\-Instruct, and DeepSeek\-R1\-Distill\-Qwen\-1\.5B and 7B\. For each model, we use the final task\-level prefixVVobtained through confidence\-only optimization\. For every queryXiX\_\{i\}, we sampleK=8K=8Gaussian perturbations withσ=0\.01\\sigma=0\.01:

V\(k\)=V\+ϵ\(k\),ϵ\(k\)∼𝒩⁡\(0,σ2​I\)\.V^\{\(k\)\}=V\+\\epsilon^\{\(k\)\},\\qquad\\epsilon^\{\(k\)\}\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\)\.\(18\)Under each perturbed prefix, the model greedily decodes a trajectoryYi\(k\)Y\_\{i\}^\{\(k\)\}\. Its trajectory\-level confidence is defined as the length\-normalized log\-probability:

ci\(k\)=1Ti\(k\)​∑t=1Ti\(k\)log⁡pθ​\(yi,t\(k\)∣Xi,V\(k\),yi,<t\(k\)\),c\_\{i\}^\{\(k\)\}=\\frac\{1\}\{T\_\{i\}^\{\(k\)\}\}\\sum\_\{t=1\}^\{T\_\{i\}^\{\(k\)\}\}\\log p\_\{\\theta\}\\left\(y\_\{i,t\}^\{\(k\)\}\\mid X\_\{i\},V^\{\(k\)\},y\_\{i,<t\}^\{\(k\)\}\\right\),\(19\)whereyi,t\(k\)y\_\{i,t\}^\{\(k\)\}denotes thett\-th token inYi\(k\)Y\_\{i\}^\{\(k\)\}andTi\(k\)T\_\{i\}^\{\(k\)\}is the total sequence length\. We quantify local confidence stability using the sample variance:

𝒮i=1K−1​∑k=1K\(ci\(k\)−c¯i\)2,c¯i=1K​∑k=1Kci\(k\),\\mathcal\{S\}\_\{i\}=\\frac\{1\}\{K\-1\}\\sum\_\{k=1\}^\{K\}\\left\(c\_\{i\}^\{\(k\)\}\-\\bar\{c\}\_\{i\}\\right\)^\{2\},\\qquad\\bar\{c\}\_\{i\}=\\frac\{1\}\{K\}\\sum\_\{k=1\}^\{K\}c\_\{i\}^\{\(k\)\},\(20\)where lower𝒮i\\mathcal\{S\}\_\{i\}indicates greater local stability, andc¯i\\bar\{c\}\_\{i\}denotes the mean confidence across the perturbed trajectories\.

For each query, we additionally greedily decode a reference trajectory under the unperturbed prefixVV\. We evaluate its final answer correctness using the standard benchmark evaluator and compute its original trajectory\-level confidenceci\(0\)c\_\{i\}^\{\(0\)\}following Eq\.[19](https://arxiv.org/html/2609.11393#A3.E19)\.

### Accuracy across Stability Groups

Figure 9:Answer accuracy under the unperturbed prefix for low\- and high\-variance query groups across five models\. Groups are defined by the model\-specific median of𝒮i\\mathcal\{S\}\_\{i\}; error bars show 95% bootstrap confidence intervals, and red annotations indicate accuracy gaps\.We first examine whether local confidence stability is associated with correctness at the unperturbed prefix\. For each query, we estimate𝒮i\\mathcal\{S\}\_\{i\}from perturbed trajectories and independently evaluate correctness using a trajectory decoded under the unperturbed prefix\. We split queries at the model\-specific median of𝒮i\\mathcal\{S\}\_\{i\}and report group accuracy with 95% bootstrap confidence intervals\.

Table 6:Association between local confidence variance and unperturbed correctness\. Spearman’sρ\\rhomeasures the correlation between𝒮i\\mathcal\{S\}\_\{i\}and correctness, while AUROC uses−𝒮i\-\\mathcal\{S\}\_\{i\}to distinguish correct from incorrect answers\.As shown in Figure[9](https://arxiv.org/html/2609.11393#A3.F9), Low\-Variance queries achieve higher unperturbed accuracy across all five models, with gaps ranging from 17\.2 to 29\.0 percentage points\. This pattern holds for both general and reasoning\-enhanced LLMs\. Table[6](https://arxiv.org/html/2609.11393#A3.T6)further shows consistently negative correlations between local variance and unperturbed correctness, with AUROCs ranging from 0\.668 to 0\.745\. Importantly, stability is estimated from perturbed trajectories, whereas correctness is evaluated independently at the unperturbed prefix\. The observed separation is therefore not merely induced by measuring variance and accuracy on the same rollouts\. Instead, it suggests that neighborhood stability contains information about the reliability of the optimized prefix itself across model families\.

### Controlling for Confidence Magnitude\.

Table 7:Confidence\-controlled association between local variance and perturbation accuracy\. Gapstratis the Low\- minus High\-Variance accuracy after five\-way stratification by mean confidence\. Partial Spearman correlation controls for mean confidence continuously\.A remaining concern is that local variance may merely reflect confidence magnitude, as more confident queries may also be inherently more stable\. To separate these effects, we divide queries into five equal\-frequency strata according to their mean confidence across perturbed trajectories\. Within each stratum, we split queries at the median of𝒮i\\mathcal\{S\}\_\{i\}and compare their perturbation accuracy, thereby reducing confidence differences between the Low\- and High\-Variance groups\. We estimate confidence intervals using stratified bootstrap sampling and assess the accuracy gap with a stratified permutation test\. We additionally compute the partial Spearman correlation between local variance and perturbation accuracy while controlling for mean confidence\.

As shown in Table[7](https://arxiv.org/html/2609.11393#A3.T7), Low\-Variance queries achieve higher perturbation accuracy after confidence stratification across all five models\. The differences are statistically significant on four models, with accuracy gaps ranging from 11\.6 to 30\.5 percentage points\. Partial Spearman analysis yields the same pattern, showing significant negative correlations after controlling for mean confidence on these four models\. These results suggest that local stability generally provides reliability information beyond confidence magnitude\.

Qwen2\.5\-Math\-1\.5B is an exception, showing a non\-significant 5\.4\-point gap and a near\-zero partial correlation \(ρ=−0\.108\\rho=\-0\.108,p=0\.128p=0\.128\)\. Its local variance is strongly correlated with mean confidence \(ρ=−0\.717\\rho=\-0\.717\), suggesting that variance provides little additional information beyond confidence magnitude for this model\.

Overall, these analyses show a consistent association between local confidence stability and answer accuracy across model families\. The relationship persists among queries with comparable mean confidence and within different difficulty groups, indicating that it cannot be explained solely by confidence magnitude or easier queries\. These findings provide empirical motivation for incorporating local stability into confidence\-based test\-time optimization\. The main experiments further examine whether optimizing this signal improves reasoning performance\.

## Appendix DC\. Proofs and Additional Theoretical Analysis

The main paper presents the local\-sensitivity results for Random Perturbation and Sharpness\-Aware Perturbation\. This section restates the quantities required by the proofs, makes the assumptions explicit, and provides the complete derivations\. We distinguish behavioral confidence obtained after re\-decoding from smooth confidence evaluated on a fixed trajectory, separating variation across decoded trajectories from local variation within a fixed decoding region\.

### Setup and Assumptions

We identify the prefixV∈ℝL×dV\\in\\mathbb\{R\}^\{L\\times d\}with a vector inℝm\\mathbb\{R\}^\{m\}, wherem=L​dm=Ld\. Under this vectorization, the Euclidean norm and inner product coincide with the Frobenius norm and inner product\. For Random Perturbation, we drawKKindependent Gaussian perturbations:

V\(k\)=V\+ϵ\(k\),ϵ\(k\)∼𝒩⁡\(0,σ2​I\)\.V^\{\(k\)\}=V\+\\epsilon^\{\(k\)\},\\qquad\\epsilon^\{\(k\)\}\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\)\.\(21\)Under each perturbed prefixV\(k\)V^\{\(k\)\}, the model greedily decodes a trajectoryY\(k\)=\(y1\(k\),…,yTk\(k\)\)Y^\{\(k\)\}=\(y\_\{1\}^\{\(k\)\},\\ldots,y\_\{T\_\{k\}\}^\{\(k\)\}\)\. Following the notation in the main paper, its trajectory\-level confidence is:

c\(k\)=1Tk​∑t=1Tklog⁡pθ​\(yt\(k\)∣E′\(k\)​\(X\),y<t\(k\)\),c^\{\(k\)\}=\\frac\{1\}\{T\_\{k\}\}\\sum\_\{t=1\}^\{T\_\{k\}\}\\log p\_\{\\theta\}\\left\(y\_\{t\}^\{\(k\)\}\\mid E^\{\\prime\(k\)\}\(X\),y\_\{<t\}^\{\(k\)\}\\right\),\(22\)whereE′\(k\)​\(X\)=\[V\(k\);E⁡\(X\)\]E^\{\\prime\(k\)\}\(X\)=\[V^\{\(k\)\};E\(X\)\]denotes the input conditioned onV\(k\)V^\{\(k\)\}\. Letc¯=K−1​∑k=1Kc\(k\)\\bar\{c\}=K^\{\-1\}\\sum\_\{k=1\}^\{K\}c^\{\(k\)\}\. The Random Perturbation objective uses the sample variance:

𝒮⁡\(V,X\)=1K−1​∑k=1K\(c\(k\)−c¯\)2\.\\mathcal\{S\}\(V;X\)=\\frac\{1\}\{K\-1\}\\sum\_\{k=1\}^\{K\}\\left\(c^\{\(k\)\}\-\\bar\{c\}\\right\)^\{2\}\.\(23\)
For the population analysis, drawϵ∼𝒩⁡\(0,σ2​I\)\\epsilon\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\)\. LetZZdenote the greedy trajectory underV\+ϵV\+\\epsilon, and letC=c⁡\(V\+ϵ\)C=c\(V\+\\epsilon\)denote its trajectory\-level confidence, defined analogously to Eq\.[22](https://arxiv.org/html/2609.11393#A4.E22)\. Thus, eachc\(k\)c^\{\(k\)\}is an independent realization ofCC\. We assume that𝔼⁡\[C2\]<∞\\mathbb\{E\}\[C^\{2\}\]<\\infty\.

For the smooth within\-trajectory analysis, fix a trajectoryY=\(y1,…,yT\)Y=\(y\_\{1\},\\ldots,y\_\{T\}\)and define its teacher\-forced confidence as:

fY​\(V\)=1T​∑t=1Tlog⁡pθ​\(yt∣E′​\(X\),y<t\),f\_\{Y\}\(V\)=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\log p\_\{\\theta\}\\left\(y\_\{t\}\\mid E^\{\\prime\}\(X\),y\_\{<t\}\\right\),\(24\)whereE′​\(X\)=\[V;E⁡\(X\)\]E^\{\\prime\}\(X\)=\[V;E\(X\)\]is the prefix\-conditioned input\.

We assume thatVVis an interior point of the decoding region associated withYY: there existsr\>0r\>0such that every prefixV\+δV\+\\deltasatisfying‖δ‖F≤r\\\|\\delta\\\|\_\{F\}\\leq rgreedily decodesYY\. LetgY=∇VfY​\(V\)g\_\{Y\}=\\nabla\_\{V\}f\_\{Y\}\(V\)andHY=∇V2​fY​\(V\)H\_\{Y\}=\\nabla\_\{V\}^\{2\}f\_\{Y\}\(V\)\.

We further assume thatfYf\_\{Y\}is sufficiently smooth aroundVVso that, forU∼𝒩⁡\(0,I\)U\\sim\\mathcal\{N\}\(0,I\):

fY​\(V\+σ​U\)=\\displaystyle f\_\{Y\}\(V\+\\sigma U\)=\{\}fY​\(V\)\+σ​⟨gY,U⟩F\\displaystyle f\_\{Y\}\(V\)\+\\sigma\\langle g\_\{Y\},U\\rangle\_\{F\}\(25\)\+σ22​⟨U,HY​U⟩F\+Rσ​\(U\),\\displaystyle\+\\frac\{\\sigma^\{2\}\}\{2\}\\langle U,H\_\{Y\}U\\rangle\_\{F\}\+R\_\{\\sigma\}\(U\),where𝔼⁡\[Rσ​\(U\)2\]=𝒪⁡\(σ6\)\\mathbb\{E\}\[R\_\{\\sigma\}\(U\)^\{2\}\]=\\mathcal\{O\}\(\\sigma^\{6\}\)\. This condition follows, for example, from a locally bounded third derivative together with an integrable Taylor remainder\. Asσ→0\\sigma\\to 0, the probability that a Gaussian perturbation leaves the fixed\-decoding neighborhood decreases faster than any polynomial inσ\\sigma\. Under the same integrability condition, these tail events do not affect the polynomial orders derived below\.

For Sharpness\-Aware Perturbation, fix a trajectoryYYwithin an update and letℓ⁡\(V\)=ℒconf​\(V,X,Y\)\\ell\(V\)=\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\(V;X,Y\)denote the corresponding fixed\-trajectory confidence loss\. We assume thatℓ\\ellhas aβ\\beta\-Lipschitz\-continuous gradient on\{V\+ϵ:‖ϵ‖F≤ρ\}\\\{V\+\\epsilon:\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\\\}\. The stationary\-point result additionally assumes thatℓ\\ellis twice continuously differentiable in a neighborhood ofVV\.

### Random Perturbation

##### Proposition 1 \(Population behavioral sharpness\)\.

LetC1,…,CKC\_\{1\},\\ldots,C\_\{K\}be the trajectory\-level confidences induced byKKindependent Gaussian perturbations, and let𝒮⁡\(V,X\)\\mathcal\{S\}\(V;X\)be their sample variance in Eq\.[23](https://arxiv.org/html/2609.11393#A4.E23)\. Then:

𝔼⁡\[𝒮⁡\(V,X\)\]=𝒮σ​\(V,X\)=Varϵ∼𝒩⁡\(0,σ2​I\)⁡\[C\]\.\\mathbb\{E\}\\\!\\left\[\\mathcal\{S\}\(V;X\)\\right\]=\\mathcal\{S\}\_\{\\sigma\}\(V;X\)=\\operatorname\{Var\}\_\{\\epsilon\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\)\}\[C\]\.\(26\)Moreover, the population sharpness satisfies:

𝒮σ​\(V,X\)=𝔼Z​\[Var⁡\(C∣Z\)\]\+VarZ⁡\(𝔼⁡\[C∣Z\]\)\.\\mathcal\{S\}\_\{\\sigma\}\(V;X\)=\\mathbb\{E\}\_\{Z\}\\\!\\left\[\\operatorname\{Var\}\(C\\mid Z\)\\right\]\+\\operatorname\{Var\}\_\{Z\}\\\!\\left\(\\mathbb\{E\}\[C\\mid Z\]\\right\)\.\(27\)

##### Proof\.

Letμ=𝔼⁡\[C\]\\mu=\\mathbb\{E\}\[C\]andC¯=K−1​∑k=1KCk\\bar\{C\}=K^\{\-1\}\\sum\_\{k=1\}^\{K\}C\_\{k\}\. The following identity holds:

∑k=1K\(Ck−C¯\)2=∑k=1K\(Ck−μ\)2−K​\(C¯−μ\)2\.\\sum\_\{k=1\}^\{K\}\(C\_\{k\}\-\\bar\{C\}\)^\{2\}=\\sum\_\{k=1\}^\{K\}\(C\_\{k\}\-\\mu\)^\{2\}\-K\(\\bar\{C\}\-\\mu\)^\{2\}\.\(28\)Taking expectations gives:

𝔼⁡\[∑k=1K\(Ck−C¯\)2\]\\displaystyle\\mathbb\{E\}\\\!\\left\[\\sum\_\{k=1\}^\{K\}\(C\_\{k\}\-\\bar\{C\}\)^\{2\}\\right\]=K​Var⁡\(C\)−K​Var⁡\(C¯\)\\displaystyle=K\\operatorname\{Var\}\(C\)\-K\\operatorname\{Var\}\(\\bar\{C\}\)\(29\)=\(K−1\)​Var⁡\(C\),\\displaystyle=\(K\-1\)\\operatorname\{Var\}\(C\),where independence impliesVar⁡\(C¯\)=Var⁡\(C\)/K\\operatorname\{Var\}\(\\bar\{C\}\)=\\operatorname\{Var\}\(C\)/K\. Dividing byK−1K\-1proves Eq\.[26](https://arxiv.org/html/2609.11393#A4.E26)\.

For the second result, definem⁡\(Z\)=𝔼⁡\[C∣Z\]m\(Z\)=\\mathbb\{E\}\[C\\mid Z\]\. The centered confidence decomposes as:

C−𝔼⁡\[C\]=\(C−m⁡\(Z\)\)\+\(m⁡\(Z\)−𝔼⁡\[C\]\)\.C\-\\mathbb\{E\}\[C\]=\\bigl\(C\-m\(Z\)\\bigr\)\+\\bigl\(m\(Z\)\-\\mathbb\{E\}\[C\]\\bigr\)\.\(30\)The cross term has zero expectation because𝔼⁡\[C−m⁡\(Z\)∣Z\]=0\\mathbb\{E\}\[C\-m\(Z\)\\mid Z\]=0\. Taking the expectation of the squared identity yields Eq\.[27](https://arxiv.org/html/2609.11393#A4.E27)\. This argument treatsZZas a discrete random variable and does not differentiate through decoding\.□\\square

##### Corollary 1 \(Control of large confidence deviations\)\.

For anyτ\>0\\tau\>0, Chebyshev’s inequality gives:

Pr⁡\(\|C−𝔼⁡\[C\]\|≥τ\)≤𝒮σ​\(V,X\)τ2\.\\Pr\\\!\\left\(\\left\|C\-\\mathbb\{E\}\[C\]\\right\|\\geq\\tau\\right\)\\leq\\frac\{\\mathcal\{S\}\_\{\\sigma\}\(V;X\)\}\{\\tau^\{2\}\}\.\(31\)Thus, reducing population behavioral sharpness controls the probability of large confidence deviations under the perturbation distribution\. This is a stability statement and does not by itself imply that the decoded answer is correct\.

##### Corollary 2 \(Contribution of behavioral changes\)\.

LetY0Y\_\{0\}be the trajectory decoded at the unperturbed prefix, and letϕ⁡\(Z\)\\phi\(Z\)denote a discrete behavioral descriptor of trajectoryZZ, such as its normalized final answer\. DefineB=𝟏\{ϕ\(Z\)≠ϕ\(Y0\)\}B=\\mathbf\{1\}\\\{\\phi\(Z\)\\neq\\phi\(Y\_\{0\}\)\\\}andpchg=Pr⁡\(B=1\)p\_\{\\mathrm\{chg\}\}=\\Pr\(B=1\)\. For0<pchg<10<p\_\{\\mathrm\{chg\}\}<1, define the conditional means:

μsame=𝔼⁡\[C∣B=0\],μchg=𝔼⁡\[C∣B=1\]\.\\mu\_\{\\mathrm\{same\}\}=\\mathbb\{E\}\[C\\mid B=0\],\\qquad\\mu\_\{\\mathrm\{chg\}\}=\\mathbb\{E\}\[C\\mid B=1\]\.\(32\)BecauseBBis a function ofZZ, applying the law of total variance tom⁡\(Z\)=𝔼⁡\[C∣Z\]m\(Z\)=\\mathbb\{E\}\[C\\mid Z\]gives:

VarZ⁡\(𝔼⁡\[C∣Z\]\)≥pchg​\(1−pchg\)​\(μchg−μsame\)2\.\\operatorname\{Var\}\_\{Z\}\\\!\\left\(\\mathbb\{E\}\[C\\mid Z\]\\right\)\\geq p\_\{\\mathrm\{chg\}\}\(1\-p\_\{\\mathrm\{chg\}\}\)\\left\(\\mu\_\{\\mathrm\{chg\}\}\-\\mu\_\{\\mathrm\{same\}\}\\right\)^\{2\}\.\(33\)
The right\-hand side isVarB⁡\(𝔼⁡\[C∣B\]\)\\operatorname\{Var\}\_\{B\}\\\!\\left\(\\mathbb\{E\}\[C\\mid B\]\\right\), which measures the confidence difference between the unchanged and changed groups\. Thus, the bound is informative when behavioral changes are accompanied by a shift in mean confidence\. If the two groups have identical mean confidence, it provides no information about how frequently behavior changes\.

##### Proposition 2 \(Smooth local sensitivity\)\.

Within a neighborhood where greedy decoding remainsYY, the local confidence variance satisfies the following expansion asσ→0\\sigma\\to 0:

Varϵ⁡\[fY​\(V\+ϵ\)\]=σ2​‖∇VfY​\(V\)‖F2\+𝒪⁡\(σ4\)\.\\operatorname\{Var\}\_\{\\epsilon\}\[f\_\{Y\}\(V\+\\epsilon\)\]=\\sigma^\{2\}\\\|\\nabla\_\{V\}f\_\{Y\}\(V\)\\\|\_\{F\}^\{2\}\+\\mathcal\{O\}\(\\sigma^\{4\}\)\.\(34\)If∇VfY​\(V\)=0\\nabla\_\{V\}f\_\{Y\}\(V\)=0, the corresponding expansion is:

Varϵ⁡\[fY​\(V\+ϵ\)\]=σ42​‖∇V2fY​\(V\)‖F2\+o⁡\(σ4\)\.\\operatorname\{Var\}\_\{\\epsilon\}\[f\_\{Y\}\(V\+\\epsilon\)\]=\\frac\{\\sigma^\{4\}\}\{2\}\\\|\\nabla\_\{V\}^\{2\}f\_\{Y\}\(V\)\\\|\_\{F\}^\{2\}\+o\(\\sigma^\{4\}\)\.\(35\)

##### Proof\.

Writeϵ=σ​U\\epsilon=\\sigma U, whereU∼𝒩⁡\(0,I\)U\\sim\\mathcal\{N\}\(0,I\), and abbreviateg=gYg=g\_\{Y\}andH=HYH=H\_\{Y\}\. From Eq\.[25](https://arxiv.org/html/2609.11393#A4.E25), define:

A=⟨g,U⟩F,Q=12​⟨U,H​U⟩F\.A=\\langle g,U\\rangle\_\{F\},\\qquad Q=\\frac\{1\}\{2\}\\langle U,HU\\rangle\_\{F\}\.\(36\)Then,fY​\(V\+σ​U\)=fY​\(V\)\+σ​A\+σ2​Q\+Rσ​\(U\)f\_\{Y\}\(V\+\\sigma U\)=f\_\{Y\}\(V\)\+\\sigma A\+\\sigma^\{2\}Q\+R\_\{\\sigma\}\(U\)\. The Gaussian moments satisfy:

𝔼⁡\[A\]=0,Var⁡\(A\)=‖g‖F2,Cov⁡\(A,Q\)=0\.\\mathbb\{E\}\[A\]=0,\\qquad\\operatorname\{Var\}\(A\)=\\\|g\\\|\_\{F\}^\{2\},\\qquad\\operatorname\{Cov\}\(A,Q\)=0\.\(37\)The last equality follows because every third\-order centered Gaussian moment is zero\. Moreover,Var⁡\(σ2​Q\)=𝒪⁡\(σ4\)\\operatorname\{Var\}\(\\sigma^\{2\}Q\)=\\mathcal\{O\}\(\\sigma^\{4\}\)\. By the Cauchy–Schwarz inequality and𝔼⁡\[Rσ​\(U\)2\]=𝒪⁡\(σ6\)\\mathbb\{E\}\[R\_\{\\sigma\}\(U\)^\{2\}\]=\\mathcal\{O\}\(\\sigma^\{6\}\), the remainder and its covariance terms contribute at most𝒪⁡\(σ4\)\\mathcal\{O\}\(\\sigma^\{4\}\)\. Consequently, we obtain:

Var⁡\[fY​\(V\+σ​U\)\]=σ2​‖g‖F2\+𝒪⁡\(σ4\)\.\\operatorname\{Var\}\[f\_\{Y\}\(V\+\\sigma U\)\]=\\sigma^\{2\}\\\|g\\\|\_\{F\}^\{2\}\+\\mathcal\{O\}\(\\sigma^\{4\}\)\.\(38\)This proves Eq\.[34](https://arxiv.org/html/2609.11393#A4.E34)\.

At a stationary point offYf\_\{Y\},g=0g=0, and the quadratic term becomes dominant:

Var⁡\[fY​\(V\+σ​U\)\]=σ4​Var⁡\(Q\)\+o⁡\(σ4\)\.\\operatorname\{Var\}\[f\_\{Y\}\(V\+\\sigma U\)\]=\\sigma^\{4\}\\operatorname\{Var\}\(Q\)\+o\(\\sigma^\{4\}\)\.\(39\)For a symmetric HessianHHand a standard Gaussian vectorUU, the following identities hold:

𝔼⁡\[U⊤​H​U\]=tr⁡\(H\),Var⁡\(U⊤​H​U\)=2​‖H‖F2\.\\mathbb\{E\}\[U^\{\\top\}HU\]=\\operatorname\{tr\}\(H\),\\qquad\\operatorname\{Var\}\(U^\{\\top\}HU\)=2\\\|H\\\|\_\{F\}^\{2\}\.\(40\)Therefore,Var⁡\(Q\)=12​‖H‖F2\\operatorname\{Var\}\(Q\)=\\frac\{1\}\{2\}\\\|H\\\|\_\{F\}^\{2\}, which proves Eq\.[35](https://arxiv.org/html/2609.11393#A4.E35)\.□\\square

This proposition characterizes the smooth within\-trajectory component of behavioral sharpness; variation due to trajectory switching is captured by the between\-trajectory term in Eq\.[27](https://arxiv.org/html/2609.11393#A4.E27)\.

##### Perturbation scale\.

The elementwise standard deviationσ\\sigmacorresponds to the following root\-mean\-square Frobenius radius:

𝔼⁡\[‖ϵ‖F2\]=σ​L​d\.\\sqrt\{\\mathbb\{E\}\\\!\\left\[\\\|\\epsilon\\\|\_\{F\}^\{2\}\\right\]\}=\\sigma\\sqrt\{Ld\}\.\(41\)Thus, choosingσ=ρ/L​d\\sigma=\\rho/\\sqrt\{Ld\}would match the root\-mean\-square norm of the random perturbation to the SAP radiusρ\\rho\. This relation aligns only their geometric scales and does not make the two objectives equivalent\.

### Sharpness\-Aware Perturbation

##### Proposition 3 \(First\-order worst\-case bound\)\.

Let the worst\-case local increase be:

Δρ​\(V\)=max‖ϵ‖F≤ρ⁡\[ℓ⁡\(V\+ϵ\)−ℓ⁡\(V\)\]\.\\Delta\_\{\\rho\}\(V\)=\\max\_\{\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\}\\left\[\\ell\(V\+\\epsilon\)\-\\ell\(V\)\\right\]\.\(42\)Letg=∇Vℓ​\(V\)g=\\nabla\_\{V\}\\ell\(V\)\. Ifℓ\\ellhas aβ\\beta\-Lipschitz\-continuous gradient on the perturbation ball, the following bound holds:

\|Δρ​\(V\)−ρ​‖g‖F\|≤β​ρ22\.\\left\|\\Delta\_\{\\rho\}\(V\)\-\\rho\\\|g\\\|\_\{F\}\\right\|\\leq\\frac\{\\beta\\rho^\{2\}\}\{2\}\.\(43\)Forg≠0g\\neq 0, the gradient\-guided perturbationϵ⋆=ρ​g/‖g‖F\\epsilon^\{\\star\}=\\rho g/\\\|g\\\|\_\{F\}additionally satisfies:

\|ℓ⁡\(V\+ϵ⋆\)−ℓ⁡\(V\)−ρ​‖g‖F\|≤β​ρ22\.\\left\|\\ell\(V\+\\epsilon^\{\\star\}\)\-\\ell\(V\)\-\\rho\\\|g\\\|\_\{F\}\\right\|\\leq\\frac\{\\beta\\rho^\{2\}\}\{2\}\.\(44\)Accordingly, the implemented single\-example SAP loss isℒSAP=ℓ⁡\(V\+ϵ⋆\)\\mathcal\{L\}\_\{\\mathrm\{SAP\}\}=\\ell\(V\+\\epsilon^\{\\star\}\)\.

##### Proof\.

For anyϵ\\epsilonin the perturbation ball, the fundamental theorem of calculus gives:

ℓ⁡\(V\+ϵ\)−ℓ⁡\(V\)−⟨g,ϵ⟩F\\displaystyle\\ell\(V\+\\epsilon\)\-\\ell\(V\)\-\\langle g,\\epsilon\\rangle\_\{F\}\(45\)=∫01⟨∇Vℓ​\(V\+t​ϵ\)−g,ϵ⟩F​dt\.\\displaystyle=\\int\_\{0\}^\{1\}\\left\\langle\\nabla\_\{V\}\\ell\(V\+t\\epsilon\)\-g,\\epsilon\\right\\rangle\_\{F\}\\,dt\.Gradient Lipschitzness and Cauchy–Schwarz imply:

\|ℓ⁡\(V\+ϵ\)−ℓ⁡\(V\)−⟨g,ϵ⟩F\|≤∫01β​t​‖ϵ‖F2​𝑑t=β2​‖ϵ‖F2\.\\left\|\\ell\(V\+\\epsilon\)\-\\ell\(V\)\-\\langle g,\\epsilon\\rangle\_\{F\}\\right\|\\leq\\int\_\{0\}^\{1\}\\beta t\\\|\\epsilon\\\|\_\{F\}^\{2\}\\,dt=\\frac\{\\beta\}\{2\}\\\|\\epsilon\\\|\_\{F\}^\{2\}\.\(46\)For the upper bound, Eq\.[46](https://arxiv.org/html/2609.11393#A4.E46)gives:

Δρ​\(V\)≤max‖ϵ‖F≤ρ⁡⟨g,ϵ⟩F\+β​ρ22=ρ​‖g‖F\+β​ρ22\.\\Delta\_\{\\rho\}\(V\)\\leq\\max\_\{\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\}\\langle g,\\epsilon\\rangle\_\{F\}\+\\frac\{\\beta\\rho^\{2\}\}\{2\}=\\rho\\\|g\\\|\_\{F\}\+\\frac\{\\beta\\rho^\{2\}\}\{2\}\.\(47\)Wheng≠0g\\neq 0, evaluating the inner objective atϵ⋆=ρ​g/‖g‖F\\epsilon^\{\\star\}=\\rho g/\\\|g\\\|\_\{F\}gives:

Δρ​\(V\)≥ℓ⁡\(V\+ϵ⋆\)−ℓ⁡\(V\)≥ρ​‖g‖F−β​ρ22\.\\Delta\_\{\\rho\}\(V\)\\geq\\ell\(V\+\\epsilon^\{\\star\}\)\-\\ell\(V\)\\geq\\rho\\\|g\\\|\_\{F\}\-\\frac\{\\beta\\rho^\{2\}\}\{2\}\.\(48\)Wheng=0g=0, choosingϵ=0\\epsilon=0givesΔρ​\(V\)≥0\\Delta\_\{\\rho\}\(V\)\\geq 0, while the upper bound givesΔρ​\(V\)≤β​ρ2/2\\Delta\_\{\\rho\}\(V\)\\leq\\beta\\rho^\{2\}/2\. Hence, Eq\.[43](https://arxiv.org/html/2609.11393#A4.E43)holds in both cases\. Finally, substitutingϵ⋆\\epsilon^\{\\star\}into Eq\.[46](https://arxiv.org/html/2609.11393#A4.E46)proves Eq\.[44](https://arxiv.org/html/2609.11393#A4.E44)\.□\\square

##### Effect of stop\-gradient\.

Forg≠0g\\neq 0, the bounds above concern the value of the perturbed objective and are unchanged by the stop\-gradient operation\. Treatingϵ⋆\\epsilon^\{\\star\}as constant gives the outer gradient:

∇VsgℒSAP=∇Vℓ​\(V\+ϵ⋆\)\.\\nabla\_\{V\}^\{\\mathrm\{sg\}\}\\mathcal\{L\}\_\{\\mathrm\{SAP\}\}=\\nabla\_\{V\}\\ell\(V\+\\epsilon^\{\\star\}\)\.\(49\)Gradient Lipschitzness further gives:

‖∇VsgℒSAP−g‖F≤β​ρ\.\\left\\\|\\nabla\_\{V\}^\{\\mathrm\{sg\}\}\\mathcal\{L\}\_\{\\mathrm\{SAP\}\}\-g\\right\\\|\_\{F\}\\leq\\beta\\rho\.\(50\)Thus, stop\-gradient removes derivatives through the construction ofϵ⋆\\epsilon^\{\\star\}while retaining the gradient evaluated at the perturbed prefix\.

##### Proposition 4 \(Stationary\-point curvature\)\.

Suppose that∇Vℓ​\(V\)=0\\nabla\_\{V\}\\ell\(V\)=0and thatℓ\\ellis twice continuously differentiable in a neighborhood ofVV\. Asρ→0\\rho\\to 0, the ideal inner maximization satisfies:

Δρ​\(V\)=ρ22​\[λmax​\(∇V2ℓ​\(V\)\)\]\+\+o⁡\(ρ2\),\\Delta\_\{\\rho\}\(V\)=\\frac\{\\rho^\{2\}\}\{2\}\\left\[\\lambda\_\{\\max\}\\\!\\left\(\\nabla\_\{V\}^\{2\}\\ell\(V\)\\right\)\\right\]\_\{\+\}\+o\(\\rho^\{2\}\),\(51\)where\[a\]\+=max⁡\(a,0\)\[a\]\_\{\+\}=\\max\(a,0\)\.

##### Proof\.

LetH=∇V2​ℓ​\(V\)H=\\nabla\_\{V\}^\{2\}\\ell\(V\)\. Twice continuous differentiability and∇Vℓ​\(V\)=0\\nabla\_\{V\}\\ell\(V\)=0yield the following expansion, uniformly over‖ϵ‖F≤ρ\\\|\\epsilon\\\|\_\{F\}\\leq\\rhoasρ→0\\rho\\to 0:

ℓ⁡\(V\+ϵ\)−ℓ⁡\(V\)=12​⟨ϵ,H​ϵ⟩F\+o⁡\(‖ϵ‖F2\)\.\\ell\(V\+\\epsilon\)\-\\ell\(V\)=\\frac\{1\}\{2\}\\langle\\epsilon,H\\epsilon\\rangle\_\{F\}\+o\(\\\|\\epsilon\\\|\_\{F\}^\{2\}\)\.\(52\)Writingϵ=ρ​U\\epsilon=\\rho Uwith‖U‖F≤1\\\|U\\\|\_\{F\}\\leq 1gives:

Δρ​\(V\)=ρ22​max‖U‖F≤1​⟨U,H​U⟩F\+o⁡\(ρ2\)\.\\Delta\_\{\\rho\}\(V\)=\\frac\{\\rho^\{2\}\}\{2\}\\max\_\{\\\|U\\\|\_\{F\}\\leq 1\}\\langle U,HU\\rangle\_\{F\}\+o\(\\rho^\{2\}\)\.\(53\)Ifλmax​\(H\)\>0\\lambda\_\{\\max\}\(H\)\>0, the maximum is attained by a unit eigenvector associated withλmax​\(H\)\\lambda\_\{\\max\}\(H\)\. Ifλmax​\(H\)≤0\\lambda\_\{\\max\}\(H\)\\leq 0, it is attained atU=0U=0\. Therefore:

max‖U‖F≤1⁡⟨U,H​U⟩F=\[λmax​\(H\)\]\+\.\\max\_\{\\\|U\\\|\_\{F\}\\leq 1\}\\langle U,HU\\rangle\_\{F\}=\[\\lambda\_\{\\max\}\(H\)\]\_\{\+\}\.\(54\)This proves Eq\.[51](https://arxiv.org/html/2609.11393#A4.E51)\.□\\square

This proposition characterizes the ideal worst\-case objective at stationarity, whereas Proposition 3 characterizes the implemented gradient\-guided perturbation wheng≠0g\\neq 0\.

##### Remark\.

Proposition 4 characterizes the ideal worst\-case inner problem\. At an exact stationary point, the first\-order perturbationϵ⋆=ρ​g/‖g‖F\\epsilon^\{\\star\}=\\rho g/\\\|g\\\|\_\{F\}is undefined and does not recover the leading Hessian eigenvector\. The proposition therefore explains the local geometry of the robust objective rather than claiming that the implemented first\-order perturbation solves the stationary second\-order problem\.

Algorithm 1TASCO with Random Perturbation0:Frozen LLM

MθM\_\{\\theta\}, test set

𝒟test\\mathcal\{D\}\_\{\\mathrm\{test\}\}, warm\-start prefix

V0V\_\{0\}, optimizer

𝒪\\mathcal\{O\}, number of epochs

EE, perturbation scale

σ\\sigma, number of perturbations

K≥2K\\geq 2, and stability weight

λrand\\lambda\_\{\\mathrm\{rand\}\}
0:Optimized prefix

VV
1:Initialize

V←V0V\\leftarrow V\_\{0\}
2:for

e=1,…,Ee=1,\\ldots,Edo

3:Randomly shuffle

𝒟test\\mathcal\{D\}\_\{\\mathrm\{test\}\}and partition it into mini\-batches

4:foreach mini\-batch

ℬ\\mathcal\{B\}do

5:Generate trajectories

𝐘ℬ\\mathbf\{Y\}\_\{\\mathcal\{B\}\}under

VV
6:

ℒconf←ℒℬ​\(V,𝐘ℬ\)\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\\leftarrow\\mathcal\{L\}\_\{\\mathcal\{B\}\}\(V;\\mathbf\{Y\}\_\{\\mathcal\{B\}\}\)
7:for

k=1,…,Kk=1,\\ldots,Kdo

8:Sample

ϵ\(k\)∼𝒩⁡\(0,σ2​I\)\\epsilon^\{\(k\)\}\\sim\\mathcal\{N\}\(0,\\sigma^\{2\}I\)and set

V\(k\)←V\+ϵ\(k\)V^\{\(k\)\}\\leftarrow V\+\\epsilon^\{\(k\)\}
9:Greedily generate trajectories

𝐘ℬ\(k\)\\mathbf\{Y\}\_\{\\mathcal\{B\}\}^\{\(k\)\}under

V\(k\)V^\{\(k\)\}
10:Compute

\{cX\(k\):X∈ℬ\}\\\{c\_\{X\}^\{\(k\)\}:X\\in\\mathcal\{B\}\\\}using Eq\.[22](https://arxiv.org/html/2609.11393#A4.E22)

11:endfor

12:Compute

ℒrand\\mathcal\{L\}\_\{\\mathrm\{rand\}\}from

\{cX\(k\)\}\\\{c\_\{X\}^\{\(k\)\}\\\}using Eq\.[23](https://arxiv.org/html/2609.11393#A4.E23)

13:

g←∇V\(ℒconf\+λrand​ℒrand\)g\\leftarrow\\nabla\_\{V\}\\left\(\\mathcal\{L\}\_\{\\mathrm\{conf\}\}\+\\lambda\_\{\\mathrm\{rand\}\}\\mathcal\{L\}\_\{\\mathrm\{rand\}\}\\right\)
14:

V←𝒪⁡\(V,g\)V\\leftarrow\\mathcal\{O\}\(V,g\)
15:endfor

16:endfor

17:return

VV

### Relationship Between the Two Local Objectives

The two analyses reveal distinct views of local geometry\. To compare them, suppose temporarily that both perturbation strategies are applied to the same smooth scalar functionh⁡\(V\)h\(V\)and that decoding remains fixed\. Away from stationary points, the random\-perturbation variance satisfies:

Varϵ⁡\[h⁡\(V\+ϵ\)\]=σ2​‖∇Vh​\(V\)‖F2\+𝒪⁡\(σ4\)\.\\operatorname\{Var\}\_\{\\epsilon\}\[h\(V\+\\epsilon\)\]=\\sigma^\{2\}\\\|\\nabla\_\{V\}h\(V\)\\\|\_\{F\}^\{2\}\+\\mathcal\{O\}\(\\sigma^\{4\}\)\.\(55\)By contrast, the worst\-case local increase satisfies:

max‖ϵ‖F≤ρ⁡\[h⁡\(V\+ϵ\)−h⁡\(V\)\]=ρ​‖∇Vh​\(V\)‖F\+𝒪⁡\(ρ2\)\.\\max\_\{\\\|\\epsilon\\\|\_\{F\}\\leq\\rho\}\\left\[h\(V\+\\epsilon\)\-h\(V\)\\right\]=\\rho\\\|\\nabla\_\{V\}h\(V\)\\\|\_\{F\}\+\\mathcal\{O\}\(\\rho^\{2\}\)\.\(56\)Thus, the random objective aggregates sensitivity over isotropic directions, whereas the worst\-case objective selects the most adverse direction\.

At a stationary point with HessianHhH\_\{h\}, their leading curvature terms depend on‖Hh‖F2\\\|H\_\{h\}\\\|\_\{F\}^\{2\}and\[λmax​\(Hh\)\]\+\[\\lambda\_\{\\max\}\(H\_\{h\}\)\]\_\{\+\}, respectively\. Their relationship is bounded by:

\[λmax​\(Hh\)\]\+≤‖Hh‖2≤‖Hh‖F\.\[\\lambda\_\{\\max\}\(H\_\{h\}\)\]\_\{\+\}\\leq\\\|H\_\{h\}\\\|\_\{2\}\\leq\\\|H\_\{h\}\\\|\_\{F\}\.\(57\)This distinguishes the largest positive curvature from aggregate curvature across directions\. In TASCO, Random Perturbation operates on re\-decoded trajectory\-level log\-likelihood, whereas SAP operates on the fixed\-trajectory entropy loss\. Therefore, these relations clarify their different geometric interpretations but do not establish numerical equivalence or an ordering between the objectives\.

Table 8:Accuracy \(%\) across three independent random seeds\. Each entry reports the mean accuracy followed by the standard deviation in gray\. The average is computed across the five benchmarks for each run and then aggregated across seeds\.##### Summary\.

Together, these analyses show how the two TASCO objectives control complementary forms of local confidence sensitivity\. Random Perturbation regularizes distributional variation across perturbed behaviors, whereas SAP controls worst\-case sensitivity along an adverse local direction\. These results establish local confidence robustness under prefix perturbations rather than a guarantee of answer correctness\. Section B separately examines the empirical relationship between local stability and answer accuracy\.

Table 9:Accuracy \(%\) and average generation length across five reasoning benchmarks\. Accuracy is reported to one decimal place, and token counts are rounded to the nearest integer\. Average results are computed across the five datasets\. Arrows denote absolute accuracy changes and relative token changes compared with Base\. Best results are inbold, and second\-best results areunderlined\.

## Appendix ED\. Complete Optimization Algorithms

This section provides the complete optimization procedures for the two TASCO variants\. Both algorithms optimize a task\-level prefixVVover the unlabeled test set while keeping the LLM parametersθ\\thetafrozen\. They differ only in how local confidence stability is estimated and incorporated into prefix optimization\.

##### Random Perturbation\.

Algorithm[1](https://arxiv.org/html/2609.11393#alg1)presents the Random Perturbation variant\. At each update, it samplesKKGaussian perturbations around the current prefix and generates a trajectory under each perturbed prefix\. The resulting trajectory\-level confidence variance is averaged across the mini\-batch and combined with the confidence loss to updateVV\.

##### Sharpness\-Aware Perturbation\.

Algorithm[2](https://arxiv.org/html/2609.11393#alg2)presents the Sharpness\-Aware Perturbation variant\. It first generates one trajectory per input under the current prefix and holds these trajectories fixed throughout the update\. A gradient\-guided perturbation is then constructed from the confidence loss, after which the prefix is updated using the loss evaluated at the perturbed prefix\. The perturbation is treated as constant during the second backward pass\.

##### Computational Cost\.

Random Perturbation captures richer distributional information but requiresKKindependently decoded perturbed rollouts per input, introducing additional adaptation cost\. Sharpness\-Aware Perturbation avoids these rollouts through a single gradient\-guided perturbation on the fixed trajectory, substantially reducing autoregressive decoding cost relative to Random Perturbation\. The reported token\-efficiency results characterize generation length after adaptation\. Moreover, the learned prefix transfers to unseen datasets without re\-optimization, avoiding additional adaptation cost in cross\-distribution settings\.

Algorithm 2TASCO with Sharpness\-Aware Perturbation0:Frozen LLM

MθM\_\{\\theta\}, test set

𝒟test\\mathcal\{D\}\_\{\\mathrm\{test\}\}, warm\-start prefix

V0V\_\{0\}, optimizer

𝒪\\mathcal\{O\}, number of epochs

EE, and perturbation radius

ρ\\rho
0:Optimized prefix

VV
1:Initialize

V←V0V\\leftarrow V\_\{0\}
2:for

e=1,…,Ee=1,\\ldots,Edo

3:Randomly shuffle

𝒟test\\mathcal\{D\}\_\{\\mathrm\{test\}\}and partition it into mini\-batches

4:foreach mini\-batch

ℬ\\mathcal\{B\}do

5:Generate trajectories

𝐘ℬ\\mathbf\{Y\}\_\{\\mathcal\{B\}\}under

VVand hold them fixed

6:

g←∇Vℒℬ​\(V,𝐘ℬ\)g\\leftarrow\\nabla\_\{V\}\\mathcal\{L\}\_\{\\mathcal\{B\}\}\(V;\\mathbf\{Y\}\_\{\\mathcal\{B\}\}\)
7:if

‖g‖F\>0\\\|g\\\|\_\{F\}\>0then

8:

ϵ⋆←ρ​g/‖g‖F\\epsilon^\{\\star\}\\leftarrow\\rho g/\\\|g\\\|\_\{F\}
9:else

10:

ϵ⋆←0\\epsilon^\{\\star\}\\leftarrow 0
11:endif

12:

gSAP←∇Vℒℬ​\(V\+StopGrad⁡\(ϵ⋆\),𝐘ℬ\)g\_\{\\mathrm\{SAP\}\}\\leftarrow\\nabla\_\{V\}\\mathcal\{L\}\_\{\\mathcal\{B\}\}\\left\(V\+\\operatorname\{StopGrad\}\(\\epsilon^\{\\star\}\);\\mathbf\{Y\}\_\{\\mathcal\{B\}\}\\right\)
13:

V←𝒪⁡\(V,gSAP\)V\\leftarrow\\mathcal\{O\}\(V,g\_\{\\mathrm\{SAP\}\}\)
14:endfor

15:endfor

16:return

VV

## Appendix FE\. Further Analysis of Reasoning Effectiveness

This section examines TASCO beyond final\-answer accuracy, focusing on whether its gains remain consistent across models and runs and are reflected in the reasoning process itself\. We also assess its sensitivity to the perturbation scale\.

### Evaluation on Reasoning\-Enhanced Models\.

We first examine whether TASCO also benefits reasoning\-enhanced LLMs, whose pretrained reasoning behavior differs substantially from that of general instruction\-tuned models\. We evaluate DeepSeek\-R1\-Distill\-Qwen\-1\.5B and DeepSeek\-R1\-Distill\-Qwen\-7B on five mathematical reasoning benchmarks\. In addition to the original model, we compare TASCO with test\-time reasoning\-control methods, including s1, CoD, andα​1\\alpha 1\. We report answer accuracy and average generation length to jointly assess reasoning effectiveness and token efficiency\.

As shown in Table[9](https://arxiv.org/html/2609.11393#A4.T9), TASCO achieves the highest average accuracy at both model scales and consistently outperforms the base model across all five benchmarks\. It improves average accuracy from 42\.2% to 49\.0% on DeepSeek\-R1\-Distill\-Qwen\-1\.5B while reducing generation length by 14\.1%, and from 56\.1% to 61\.1% on the 7B model with an 8\.8% reduction\. Although some reasoning\-control baselines produce shorter outputs, their accuracy gains are smaller or inconsistent\. TASCO thus offers a stronger balance between accuracy and generation efficiency, demonstrating that stability\-aware confidence optimization also benefits models already trained for deliberative reasoning\.

### Evaluation Across Random Seeds

We additionally evaluate TASCO and selected baselines using three independent random seeds\. To limit the cost of repeated test\-time optimization, we include representative methods covering no adaptation, latent\-variable optimization, and confidence\-only prefix optimization: Zero\-Shot CoT, LTPO, and TTSV\. We evaluate both TASCO variants under the same protocol and report mean accuracy with standard deviation in Table[8](https://arxiv.org/html/2609.11393#A4.T8)\. This evaluation provides more reliable performance estimates and quantifies variation across independent runs\.

Table 10:Reasoning\-process evaluation using DeepSeek\-V4\-Flash as the external judge\. All values are percentages\.
### Semantic Evaluation of Reasoning Processes

##### Experimental Setup\.

We use DeepSeek\-V4\-Flash as an external judge to examine how TASCO affects intermediate reasoning\. We compare paired trajectories generated by Confidence Only and TASCO\-SAP using Qwen2\.5\-Math\-7B, LLaMA3\.1\-8B\-Instruct, and DeepSeek\-R1\-Distill\-Qwen\-7B on the full MATH500 and Minerva Math test sets, containing 500 and 272 examples, respectively\. For each trajectory, the judge receives only the original problem and the generated reasoning process; no ground\-truth answer is provided\. Common explicit final\-answer spans are masked to prevent the judge from inferring reasoning quality from answer correctness\. We enable thinking mode with high reasoning effort and request a structured JSON annotation\.

The judge first divides each trajectory into semantically meaningful steps\. Each step receives a correctness label from \{correct,incorrect,uncertain\}, an informativeness label from \{informative,redundant,off\_track\}, and a functional role\. The judge also determines whether the trajectory commits prematurely to an answer or reasoning direction before sufficient support has been established\. All reported metrics are computed from these annotations rather than directly assigned by the judge\.

##### External\-Judge Prompt\.

The prompt template used for reasoning\-process annotation is shown below\. The placeholders are replaced with the original problem and the corresponding trajectory after final\-answer masking\.

##### External\-Judge Prompt\.

We use the following condensed prompt to summarize the instructions given to the external judge\. The complete prompt and JSON schema are provided in the released implementation\.

Reasoning\-Process Evaluation PromptSystem:You are an expert evaluator of mathematical reasoning\. Evaluate the reasoning process independently of its final answer, writing style, verbosity, or expressed confidence\.Divide the trajectory into semantically meaningful steps\. Label each step by:•correctness:correct,incorrect, oruncertain;•informativeness:informative,redundant, oroff\_track\.Determine whether the trajectory commits prematurely to an answer or reasoning direction before sufficient support is established\. Return all annotations as a valid JSON object\.User:Evaluate the following reasoning trajectory\.Problem:<Problem\>Reasoning trajectory:<Reasoning Trajectory\>

Figure 10:Sensitivity of TASCO to perturbation scales on four additional benchmarks using Qwen2\.5\-Math\-1\.5B\. Each benchmark contains separate panels for Random Perturbation and Sharpness\-Aware Perturbation\.
##### Evaluation Metrics\.

For trajectoryiiwithJiJ\_\{i\}semantic steps, letci​jc\_\{ij\}andui​ju\_\{ij\}denote the correctness and informativeness labels of stepjj, respectively\. LetEiE\_\{i\}denote the subset of steps labeled either correct or incorrect\. Step Correctness is defined as:

SCi=∑j∈Ei\{ci​j=correct\}\|Ei\|,\\mathrm\{SC\}\_\{i\}=\\frac\{\\sum\_\{j\\in E\_\{i\}\}\\mathbf\{1\}\\\!\\left\\\{c\_\{ij\}=\\mathrm\{correct\}\\right\\\}\}\{\|E\_\{i\}\|\},\(58\)where𝟏​\{⋅\}\\mathbf\{1\}\\\{\\cdot\\\}is the indicator function and uncertain steps are excluded\. Higher SC indicates that a larger proportion of assessable steps are mathematically or logically valid\.

Step Informativeness measures the proportion of steps that introduce useful information and advance the solution:

SIi=1Ji∑j=1Ji\{ui​j=informative\}\.\\mathrm\{SI\}\_\{i\}=\\frac\{1\}\{J\_\{i\}\}\\sum\_\{j=1\}^\{J\_\{i\}\}\\mathbf\{1\}\\\!\\left\\\{u\_\{ij\}=\\mathrm\{informative\}\\right\\\}\.\(59\)Higher SI indicates more productive reasoning\.

Redundancy Rate measures the proportion of steps that mainly repeat or restate previously established information:

RRi=1Ji∑j=1Ji\{ui​j=redundant\}\.\\mathrm\{RR\}\_\{i\}=\\frac\{1\}\{J\_\{i\}\}\\sum\_\{j=1\}^\{J\_\{i\}\}\\mathbf\{1\}\\\!\\left\\\{u\_\{ij\}=\\mathrm\{redundant\}\\right\\\}\.\(60\)Lower RR indicates less repetitive reasoning\.

Letpip\_\{i\}denote the trajectory\-level premature\-commitment judgment\. We define the corresponding indicator and its aggregate rate overNNtrajectories as:

PCi=\{pi=true\},PC=1N∑i=1NPCi\.\\mathrm\{PC\}\_\{i\}=\\mathbf\{1\}\\\!\\left\\\{p\_\{i\}=\\mathrm\{true\}\\right\\\},\\qquad\\mathrm\{PC\}=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\mathrm\{PC\}\_\{i\}\.\(61\)Lower PC indicates that the model is less likely to commit prematurely to an insufficiently supported reasoning direction\. We average SC, SI, and RR across trajectories and report all four metrics as percentages\.

##### Sensitivity to Perturbation Scale\.

We further examine the sensitivity of TASCO to the Gaussian scaleσ\\sigmaand perturbation radiusρ\\rhoon four additional benchmarks\. As shown in Fig\.[10](https://arxiv.org/html/2609.11393#A6.F10), both variants outperform confidence\-only optimization across a broad range of perturbation scales\. The default settings,σ=0\.01\\sigma=0\.01andρ=0\.8\\rho=0\.8, achieve the best or near\-best accuracy across datasets, while moderate changes generally produce comparable results\. These findings indicate that TASCO is not sensitive to a narrowly tuned perturbation scale and that the selected settings generalize well across benchmarks\.

##### Results\.

As shown in Table[10](https://arxiv.org/html/2609.11393#A6.T10), TASCO consistently improves all four reasoning\-process metrics across both datasets\. It produces a larger proportion of correct and informative steps while reducing redundant reasoning and premature commitment\. These results suggest that stability\-aware optimization affects not only final\-answer accuracy but also how the model develops and maintains its reasoning process\.

## Appendix GF\. Case Studies

This section presents case studies that illustrate the experimental prompting protocol and compare the reasoning behaviors induced by Confidence Only and TASCO\.

##### Prompt and Example\.

We first provide an AIME24 example illustrating the complete prompt and response format\. As shown in Table[11](https://arxiv.org/html/2609.11393#A7.T11), the system message instructs the model to reason step by step and place its final answer within\\boxed\{\}, while the original problem is provided as the user message\. TASCO adds no textual instructions; its learned continuous prefix is prepended only at the embedding level\. The table reports the complete response and the final answer extracted by the benchmark parser\. Subsequent case studies use the same prompt format and omit these repeated instructions\.

##### Reasoning Patterns\.

Table[12](https://arxiv.org/html/2609.11393#A7.T12)reveals a recurring contrast between the two methods\. Confidence Only often commits early to a locally plausible solution and continues confidently after discarding a necessary condition\. Across the three cases, it cancels a potentially zero factor, confuses simultaneous constraints with their union, or violates a coprimality requirement\. TASCO instead preserves these constraints throughout the derivation and retains valid reasoning branches until they are properly resolved\. These examples suggest that stability\-aware optimization mitigates premature commitment to fragile reasoning paths and promotes more consistent and reliable multi\-step reasoning\.

SYSTEM:Please reason step by step, and put your final answer within\\boxed\{\}\.

USER:\[𝐯1\]\[𝐯2\]\[𝐯3\]⋯\[𝐯20\]\[\\mathbf\{v\}\_\{1\}\]\[\\mathbf\{v\}\_\{2\}\]\[\\mathbf\{v\}\_\{3\}\]\\cdots\[\\mathbf\{v\}\_\{20\}\]Every morning Aya goes for a99\-kilometer\-long walk and stops at a coffee shop afterwards\. When she walks at a constant speed ofsskilometers per hour, the walk takes her44hours, includingttminutes spent in the coffee shop\. When she walks ats\+2s\+2kilometers per hour, the walk takes her22hours and2424minutes, includingttminutes spent in the coffee shop\. Suppose Aya walks ats\+12s\+\\frac\{1\}\{2\}kilometers per hour\. Find the number of minutes the walk takes her, including thettminutes spent in the coffee shop\.

GROUND TRUTH:204

TASCO REASONING:

To solve this problem, we first determine the values ofssandttusing the two given walking times\.

\#\# Step 1: Formulate the first time constraint\.When Aya walks atsskilometers per hour, the walking time is9s\\frac\{9\}\{s\}hours, while the time spent in the coffee shop ist60\\frac\{t\}\{60\}hours\. Since the total time is44hours,

9s\+t60=4\.\\frac\{9\}\{s\}\+\\frac\{t\}\{60\}=4\.\#\# Step 2: Formulate the second time constraint\.When Aya walks ats\+2s\+2kilometers per hour, the total duration is22hours and2424minutes, or2\.42\.4hours\. Therefore,

9s\+2\+t60=2\.4\.\\frac\{9\}\{s\+2\}\+\\frac\{t\}\{60\}=2\.4\.\#\# Step 3: Solve forssandtt\.Solving the two equations gives

\(s,t\)=\(−3,240\)or\(s,t\)=\(2\.5,24\)\.\(s,t\)=\(\-3,240\)\\qquad\\text\{or\}\\qquad\(s,t\)=\(2\.5,24\)\.Because a speed of−3\-3kilometers per hour is not physically meaningful, we discard the first solution\. Hence,

s=2\.5,t=24\.s=2\.5,\\qquad t=24\.\#\# Step 4: Compute the requested duration\.At the new speed,

s\+12=2\.5\+0\.5=3s\+\\frac\{1\}\{2\}=2\.5\+0\.5=3kilometers per hour\. Walking99kilometers therefore takes

93=3\\frac\{9\}\{3\}=3hours\. Including the2424minutes spent in the coffee shop, the total duration is

3×60\+24=2043\\times 60\+24=204minutes\.

Therefore, the walk takes204\\boxed\{204\}minutes\.

Table 11:Prompt and TASCO reasoning example on AIME24\. The vectors shown before the user question schematically represent the learned continuous prefix prepended at the embedding level rather than textual tokens\.Table 12:Three comparative case studies on polynomial roots, domain constraints, and coprime factorization\. In each case, Confidence Only drops a condition identified earlier in the derivation, whereas TASCO preserves the condition and obtains the correct answer\.CASE 1: POLYNOMIAL ROOT FINDINGQUESTION:Find the roots of\(x−3\)3\+\(x−7\)3=\(2​x−10\)3\.\(x\-3\)^\{3\}\+\(x\-7\)^\{3\}=\(2x\-10\)^\{3\}\.GROUND TRUTH:3,5,73,5,7CONFIDENCE\-ONLY REASONING \(INCORRECT\):\#\# Step 1:To solve the equation, we use the identitya3\+b3=\(a\+b\)​\(a2−a​b\+b2\)\.a^\{3\}\+b^\{3\}=\(a\+b\)\(a^\{2\}\-ab\+b^\{2\}\)\.\#\# Step 2:Leta=x−3a=x\-3andb=x−7b=x\-7\. Applying the identity gives\(2​x−10\)​\(\(x−3\)2−\(x−3\)​\(x−7\)\+\(x−7\)2\)=\(2​x−10\)3\.\(2x\-10\)\\bigl\(\(x\-3\)^\{2\}\-\(x\-3\)\(x\-7\)\+\(x\-7\)^\{2\}\\bigr\)=\(2x\-10\)^\{3\}\.\#\# Step 3:Dividing both sides by2​x−102x\-10, we obtain\(x−3\)2−\(x−3\)​\(x−7\)\+\(x−7\)2=\(2​x−10\)2\.\(x\-3\)^\{2\}\-\(x\-3\)\(x\-7\)\+\(x\-7\)^\{2\}=\(2x\-10\)^\{2\}\.\#\# Step 4:Expanding both sides givesx2−6​x\+9−\(x2−10​x\+21\)\+x2−14​x\+49=4​x2−40​x\+100\.x^\{2\}\-6x\+9\-\(x^\{2\}\-10x\+21\)\+x^\{2\}\-14x\+49=4x^\{2\}\-40x\+100\.Simplifying yieldsx2−10​x\+37=4​x2−40​x\+100\.x^\{2\}\-10x\+37=4x^\{2\}\-40x\+100\.\#\# Step 5:Rearranging and factoring gives3​x2−30​x\+63=0,x2−10​x\+21=\(x−3\)​\(x−7\)=0\.3x^\{2\}\-30x\+63=0,\\qquad x^\{2\}\-10x\+21=\(x\-3\)\(x\-7\)=0\.\#\# Step 6:Therefore, the roots arex=3x=3andx=7x=7, and the final answer is \{3,7\}\.TASCO REASONING \(CORRECT\):\#\# Step 1:Lety=x−5y=x\-5\. Thenx−3=y\+2,x−7=y−2,2​x−10=2​y\.x\-3=y\+2,\\qquad x\-7=y\-2,\\qquad 2x\-10=2y\.\#\# Step 2:The equation becomes\(y\+2\)3\+\(y−2\)3=\(2​y\)3\.\(y\+2\)^\{3\}\+\(y\-2\)^\{3\}=\(2y\)^\{3\}\.Expanding both sides gives\(y3\+6​y2\+12​y\+8\)\+\(y3−6​y2\+12​y−8\)=8​y3\.\(y^\{3\}\+6y^\{2\}\+12y\+8\)\+\(y^\{3\}\-6y^\{2\}\+12y\-8\)=8y^\{3\}\.\#\# Step 3:Combining like terms, rearranging, and factoring gives2​y3\+24​y=8​y3,6​y​\(y2−4\)=0\.2y^\{3\}\+24y=8y^\{3\},\\qquad 6y\(y^\{2\}\-4\)=0\.\#\# Step 4:Thus,y=0,y=2,y=−2\.y=0,\\qquad y=2,\\qquad y=\-2\.Substitutingx=y\+5x=y\+5givesx=5,x=7,x=3\.x=5,\\qquad x=7,\\qquad x=3\.\#\# Step 5:Therefore, the complete set of roots is \{3,5,7\}\.CASE 2: DOMAIN CONSTRAINTSQUESTION:For which real values ofxxis the following function undefined?f⁡\(x\)=1\|x2\+3​x−4\|\+\|x2\+9​x\+20\|\.f\(x\)=\\frac\{1\}\{\|x^\{2\}\+3x\-4\|\+\|x^\{2\}\+9x\+20\|\}\.GROUND TRUTH:−4\-4CONFIDENCE\-ONLY REASONING \(INCORRECT\):\#\# Step 1:To determine the values outside the domain, we find where the denominator is zero\. Since both terms are absolute values,\|x2\+3​x−4\|\+\|x2\+9​x\+20\|=0\|x^\{2\}\+3x\-4\|\+\|x^\{2\}\+9x\+20\|=0if and only if both quadratic expressions are zero\.\#\# Step 2:The first quadratic factors asx2\+3​x−4=\(x\+4\)​\(x−1\)=0,x^\{2\}\+3x\-4=\(x\+4\)\(x\-1\)=0,givingx=−4x=\-4orx=1x=1\.\#\# Step 3:The second quadratic factors asx2\+9​x\+20=\(x\+4\)​\(x\+5\)=0,x^\{2\}\+9x\+20=\(x\+4\)\(x\+5\)=0,givingx=−4x=\-4orx=−5x=\-5\.\#\# Step 4:The roots of the two equations are combined by union rather than intersection\.The reasoning therefore concludes that the denominator is zero atx=−5,−4,1x=\-5,\-4,1, giving \{\-5,\-4,1\}\.TASCO REASONING \(CORRECT\):\#\# Step 1:The denominator is a sum of two nonnegative terms, so it is zero only when both quadratic expressions are zero simultaneously\.\#\# Step 2:Solving the first equation givesx2\+3​x−4=\(x\+4\)​\(x−1\)=0,x^\{2\}\+3x\-4=\(x\+4\)\(x\-1\)=0,whose roots arex=−4x=\-4andx=1x=1\.\#\# Step 3:Solving the second equation givesx2\+9​x\+20=\(x\+4\)​\(x\+5\)=0,x^\{2\}\+9x\+20=\(x\+4\)\(x\+5\)=0,whose roots arex=−4x=\-4andx=−5x=\-5\.\#\# Step 4:Because the two conditions must hold simultaneously, we take the intersection:\{−4,1\}∩\{−4,−5\}=\{−4\}\.\\\{\-4,1\\\}\\cap\\\{\-4,\-5\\\}=\\\{\-4\\\}\.Therefore, the denominator is zero only atx=−4x=\-4, and the final answer is \{\-4\}\.CASE 3: COPRIMALITY CONSTRAINTSQUESTION:Ifaaandbbare positive integers such thatgcd⁡\(a,b\)=210\\gcd\(a,b\)=210,lcm⁡\(a,b\)=2103\\operatorname\{lcm\}\(a,b\)=210^\{3\}, anda<ba<b, how many possible values are there foraa?GROUND TRUTH:88CONFIDENCE\-ONLY REASONING \(INCORRECT\):\#\# Step 1:Usinggcd⁡\(a,b\)​lcm⁡\(a,b\)=a​b,\\gcd\(a,b\)\\operatorname\{lcm\}\(a,b\)=ab,we obtaina​b=210⋅2103=2104\.ab=210\\cdot 210^\{3\}=210^\{4\}\.\#\# Step 2:Sincegcd⁡\(a,b\)=210\\gcd\(a,b\)=210, writea=210​m,b=210​n,a=210m,\\qquad b=210n,wheregcd⁡\(m,n\)=1\\gcd\(m,n\)=1\. Substituting givesm​n=2102\.mn=210^\{2\}\.\#\# Step 3:The prime factorization is2102=22⋅32⋅52⋅72\.210^\{2\}=2^\{2\}\\cdot 3^\{2\}\\cdot 5^\{2\}\\cdot 7^\{2\}\.Therefore, the total number of divisors of2102210^\{2\}is\(2\+1\)4=81\.\(2\+1\)^\{4\}=81\.\#\# Step 4:Each divisor is treated as producing a coprime factor pair, even though many divisor pairs share prime factors\.After removing symmetric pairs, the number of possible values ofaais computed as81−12=40\.\\frac\{81\-1\}\{2\}=40\.Therefore, the final answer is \{40\}\.TASCO REASONING \(CORRECT\):\#\# Step 1:Using the relationship between the greatest common divisor and least common multiple givesa​b=gcd⁡\(a,b\)​lcm⁡\(a,b\)=210⋅2103=2104\.ab=\\gcd\(a,b\)\\operatorname\{lcm\}\(a,b\)=210\\cdot 210^\{3\}=210^\{4\}\.\#\# Step 2:Writea=210​m,b=210​n,a=210m,\\qquad b=210n,wheregcd⁡\(m,n\)=1\\gcd\(m,n\)=1\. Then\(210​m\)​\(210​n\)=2104,m​n=2102\.\(210m\)\(210n\)=210^\{4\},\\qquad mn=210^\{2\}\.\#\# Step 3:Since2102=22⋅32⋅52⋅72210^\{2\}=2^\{2\}\\cdot 3^\{2\}\\cdot 5^\{2\}\\cdot 7^\{2\}andmmandnnare coprime, each complete prime power must be assigned entirely to eithermmornn\. Splitting a prime power between the two factors would violategcd⁡\(m,n\)=1\\gcd\(m,n\)=1\.\#\# Step 4:There are four distinct prime powers, each of which can be assigned independently to eithermmornn\. Hence, there are24=162^\{4\}=16ordered assignments\. Sincea<ba<b, equivalentlym<nm<n, each unordered pair contributes exactly one valid value ofaa\. Therefore,162=8\.\\frac\{16\}\{2\}=8\.The final answer is \{8\}\.

Similar Articles

Confidence-Aware Alignment Makes Reasoning LLMs More Reliable

arXiv cs.AI

This paper introduces CASPO, a framework for aligning token-level confidence with step-wise logical correctness in large reasoning models using iterative Direct Preference Optimization. It also proposes Confidence-aware Thought (CaT) for dynamically pruning uncertain reasoning branches during inference to improve reliability and efficiency.

LLMs Improving LLMs: Agentic Discovery for Test-Time Scaling

Hugging Face Daily Papers

This paper introduces AutoTTS, an environment-driven framework that automates the discovery of test-time scaling strategies for LLMs by formulating it as controller synthesis. It demonstrates improved accuracy-cost tradeoffs on mathematical reasoning benchmarks with minimal computational overhead.

Self-Guided Test-Time Training for Long-Context LLMs

Hugging Face Daily Papers

Proposes Self-Guided Test-Time Training (S-TTT), where the model identifies relevant evidence spans in long contexts for adaptation, achieving up to 15% relative improvement on long-context reasoning benchmarks.