Lean4AgenticRL: Advancing Agentic RL with Verifiable Multi-level Process Rewards
Abstract
Lean4AgenticRL integrates multi-level process rewards into a Lean4 formalization framework to improve agentic reinforcement learning for software engineering and terminal tasks, yielding stronger model performance.
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.
Community
Long-running software engineering and terminal tasks require agents to learn from both final outcomes and intermediate actions. Yet outcome rewards alone offer limited guidance about which steps help. We introduce Lean4AgenticRL, a framework that grounds multi-level process rewards in a unified Lean4 formalization schema for open-ended agentic reinforcement learning. It first builds a problem-specific workflow through exploration and planning. It then formalizes the workflow and annotates task outcomes, workflow-stage progress, and tool-call behavior. These signals support workflow-stage-normalized GRPO, which assigns credit across comparable stages of different rollouts. We train LAR-9B and LAR-27B, which lead the compared models of similar size across three benchmarks. LAR-27B achieves 84.2% on SWE-Bench-Verified and 77.3% on TerminalBench-2.1, demonstrating the potential of formal methods for more effective agentic RL.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- ProgAgent: Learning Tool Orchestration through Programmatic Training (2026)
- Learning Generalizable Behaviors for Terminal Agents (2026)
- VERA: Scaling Verifiable Environments for Agentic co-Evolution (2026)
- A^2Agent: Action-Aware Reinforcement Learning for Repository-Level Code Localization Agents (2026)
- Doing More with Less Tokens: Hierarchical Reinforcement Learning for Efficient Coding Agents (2026)
- SkillGym: Internalizing Human Skills into LLMs for Real-World Problem Solving (2026)
- Evaluating Agentic Capabilities Before Post-Training: An End-to-End Approach (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Get this paper in your agent:
hf papers read 2610.22448 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 2
amazon/LAR-27B
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper