ByteBulletin

[research] · · 4 min read

Lean 4 studies expose LLM trust in false proof reports

New arXiv research shows that language models frequently accept incorrect verification results, leading to flawed final proofs despite initial correct rejections.

By ByteBulletin Editor · Editor


Two new papers published on arXiv investigate the reliability of large language models (LLMs) in formal verification workflows, specifically within the Lean 4 ecosystem. The first study, titled "Language Models Under False Lean 4 Reports: Initial Decisions and Final Proofs," examines how models respond when a proof assistant interface displays incorrect verification results. The second, "Bipartite Edge Recovery in Formalized Mathematics," addresses the challenge of verifying equivalence between natural language mathematical statements and their formalized Lean 4 counterparts. Together, these works highlight a critical gap in current AI-assisted mathematical reasoning: the tendency of models to defer to interface feedback rather than independent logical validation.

The Impact of False Verification Reports

The primary study tests 14 pairs of elementary Lean 4 statements across seven model deployments. In this setup, each model receives a mathematical statement, a candidate proof, and a verification report. The model must then decide whether to keep, revise, or reject the candidate. The researchers measure two distinct metrics: the initial decision (keep, revise, or reject) and the correctness of the final submitted proof.

The results reveal a significant vulnerability to interface manipulation. In the original Claude batch, when the system fabricated errors (reporting that valid proofs were incorrect), the rate of correct "keeps" for working proofs plummeted from 40 out of 42 to just 2 out of 41. This indicates that models are heavily influenced by negative feedback, even when that feedback is false. Conversely, when false statements were presented with fabricated success reports, models rejected them in 35 out of 41 cases, compared to 37 out of 42 rejections when no report was provided. While these numbers are close, the authors note that this does not establish equivalence in reliability.

A more nuanced finding emerged regarding insufficient proofs. For true statements with incomplete proofs, fabricated success reports reduced the rate of correct revisions from 18 out of 26 to 5 out of 26 for both Opus and Haiku models. However, Sonnet maintained a higher revision rate of 11 out of 13 when given a larger output budget. This suggests that model size and context window constraints play a role in how strongly models adhere to false positive reports.

Discrepancy Between Initial and Final Decisions

A critical insight from the research is that initial decisions do not always predict final correctness. In a later batch involving Opus and Haiku, valid final proofs for general statements dropped from 28 out of 28 to 20 out of 28 under fabricated error conditions. More notably, six responses to closed statements recovered from an initial rejection to produce a valid final proof. This behavior implies that models may initially reject a proof due to a false error report but then revise their stance during the generation of the final submission, potentially ignoring the false report in favor of their internal reasoning. However, this recovery is inconsistent, as seen in the drastic drop in correct keeps for working proofs in the earlier batch.

Bipartite Edge Recovery in Autoformalization

The second paper, "Bipartite Edge Recovery in Formalized Mathematics," tackles a different but related problem: verifying that natural language (NL) mathematical sources and formal language (FL) libraries are equivalent. As machine-driven autoformalization becomes more common, ensuring that a Lean 4 declaration correctly formalizes a natural language statement is a major open problem. The authors model this as a link-prediction problem in a bipartite knowledge graph, where cross-edges labeled "formalizes" connect NL statements to FL declarations.

This task is challenging due to sparsity and many-to-many relationships; a single statement may be split into multiple declarations, or a single declaration may serve multiple statements. The proposed pipeline combines gradient-boosted edge scores, a global assignment mechanism that allows for unmatched statements, and deferral of uncertain edges to an LLM. Across six community-developed projects, this hybrid approach improved edge precision and F1 scores over an LLM-only baseline while reducing API costs by more than half. The method also demonstrated transferability to the formalization of research mathematics, suggesting that structured graph-based approaches can augment LLM capabilities in autoformalization.

Implications for Developers and Researchers

For developers integrating LLMs into formal verification tools, these findings suggest that relying solely on LLMs to interpret proof assistant output is risky. The models' susceptibility to false reports indicates that interface design must be robust against manipulation, and that LLMs should be prompted to independently verify proofs rather than trusting the reported status. The discrepancy between initial and final decisions also highlights the need for transparent logging of model reasoning steps, as the final output may not reflect the model's initial assessment.

For researchers in autoformalization, the bipartite edge recovery approach offers a cost-effective way to improve the accuracy of NL-FL alignment. By combining traditional machine learning techniques with LLMs for uncertain cases, this method provides a practical solution to the sparsity and many-to-many challenges inherent in formalizing complex mathematical texts. This could lead to more reliable machine-checked libraries, which are essential for the broader adoption of formal methods in software and mathematics.

What to Watch

  • Model-Specific Variability: The differing baseline competence and responses to false reports across Claude models (Opus, Haiku, Sonnet) suggest that model architecture and training data significantly impact reliability. Future studies should explore how fine-tuning or RLHF affects this behavior.
  • Interactive Workflow Reliability: The current studies do not isolate checking difficulty or establish reliability in an interactive proof workflow. Real-world scenarios involve iterative refinement, which may exacerbate or mitigate the issues observed in single-shot tasks.
  • Scalability of Edge Recovery: The bipartite edge recovery pipeline was tested on six projects. Its performance on larger, more diverse corpora, including those with high sparsity or complex many-to-many relationships, remains to be seen.
  • Integration with Proof Assistants: How these findings translate to actual proof assistant interfaces, such as Lean 4's web-based IDEs, is an open question. The impact of UI/UX design on model behavior needs further investigation.

Get the signal, not the noise.

One short email when it matters. No recaps of recaps.

SHARE

← All stories