Manuscript Offprint

arXiv:2608.30841

HSRM: Hidden-State Reward Models for Test-Time Verification

Xianzhi Li, Xiaodan Zhu

Abstract

Large language models can often generate plausible mathematical reasoning traces, but reliably identifying the correct solution among multiple candidates remains a key challenge. Existing test-time reasoning pipelines typically rely on text-based verifiers that re-read each generated solution, making verification an expensive component of inference. Prior work has shown, however, that LLMs often encode correctness-related signals in their internal representations, including awareness of when their own answers are likely to be wrong. Building on this observation, we introduce HSRM, a lightweight hidden-state reward model that verifies candidate solutions by directly reading the generator's internal representations rather than re-processing its text. HSRM extracts hidden states from a frozen generator at reasoning-step boundaries and uses a small Transformer encoder to rank candidates. It is trained from self-generated trajectories with outcome labels, requiring neither human-written process supervision nor a large pretrained verifier. Across four mathematical reasoning benchmarks, HSRM matches or outperforms a 55M-parameter text-only energy verifier in 15 of 16 generator-dataset settings while using only about 2M parameters, providing an efficient alternative to text-only verification by reusing representations already computed during generation 1^{1}.

1 Introduction

Large language models (LLMs) have made substantial progress on deductive reasoning, yet individual generated solutions often remain unreliable. A common way to improve reliability is to spend more computation at test time: sample multiple candidate solutions, score them, and return the most promising one. This strategy has become a standard mechanism for converting additional inference compute into higher reasoning accuracy (Brown et al., 2024; Snell et al., 2025). Its effectiveness, however, depends heavily on the quality and cost of the verifier used to select among candidates.

Most existing verifiers are text-based. Since the GSM8K verifier of Cobbe et al. (2021), reward models for reasoning have typically been trained to read a generated solution as text and assign either an outcome-level score or process-level scores over intermediate reasoning steps (Uesato et al., 2022; Lightman et al., 2023; Wang et al., 2024). Recent process reward models are often large language models themselves (Yang et al., 2024; Zhang et al., 2025b; Zheng et al., 2025). As a result, verification can become a major part of the total inference cost: after the generator has already produced each candidate solution, a separate model must process the same solution again in order to judge it.

This text-only design leaves open a natural question. During generation, the model has already computed rich internal representations that may contain evidence about whether the solution is correct. Prior work suggests that such information is often present in model internals: language models can encode signals about whether their own answers are likely to be correct (Kadavath et al., 2022), and hidden representations have been used to detect truthfulness, factuality, and correctness-related properties (Azaria and Mitchell, 2023; Burns et al., 2024; Li et al., 2023; Zou et al., 2023; Marks and Tegmark, 2023; Orgad et al., 2025; Zhang et al., 2025a). These findings suggest that a verifier may not need to infer solution quality only from emitted text. Instead, verification could directly read the internal states produced during decoding. This motivates our central question: can hidden states from the generator itself support efficient verification for mathematical reasoning?

We introduce HSRM, a Hidden-State Reward Model for test-time verification. HSRM reads hidden states from a frozen generator at reasoning-step

1^{1}Code is available at https://github.com/JXL884/HSRM.

boundaries and assigns a scalar score to each candidate solution. It is implemented as a small Transformer encoder with 2M parameters and is trained on hidden states from the generator's own sampled trajectories. This training data is collected by the same test-time sampling process used for best-of-N reasoning: given problems in a target domain, we sample multiple candidate solutions, label their final answer correctness, and train the verifier to rank correct candidates above incorrect ones. Thus, HSRM does not rely on a pre-existing verifier corpus or human-written process supervision. Instead, it can be adapted to a new domain whenever candidate solutions can be sampled and outcome labels can be obtained. Unlike text-based verifiers, HSRM does not need to re-encode generated solutions with a separate large language model; it reuses representations that are already produced during decoding, making verification substantially lighter. Our main contributions are:

• We propose HSRM, a lightweight hidden-state reward model for best-of-N reasoning that scores candidate solutions using a frozen generator hidden states at reasoning-step boundaries and can be trained from candidate trajectories sampled by the generator itself.

• We evaluate HSRM across a variety of mathematical reasoning benchmarks with different generator scales, showing that it matches or outperforms a 55M-parameter text-only verifier on 15 of 16 generator–dataset settings while using only about 2M parameters.

• We provide ablations over verifier capacity, layer depth, and input modality, showing that the hidden-state advantage comes primarily from the input representation rather than from increased model size.

References (32)