Papers › Seek in the Dark: Reasoning via Test-Time Instance-Level Policy Gradient in Latent Space

Seek in the Dark: Reasoning via Test-Time Instance-Level Policy Gradient in Latent Space

19 May 2025arXiv:2505.13308archive 2025-07-28

Hengli Li, Chenxi Li, Tong Wu, Xuekai Zhu, Yuxuan Wang, Zhaoxin Yu, Eric Hanchen Jiang, Song-Chun Zhu, Zixia Jia, Ying Nian Wu, Zilong Zheng

Reasoning ability, a core component of human intelligence, continues to pose a significant challenge for Large Language Models (LLMs) in the pursuit of AGI. Although model performance has improved under the training scaling law, significant challenges remain, particularly with respect to training algorithms, such as catastrophic forgetting, and the limited availability of novel training data. As an alternative, test-time scaling enhances reasoning performance by increasing test-time computation without parameter updating. Unlike prior methods in this paradigm focused on token space, we propose leveraging latent space for more effective reasoning and better adherence to the test-time scaling law. We introduce LatentSeek, a novel framework that enhances LLM reasoning through Test-Time Instance-level Adaptation (TTIA) within the model's latent space. Specifically, LatentSeek leverages policy gradient to iteratively update latent representations, guided by self-generated reward signals. LatentSeek is evaluated on a range of reasoning benchmarks, including GSM8K, MATH-500, and AIME2024, across multiple LLM architectures. Results show that LatentSeek consistently outperforms strong baselines, such as Chain-of-Thought prompting and fine-tuning-based methods. Furthermore, our analysis demonstrates that LatentSeek is highly efficient, typically converging within a few iterations for problems of average complexity, while also benefiting from additional iterations, thereby highlighting the potential of test-time scaling in the latent space. These findings position LatentSeek as a lightweight, scalable, and effective solution for enhancing the reasoning capabilities of LLMs.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2505.13308")

Code

Syntology Ran 1 of 16 code samples harvested from 1 repository linked to this paper; 15 have no recorded run. Of those that ran: 1 ran · violated contract.

By repository: official repository: 16 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

bigai-nlco/latentseek officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 1 ran; 0 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
15unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from bigai-nlco/latentseek. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

is_equiv bigai-nlco/latentseek/src/extract_judge_answer/math_equivalent_MATH.py official repository ran · violated contract MIT (permissive) · 20063c675d638a77 · report
AIME_2024_prompt bigai-nlco/latentseek/src/prompts/solver_prompts.py official repository unverified MIT (permissive) · 7ced33ff18e50b62 · report
MATH_500_prompt bigai-nlco/latentseek/src/prompts/solver_prompts.py official repository unverified MIT (permissive) · c7427018645757d3 · report
choice_answer_clean bigai-nlco/latentseek/src/extract_judge_answer/grader.py official repository unverified MIT (permissive) · 809c0178a7ae90ff · report
choice_answer_clean bigai-nlco/latentseek/src/extract_judge_answer/parse_utils_qwen.py official repository unverified MIT (permissive) · 29ac3caee056dbbd · report
convert_expr bigai-nlco/latentseek/src/extract_judge_answer/latex2sympy/latex2sympy2.py official repository unverified MIT (permissive) · 9675ce6b40daf814 · report
convert_relation bigai-nlco/latentseek/src/extract_judge_answer/latex2sympy/latex2sympy2.py official repository unverified MIT (permissive) · d3b7a1bd2b1b514a · report
extract_answer bigai-nlco/latentseek/src/extract_judge_answer/utils.py official repository unverified MIT (permissive) · 6b13e7afc2042384 · report
extract_true_answer bigai-nlco/latentseek/src/extract_judge_answer/utils.py official repository unverified MIT (permissive) · 55245bd240cd59a0 · report
get_vera_prompt bigai-nlco/latentseek/src/prompts/vera_prompts.py official repository unverified MIT (permissive) · a5b1d036650981f3 · report
gsm8k_prompt bigai-nlco/latentseek/src/prompts/solver_prompts.py official repository unverified MIT (permissive) · b82d92df5b302601 · report
is_digit bigai-nlco/latentseek/src/extract_judge_answer/grader.py official repository unverified MIT (permissive) · fb37d3c84b18e368 · report
latex2sympy bigai-nlco/latentseek/src/extract_judge_answer/latex2sympy/latex2sympy2.py official repository unverified MIT (permissive) · 699bf6581fe5aa36 · report
optimized_generation bigai-nlco/latentseek/src/opt_generation.py official repository unverified MIT (permissive) · 0dfb6b192649acd6 · report
original_generation bigai-nlco/latentseek/src/ori_generation.py official repository unverified MIT (permissive) · 7334a52286348c49 · report
parse_digits bigai-nlco/latentseek/src/extract_judge_answer/grader.py official repository unverified MIT (permissive) · 7d4b7f8c3875b126 · report

Tasks

GSM8KMath

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections