# GradCuit：梯度回路实现稳健可解释的测试时潜在推理

- 来源：HuggingFace Daily Papers（社区热门论文）
- 发布时间：2026-08-03 08:00
- AIHOT 分数：55
- AIHOT 链接：https://aihot.virxact.com/items/cmsef9rig0pgzro2e8ci8bkw0
- 原文链接：https://arxiv.org/abs/2608.02585

## AI 摘要

GradCuit 将可学习潜在状态插入 Transformer 中间层，利用自注意力机制作为前向计算与反向梯度传播的回路，直接优化潜在变量以提升推理质量。在五个骨干模型和三个推理基准上，GradCuit 较标准 CoT 基线平均提升 6.6 个百分点，整体准确率达 64.5%，优于最强对比方法 2.4 个百分点；在七种学习率设置下准确率标准差从 1.53 降至 0.82。

## 正文

NLCo Lab, Beijing Institute for General Artificial Intelligence Institute of Automation, Chinese Academy of Sciences School of Artificial Intelligence, Beijing University of Posts and Telecommunications School of Artificial Intelligence for Science, Peking University

yuzhaoxin2024@ia.ac.cn, shenqi@bupt.edu.cn,lihengli@stu.pku.edu.cn, chizhang.cz@pku.edu.cn, zlzheng@bigai.ai

Equal Contributions.

Equal Supervision.

Corresponding author(s): Hengli Li, Chi Zhang, Zilong Zheng.

1 Introduction

A growing line of work explores augmenting large language models (LLMs) with latent reasoning (Hao et al., 2025, Li et al., 2025, Deng et al., 2024), where continuous latent variables serve as intermediate states beyond explicit chain-of-thought tokens (Wei et al., 2022). Recent reasoning-as-optimization methods, including LatentSeek (Li et al., 2025), LTPO (Ye et al., 2026), and MILR (Mi et al., 2026), optimize instance-specific latents at test time to improve generation quality without updating model parameters. However, since they rely on decoded tokens as the interface between latent variables and the reasoning path, optimization is restricted to policy gradients of token-level objectives, which can only reach the latents by backpropagating through the decoding process. This designation creates a fundamental credit-assignment challenge: it remains difficult to determine how latent variables contribute to subsequent reasoning tokens and the final answer.

To be specific, this challenge manifests in two aspects: (1) Indirect optimization: the decoding process introduces an information bottleneck between latent variables and their downstream effects, causing optimization signals to become indirect and entangled with intermediate token representations; (2) Opaque latent dynamics: the discrete generation pathway obscures how individual latent variables influence subsequent predictions, making it difficult to interpret a particular latent update.

Figure 1: The GradCuit framework. The Transformer’s self-attention mechanism functions as a gradient-routing circuit, enabling direct backward credit assignment from generated tokens to the latents along attention pathways. The red feedback loop visualizes the policy gradient update (), used to iteratively refine the latents during inference without updating the base model parameters.

We propose GradCuit, which takes a step toward addressing this credit-assignment challenge by leveraging the Transformer’s self-attention mechanism as a computational circuit for latent reasoning. Our design choice is to introduce latents directly into the model’s intermediate hidden space, allowing the self-attention circuit to serve as both the forward pathway for computation and the backward pathway for gradient propagation during optimization. This designation is related in spirit to the Transformer Circuits viewpoint (Elhage et al., 2021): the attention graph defines a compositional circuit of interactions, hence the name GradCuit (gradient through circuit). GradCuit enables direct optimization of the latents through self-attention, while simultaneously offering a lens into the latent dynamics 111Concurrent work by Anthropic, J-lens (Gurnee et al., 2026), explores a related idea. However, whereas their focus is on explainability, our goal is to improve latent reasoning. via the Jacobian of the subsequent tokens with respect to the latents.

Extensive experiments across five backbones and three reasoning benchmarks demonstrate the strong and consistent performance of GradCuit. Averaged across all backbones, benchmarks, and answer formats, GradCuit improves accuracy over the standard CoT baseline by 6.6 percentage points. It also outperforms all four enhanced reasoning baselines, achieving an overall average accuracy of 64.5%, compared with 62.1% for the strongest competing method. GradCuit further exhibits greater robustness: across seven learning-rate settings, it consistently outperforms LatentSeek while reducing the standard deviation in accuracy from 1.53 to 0.82. Even when its policy-gradient updates are replaced by a random walk, GradCuit remains competitive with LatentSeek (Li et al., 2025), demonstrating the robustness of its latent space to the choice of optimization direction. Finally, this circuit-like gradient pathway enables direct inspection of latent dynamics, revealing the important role of reasoning-connector tokens and thereby improving the interpretability of latent reasoning.

Contributions.

•

Circuit-like latent reasoning through self-attention. We introduce GradCuit, which inserts a small set of learnable latent states at an intermediate Transformer layer, enabling self-attention to provide a direct computational pathway for both forward token–latent interaction and backward credit assignment.

•

Improved robustness through direct credit assignment. By propagating reward-weighted gradients directly from generated tokens to the latent states, GradCuit achieves greater optimization robustness than previous latent-reasoning methods.

•

Effective and interpretable latent dynamics. Across five backbones and three reasoning benchmarks, GradCuit improves accuracy over CoT by 6.6 percentage points and outperforms the strongest enhanced reasoning baseline by 2.4 points on average. Its circuit-like gradient pathway also makes latent dynamics more interpretable, revealing the important role of reasoning-connector tokens in latent reasoning.

2 Circuit-like Gradient Flow for Latent Reasoning

In this section, we present the GradCuit algorithm.

2.1 Preliminaries: Output-Side Latent Optimization

Let be an autoregressive language model and a reward model. For an input problem , let denote a length- token sequence. As a representative output-side formulation, LatentSeek (Li et al., 2025) introduces latent variables , where each lies in the latent space associated with and . Its ideal test-time objective is to maximize the expected reward:

(1)

The conditional generation distribution is factorized as

(2)

where parameterizes the language-model head (LM head).

Conceptually, LatentSeek first decodes the latent variables into the first tokens, and then performs standard autoregressive generation conditioned on this decoded prefix. After producing the full sequence and evaluating its reward , LatentSeek updates the latents by backpropagating gradients through the logits associated with these decoded tokens. Concretely, the policy-gradient term for the -th latent takes the form

(3)

2.2 Gradient Flow through Transformer Circuits

To precisely attribute the influence of individual latent variables and avoid the information loss introduced by decoding continuous latents into discrete tokens, we propose a new method, GradCuit, for solving Equation˜1. Rather than defining the latent space at the transformer’s output, as in Li et al. (2025), we define it within an intermediate hidden-state space. This design directly incorporates the pre-trained self-attention mechanism into the latent optimization process.

Consider an -layer transformer decoder, and let the output space of its -th layer serve as the latent optimization space. To predict the -th token , we first pass the prompt and the previously generated tokens through the first transformer layers, obtaining their corresponding hidden representations, and , respectively. We then insert the optimizable latent variables between these representations to form the concatenated sequence

The next-token distribution is obtained by passing this concatenated sequence through the remaining Transformer layers and the language-model head:

(4)

This construction inducesa new autoregressive factorization that replaces Equation˜2:

(5)

Because the latent variables participate in self-attention alongside the token representations, each generated token can attend to all preceding latent positions. Consequently, gradient signals from every generated token can propagate directly to every latent variable through the remaining self-attention layers. This token-to-latent gradient flow is characterized as

which measures the sensitivity of the probability of the -th token to the -th latent variable. We accordingly perform the following policy-gradient-style update, as in LatentSeek (Li et al., 2025):

(6)

where denotes the latent optimization step size. The gradient associated with each latent variable aggregates contributions from all generated token positions:

(7)

In summary, gradient signals flow from the generated discrete tokens back to each latent variable through the transformer’s self-attention connectivity. Motivated by this circuit-like pathway for gradient propagation, we refer to the resulting latent reasoning method as GradCuit.

3 Experiments

In this section, we present a comprehensive empirical evaluation of GradCuit.

3.1 Experimental Setup

We evaluate GradCuit against CoT, our one-pass Self-Reflection baseline, Self-Consistency, Self-Scored Best-of- (BoN), and LatentSeek (Li et al., 2025) to assess its effectiveness relative to representative explicit, sampling-based, and latent reasoning methods. Complete baseline protocols and prompts are provided in the Appendix. Experiments are conducted using five instruction-tuned backbones: LLaMA-3.2-3B-Instruct,222https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct LLaMA-3.1-8B-Instruct,333https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct Qwen2.5-7B-Instruct,444https://huggingface.co/Qwen/Qwen2.5-7B-Instruct Qwen2.5-14B-Instruct,555https://huggingface.co/Qwen/Qwen2.5-14B-Instruct and Qwen3-4B-Instruct-2507.666https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507 We evaluate all methods on GPQA-Diamond (Rein et al., 2024), GSM8K (Cobbe et al., 2021), and MATH-500 (Lightman et al., 2024, Hendrycks et al., 2021), using both \boxed and JSON answer formats. Full details are provided in the Appendix.

媒体内容 · 前往原文查看

Backbone LLaMA3.2-3B LLaMA3.1-8B Qwen2.5-7B Qwen2.5-14B Qwen3-4B Avg.

Prompt Type Boxed JSON Boxed JSON Boxed JSON Boxed JSON Boxed JSON Boxed JSON

GPQA-Diamond

CoT 17.7 18.7 20.7 22.2 31.3 31.8 40.4 42.4 40.9 40.4 30.2 31.1

Self-Reflection 12.6 25.3 14.1 25.8 33.8 31.8 36.9 45.5 58.6 54.6 31.2 36.6

Self-Consistency 23.2 25.3 25.8 28.8 34.9 34.9 41.4 39.9 50.5 55.1 35.2 36.8

Self-Scored BoN 18.2 24.2 15.7 26.3 33.3 37.9 41.4 46.5 46.5 48.0 31.0 36.6

LatentSeek 25.3 20.7 27.8 29.3 33.3 32.3 47.5 42.9 50.0 51.0 36.8 35.2

GradCuit (Ours) 30.3 27.8 31.3 30.3 38.4 35.4 42.4 42.9 52.5 49.5 39.0 37.2

GSM8K

CoT 75.4 68.2 81.7 76.6 89.2 79.9 92.4 89.6 88.1 87.3 85.4 80.3

Self-Reflection 67.9 58.5 70.9 67.3 89.2 79.4 93.2 89.1 92.0 88.6 82.6 76.6

Self-Consistency 79.5 69.7 84.0 84.0 88.2 81.4 92.2 90.6 89.2 88.7 86.6 82.9

Self-Scored BoN 77.9 64.6 83.4 75.7 89.2 76.3 92.6 89.5 89.9 88.2 86.6 78.9

LatentSeek 77.8 68.8 82.6 78.2 90.8 79.1 92.1 90.1 88.0 88.6 86.3 81.0

GradCuit (Ours) 82.5 75.7 86.2 84.5 91.8 82.1 93.3 92.6 90.0 88.9 88.8 84.8

MATH-500

CoT 40.4 40.0 50.6 46.8 73.0 43.4 79.2 59.8 87.2 79.8 66.1 54.0

Self-Reflection 35.4 38.4 38.4 40.2 74.6 47.0 76.4 62.0 84.4 81.6 61.8 53.8

Self-Consistency 45.2 48.0 46.4 50.8 73.8 68.4 80.0 68.4 89.0 84.6 66.9 64.0

Self-Scored BoN 45.8 42.0 48.0 45.2 74.4 64.2 78.8 66.8 90.0 83.4 67.4 60.3

LatentSeek 47.6 40.2 56.8 51.0 76.4 45.2 78.2 62.6 87.0 81.4 69.2 56.1

GradCuit (Ours) 53.6 47.4 57.4 53.6 77.2 68.6 80.2 68.6 91.8 86.8 72.0 65.0

Table 1: Accuracy comparison across different reasoning settings. GradCuit denotes our method.

3.2 Main Results

Overall Effectiveness. Table 1 summarizes the main results. Averaged over all 30 backbone–benchmark–format settings, GradCuit achieves 64.5% accuracy, outperforming CoT by 6.6 points and the strongest competing method by 2.4 points. It attains the highest average accuracy under both answer formats on all three benchmarks and achieves the best individual result in 23 of 30 settings. GradCuit also consistently outperforms Self-Consistency and Self-Scored BoN in all six benchmark–format aggregates. Moreover, its average number of optimization iterations is lower than the number of sampled responses used by these methods in every setting; additional statistics are reported in the Appendix.

Comparison with LatentSeek. GradCuit improves over LatentSeek in every benchmark–format aggregate. Under the Boxed/JSON formats, the respective gains are 2.2/2.0 points on GPQA-Diamond, 2.5/3.8 points on GSM8K, and 2.8/8.9 points on MATH-500. These consistent gains support the benefit of aggregating continuation-token gradients through the remaining Transformer computation, rather than restricting each latent’s update to the log-probability of its associated decoded prefix token.

Figure 2: Learning-rate sensitivity of LatentSeek and GradCuit on MATH-500 using LLaMA-3.2-3B-Instruct.

Figure 3: Average accuracy across three representative backbones. GradCuit (random) uses randomly sampled update directions.

3.3 Robustness Gain

We examine the robustness of latent optimization from two complementary perspectives: sensitivity to the learning rate and dependence on reward guidance. For the learning-rate analysis, we evaluate GradCuit and LatentSeek using LLaMA-3.2-3B-Instruct on MATH-500 with the Boxed answer format. We scale their respective base learning rates, and , by while holding all other settings fixed. For the gradient-direction analysis, we replace the reward-derived gradients in GradCuit with Gaussian random directions at each optimization step, resulting in a random-walk variant without reward guidance. We report Boxed accuracy averaged over GPQA-Diamond, GSM8K, and MATH-500 using LLaMA-3.2-3B-Instruct, LLaMA-3.1-8B-Instruct, and Qwen3-4B-Instruct.

Robustness to Learning Rates. As shown in Figure˜3, GradCuit maintains strong performance across all seven learning-rate settings. Its accuracy varies only from 51.4% to 53.8%, compared with 47.6% to 51.8% for LatentSeek. It also achieves both a higher average accuracy (52.6% versus 49.3%) and a substantially lower standard deviation (0.82 versus 1.53). These results indicate that direct interaction with selected-layer latent states provides a more stable optimization interface that is less sensitive to step-size selection.

Robustness to Optimization Directions. As shown in Figure˜3, even the random-walk variant of GradCuit achieves an average accuracy of 60.6%, slightly exceeding the 60.3% of reward-guided LatentSeek. Thus, useful reasoning trajectories can be discovered through direct exploration of the selected-layer latent space even without an explicitly optimized direction. This comparison separates two sources of improvement: the direct latent interaction introduced by GradCuit makes the optimization space inherently more accessible and robust, while reward guidance determines how effectively that space is explored.

3.4 Latent Dynamics: Token-Level Gradient Attribution Analysis

We conduct the analysis using LLaMA-3.2-3B-Instruct on GPQA-Diamond, GSM8K, and MATH-500 with the Boxed answer format. Gradients are computed from the generated trajectory at the final latent-optimization step. For each continuation token, we define its gradient strength as the norm of its gradient with respect to all optimized latent states. We then average the gradient strength over tokens assigned to the same category and across evaluation examples. Tokens are automatically classified using the rule-based categories summarized in Table˜2.

媒体内容 · 前往原文查看

Token category Representative tokens

Formatting ., ,, #, -

Reasoning Connector because, therefore, then, however

Content Explanation compute, equation, value, number

Answer Marker \boxed, ####, final, answer

Answer Content 42, C, 3.14, 7/8

Table 2: Continuation-token categories used in the gradient attribution analysis.

Figure 4: Gradient strength across continuation-token categories on three reasoning benchmarks.

Reasoning connectors receive the strongest gradients. As shown in Figure˜4, reasoning connectors consistently exhibit the highest gradient strength across all three benchmarks. Tokens such as because, therefore, and then mark transitions between successive reasoning steps. Their consistently high first-order sensitivity indicates that optimized latent states primarily influence how the model connects and advances its reasoning process, rather than affecting continuation tokens uniformly.

4 Further Analysis

In this section, we perform deeper analysis on GradCuit.

4.1 Ablation Study

We conduct the ablation study across five backbones and three benchmarks using the Boxed answer format. We compare the full GradCuit with three variants: w/o Gradient replaces the reward-derived gradients with Gaussian random directions, w/o Latent Update retains the inserted prefix without updating it, and w/o Inserted Prefix reduces the method to standard CoT. The results are presented in Table˜3.

媒体内容 · 前往原文查看

LLaMA-3.2-3B LLaMA-3.1-8B Qwen2.5-7B Qwen2.5-14B Qwen3-4B

Method G S M G S M G S M G S M G S M

GradCuit 30.3 82.5 53.6 31.3 86.2 57.4 38.4 91.8 77.2 42.4 93.3 80.2 52.5 90.0 91.8

w/o Gradient

26.3

(-4.0)

80.7

(-1.8)

49.4

(-4.2)

25.3

(-6.0)

85.4

(-0.8)

54.2

(-3.2)

37.9

(-0.5)

89.5

(-2.3)

75.8

(-1.4)

42.4

(-0.0)

93.0

(-0.3)

78.8

(-1.4)

48.0

(-4.5)

89.6

(-0.4)

86.2

(-5.6)

w/o Latent Update and the above

23.2

(-7.1)

78.5

(-4.0)

47.6

(-6.0)

20.2

(-11.1)

82.6

(-3.6)

49.0

(-8.4)

36.4

(-2.0)

89.2

(-2.6)

72.2

(-5.0)

41.4

(-1.0)

92.3

(-1.0)

78.4

(-1.8)

43.4

(-9.1)

89.3

(-0.7)

86.8

(-5.0)

w/o Inserted Prefix and the above

17.7

(-12.6)

75.4

(-7.1)

40.4

(-13.2)

20.7

(-10.6)

81.7

(-4.5)

50.6

(-6.8)

31.3

(-7.1)

89.2

(-2.6)

73.0

(-4.2)

40.4

(-2.0)

92.4

(-0.9)

79.2

(-1.0)

40.9

(-11.6)

88.1

(-1.9)

87.2

(-4.6)

Table 3: Ablation results across five instruction-tuned backbones. We report accuracy (%). Within each backbone, G, S, and M denote GPQA-Diamond, GSM8K, and MATH-500, respectively.

The inserted prefix alone is insufficient. Averaged over all 15 backbone–benchmark settings, inserting a fixed prefix improves accuracy from 60.5% to 62.0%, but degrades performance in six settings and ties CoT in one. In contrast, the full GradCuit reaches 66.6% and outperforms the fixed-prefix variant in all 15 settings by an average of 4.6 points. The improvement therefore cannot be explained solely by the additional textual reasoning cue.

Reward guidance provides the decisive gain. Random Optimization outperforms the fixed-prefix variant in 14 of 15 settings, indicating that modifying selected-layer latent states can expose useful alternative reasoning trajectories. Replacing random directions with reward-derived gradients provides a further average improvement of 2.4 points: GradCuit outperforms random optimization in 14 settings, ties it in one, and is best or tied-best in every column. These results indicate that selected-layer optimization and reward-guided credit assignment provide complementary benefits.

4.2 Analysis of Optimized Layers

Figure 5: Sensitivity of GradCuit to the optimized layer on LLaMA-3.2-3B-Instruct. Performance is reported on (a) GPQA-Diamond, (b) GSM8K, and (c) MATH-500. The horizontal axis indicates the normalized depth at which the latent is optimized.

We investigate how the layer at which the latent prefix is optimized affects the performance of GradCuit. Using LLaMA-3.2-3B-Instruct as the backbone, we place the optimizable prefix at four normalized depths.

As shown in Figure˜5, optimizing the latent prefix at an intermediate layer generally outperforms optimization in the embedding space. On GPQA-Diamond, the 25% and 50% placements both achieve the highest accuracy of , compared with at the embedding level. The benefit is most pronounced on MATH-500, where moving the latent toward the middle of the network yields the largest improvement.

The optimal layer is therefore task-dependent, but the strongest results consistently occur between 25% and 50% of the network depth. Moving the optimization point further to 75% does not provide an additional gain and can be detrimental, most notably on GPQA-Diamond. These results are consistent with a favorable trade-off at early-to-middle depths: the hidden states are contextualized enough to provide informative optimization signals while retaining sufficient downstream Transformer computation to propagate and refine the effect of the optimized latent.

4.3 Case Study

To qualitatively investigate how test-time latent optimization affects model reasoning, we present a representative example in Table 4. We compare the outputs before and after optimization by LatentSeek and GradCuit.

媒体内容 · 前往原文查看

Question. Find the unique odd integer such that and is the inverse of modulo . LatentSeek Original We seek the unique integer such that and is the multiplicative inverse of […] The final answer is \boxed{19}. Optimized We solve unique integer , that that and is the inverse of […] modulo 23 is \boxed{20}. GradCuit (Ours) Original We are given that is the inverse of modulo 23. […] modulo 23 is \boxed{20}. Optimized We are given that is the inverse of modulo 23. […] The answer is .

Table 4: A representative case comparing the outputs before and after latent optimization. All model outputs are displayed verbatim, and the ground-truth answer is .

As shown in Table 4, LatentSeek changes the decoded token sequence during optimization but still produces an incorrect answer and introduces malformed text such as “that that.” In contrast, GradCuit directly updates the hidden states without explicitly modifying the token sequence, thereby avoiding such textual corruption while correcting the answer from to . This case further illustrates the greater robustness of GradCuit.

5 Related Work

Test-Time Optimization.

A broad set of methods improve language-model outputs at inference time by allocating additional computation. Discrete approaches include repeated sampling and aggregation, such as self-consistency (Wang et al., 2023), as well as recitation-augmented generation (Sun et al., 2023) and explicit trajectory search (Hao et al., 2023). Continuous inference-time steering includes PPLM, which updates internal activations using gradients from a differentiable attribute model while keeping the base language model frozen (Dathathri et al., 2020). Amulet instead formulates each token-decoding step as an online optimization problem for test-time preference adaptation (Zhang et al., 2025). CTRL is related to controllable generation, but its control-code conditioning is learned during pre-training rather than optimized at test time (Keskar et al., 2019). Test-Time Training (TTT) updates model parameters or fast model state online using self-supervised objectives (Sun et al., 2020; 2025, Hardt and Sun, 2024). In contrast, GradCuit keeps all model parameters fixed and optimizes only a small set of instance-specific states inserted at a selected Transformer layer.

Reinforcement Learning for Language Models.

Reinforcement learning from human feedback is exemplified by InstructGPT (Ouyang et al., 2022), whereas Constitutional AI uses reinforcement learning from AI feedback (Bai et al., 2022). Policy-gradient methods such as PPO are widely used in this setting (Schulman et al., 2017). More recent alignment objectives and algorithms include Direct Preference Optimization (Rafailov et al., 2023) and Statistical Rejection Sampling (Liu et al., 2024a). Group Relative Policy Optimization was introduced in DeepSeekMath (Shao et al., 2024) and subsequently used at scale in DeepSeek-R1 (Guo et al., 2025). In parallel, reward modeling has evolved from human preference models to automated and language-model-driven reward design (Kwon et al., 2023), as well as multi-agent verification frameworks (Lifshitz et al., 2025). A related variational perspective is explored by Chen et al. (2024), which improves latent trajectory fitting by updating model parameters. Compared with these training-time approaches, our method operates entirely at test time: it does not update the policy model, but instead uses gradients of token-level objectives to refine instance-specific latent states.

Latent Reasoning.

Prompting-based reasoning methods such as chain-of-thought prompting (Wei et al., 2022, Kojima et al., 2022, Zhou et al., 2023) elicit intermediate reasoning steps in text. Compute-adaptive strategies further adjust inference effort based on task complexity (Snell et al., 2025, Inoue et al., 2025). Motivated by the limitations of explicit textual traces, latent chain-of-thought methods replace or compress reasoning traces into continuous representations (Hao et al., 2025, Shen et al., 2025, Cheng and Van Durme, 2024, Deng et al., 2024). Prompt tuning and soft/prefix prompting (Lester et al., 2021, Liu et al., 2024b, Li and Liang, 2021, Liu et al., 2022) also inject trainable vectors, but they typically require supervised data and training-time backpropagation through the model. Our work is closest to test-time latent-optimization methods. LatentSeek optimizes output-side latent representations that are decoded into token sequences for reward evaluation (Li et al., 2025). LTPO optimizes input-level latent thought vectors using a confidence reward and perturbation-based policy gradients (Ye et al., 2026). MILR searches intermediate text–image output representations for multimodal generation (Mi et al., 2026), while DMLR refines latent think tokens using confidence-guided policy gradients and dynamic visual injection (Liu et al., 2026). GradCuit instead inserts optimizable states at a selected Transformer layer and directly differentiates continuation-token log-probabilities with respect to these states through the remaining Transformer computation.

6 Conclusion

We study the credit-assignment problem in test-time latent reasoning: how to propagate sequence-level rewards to the instance-specific latent states that shape a reasoning trajectory. We introduce GradCuit, which realizes Credit-Assigned Gradient Flow by inserting optimizable latent states at a selected Transformer layer. This construction makes every continuation-token log-probability differentiable with respect to every latent state, enabling direct reward-weighted optimization while keeping the base model frozen.

