Lean4AgenticRL:以可验证的多级过程奖励推进智能体强化学习
研究论文 · 2026/10/20
Lean4AgenticRL 是一个基于 Lean4 形式化框架的智能体强化学习框架,通过多级过程奖励(包括工具调用和流程阶段奖励)提升大语言模型在软件工程和终端使用任务中的能力。该框架构建问题特定的工作流系统,并利用工作流形式化和多级奖励标注方法在通用测试系统中验证智能体行为,结合工作流阶段归一化的 GRPO 算法进行训练。基于此框架训练的 LAR-9B/27B 模型在 TerminalBench-2.1 上达到 77.3% 的准确率,平均超越基础模型 9.89%,并比同类最佳模型高出 5.07%。
该论文首次将形式化方法(Lean4)与多级过程奖励结合用于智能体强化学习,显著提升了模型在复杂软件工程和终端任务上的性能,为开放式智能体 RL 提供了新思路,且实验结果具有竞争力。
Enhancing the agentic capabilities of Large Language Models (LLMs) to tackle complex software engineering (SWE) and general terminal-usage problems is a pressing challenge. Current state-of-the-art LLMs often go through large-scale agentic Reinforcement Learning (RL). However, they mostly rely on high-level outcome rewards, with minimal consideration of low-level toolcall and mid-level workflow-stage rewards, which makes the training less effective. To overcome this limitation, we propose **Lean4AgenticRL**, which, to the best of our knowledge, is the first framework that grounds multi-level process rewards in the unified Lean4 formalization schema for open-ended agentic RL. **Lean4AgenticRL** first builds a *problem-specific workflow* system that balances the agent's own capability and controllability during execution, laying the foundation for further verification. Subsequently, our workflow formalization and multi-level reward annotation methods enable agent behavior verification within a general harness system. It provides multi-level rewards to support more effective agentic RL with the workflow-stage-normalized GRPO algorithm. Using **Lean4AgenticRL**, we train **LAR-9B/27B**, a family of models with enhanced agentic capability. Extensive experiments indicate that our model outperforms the leading model of similar size. **LAR-27B** achieves **77.3%** on TerminalBench-2.1. On average, our models outperform the base model by **9.89%** and surpass the second-best model of comparable size we know by **5.07%**. These results indicate the potential of integrating formal methods in enhancing open-ended agentic RL.