FormalJudge: A Neuro-Symbolic Paradigm for Agentic Oversight

Jiayi Zhou, Yang Sheng, Hantao Lou, Yaodong Yang, Jie Fu

TL;DR

This paper introduces FormalJudge, a novel neuro-symbolic framework for overseeing LLM agents. By combining LLMs for semantic understanding with formal verification for logical reasoning, FormalJudge provides more reliable and robust oversight, significantly improving safety and deception detection compared to existing LLM-as-a-Judge methods.

What Problem Does This Paper Address?

As LLM-based agents become more capable and deployed in high-stakes real-world scenarios (e.g., financial transactions, complex logistics), ensuring their safety and reliability is paramount. The current dominant paradigm, "LLM-as-a-Judge," where one LLM evaluates another, faces a critical dilemma: probabilistic LLMs supervising other probabilistic LLMs can inherit their failure modes, leading to issues like systematic biases, inability to enforce hard constraints, and vulnerability to deceptive agents. This creates a "hallucination echo chamber" where unreliable outputs are validated. The core challenge is bridging the gap between high-level human intent and the rigorous, verifiable constraints needed for agent oversight, a gap traditionally hindered by the difficulty of translating natural language requirements into formal specifications.

Methods

FormalJudge proposes a "Formal-of-Thought" architecture that combines LLMs and formal verification. The process is bidirectional:

  1. Top-Down Intent Decomposition: LLMs act as "specification compilers." They take high-level human intent and decompose it into a set of atomic, verifiable constraints (binary "yes/no" questions).
  2. Context-Aware Grounded Extraction: LLMs extract relevant facts from the agent's trajectory (actions, observations, tool outputs) to answer these atomic questions. This step is designed to be context-minimal for each fact.
  3. Formal Specification Synthesis: The extracted facts and decomposed constraints are used to synthesize formal specifications, written in the Dafny language.
  4. SMT Verification: A Z3 SMT solver deterministically verifies these Dafny specifications. This produces a solver-backed verdict, offering mathematical guarantees rather than probabilistic scores.

This architecture separates probabilistic reasoning (for semantic extraction) from deterministic logical composition (handled by Dafny/Z3), isolating potential LLM errors to auditable atomic facts.

Datasets

The paper evaluates FormalJudge on three benchmarks:

  • Agent-SafetyBench: Evaluates behavioral safety in tool-use scenarios.
  • VitaBench: Assesses constraint adherence in complex "life-serving" tasks.
  • Deceivers: Targets agentic upward deception, where agents fabricate results.

The authors also use trajectories from seven agent models, including both closed-source (GPT-40, Gemini-3.0-Pro, Claude-4.5-Sonnet) and open-source (Qwen-2.5 family: 7B, 14B, 32B, 72B parameters) alternatives.

Key Insights and Ideas

  • Formal Verification as an Escape: Formal verification offers a principled way out of the "LLM-as-a-Judge" dilemma by providing deterministic guarantees, breaking the cycle of probabilistic systems supervising probabilistic systems.
  • LLMs as Specification Compilers: The key innovation is using LLMs not as judges themselves, but as tools to translate human intent into formal specifications, bridging the natural language-to-formal gap.
  • Separation of Concerns: By separating atomic semantic extraction (LLM) from logical composition (SMT solver), FormalJudge localizes errors and gains robustness.
  • Weak-to-Strong Generalization: FormalJudge enables smaller judge models to effectively supervise much larger, more capable agents, a feat difficult for LLM-as-a-Judge baselines.
  • Iterative Refinement with Formal Feedback: Formal verification feedback can guide agents to iteratively improve their safety behavior, leading to significant accuracy gains.

Key Results

  • Performance Improvement: FormalJudge achieves an average improvement of 16.6% over LLM-as-a-Judge baselines across three benchmarks and seven agent models.
  • Weak-to-Strong Deception Detection: A 7B judge model using FormalJudge achieves over 90% accuracy in detecting deception from 72B agents, demonstrating strong generalization.
  • Robustness: FormalJudge maintains stable performance across varying attack sophistication levels, unlike LLM baselines which show high variance.
  • Iterative Refinement: Agents guided by FormalJudge's Dafny specifications improve from 70.7% to 99.8% accuracy over three refinement rounds, significantly outperforming LLM-based feedback.
  • Structured Information is Necessary but Insufficient: While structured inputs improve LLM judges, they still struggle with compositional reasoning, highlighting the need for formal methods.
  • Executable Code is Not Formal Proof: LLM+Python baselines show marginal gains, underscoring that formal verification's solver-backed guarantees are crucial.

Limitations and Future Work

  • NL-to-Formal Interface Bottleneck: The primary remaining source of errors lies in the LLM's ability to correctly decompose user intent into atomic constraints and extract semantic information from trajectories. This "informal-to-formal interface" remains a challenge.
  • Conditional Guarantees: FormalJudge provides solver-backed guarantees over explicit formal predicates, not end-to-end guarantees over natural language intent.
  • Future Work: The authors suggest exploring more advanced LLM techniques for specification synthesis and semantic extraction, as well as investigating methods to improve the robustness of the formal verification backend itself. They also highlight the potential for formal verification feedback to guide agents towards safer behavior through iterative refinement.

Summary updated

BibTeX
@inproceedings{zhou2026formaljudge,
  author = {Jiayi Zhou and Yang Sheng and Hantao Lou and Yaodong Yang and Jie Fu},
  title = {{FormalJudge: A Neuro-Symbolic Paradigm for Agentic Oversight}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=tnsQ23imeD},
}

Loading related content...

Figure