Across five backbones and three reasoning benchmarks, GradCuit achieves the highest average accuracy among all evaluated methods while exhibiting substantially lower sensitivity to learning-rate selection than LatentSeek. Even when reward-derived gradients are replaced with random directions, GradCuit remains competitive with LatentSeek, indicating that direct interaction within a selected-layer latent space provides a robust optimization interface. Token-level gradient attribution shows that latent influence concentrates on reasoning-connector tokens, while ablation studies establish the complementary roles of the inserted prefix, latent-state optimization, and reward guidance. Additional analyses identify early-to-middle Transformer layers as the most effective optimization space and illustrate, through a representative case, that direct hidden-state updates can correct an erroneous answer without introducing malformed text. Together, these findings demonstrate that GradCuit enables more robust and interpretable test-time latent reasoning.

References

Y. Bai, S. Kadavath, S. Kundu, A. Askell, J. Kernion, A. Jones, A. Chen, A. Goldie, A. Mirhoseini, C. McKinnon, et al. (2022) Constitutional ai: harmlessness from ai feedback. CoRR. Cited by: §5.

H. Chen, Y. Feng, Z. Liu, W. Yao, A. Prabhakar, S. Heinecke, R. Ho, P. Mui, S. Savarese, C. Xiong, and H. Wang (2024) Language models are hidden reasoners: unlocking latent reasoning capabilities via self-rewarding. External Links: 2411.04282, Link Cited by: §5.

J. Cheng and B. Van Durme (2024) Compressed chain of thought: efficient reasoning through dense representations. CoRR. Cited by: §5.

K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, C. Hesse, and J. Schulman (2021) Training verifiers to solve math word problems. CoRR. Cited by: §3.1.

S. Dathathri, A. Madotto, J. Lan, J. Hung, E. Frank, P. Molino, J. Yosinski, and R. Liu (2020) Plug and play language models: a simple approach to controlled text generation. In The Eighth International Conference on Learning Representations, External Links: Link Cited by: §5.

Y. Deng, Y. Choi, and S. Shieber (2024) From explicit cot to implicit cot: learning to internalize cot step by step. CoRR. Cited by: §1, §5.

N. Elhage, N. Nanda, C. Olsson, T. Henighan, N. Joseph, B. Mann, A. Askell, Y. Bai, A. Chen, T. Conerly, N. DasSarma, D. Drain, D. Ganguli, Z. Hatfield-Dodds, D. Hernandez, A. Jones, J. Kernion, L. Lovitt, K. Ndousse, D. Amodei, T. Brown, J. Clark, J. Kaplan, S. McCandlish, and C. Olah (2021) A mathematical framework for transformer circuits. Transformer Circuits Thread. Note: https://transformer-circuits.pub/2021/framework/index.html Cited by: §1.

D. Guo, D. Yang, H. Zhang, J. Song, R. Zhang, R. Xu, Q. Zhu, S. Ma, P. Wang, X. Bi, et al. (2025) DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature 645, pp. 633–638. External Links: Document, Link Cited by: §5.

W. Gurnee, N. Sofroniew, A. Pearce, M. Piotrowski, I. Kauvar, R. Chen, A. Soligo, P. Bogdan, E. Ong, R. Wang, B. Thompson, D. Abrahams, S. Kantamneni, E. Ameisen, J. Batson, and J. Lindsey (2026) Verbalizable representations form a global workspace in language models. Transformer Circuits Thread. External Links: Link Cited by: footnote 1.

S. Hao, Y. Gu, H. Ma, J. Hong, Z. Wang, D. Wang, and Z. Hu (2023) Reasoning with language model is planning with world model. In Annual Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 8154–8173. Cited by: §5.

S. Hao, S. Sukhbaatar, D. Su, X. Li, Z. Hu, J. E. Weston, and Y. Tian (2025) Training large language models to reason in a continuous latent space. In Second Conference on Language Modeling, External Links: Link Cited by: §1, §5.

M. Hardt and Y. Sun (2024) Test-time training on nearest neighbors for large language models. In International Conference on Learning Representations (ICLR), Cited by: §5.

D. Hendrycks, C. Burns, S. Kadavath, A. Arora, S. Basart, E. Tang, D. Song, and J. Steinhardt (2021) Measuring mathematical problem solving with the math dataset. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, Cited by: §3.1.

Y. Inoue, K. Misaki, Y. Imajuku, S. Kuroki, T. Nakamura, and T. Akiba (2025) Wider or deeper? scaling LLM inference-time compute with adaptive branching tree search. In Advances in Neural Information Processing Systems, External Links: Link Cited by: §5.

N. S. Keskar, B. McCann, L. R. Varshney, C. Xiong, and R. Socher (2019) CTRL: a conditional transformer language model for controllable generation. CoRR. Cited by: §5.

T. Kojima, S. S. Gu, M. Reid, Y. Matsuo, and Y. Iwasawa (2022) Large language models are zero-shot reasoners. In Advances in Neural Information Processing Systems (NeurIPS), Cited by: §5.

M. Kwon, S. M. Xie, K. Bullard, and D. Sadigh (2023) Reward design with language models. In International Conference on Learning Representations (ICLR), Cited by: §5.

B. Lester, R. Al-Rfou, and N. Constant (2021) The power of scale for parameter-efficient prompt tuning. In Annual Conference on Empirical Methods in Natural Language Processing (EMNLP), Cited by: §5.

H. Li, C. Li, T. Wu, X. Zhu, Y. Wang, Z. Yu, E. H. Jiang, S. Zhu, Z. Jia, Y. N. Wu, and Z. Zheng (2025) Seek in the dark: reasoning via test-time instance-level policy gradient in latent space. External Links: 2505.13308, Link Cited by: §A.2, §1, §1, §2.1, §2.2, §2.2, §3.1, §5.

X. L. Li and P. Liang (2021) Prefix-tuning: optimizing continuous prompts for generation. In Annual Meeting of the Association for Computational Linguistics (ACL), Cited by: §5.

S. Lifshitz, S. A. McIlraith, and Y. Du (2025) Multi-agent verification: scaling test-time compute with multiple verifiers. In Second Conference on Language Modeling, External Links: Link Cited by: §5.

H. Lightman, V. Kosaraju, Y. Burda, H. Edwards, B. Baker, T. Lee, J. Leike, J. Schulman, I. Sutskever, and K. Cobbe (2024) Let’s verify step by step. In International Conference on Learning Representations (ICLR), Cited by: §3.1.

C. Liu, Y. Yang, Y. Fan, Q. Wei, S. Liu, and X. E. Wang (2026) Reasoning within the mind: dynamic multimodal interleaving in latent space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Findings, pp. 9225–9236. External Links: Link Cited by: §5.

