NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

interwhen: A Generalizable Framework for Verifiable Reasoning with Test-time Monitors

Vishak K Bhat, Prateek Chanda, Ashmit Khandelwal, Maitreyi Swaroop, Subbarao Kambhampati, Vineeth N. Balasubramanian, Nagarajan Natarajan, Amit Sharma

TL;DR

interwhen is a plug-and-play, single-trajectory verification framework that steers Large Language Model (LLM) reasoning in real-time by asynchronously validating intermediate steps against automatically synthesized code verifiers. By decoupling verification from generation and utilizing a forked state-extraction mechanism, it achieves near-perfect accuracy and strict policy compliance at a fraction of the compute cost required by traditional tree-search methods.

What Problem Does This Paper Address?

As LLM-based agents are increasingly deployed in high-stakes, real-world workflows (like database operations or customer service), ensuring safety and reliability is paramount. Modern reasoning models produce long, complex chains of thought and tool calls before executing actions.

Existing test-time verification methods fall into two inefficient buckets:

  1. Outcome-based verification (LLM-Modulo): Only checking the final answer, which completely misses early errors that propagate through the trajectory.
  2. Branch-and-verify strategies (e.g., Tree of Thoughts, MCTS): Exploring multiple reasoning paths simultaneously, which multiplies inference latency and token costs.

Furthermore, outside of structured domains like mathematics or code compilation, process verifiers are incredibly scarce. Writing custom verification logic manually for complex natural-language business policies is labor-intensive and prone to human error.

Methods

The authors introduce LLM-Process-Modulo via the interwhen framework, which operates in two distinct phases:

1. Offline Phase: Automatic Verifier Synthesis

Instead of manually coding verifiers, interwhen uses a frontier LLM to translate natural-language policy documents into executable code-based verifiers (Python or Z3 SMT formulas). To ensure absolute correctness, they introduce a Lean 4-based variant that generates a formal specification, the verifier code, and a machine-checked proof validating that the code perfectly matches the specification.

2. Online Phase: Asynchronous Single-Trajectory Steering

During inference, the main LLM generates its reasoning trace uninterrupted. At regular intervals or step boundaries, interwhen forks a lightweight execution thread. This forked model acts as a State Extractor, pulling out relevant state variables from the partial trace.

These variables are passed to the synthesized verifiers asynchronously. If a policy violation is detected, interwhen halts the main generation, rolls back the trajectory to the violation point, and injects precise textual feedback to steer the model back on track. If no violation occurs, the system incurs virtually zero latency overhead.

Overview of the interwhen framework

Datasets

The framework was evaluated across a diverse suite of eight benchmarks:

  • Agentic Benchmarks: $\tau^2$-bench (Retail and Telecom domains), AgentSafetyBench (safety and failure modes), and VitaBench (Online Travel Agency planning).
  • Non-Agentic Reasoning Benchmarks: Maze (spatial navigation), SpatialMap (spatial relations), GameOf24 (arithmetic), ZebraLogic (logic puzzles), and Verina (code and specification generation).

Key Insights and Ideas

  • Decoupling is Key to Efficiency: Running verifiers on a parallel thread means correct executions are never slowed down. The system only intervenes "when" an error occurs, making it highly architecturally efficient.
  • Steering Beats Searching: Correcting a single trajectory via targeted feedback uses significantly fewer tokens than maintaining massive search trees or sampling multiple independent paths (Best-of-N).
  • SLMs are Competent State Extractors: The authors discovered that extracting structured variables from a reasoning trace does not require a massive frontier model. A 3B Small Language Model (SLM) performed on par with GPT-5.4 class models, making runtime verification incredibly cheap.
Demonstration of the interwhen method on a Maze instance

Key Results

  • Massive Accuracy Boosts: On the $\tau^2$-bench Telecom domain, the task completion rate for a Qwen3-30B model skyrocketed from 32.17% to 87.70% in solo mode.
  • Token Savings: Remarkably, because the verifier's feedback prevents the model from wandering down repetitive or fruitless reasoning paths, interwhen achieved these gains while using fewer tokens (96.93%) than standard Chain-of-Thought (CoT) baselines.
  • Outperforming Test-Time Scaling Baselines: On non-agentic tasks like ZebraLogic and GameOf24, interwhen matched or exceeded the accuracy of heavy search methods like Tree of Thoughts while saving up to 7–18× the token budget.
  • Lean Verifier Viability: Automatically generated Lean 4 verifiers performed comparably to manually validated Python verifiers, proving that formal verification can be automated at scale.

Limitations and Future Work

  • The Completeness Challenge: While ensuring the synthesized verifiers are sound (free of false positives) is handled well by formal proofs, ensuring they are complete (catching every single possible violation) remains difficult, especially when natural language policies contain implicit rules.
  • Over-Restriction: When policies are vague or overly cautious, the synthesized verifiers can occasionally over-block legitimate tool calls, slightly reducing the agent's helpfulness on complex, unfulfillable requests.

Future work will focus on iterative policy debugging and refining the framework to handle highly ambiguous or soft constraints more gracefully.

Summary updated

BibTeX
@inproceedings{bhat2026interwhen,
  author = {Vishak K Bhat and Prateek Chanda and Ashmit Khandelwal and Maitreyi Swaroop and Subbarao Kambhampati and Vineeth N. Balasubramanian and Nagarajan Natarajan and Amit Sharma},
  title = {{interwhen: A Generalizable Framework for Verifiable Reasoning with Test-time Monitors}},
  booktitle = {VerifAI-2 @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=SFOkliC171},
}
Figure