← Latest papers
🤖 AI

Faithful Autoformalization via Roundtrip Verification and Repair

This paper proposes a roundtrip verification framework that ensures faithful natural language-to-formal translation by iteratively translating back to natural language, checking for logical equivalence, and applying diagnosis-guided scoped repairs to correct errors without requiring ground-truth annotations.

Original authors: Daneshvar Amrollahi, Jerry Lopez, Clark Barrett

Published 2026-05-12
📖 4 min read☕ Coffee break read

Original authors: Daneshvar Amrollahi, Jerry Lopez, Clark Barrett

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 translate a complex legal rule from English into a strict, computer-readable language (like a secret code). You ask a super-smart AI to do this translation. But how do you know the AI didn't accidentally change the meaning of the rule while translating it?

This paper proposes a clever "translation check" system that doesn't need a human expert to hold the answer key. Instead, it uses a Roundtrip Verification method.

Here is how it works, using a simple analogy:

The "Roundtrip" Game

Think of the process like a game of "Telephone," but with a twist:

  1. The Forward Trip (Translation): You give the AI a natural language rule (e.g., "No cars over 3 tons can enter the park"). The AI translates this into a strict logical code (Stage 1).
  2. The Back Trip (Reverse Translation): The AI takes that logical code and translates it back into plain English (Stage 2).
  3. The Re-Forward Trip (Re-Translation): The AI takes this new English sentence and translates it back into logical code again (Stage 3).

The Check: The system now compares the First Code (from step 1) with the Second Code (from step 3).

  • If they match perfectly: The AI likely got the meaning right. It's a "faithful" translation.
  • If they don't match: Something went wrong. The meaning drifted somewhere along the line.

The "Doctor" and the "Scalpel"

When the two codes don't match, a naive approach would be to just tell the AI, "Try again from the start!" and hope for the best. This paper argues that's wasteful.

Instead, they use a Diagnosis and Repair system:

  • The Doctor (Diagnosis): A special AI "judge" looks at the four pieces of the puzzle (Original Text, First Code, Back-Translated Text, Second Code) to figure out exactly which step broke the meaning. Did it mess up the first translation? Did it misunderstand the back-translation?
  • The Scalpel (Scoped Repair): Once the doctor identifies the specific broken step, the system only fixes that one part. It doesn't throw away the whole work; it just performs surgery on the faulty step and re-runs the rest of the chain.

The Real-World Test

The researchers tested this on two sets of Texas laws:

  1. Traffic Laws: Rules about driving, speed limits, and school buses.
  2. Wildlife Laws: Rules about hunting, fishing, and protected animals.

They used two different powerful AI models (Claude and GPT) to see if this system worked.

Key Findings (The "So What?")

  1. The Check Works: When the system says the two codes match (Formal Equivalence), it is a very strong signal that the meaning hasn't drifted. When the codes don't match, the meaning is almost certainly wrong.
  2. Fixing the Right Thing Matters: The most successful method wasn't just "trying again." It was using the "Doctor" to find the specific broken step and using the "Scalpel" to fix only that step.
  3. The Bottleneck: The system works best when the "Doctor" (the diagnosis step) is reliable.
    • When they used the Claude model to act as the doctor, the system was fast and accurate.
    • When they used the GPT model as the doctor, it kept blaming the first step for every error, even when it wasn't the first step's fault. This made the system slow and inefficient.
    • The Fix: They found that if they kept GPT for the heavy lifting (translation) but swapped in Claude just to act as the doctor, the system became fast and accurate again.

The Bottom Line

This paper shows that you can verify if an AI is faithfully translating complex rules without needing a human to check every single answer. By translating back and forth and fixing only the specific broken links in the chain, you can get much more reliable results.

Important Note: The authors explicitly warn that even with this system, the output should not be used for safety-critical tasks (like autonomous driving or medical devices) without a human expert reviewing it first. It's a great tool for checking consistency, but not a magic guarantee of absolute truth.

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 →