arXiv:2609.11393cs.AISep 2026

Manuscript Offprint

arXiv:2609.11393

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

Bincheng Gu, Min Gao, Zongwei Wang, Yibing Bai, Yulan He, Junliang Yu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

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.

Introduction

Large Language Models (LLMs) have demonstrated strong reasoning capabilities on complex tasks such as mathematical reasoning and code generation (Guo et al. 2025; Jaech et al. 2024). 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; Lambert et al. 2024). 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).

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; Li et al. 2025;

Figure

Figure 1: Comparison of confidence-only and stability-aware optimization under prefix perturbations across trajectories yielding correct and incorrect answers.

Sinii et al. 2025). 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; Nguyen and Le 2026), whereas verifier-free methods use the model's output entropy as an intrinsic confidence signal (Ye, Liang, and Shan 2025).

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). This assumption can fail on complex reasoning tasks, where LLMs can be poorly calibrated and remain highly confident along incorrect reasoning trajectories (Jurayj, Cheng, and Van Durme 2025; Huang et al. 2025). 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; Zhao et al. 2026).

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), 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). We measure this stability using trajectory-level confidence variance. As shown in Fig. 2, the low-variance group consistently achieves higher answer accuracy than

∗^{*}Corresponding author.

Figure

Figure 2: Answer accuracy for low- and high-variance query groups defined by the median trajectory-confidence variance.

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.

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.

References (44)