T. Liu, Y. Zhao, R. Joshi, M. Khalman, M. Saleh, P. J. Liu, and J. Liu (2024a) Statistical rejection sampling improves preference optimization. In International Conference on Learning Representations (ICLR), External Links: Link Cited by: §5.

X. Liu, K. Ji, Y. Fu, W. Tam, Z. Du, Z. Yang, and J. Tang (2022) P-tuning: prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 61–68. External Links: Document, Link Cited by: §5.

X. Liu, Y. Zheng, Z. Du, M. Ding, Y. Qian, Z. Yang, and J. Tang (2024b) GPT understands, too. AI Open 5, pp. 208–215. Cited by: §5.

Y. Mi, Y. Zhao, H. Li, C. Li, H. Wu, X. Ma, S. Zhu, Y. N. Wu, and Q. Li (2026) MILR: improving multimodal image generation via test-time latent reasoning. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §1, §5.

L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray, et al. (2022) Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems (NeurIPS) 35, pp. 27730–27744. Cited by: §5.

R. Rafailov, A. Sharma, E. Mitchell, C. D. Manning, S. Ermon, and C. Finn (2023) Direct preference optimization: your language model is secretly a reward model. Advances in Neural Information Processing Systems (NeurIPS) 36. Cited by: §5.

D. Rein, B. L. Hou, A. C. Stickland, J. Petty, R. Y. Pang, J. Dirani, J. Michael, and S. R. Bowman (2024) GPQA: a graduate-level google-proof q&a benchmark. In First Conference on Language Modeling, Cited by: §3.1.

J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov (2017) Proximal policy optimization algorithms. CoRR. Cited by: §5.

Z. Shao, P. Wang, Q. Zhu, R. Xu, J. Song, X. Bi, H. Zhang, M. Zhang, Y. Li, Y. Wu, et al. (2024) DeepSeekMath: pushing the limits of mathematical reasoning in open language models. CoRR. External Links: Link Cited by: §5.

Z. Shen, H. Yan, L. Zhang, Z. Hu, Y. Du, and Y. He (2025) CODI: compressing chain-of-thought into continuous space via self-distillation. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pp. 677–693. External Links: Document, Link Cited by: §5.

C. V. Snell, J. Lee, K. Xu, and A. Kumar (2025) Scaling llm test-time compute optimally can be more effective than scaling parameters for reasoning. In International Conference on Learning Representations (ICLR), Cited by: §5.

Y. Sun, X. Li, K. Dalal, J. Xu, A. Vikram, G. Zhang, Y. Dubois, X. Chen, X. Wang, S. Koyejo, et al. (2025) Learning to (learn at test time): rnns with expressive hidden states. International Conference on Machine Learning (ICML). Cited by: §5.

Y. Sun, X. Wang, Z. Liu, J. Miller, A. Efros, and M. Hardt (2020) Test-time training with self-supervision for generalization under distribution shifts. In International Conference on Machine Learning (ICML), Cited by: §5.

Z. Sun, X. Wang, Y. Tay, Y. Yang, and D. Zhou (2023) Recitation-augmented language models. In International Conference on Learning Representations (ICLR), Cited by: §5.

X. Wang, J. Wei, D. Schuurmans, Q. V. Le, E. H. Chi, S. Narang, A. Chowdhery, and D. Zhou (2023) Self-consistency improves chain of thought reasoning in language models. In International Conference on Learning Representations (ICLR), External Links: Link Cited by: §5.

J. Wei, X. Wang, D. Schuurmans, M. Bosma, B. Ichter, F. Xia, E. H. Chi, Q. V. Le, and D. Zhou (2022) Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems (NeurIPS) 35, pp. 24824–24837. Cited by: §1, §5.

W. Ye, Y. Liang, and L. Shan (2026) Thinking on the fly: test-time reasoning enhancement via latent thought policy optimization. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §1, §5.

Z. Zhang, F. Bai, Q. Chen, C. Ma, M. Wang, H. Sun, Z. Zheng, and Y. Yang (2025) Amulet: realignment during test time for personalized preference adaptation of LLMs. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: §5.

D. Zhou, N. Schärli, L. Hou, J. Wei, N. Scales, X. Wang, D. Schuurmans, C. Cui, O. Bousquet, Q. V. Le, and E. H. Chi (2023) Least-to-most prompting enables complex reasoning in large language models. In International Conference on Learning Representations (ICLR), External Links: Link Cited by: §5.

Appendix A Implementation Details

A.1 Details of GradCuit

Latent Construction and Deployment.

For each problem, we first render the system and user messages using the native Hugging Face chat template of the corresponding backbone. We then append the fixed textual prefix, “Let’s think about this problem and solve it step by step.”, after the rendered prompt and before the generated continuation. The number of inserted latent states, denoted by , is therefore determined by the number of tokens into which each backbone tokenizer decomposes this prefix. The optimized layer is a method hyperparameter that determines the decoder-block input at which the prefix representations are treated as optimizable latent states. For a model with decoder blocks, we set in the main experiments to obtain a consistent representative configuration across backbones. We additionally vary in the layer-position analysis to examine how the location of the latent optimization space affects optimization performance. We initially pass the prompt and textual prefix through the first Transformer blocks and extract the hidden representations corresponding to the prefix span, denoted by . Rather than repeatedly encoding the textual prefix, we introduce a trainable offset , initialized to zero, and use

as the prefix representation throughout optimization. At the input to the selected decoder block, a forward pre-hook replaces the original prefix span with . All prompt and continuation representations retain their original positions, and the standard causal attention mask is used without modification. Consequently, continuation tokens can attend to all inserted latent states while the model architecture and parameters remain unchanged. All model parameters are frozen, and gradients are computed only with respect to .

Test-Time Optimization.

Before optimization, we greedily generate an initial continuation using and evaluate its final answer with the self-reward verifier described below. At each optimization step, the currently generated token sequence is treated as fixed and passed through the model using teacher forcing. We disable the key–value cache during this gradient computation and collect the log-probability assigned to every continuation token. A single trajectory is used at each step to estimate the sequence-level objective, and the implementation minimizes

(8)

The token log-probabilities are summed without length normalization. The generated token IDs and their input embeddings are detached from the computational graph, as is the scalar reward, so the gradient propagates only from the continuation-token log-probabilities through the remaining Transformer blocks to the latent offset. We update using Adam with a learning rate of , the default coefficients and , and . No weight decay, gradient clipping, latent-norm constraint, or additional regularization is applied. After every update, we greedily regenerate the complete continuation using the updated latent states and obtain a new reward. Optimization terminates immediately once the verifier accepts the final answer or after at most ten latent updates. If no answer is accepted within this budget, the continuation produced after the final update is returned.

