← Latest papers
🤖 AI

HERMES: Towards Efficient and Verifiable Mathematical Reasoning in LLMs

The paper introduces Hermes, a novel tool-assisted agent that interleaves informal reasoning with formally verified proofs in Lean to achieve more accurate, efficient, and verifiable mathematical reasoning in large language models compared to existing approaches.

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

Published 2026-06-01
📖 4 min read☕ Coffee break read

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

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to solve a very difficult math puzzle. You have a brilliant but slightly scatterbrained assistant (the Large Language Model, or LLM) who is great at brainstorming ideas and writing long, creative explanations. However, this assistant sometimes makes small logical mistakes, gets confused, or "hallucinates" facts that sound right but aren't true.

On the other hand, you have a strict, unyielding Mathematical Judge (a formal proof system called Lean). This judge never makes mistakes, but it's also very rigid. It doesn't understand your creative brainstorming; it only accepts perfectly structured, formal code. If you give it a messy explanation, it just says "Error."

Hermes is a new tool that acts as a translator and quality control manager between these two. It lets your creative assistant work freely but stops it every few steps to ask the strict Judge: "Is this specific step actually true?"

Here is how Hermes works, broken down into simple parts:

1. The Problem: The "Long Walk" vs. The "Strict Exam"

  • The Old Way (Informal Reasoning): Your assistant tries to solve the whole problem in one long stream of thought. It's flexible and fast, but if it takes a wrong turn early on, it might keep walking in the wrong direction for a long time before realizing the mistake. It's like driving a car with your eyes closed, hoping you don't hit a wall.
  • The Other Way (Formal Proving): Your assistant tries to write the solution in strict code from the very beginning. It's perfectly accurate, but it's so slow and difficult that the assistant often gets stuck or gives up. It's like trying to build a house brick-by-brick while checking every single brick against a blueprint before laying the next one.

2. The Hermes Solution: The "Checkpoint" System

Hermes combines the best of both worlds. It lets your assistant write a few steps of its creative explanation, then pauses to run a "checkpoint."

  • The Translator (Formalization Module): When the assistant says, "Therefore, the angle is 45 degrees," Hermes translates that sentence into the strict code the Judge understands.
  • The Judge (Prover Module): The strict Judge checks that code.
    • If it passes: Great! Hermes saves that step in a Memory Bank and tells the assistant, "You're good, keep going."
    • If it fails: The Judge says, "No, that's wrong." Hermes tells the assistant, "Stop! You made a mistake here. Go back and fix it."
  • The Memory Bank: Because math problems often have long chains of logic, Hermes remembers all the steps that did pass the check. This ensures the assistant doesn't forget the rules it already proved, keeping the whole argument consistent.

3. Why It's Better (The Results)

The paper tested Hermes on tough math competitions (like the AIME and HARDMath2) using various AI models.

  • Accuracy: Hermes made the AI much smarter. On the hardest problems, it improved the AI's success rate by up to 40%. It stopped the AI from confidently giving wrong answers.
  • Efficiency: You might think checking every step would be slow and expensive. Surprisingly, Hermes was actually faster and cheaper (in terms of computer power) than other methods that try to generate 5 or 10 different answers and pick the best one. It's like taking a direct, verified path versus wandering around a maze trying 10 different routes.
  • Clarity: Unlike other methods that just say "This answer is 80% likely to be right," Hermes gives a clear "Yes" or "No" on specific steps, making it easier to see why an answer is correct or wrong.

The Bottom Line

Hermes is like giving your creative math assistant a smart, automated editor that checks its work in real-time. It doesn't stop the assistant from thinking creatively; it just makes sure the assistant doesn't wander off a cliff. The result is a math-solving AI that is not only more accurate but also more efficient and easier to trust.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →