- Rating
- 4
- Clarity
- 3
- Confidence
- 5
- Originality
- 2
- Quality
- 2
- Significance
- 3
Read review
Summary
So they introduce Lean4Agent, a framework for modeling and checking LLM-agent workflows using Lean 4. The framework has three layers: structural workflow checks, predicate-based static semantic checks, and trajectory-level failure localization. The authors also propose LeanEvolve, which uses verification feedback and optional environment feedback to revise workflows. The evaluation uses subsets of SWE-Bench-Verified and ELAIP-Bench across five LLMs, comparing verification-passing workflows against verification-failing ones and measuring whether workflow evolution improves task performance:)!
Strengths and weaknesses
I liked the direction. Agent workflows are getting more complex, and it is reasonable to ask whether formal methods can help specify and debug them. The paper tries to make this concrete instead of just saying “use formal verification for agents.” The layered design is also sensible: first check graph/type/read-write structure, then check semantic pre/postconditions, then inspect trajectories for runtime failures. That organization is pretty neat and gives the framework a clear shape. The case studies are also useful. The examples around missing JSON fields, context-isolated steps, and bad verification behavior in SWE agents are the kinds of errors that really do show up in agent workflows. I appreciated that the paper gives concrete workflow snippets and Lean-style diagnostic outputs, rather than only reporting aggregate numbers. The empirical results are also encouraging: verification-passing workflows do better than failing workflows on both SWE and paper-understanding tasks, and LeanEvolve seems to add further gains.
However, I have a major concern about the strength of the “formal verification” framing. A lot of the semantic layer depends on the LLMExec assumption: roughly, if a step’s preconditions hold, then the LLM can produce outputs satisfying the postconditions. That is a very strong assumption for black-box LLM agents. The Lean checks may verify consistency of the workflow specification under this assumption, but they do not verify that the LLM actually follows the intended semantics. The trajectory layer helps, but then the system partly falls back to external tools and LLM-as-judge. So the formal part is useful, but it is not as strong as the framing sometimes suggests. I also worry about the automatic predicate annotation step. The semantic predicates are generated from natural-language workflow instructions by an LLM. If the predicates are incomplete, too weak, or simply wrong, then the Lean verification can certify the wrong abstraction. This is not just a small implementation detail; it is central to whether the framework is checking meaningful properties. The authors mention this limitation, but I think it deserves much more emphasis in the main discussion.
The evaluation is promising but not fully causal. The main comparison is between workflows that pass verification and workflows that fail verification. But these groups may differ in overall quality for reasons unrelated to Lean verification. In other words, passing workflows may simply be better-written workflows. I would have liked a stronger causal experiment: take the same failing workflow, repair the exact failed predicates, and compare before/after across many tasks; or perturb passing workflows to introduce controlled semantic violations and check whether the verifier predicts the performance drop.
Another issue is reproducibility. The code is not released at submission time, and the experiments rely on expensive closed/commercial LLMs. Given that this is a tooling/framework paper, the lack of a submission-time artifact makes it hard to inspect how much of the Lean library is actually general, how predicates are generated, and how robust the checking pipeline is. So my take is mixed. The idea is timely and the results are interesting, but the current version overstates what is formally verified and does not yet convince me that the verification signal is isolated from general workflow quality. I would be more positive if the authors toned down the formal-guarantee language, released the artifact, and added stronger causal ablations.
Questions
-
Can the authors clarify exactly what is proved in Lean versus what is assumed? In particular, how should readers interpret the guarantee under the LLMExec axiom?
-
Can the authors include a clearer, compact example of what is actually encoded and checked in Lean? For example, it would help to show one full workflow step, its generated predicates, the corresponding Lean statement, and the final theorem/check that passes or fails.
-
How reliable are the LLM-generated predicates? Can the authors evaluate predicate quality manually or with an ablation where predicates are weakened, strengthened, or corrupted?
-
Can the authors provide a more causal evaluation of verification? For example, repair the specific verification failures in a workflow and compare before/after performance across many tasks.
-
How much of the improvement comes from selecting generally better workflows rather than from formal verification itself? A comparison with human/LLM workflow-quality scoring or random workflow filtering would help.
-
What kinds of agent failures are out of scope? For example, does the approach handle hallucinated reasoning, wrong code edits, incomplete exploration, hidden tool failures, or only failures expressible through the chosen predicates?
Limitations
Partially. The appendix discusses important limitations, including black-box LLM behavior, semantic ambiguity, LLM-generated predicate annotations, and difficulty evaluating some components. However, I think these issues should be much more central in the main text. In particular, the paper should more clearly separate “formal verification of a workflow abstraction under assumptions” from “verification of actual LLM-agent behavior.”
Paper formatting concerns
N/A
Final justification
They clarified all my concerns!
Dear Reviewer PKw6,
Thank you for your detailed review and constructive suggestions. We appreciate your recognition of the importance of our research direction, our framework design, the concrete case studies, and the encouraging empirical results. We summarize and respond to your concerns as follows:
W1. Strength of the formal verification’s framing
Thank you for raising this important question. We would like to clarify the scope and boundary of Lean4Agent through the following points:
Scope of our claim: We would like to clarify that the main framing of our paper is to provide a framework for formally modeling and verifying the agent workflows and trajectories under explicit assumptions, rather than unconditionally proving the correctness of black-box LLM agents. We will make this scope more explicit in the main paper and do our best to avoid wording that could be interpreted as an unconditional guarantee of LLM behavior.
Boundary of the formal components: Similar to formalized mathematics, Lean4Agent first abstracts the system's basic semantic requirements and then formally reasons about their relations. We use predicates as the atomic semantic facts of the workflow. Once the workflow structure and predicate annotations are obtained, Lean formally verifies the structural properties, predicate propagation, pre-/post-condition entailment, and workflow-level semantic consistency.
Because manually annotating all workflows is impractical in real-world use cases, we apply LLMs to extract local predicates from step-wise natural language instructions. These predicates are designed to capture a small fraction of facts that can be modeled through program or local LLM judgments. The formal component then composes these local predicates to derive global workflow properties. Therefore, the formal boundary begins after the workflow abstraction and predicate specification. This is analogous to theorem proving in formal mathematics, where the formal part only happens after the statement has been formalized. On the other hand, the quality of the predicate annotation process is evaluated below.
Quantitative evaluation of LLM-based predicate annotations: We agree that the quality of predicate annotation is central to the meaningfulness of our verification. We therefore manually evaluated all 12 workflows used in our experiments. It covers 165 semantic nodes and 1,460 predicate annotations. We assess both the correctness of the annotated predicates and whether any predicates are omitted.
We identified 36 mis-specified predicates, corresponding to an annotation error rate of 2.47%. After manually correcting all 36 annotations, none of the verification results flipped. Among these errors, 34 were overly permissive variable-level predicates, primarily in preconditions. Tightening them did not alter whether the corresponding workflow passed or failed the verification. The remaining two were overly weak graph-level predicates annotated in a single verification-failing ELAIP-Bench workflow. It continued to fail after the correction because the failures stemmed from information-flow defects. We also found no serious predicate omissions in the evaluated workflows.
These results provide evidence that the local LLM-based annotation and global formal propagation procedure is reliable for the workflow examined in our experiments. We will add these manual evaluation results to the next version of our paper.
Role of the
LLMExecassumption: This assumption is used only in later-2, where no concrete execution trajectory is yet available. It abstracts an individual LLM step by assuming that, when its precondition holds, executing the agent can establish the specified postconditions. This abstraction enables static reasoning about whether the workflow is semantically self-contained before deployment. We would like to emphasize thatLLMExecis only a modeling assumption at layer-2 and cannot be directly evaluated; its violation is undefined.We will include the above points to more clearly demonstrate our framework's positioning and further soften the “formal verification” guarantees if you think it necessary in the next version of our paper.
W2. Casual evaluation through targeted workflow repair guided by Lean4Agent
We thank the reviewer for requesting a more casual evaluation and would like to clarify that we have already partially done such an experiment in Appendix A.4, where we repaired the
failed-1workflow for the SWE agent based on the layer-2 results. Re-evaluating the same workflow using GPT-5.2 improves its accuracy from 52.00% to 62.00%.To strengthen this experiment, we further evaluated the repaired SWE workflow using GLM-5, where its accuracy increased from 48.00% to 60.00%. We also repaired the
failed-1ELAIP-Bench workflow and evaluated it using GLM-5; the performance improved from 22.00% to 43.00%. For the ELAIP-Bench workflow, layer-2 identified the violations of theverdictEnumValidandnegation_flagpredicates. The original workflow generated option-level positive or negative judgments, but failed to pass the supporting rathinales to the final-answer aggregation step. We repaired the exact information-flow defect by propagating these reasons to the downstream step. After the repair, both workflows reached the performance range of the passing workflows.These controlled before-and-after results provide more distinct evidence that the Lean4Agent does not merely select generally better workflows. Its diagnostics can identify specific defects and guide targeted workflow repair. We will add this experiment to the next version of our paper.
W3. Release of the code
Thank you for raising this concern. The code was still being organized at the time of submission, but this process is now complete. Because the rebuttal policy does not permit us to attach the link directly, we have submitted the anonymized code package to the AC. We will also release the complete code upon publication and maintain the repository continuously.
Q1. Lean boundary and the `LLMExec axiom
We have answered this question in W1; please kindly refer to that section for details.
Q2. Compact end-to-end Lean verification example
We thank the reviewer for raising this point and would like to clarify that such example has been provided in Appendices D.1 and D.2, where D.1 presents the original YAML workflow and D.2 shows the corresponding Lean4Agent encoding, including the workflow nodes, generated pre- and post-conditions, semantic graph, structural verifications, and the final semantic-soundness theorem proved based on
native_decidewith the help of our implemented lemmas. Additionally, in Appendix B.2.5, we provide a failing example in which Lean4Agent identifies a missing JSON Schema predicate for the downstream step. We will add a compact overview to the main paper and explicitly direct readers to the complete passing and failing examples in the appendix of the next version of our paper.Q3. Reliability of LLM-annotated predicates
Please kindly refer to W1.3, where we report the manual evaluation of all 1,460 predicate annotations.
Q4. Casual evaluation of verification
Please kindly refer to W2 for the answer to this question.
Q5. Lean4Agent compared with general workflow-quality selection
We are grateful for this question and would like to clarify that we have already conducted this comparison in Appendix A.3 using GPT-5.5 as the LLM workflow-quality judge. For the paper-understanding task, where workflow requirements are more explicit and easier to inspect from the surface description, the LLM judge largely agrees with Lean4Agent’s judgment. However, for the SWE task, where workflows involve more implicit semantics, context, and information-flow requirements, the LLM scores show weak alignment with both Lean4Agent results and empirical workflow performance. A closer analysis shows that the LLM judge often captures explicit workflow behaviors but misses the implicit factors. This comparison suggests that Lean4Agent provides information beyond general workflow-quality scoring, particularly for workflows whose correctness depends on non-local semantic relations. We will reference this experiment more explicitly in the main paper.
Q6. Agent failures outside the current predicate scope
Thank you for the question. We would like to clarify that Lean4Agent provides a highly extensible predicate system and is intended to be maintained as a long-term project. Although some of the capabilities mentioned by the reviewer were not yet supported by the repository version available at the time of submission and extensibility alone does not verify properties that have not been explicitly modeled. We would like to share that, in the current internal version of the Lean4Agent repository, most of the failure types raised by the reviewer are already supported. In particular, we have extended Lean4Agent to a general Claude-Code setting and introduced predicates for incorrect code edits and incomplete exploration through Lean4-based checks. We also leverage LLM-as-judge predicates to detect hidden tool-calling failures. We plan to maintain Lean4Agent over the long term, with the predicate family evolving as new agent behaviors and failure modes emerge. We will clarify both the scope of the submitted version and our maintenance plan in the next version of the paper.
We hope the above rebuttal addresses your concerns. We are grateful for your comprehensive questions and constructive suggestions, which have helped us to improve the clarity, completeness, and scope of guarantees presented in our work.
Best regards,
Submission #11044 Author Team