NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Verifiers in the Loop: Decoding Time Verification for Code Translation

Tianyang Zhou, Somesh Jha, Mihai Christodorescu, Kirill Levchenko, Varun Chandrasekaran

NeurIPS page · OpenReview · Open on the map

Category: LLM Agents, Evals & Benchmarks › LLM-Augmented Problem Solving · Type: new method · Keywords: code translation, test-time scaling, deterministic verification, verifier-guided decoding, autoregressive generation

Areas: Code & Coding Agents › Code Generation and Optimization › Code Generation; Evaluation & Benchmarks › Language Model and Agent Benchmarks › Code Generation Benchmarks

Summary

Decoding Time Verification (DTV) integrates deterministic program verification directly into the decoding loop to improve code translation accuracy while reducing token waste.

Explained to a 5-year-old

Some computers help write code, but they sometimes make mistakes. We have a checker that looks at the code while it is being written. The checker stops the computer if the code is not correct, so it doesn't keep going wrong. This helps the computer finish the code faster and with fewer errors. It makes translating code from one language to another more reliable.

Explained to a 5-year-old, longer

When a computer program is being written, it can make mistakes. To help it, we have a special checker that looks at the code as it is being written. The checker knows what correct code looks like, so it can tell if the code is wrong right away. If the code is wrong, the checker tells the computer to stop and fix it, instead of continuing with the mistake. This way, the computer doesn't waste time writing code that will be thrown away later. The checker also helps the computer know where to pause and restart, so it can keep building the code correctly. This method works for translating code from one programming language to another, like turning C code into Rust code or JavaScript into TypeScript. By checking as we go, the translation becomes more accurate and uses less computer power. It also helps the computer finish the job faster because it doesn't have to redo many wrong parts. The idea is simple: check while you write, not after you finish. This makes the whole process smoother and more reliable for developers.

For a technical reader

The paper proposes integrating deterministic program verification into the decoding process of large language models for code translation. By interleaving generation with verifier calls under a controller, the system ensures only syntactically valid prefixes are produced, using structural checks and rollback to prevent error propagation. This reduces token waste and improves translation success rates while maintaining comparable inference budgets. The framework demonstrates consistent gains across two translation tasks and offers a more favorable pass-rate-cost tradeoff than post-generation verification or sampling-based scaling.

Problem

Existing code translation approaches apply deterministic verifiers only after generation, causing early errors to corrupt the autoregressive context and rarely be corrected. This makes inference inefficient and reduces translation success rates.

Method

The approach interleaves generation with verifier calls under a state-machine controller that enforces valid prefixes, uses structural-boundary checks, and performs structure-aware rollback to prevent error propagation and reduce wasted tokens.

Results

The approach improves pass rates from 72.3% to 82.0% on C-to-Rust and from 33.3% to 46.0% on JavaScript-to-TypeScript under matched token budgets, while using fewer tokens per case, and achieves a better pass-rate-cost tradeoff than post-hoc verification or sampling-based scaling.

Contributions

It introduces a framework that integrates deterministic verification into the decoding loop, enabling verifier-guided generation with valid-prefix enforcement and structure-aware rollback, and demonstrates significant gains on two code translation tasks.

Practical relevance

This verifier-guided decoding can make code translation more reliable and efficient for developers using large language models, reducing wasted inference compute and improving correctness.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction