rrma-lean4-agent-traces
收藏资源简介:
RRMA Lean 4 Agent Traces 是一个包含416条多智能体Lean 4证明搜索轨迹的数据集,专注于两个Erdős数学问题的自动定理证明。数据集涵盖了三个不同规模的Claude模型变体(claude-opus-4-8、claude-haiku-4-5、claude-sonnet-4-6)和四个逐步增加的难度等级:G2(在预构建框架中填充sorry空缺)、G1(根据自然语言构造描述构建证明)、G05(仅提供Mathlib提示,无构造描述)和G0(仅提供定理陈述,无额外提示)。具体数学问题包括Erdős #741(ii)(关于同时高效且不可分割的加性基的存在性)和Erdős #125(组合数学相关问题)。数据格式方面,每条轨迹包含以下字段:messages(严格交替的用户/助手角色对话轮次列表)、reward(二元奖励,1.0表示会话最后一次真实预言机运行得分为1.0,即Lean编译通过且无sorry)、n_oracle_runs(会话中检测到的真实预言机调用次数)、last_oracle_score(最终真实预言机得分,若从未运行则为null)、ever_scored_1(布尔值,表示是否有任何真实预言机运行得分为1.0)、model(生成轨迹的模型)、rung(难度等级)、problem(问题标识)、n_turns和n_tool_calls(会话统计)。工具调用以内联格式<tool_call>和<tool_result>表示,思考块以<thinking>标记。该数据集适用于强化学习训练、定理证明智能体评估、形式化方法研究以及多轮对话代理的监督微调等任务。奖励信号基于Lean 4和Mathlib编译器的硬验证,确保了评估的可靠性。
RRMA Lean 4 Agent Traces is a dataset containing 416 multi-agent Lean 4 proof search traces, focusing on automated theorem proving for two Erdős mathematical problems. The dataset covers three different scales of Claude model variants (claude-opus-4-8, claude-haiku-4-5, claude-sonnet-4-6) and four progressively increasing difficulty levels: G2 (filling sorry gaps in pre-built frameworks), G1 (constructing proofs based on natural language construction descriptions), G05 (providing only Mathlib hints without construction descriptions), and G0 (providing only theorem statements without additional hints). Specific mathematical problems include Erdős #741(ii) (on the existence of simultaneously efficient and indecomposable additive bases) and Erdős #125 (a combinatorial mathematics-related problem). In terms of data format, each trace contains the following fields: messages (a list of strictly alternating user/assistant role dialogue turns), reward (a binary reward, where 1.0 indicates that the last real oracle run in the session scored 1.0, meaning Lean compilation passed without sorry), n_oracle_runs (the number of real oracle calls detected in the session), last_oracle_score (the final real oracle score, null if never run), ever_scored_1 (a boolean indicating whether any real oracle run scored 1.0), model (the model that generated the trace), rung (difficulty level), problem (problem identifier), n_turns and n_tool_calls (session statistics). Tool calls are represented in inline format with <tool_call> and <tool_result>, and thinking blocks are marked with <thinking>. This dataset is suitable for tasks such as reinforcement learning training, theorem proving agent evaluation, formal methods research, and supervised fine-tuning of multi-turn dialogue agents. The reward signal is based on hard verification by the Lean 4 and Mathlib compilers, ensuring reliable evaluation.
数据集概述
- 数据集名称:RRMA Lean 4 Agent Traces
- 许可证:Apache-2.0
- 标签:lean4, theorem-proving, agent-traces, rl, trl, formal-methods, rlvr
数据集内容
包含 416 条多智能体 Lean 4 证明搜索轨迹(traces),覆盖两个 Erdős 问题、三个模型等级和四个难度级别(rungs)。
问题(Problems)
- Erdős #741(ii):关于同时具有高效性和不可分割性的加法基的存在性
- Erdős #125:相关的组合数学问题
难度阶梯(Rungs / ablation ladder)
| Rung | 描述 |
|---|---|
| G2 | 在预先构建的骨架中填充 sorry 空缺 |
| G1 | 根据自然语言构造描述构建证明 |
| G05 | 仅提供 Mathlib 提示,无具体构造 |
| G0 | 仅提供定理陈述(冷启动) |
模型与轨迹分布
| 模型 | 轨迹数 | Reward=1.0(最终证明成功) |
|---|---|---|
| claude-opus-4-8 | 99 | 44 |
| claude-haiku-4-5 | 156 | 67 |
| claude-sonnet-4-6 | 161 | 4 |
Reward=1.0 按领域/难度分布:
- erdos-125:64
- 741ii G1:36
- G0:7
- G2:5
- G05:3
数据格式
每行包含以下字段:
- messages:严格交替的
{role, content}对话轮次列表 - reward:1.0(会话最终真实 oracle 评分为 1.0,Lean 编译通过,无
sorry),否则为 0.0 - n_oracle_runs:会话中检测到的真实 oracle 调用次数
- last_oracle_score:最终真实 oracle 评分(若从未调用则为 null)
- ever_scored_1:是否曾在任意真实 oracle 运行中获得 1.0(13 个会话曾证明但后来回退)
- model:生成轨迹的模型
- rung:G0 / G05 / G1 / G2 / various
- problem:erdos-741ii 或 erdos-125
- n_turns、n_tool_calls:会话统计数据
工具调用以 <tool_call name="...">...</tool_call> / <tool_result>...</tool_result> 形式内联;思考块以 <thinking>...</thinking> 形式包含。
信号质量
- 使用 Lean 4 + Mathlib 编译器进行硬可验证奖励,无模糊评分。
- 轨迹真实捕捉了编辑→编译→诊断→修复的循环过程。
- 已知局限:部分 oracle 运行发生在修复共享临时目录竞态条件之前(智能体可能短暂误评相邻文件);当前
reward为会话内实时 oracle 信号,未经过独立重新验证。
版本说明(v2)
- 修正了原始上传中的两个缺陷:
messages字段从 JSON 字符串修正为数组reward现在仅根据真实 oracle 输出(紧邻SORRY_COUNT:/BUILD_EXIT:/STATUS:行的SCORE=)标记,仅当最后一次 oracle 评分为 1.0 时才设为 1.0
- 修正后正例数量:115/416(原为 336)
来源与相关数据集
- 使用 RRMA 框架生成,运行于 RTX 4070 Ti
- 相关数据集:
vincentoh/erdos741ii-lean4-opus-traces(39 条 Opus G1 轨迹,应用了相同的 v2 修正)