媒体内容 · 前往原文查看

Algorithm 1 GradCuit inference for one problem instance.

1:Problem context and frozen model

2:Prefix , optimized layer , learning rate , and update budget

3:Render the model-specific chat prompt and append

4:Extract the prefix states at the input to decoder block

5:Initialize

6:

7:Generate greedily using

8:Obtain from the verifier

9:for do

10: if then

11: return

12: end if

13: Recompute continuation-token log-probabilities with teacher forcing

14: Compute using Eq. (8)

15: Update by one Adam step with learning rate

16:

17: Regenerate greedily using

18: Re-evaluate

19:end for

20:return

Self-Reward Verifier.

Across all experiments that require a reward or verification signal, the evaluated LLM itself serves as the self-verifier and supplies the self-reward; no separate reward model is introduced. For each backbone, GradCuit, Self-Reflection, Self-Scored BoN, and LatentSeek all invoke that same backbone using an identical verifier prompt, answer-extraction procedure, and decision rule. The verifier receives only the original question and the extracted final answer. It evaluates final-answer correctness without scoring the completeness or quality of the generated reasoning. Its binary verdict is mapped to the discrete reward

An output from which no valid final answer can be extracted is assigned a reward of . This unified self-reward protocol ensures that performance differences among GradCuit, Self-Reflection, Self-Scored BoN, and LatentSeek do not arise from different reward mechanisms. The complete verifier prompt is:

You are a critical verifier for mathematical questions.

You will be given the original question and one final answer.

Decide whether that answer is correct for the question.

QUESTION:

{question}

FINAL ANSWER:

{extracted_answer}

INSTRUCTIONS:

1. Verify only the final answer. Do not evaluate any missing reasoning steps.

2. Do not solve the problem independently from scratch unless a tiny auxiliary calculation is strictly necessary for verification.

3. Prefer reverse verification methods such as substitution, plugging the answer back into the original conditions, checking algebraic consistency, checking boundary cases, or other direct validation targeted at the proposed answer.

4. Accept mathematically equivalent forms when they represent the same final answer.

5. If the final answer is correct, the verdict is True.

6. If the final answer is incorrect, the verdict is False.

Generation Prompts and Decoding.

For the Boxed format, the system and user messages are:

{"role": "system", "content": "Please reason step by step, and put your final answer within \boxed{}."}

{"role": "user", "content": q}

For the JSON format, the system and user messages are:

{"role": "system", "content": "Please reason step by step, and put your final answer in a json dict with exactly one key "answer", for example {"answer": "1.234"}."}

{"role": "user", "content": q}

GradCuit uses greedy decoding with a batch size of one. We set the maximum continuation length to 4,096 tokens for Qwen3-4B-Instruct-2507 because it typically produces longer reasoning trajectories, and to 2,048 tokens for all other backbones. To ensure a fair comparison, these backbone-specific maximum continuation lengths are kept identical across GradCuit and all baselines, while each method retains its required decoding strategy.

媒体内容 · 前往原文查看

Table 5: Backbone-specific GradCuit configurations used in the main experiments. Layer indices identify the decoder-block input at which the inserted prefix states are optimized.

Backbone Decoder Blocks Optimized Layer Maximum New Tokens

LLaMA-3.2-3B-Instruct 28 14 2,048

LLaMA-3.1-8B-Instruct 32 16 2,048

Qwen2.5-7B-Instruct 28 14 2,048

Qwen2.5-14B-Instruct 48 24 2,048

Qwen3-4B-Instruct-2507 36 18 4,096

Random-Direction Variant.

For the random-direction analysis, the reward-derived update is replaced at every step by an independently sampled Gaussian direction. Specifically, with , we apply

The sampled direction is globally -normalized and then scaled by the learning rate. This variant does not use Adam or match the random-vector norm to the reward-derived gradient norm. The verifier is retained only for the common stopping rule. All remaining settings, including the inserted prefix, optimized layer, learning rate, generation budget, and decoding strategy, are identical to those of GradCuit.

Numerical and Randomness Settings.

Backbone inference and latent states use bfloat16 precision. The main experiments use a fixed random seed of 42 and report one run for each backbone–benchmark–format configuration. For the layer-position analysis with LLaMA-3.2-3B-Instruct, the 0%, 25%, 50%, and 75% positions correspond to the word-embedding space and decoder-block input indices 7, 14, and 21, respectively.

A.2 Details of Other Baselines

Shared Protocol.

All baselines use the native Hugging Face chat template of the corresponding backbone and the same Boxed and JSON system prompts used by GradCuit. Except for interactions required by each method, no additional instructions are added. The backbone-specific maximum generation lengths are also kept identical across methods: 4,096 tokens for Qwen3-4B-Instruct-2507 and 2,048 tokens for all other backbones. For methods requiring answer verification, the currently evaluated backbone itself serves as the self-verifier. The verifier uses the same prompt and binary reward rule described above, with greedy decoding and a maximum generation length of 8,192 tokens. All experiments use a fixed random seed of 42.

Chain-of-Thought.

The Chain-of-Thought (CoT) baseline directly generates one complete response from the corresponding Boxed or JSON prompt using greedy decoding. It does not include the fixed prefix introduced by GradCuit and performs no subsequent verification, reflection, sampling, or test-time optimization. The single generated response is directly used as the final output.

One-Pass Self-Reflection.

The initial response of Self-Reflection is generated using exactly the same procedure as CoT. The self-verifier then evaluates the extracted final answer. If the answer is accepted, the initial response is returned without further generation. Otherwise, we continue the existing multi-turn conversation by retaining the initial response as an assistant message and appending one user turn that asks the backbone to reconsider and revise its answer. The verifier supplies no textual critique or auxiliary reasoning to the backbone. The backbone generates one revised response using greedy decoding, which is returned as the final output. No additional reflection round is performed.

Self-Consistency.

Self-Consistency generates five candidate responses for each problem using stochastic decoding with . We explicitly enable sampling and leave all other Hugging Face generation parameters at their default values. A final answer is extracted from each candidate according to the corresponding Boxed or JSON format. Candidates from which no valid answer can be extracted are discarded. The remaining extracted answers are compared using strict string matching, without invoking the verifier or performing additional mathematical-equivalence checking. The answer occurring most frequently is returned as the final prediction. If multiple answers receive the same highest number of votes, the one appearing first in generation order is selected.

Self-Scored Best-of-N.

Self-Scored Best-of-N (BoN) generates 5 candidate responses using the same stochastic decoding configuration as Self-Consistency. All 5 candidates are generated and subsequently evaluated by the same self-verifier used for GradCuit. The verifier verdict for each candidate is mapped to the shared discrete reward, with accepted and rejected candidates receiving rewards of and , respectively. The candidate with the highest reward is selected, and its complete generated response is returned as the final output. When multiple candidates receive the same highest reward, the final candidate in generation order is selected.

LatentSeek.

We use the official implementation of LatentSeek (Li et al., 2025) and retain its recommended method-specific configuration. LatentSeek uses the same backbone, Boxed or JSON input prompt, answer parser, self-verifier, and backbone-specific maximum generation length as GradCuit. Its latent variables are optimized using Adam with a learning rate of for at most ten optimization steps. All remaining method-specific implementation details follow the official LatentSeek implementation.

A.3 Hardware and Software.

All experiments were conducted on a server equipped with eight NVIDIA L40 GPUs. The software environment used Python 3.10, PyTorch 2.1.0, and CUDA 13.2.

Appendix B Compute Budget and Efficiency

媒体内容 · 前往原文查看

Method LLaMA3.2-3B LLaMA3.1-8B Qwen2.5-7B Qwen2.5-14B Qwen3-4B Avg.

Prompt Type Boxed JSON Boxed JSON Boxed JSON Boxed JSON Boxed JSON Boxed JSON

GPQA-Diamond

GradCuit (Ours) 2.64 2.68 3.63 3.25 1.79 1.85 2.49 1.98 4.98 4.52 3.11 2.86

Self-Consistency 5 5 5 5 5 5 5 5 5 5 5 5

Self-Scored BoN 5 5 5 5 5 5 5 5 5 5 5 5

GSM8K

GradCuit (Ours) 2.34 2.02 1.94 1.83 1.73 1.73 1.77 1.87 1.36 1.32 1.83 1.75

Self-Consistency 5 5 5 5 5 5 5 5 5 5 5 5

Self-Scored BoN 5 5 5 5 5 5 5 5 5 5 5 5

MATH-500

GradCuit (Ours) 2.75 3.59 3.46 3.35 2.18 2.37 1.99 1.39 1.62 2.05 2.40 2.55

Self-Consistency 5 5 5 5 5 5 5 5 5 5 5 5

Self-Scored BoN 5 5 5 5 5 5 5 5 5 5 5 5

Table 6: Average optimization iterations and repeated-sampling budgets in the main experiments. For GradCuit, the values include the original unoptimized generation as the first round, followed by any subsequent optimized generations before termination. For Self-Consistency and Self-Scored BoN, the values report the fixed number of sampled responses.

媒体内容 · 前往原文查看

Question. Which sequence of reactions would lead to the high-yield synthesis of 1-(3-bromo-5-nitrophenyl)ethan-1-one from benzene? Choices: (A) i) HNO3/H2SO4; ii) Fe/HCl; iii) NaNO2/HCl; iv) H3PO2; v) Br2/FeBr3; vi) CH3COCl/AlCl3; vii) HNO3/H2SO4 (B) i) CH3COCl/AlCl3; ii) Br2/FeBr3; iii) HNO3/H2SO4; iv) Fe/HCl; v) HNO3/H2SO4; vi) NaNO2/HCl; vii) H3PO2 (C) i) HNO3/H2SO4; ii) Fe/HCl; iii) CH3COCl/AlCl3; iv) Br2/FeBr3; v) HNO3/H2SO4; vi) NaNO2/HCl; vii) H3PO2 (D) i) Br2/FeBr3; ii) HNO3/H2SO4; iii) CH3COCl/AlCl3; iv) HNO3/H2SO4; v) Fe/HCl; vi) NaNO2/HCl; vii) H3PO2 Original 1. The target compound is 1-(3-bromo-5-nitrophenyl)ethan-1-one, which is an aromatic ketone with a bromo and a nitro group on the benzene ring. […] The closest sequence that matches the above steps is option (D), but it includes an extra step (v) HNO3/H2SO4, which is not necessary. Therefore, the correct answer is \boxed{D}. Optimized The target compound is 1-(3-bromo-5-nitrophenyl)ethan-1-one. To synthesize this compound, we need to introduce a nitro group (-NO2) […] A, B and D options do not include the correct sequence of reactions. Therefore, the correct answer is: \boxed{C}.

Table 7: A case from GPQA-Diamond. The backbone is Llama3.1-8B-Instruct and the ground-truth answer is C.

媒体内容 · 前往原文查看

Question. A merchant must choose between purchasing jewelry worth and electronic gadgets worth . The jewelry market is expected to rise by , while the electronics market is expected to rise by within the month. What is the maximum profit the merchant can obtain? Original Step 1: Calculate the future value of the jewelry after a 2.5% increase. […] Profit = $8,096 - $8,000 Profit = $96 Therefore, the merchant will make a profit of $96 by choosing the electronic gadgets. \boxed{$96} Optimized 1. The merchant has two options: - Option 1: Purchase jewelry worth $5,000. […] 9. Since $125 is greater than $96, the merchant should choose Option 1 (jewelry) to maximize profit. 10. Therefore, the maximum profit the merchant can make is $125. \boxed{$125}

Table 8: A case from GSM8K. The backbone is Llama3.1-8B-Instruct and the ground-truth answer is .

Self-Consistency and Self-Scored BoN use a fixed sampling budget of five responses and generate all five candidates for every problem. In contrast, GradCuit first generates an unoptimized response and then iteratively updates the latent states until the self-verifier accepts the answer.

Table 6 counts the initial response as the first round and includes all subsequent optimized generations. Across the 30 backbone–benchmark–format settings, GradCuit averages 2.42 rounds, ranging from 1.32 to 4.98 and remaining below five in every setting. These results show that its improvements do not rely on more reasoning rounds.

Appendix C Additional Cases

The main text presents a representative case from MATH-500; here, we provide additional cases from the other two benchmarks, GPQA-Diamond and GSM8K. In the GPQA-Diamond case shown in Table 7, the original output selects option D despite identifying an inconsistency in its reaction sequence, whereas the optimized output correctly reasons about the order in which the substituents should be introduced and selects option C. In the GSM8K case shown in Table 8, the original output incorrectly compares the final values of the two investments and selects the electronic gadgets, while the optimized output instead compares their respective profits of and , yielding the correct maximum profit of . These cases further illustrate that hidden-state optimization of GradCuit can reorganize the overall reasoning structure and strategy, whereas LatentSeek modifies the early decoded token sequence and may consequently introduce malformed or duplicated text.
