Beyond Solver Verdicts: Generative Reward Models for Autoformalization
Authors: Vikash Singh, Debargha Ganguly, Aman Goel, Ali Torkamani, Xiaoxue Han, Joseph Lilien, Ferhat Erata, Vipin Chaudhary (Case Western Reserve University & Amazon Web Services)
Summary (Overview)
- Formalizes Verdict-Preserving-Unfaithfulness (VPU): A critical failure mode in neurosymbolic systems where an incorrect formal encoding executes successfully and matches the expected solver verdict despite being logically non-equivalent to the reference formalization.
- Proves theoretical limits of structural verification: Demonstrates that any scoring function depending only on binary solver verdicts achieves chance-level (0.5) AUROC on verdict-matched pairs.
- Introduces Generative Verification (GenV): A novel approach that distills an offline Z3-equivalence oracle into a reference-free, continuous verification score by repurposing the language model's native vocabulary space for next-token prediction.
- Achieves state-of-the-art results: GenV+HN reaches 0.961 AUROC in reference-equivalence verification, generalizes zero-shot across unseen translators and formal styles, and yields an 11.3-point downstream accuracy gain in agentic test-time compute allocation.
- Provides mechanistic interpretability: Gradient-based lenses and sparse autoencoders demonstrate that VPU and error-position information are natively recoverable from the verifier's hidden states without explicit localization training.
Introduction and Theoretical Foundation
Background and Motivation
Neurosymbolic systems promise a clean division of labor: a language model translates natural language problems into formal logic, and a sound solver (e.g., Z3) performs deduction. However, the resulting guarantee is conditional—a solver certifies what follows from the supplied encoding, but does not certify that the encoding accurately represents the source problem. The translation step is therefore an independent point of failure.
Formal Definition of VPU
The paper studies this failure relative to a designated reference formalization . Reference-equivalence is defined by mutual implication:
where denotes the logical conjunction of assertions in candidate encoding .
Definition 1 (Reference-relative Verdict-Preserving-Unfaithfulness): Relative to a designated reference , a candidate is VPU when it is syntactically valid, has the same solver verdict as the reference, and is not reference-equivalent:
Theoretical Impossibility Result
Proposition 1 (Binary verdict-only indistinguishability): For any paired evaluation set where is reference-equivalent and is VPU with for every pair, any scoring function that depends only on the binary solver verdict assigns tied scores to both members of every pair, yielding an empirical AUROC of 0.5.
Proof sketch: Because both members of every pair share the same verdict, . The positive and negative score multisets are identical, so every comparison is a tie, giving AUROC = 0.5 under the half-credit convention.
This result isolates a narrow information limit but does not preclude verifiers that inspect the source problem, candidate program, execution traces, or internal model states.
Methodology
1. Verification via Next Token Prediction
Rather than appending a randomly initialized classification head (which can disrupt pre-trained representations), GenV repurposes the frozen vocabulary head as a generative classifier. The model receives a context (source problem + candidate encoding) and outputs a single token judgment ("Yes" for faithful, "No" for unfaithful).
The continuous verification score is computed in a single forward pass by renormalizing probability mass over target classes:
where is a stabilization constant, and are vocabulary token ID sets for positive/negative answers, and .
2. Supervised Fine-Tuning with Oracle Labels
Training data uses binary labels pre-computed by the exact Z3-equivalence oracle. The model is fine-tuned with causal cross-entropy loss over the answer sequence only:
Context tokens condition the forward pass but their loss is masked out, preventing catastrophic forgetting.
3. Oracle-Guided Hard Negative Mining
To address the sparsity of deceptive false positives, the framework bootstraps the training manifold with programmatic hard negatives. Targeted mutation operators (e.g., flipping relational operators, perturbing constants, reversing implications) are applied to gold references. A mutated candidate is retained if and only if it is syntactically correct and satisfies the VPU criteria from Definition 1, with Z3 serving as the deterministic adjudicator.
Empirical Validation / Results
RQ1: Representation vs. Structure in Equivalence Verification
Table 1: Reference-faithfulness AUROC
| System | AUROC |
|---|---|
| (a) Combined benchmark (950 rows, 260 VPU) | |
| GenV+HN (deployed), ours | 0.961 |
| GenV, without mined negatives | 0.956 |
| Self-consistency vote (K=5) | 0.863 |
| Outcome RM (token head) | 0.762 |
| Process RM (token head) | 0.756 |
| Solver-only (verdict match) | 0.500 |
| (b) Expanded split (488 rows, 184 VPU): prior methods | |
| Generative readout, | 0.950 |
| GTED tree-edit distance | 0.835 |
| FormalAlign (fwd+bwd) | 0.752 |
| Round-trip back-translation | 0.578 |
Table 2: Matched supervision and readout ablation
| Readout | Supervision | AUROC |
|---|---|---|
| Generative P(Yes) | whole-encoding | 0.983 |
| 2-class head, warm init | whole-encoding | 0.921 |
| 2-class head, cold init | whole-encoding | 0.920 |
| per-step token head, ORM label | per-step, min-agg | 0.827 |
| per-step token head, PRM label | per-step, min-agg | 0.633 |
Key findings:
- The vocabulary-space readout provides an additional improvement over the two-class head under matched supervision.
- Ablations confirm robustness to target token choice (e.g., "Yes/No" vs. "A/B" or "X/Y"), indicating the model genuinely tracks the equivalence target rather than exploiting linguistic biases.
RQ2: Zero-Shot Generalization
Table 3: Zero-shot AUROC across out-of-domain formal styles
| Dataset | G-20 readout | GenV | Process RM | Outcome RM | GenV+HN (ours) |
|---|---|---|---|---|---|
| In-domain | 0.959 | 0.956 | 0.756 | 0.762 | 0.961 |
| FOLIO | 0.667 | 0.595 | 0.774 | 0.534 | 0.830 |
| ProofWriter | 0.837 | 0.831 | 0.774 | 0.560 | 0.842 |
| MALLS | 0.863 | 0.826 | 0.797 | 0.509 | 0.925 |
| ProverQA | 0.906 | 0.822 | 0.588 | 0.528 | 0.964 |
| ProntoQA | 0.865 | 0.800 | 0.630 | 0.535 | 0.915 |
| LogicNLI | 0.603 | 0.593 | 0.559 | 0.577 | 0.642 |
GenV+HN maintains consistent margins across all OOD formal styles, while token-head reward models suffer severe degradation.
RQ3: Diagnostic Alignment with Human Intent
Table 4: Reference-equivalence vs. panel-majority intent on a contested slice
| Target | GenV+HN | Judge |
|---|---|---|
| Z3-equivalence to reference | 0.907 | 0.654 |
| Panel-majority intent | 0.679 | 0.778 |
GenV+HN's advantage is specific to strict reference-equivalence; the gap on subjective human intent highlights an open challenge in resolving informal ambiguity.
RQ4: Test-Time Agentic Utility
Table 5: Mechanism attribution by replay on identical recorded pools
| Mechanism | Comparison | Base Acc | Verified Acc | Δpts |
|---|---|---|---|---|
| Best-of-N itself | vote@5 vs. single-shot PoT | 0.655 | 0.748 | +9.3 |
| Gated escalation | vote, full pool vs. vote@5 | 0.748 | 0.760 | +1.2 |
| Verifier selection | faith² vote vs. vote, full pool | 0.760 | 0.768 | +0.9 |
| Full adaptive system vs single-shot PoT | 0.655 | 0.768 | +11.3 | |
| Solver-gate control | solver-gated vs. shipped gate | 0.768 | 0.758 | -1.0 |
| Advisory feedback | feedback vs. none, equal budget | 71/72 flips | ≈0 |
The integration of GenV+HN drives total system accuracy from 0.655 to 0.768 (+11.3 points), with the dynamic verification gate (not static re-ranking) being the superior deployment mechanism.
Theoretical and Practical Implications
Theoretical Contributions
- Formal characterization of VPU: Provides a rigorous, operational definition of reference-relative unfaithfulness that is deterministic and trainable.
- Information-theoretic limits: Proves that binary verdict-only scoring is mathematically bounded to chance-level detection on verdict-matched pairs.
- Separation of supervision from deployment: Establishes a clean distinction between privileged oracle information (used only in training) and reference-free inference inputs.
Practical Implications
- Deployable verification: GenV+HN requires only the source problem and candidate encoding at inference time—no reference formalization needed.
- Agentic compute allocation: The verifier effectively governs test-time compute, providing gains across diverse backends (from +2.3 to +42.6 points depending on generator capability).
- Architecture-agnostic: The generative readout works within the model's native vocabulary space, requiring no architectural changes.
Mechanistic Insights
The paper demonstrates that VPU and error-position information are diagnostically recoverable from intermediate representations:
- Decision-projected gradient lens: The margin combined with gradient-times-activation attribution localizes mutations without explicit localization training.
- Sparse autoencoder probes: A TopK SAE on layer-48 activations recovers 0.960 AUROC for GenV+HN, showing that PRM and ORM hidden states contain substantially more VPU information than their deployed output scores expose.
Conclusion
GenV+HN resolves the critical vulnerability of Verdict-Preserving-Unfaithfulness in neurosymbolic systems by distilling offline Z3-equivalence into a reference-free generative readout. Key takeaways:
- Structural checks are fundamentally insufficient for detecting VPU—only learned, reference-equivalence-aware verification can bridge this gap.
- Generative readouts outperform classification heads under matched supervision, and hard-negative mining provides additional robustness.
- The verifier generalizes zero-shot across unseen translators and divergent formal styles, though severe OOD shifts can degrade calibration.
- Reference-equivalence serves as an uncompromising, reproducible target for formal evaluation, but subjective human intent remains an open challenge.
Future Directions
- Bridging the semantic gap between strict reference-equivalence and subjective human intent via human-labeled benchmarks
- Extending diagnostic internal representations to causally steer multi-error repair pipelines
- Handling naturally occurring correlated, multi-error distributions (current mining uses synthetic single-edit mutations)
- Addressing the vacuous-equivalence limitation for unsatisfiable reference formulas
Limitations
- Supervision is bounded by SMT decidability limits and assumes a fully specified gold reference
- Advisory feedback does not yield measurable accuracy improvements without expanding the sampling budget
- The logical equivalence guarantee applies only to satisfiable formal specifications (two unsatisfiable formulas are vacuously equivalent under standard Z3 model checking)
Related papers
- AuK Technical Report: An Open-Source Foundational Model for Speech Generation and Editing
AuK unifies speech generation and editing across five task families via instruction-conditioned flow matching, achieving state-of-the-art results with a 4.5x faster distilled variant.
- Unlocking Lossless Speedups in LLMs via Discrete Diffusion
Diffusion-augmented LLMs decouple generation quality from speed, enabling lossless parallel token generation with up to 3x faster inference via rejection sampling.
- Learning from Synthetic Data without Model Collapse in Iterative Instruction Tuning
KITE prevents model collapse in synthetic-data instruction tuning by targeting weak skills via DINA-based diagnosis and curating examples near the model's semantic knowledge boundary, achieving sustained monotonic improvement across benchmarks.