Papers › HERMES: Towards Efficient and Verifiable Mathematical Reasoning in LLMs

HERMES: Towards Efficient and Verifiable Mathematical Reasoning in LLMs

24 Nov 2025ICMLarXiv:2511.18760added by Syntology

Azim Ospanov, Zijin Feng, Jiacheng Sun, Haoli Bai, Xin Shen, Farzan Farnia

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Informal mathematics has been central to modern large language model (LLM) reasoning, offering flexibility and efficient construction of arguments. However, purely informal reasoning is prone to logical gaps and subtle errors that are difficult to detect and correct. In contrast, formal theorem proving provides rigorous, verifiable mathematical reasoning, where each inference step is checked by a trusted compiler, but lacks the exploratory freedom of informal problem-solving. This mismatch leaves current LLM-based math agents without a principled way to combine the strengths of both paradigms. In this work, we introduce Hermes, the first tool-assisted agent that explicitly interleaves informal reasoning with formally verified proofs in Lean. The framework performs intermediate formal checking to prevent reasoning drift and a memory module for proof continuity across multi-step reasoning chains, enabling both exploration and verification. We evaluate Hermes on four challenging mathematical reasoning benchmarks using LLMs of varying parameter scales, from small models to state-of-the-art systems. Across all settings, Hermes reliably improves the reasoning accuracy of base models while substantially reducing reasoning token usage and computational cost compared to reward-based approaches. On difficult datasets such as AIME and HARDMath2, Hermes@1 achieves up to a 40% accuracy improvement while using 80% fewer total inference FLOPs. When scaled at test time, Hermes@5 boosts accuracy further by 20%. The implementation and codebase are publicly available at https://github.com/aziksh-ospanov/HERMES.

PaperPDFCode 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="2511.18760")

Code

Syntology Ran 0 of 10 code samples harvested from 1 repository linked to this paper; 10 have no recorded run.

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

aziksh-ospanov/HERMES found in paper text by SyntologyMIT report

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

10 samples harvested; 0 ran; 0 honoured the contract we drafted; 10 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.

10unverified

Licence: 0 of the 10 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 aziksh-ospanov/HERMES. “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.

call_scheduler aziksh-ospanov/HERMES/utils.py found in paper text by Syntology unverified MIT (permissive) · 47f1f1e0c743c78f · report
extract_local_model_output aziksh-ospanov/HERMES/utils/models.py found in paper text by Syntology unverified MIT (permissive) · 2759e9544307b4fb · report
is_deepseek_endpoint aziksh-ospanov/HERMES/models/llm_client.py found in paper text by Syntology unverified MIT (permissive) · a53e6fa33bc0f732 · report
llm_settings_from_config aziksh-ospanov/HERMES/models/auxiliary_llm.py found in paper text by Syntology unverified MIT (permissive) · 8bb58cb2cdfa9f7d · report
looks_like_full_url aziksh-ospanov/HERMES/models/llm_client.py found in paper text by Syntology unverified MIT (permissive) · f81a71bd89187804 · report
md_to_html aziksh-ospanov/HERMES/render_readme_pdf.py found in paper text by Syntology unverified MIT (permissive) · bb74e5f2f4b39ba4 · report
normalize_base_url aziksh-ospanov/HERMES/models/llm_client.py found in paper text by Syntology unverified MIT (permissive) · 1a185fd5ba9d831e · report
timeout_handler aziksh-ospanov/HERMES/multithread_support.py found in paper text by Syntology unverified MIT (permissive) · 7c727b0f05d1a52a · report
timeout_handler aziksh-ospanov/HERMES/utils.py found in paper text by Syntology unverified MIT (permissive) · deaa4d18cf20a245 · report
trace aziksh-ospanov/HERMES/multithread_support.py found in paper text by Syntology unverified MIT (permissive) · 4b110f7f2fb2a56d · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2511.18760, was issued in November 2025, after that date, so the archive has no leaderboard rows for it.

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