reasoning_data
收藏资源简介:
reasoning_data 是一个用于 Lean 4 定理证明的数据集,包含非正式推理轨迹(proof_plan)以及每个提示/答案对的编译器反馈注释版本。数据集分为训练集和测试集:训练集(70,451 个样本)包含已解决的问题,每行带有已验证的证明、反馈注释变体和证明计划;测试集(66,593 个样本)包含未解决的问题池,仅提供提示,适合用于评估或生成。数据集字段包括 uuid、data_source、question、answer、question_feedback、answer_feedback 等。其中 question 和 answer 是用于阶段二监督微调(SFT)的文本,要求模型在给出 Lean 证明前先提供非正式解决方案,并将证明计划嵌入在证明之前。source_* 字段保留阶段一指令的原始文本,用于对比。proof_plan 字段包含推理段列表,非修复行仅包含一个段,包含问题重述、有用观察、推理路径、关键推导、证明类型、形式锚点和最终解决方案等部分;修复行则包含多个段,每个段对应一次尝试,并包含错误分析、修订推理和更新证明计划。valid 表示证明是否编译通过,proof_repair 表示是否为多轮修复会话。此外还包含 token_count、tactic_count、lean_score、lean_rank 等统计信息。该数据集适用于训练大语言模型进行 Lean 4 定理证明,特别是结合非正式推理和编译器反馈的训练。
reasoning_data is a dataset for Lean 4 theorem proving, containing informal reasoning traces (proof_plan) and compiler feedback annotated versions of each prompt/answer pair. The dataset is divided into training and test sets: the training set (70,451 samples) contains solved problems with verified proofs, feedback annotation variants, and proof plans; the test set (66,593 samples) contains an unsolved problem pool with only prompts, suitable for evaluation or generation. Dataset fields include uuid, data_source, question, answer, question_feedback, answer_feedback, etc. The question and answer are texts used for stage two supervised fine-tuning (SFT), requiring the model to provide an informal solution before giving a Lean proof and embed the proof plan before the proof. The source_* fields retain the original text of stage one instructions for comparison. The proof_plan field contains a list of reasoning segments; non-repair rows contain only one segment with problem restatement, useful observations, reasoning path, key derivation, proof type, formal anchor, and final solution; repair rows contain multiple segments, each corresponding to one attempt, including error analysis, revised reasoning, and updated proof plan. valid indicates whether the proof compiles, and proof_repair indicates whether it is a multi-turn repair session. Additionally, there are statistics such as token_count, tactic_count, lean_score, lean_rank. This dataset is suitable for training large language models in Lean 4 theorem proving, particularly combining informal reasoning and compiler feedback.
数据集概述
数据集名称:reasoning_data
发布方:formalmathatepfl(EPFL 形式数学团队)
数据类型:Lean 4 定理证明数据,附带非形式化推理轨迹(proof_plan)及编译器反馈标注的提示/答案对。
许可与访问:通过 Hugging Face 平台托管,地址为 https://huggingface.co/datasets/formalmathatepfl/reasoning_data。
数据集结构
数据划分(Splits)
- train(训练集):包含已解决的问题,共 70,451 个样本,每个样本均带有验证过的证明、带反馈标注的变体以及推理计划。其中
proof_repair == True的行代表多次尝试的修复会话。 - test(测试集):包含未解决的问题池,共 66,593 个样本,仅包含题目(
answer为空,answer_feedback/valid为 null,proof_plan为[])。
数据规模
- 下载大小:约 1.27 GB(1,274,545,789 字节)
- 数据集总大小:约 3.51 GB(3,507,847,653 字节)
- 训练集大小:约 3.25 GB(3,247,622,250 字节)
- 测试集大小:约 260 MB(260,225,403 字节)
数据字段说明
| 字段名 | 类型 | 内容描述 |
|---|---|---|
uuid |
string | 源数据集的标识符(不同形式化可能重复,如来自 NuminaMath-LEAN) |
data_source |
string | 来源数据集名称 |
question |
string | 替换为阶段二指令的源问题;修复行中每个失败尝试前附带其计划片段 |
answer |
string | 计划片段(修复行为最后一个)+ 空行 + source_answer |
question_feedback |
string | source_question_feedback 替换为阶段二指令;修复行每个失败尝试前附带计划片段 |
answer_feedback |
string | 直接行:计划 + 空行 + source_answer_feedback;修复行:最后错误块 + 最后计划片段 + 修正后的反馈标注证明 |
source_question |
string | 与 formalmathatepfl/sft_classic 完全一致的提示文本 |
source_answer |
string | 与 formalmathatepfl/sft_classic 完全一致的答案文本 |
source_question_feedback |
string | 与 formalmathatepfl/feedback_data_training 完全一致的提示文本 |
source_answer_feedback |
string | 与 formalmathatepfl/feedback_data_training 完全一致的反馈标注证明 |
proof_plan |
list[string] | 推理分段列表;非修复行:一个分段含 [问题重述]、[有用观察]、[推理路径]、[关键推导]、[证明类型]、[形式锚点]、[最终解答];修复行:每个尝试一个分段,首段含上述章节,后续含 [错误分析]、[修订推理]、[更新证明计划] |
valid |
bool | 该证明是否通过编译(未被重新验证时为 null) |
proof_repair |
bool | 该行是否为修复会话(多次尝试) |
lean_code |
string | 已验证的证明(不含反馈块) |
token_count |
float64 | 证明统计信息(源池中缺失时为 null) |
tactic_count |
float64 | 证明统计信息(源池中缺失时为 null) |
lean_score |
float64 | 证明统计信息(源池中缺失时为 null) |
lean_rank |
float64 | 证明统计信息(源池中缺失时为 null) |
提示指令说明
-
阶段二(SFT 阶段 2)指令:
“Replace every sorry statement with an appropriate proof. Before writing any Lean code, give an informal solution with the sections [Problem Restatement], [Useful Observations], [Reasoning Path], [Key Derivation], [Proof Type], [Formal Anchors] and [Final Solution]. Then provide the complete solution in the lean4 code block. If a previous attempt failed, first give [Error Analysis], [Revised Reasoning] and [Updated Proof Plan], then provide the corrected solution.”
question_feedback在此基础上增加要求:在适当位置以/- <feedback> ... </feedback> -/形式插入 Lean 4 编译器反馈块。 -
阶段一(SFT 阶段 1)指令(即
source_*列中的文本):
与formalmathatepfl/sft_classic及formalmathatepfl/feedback_data_training完全一致的提示格式。
用途与背景
该数据集用于训练语言模型进行 Lean 4 定理证明,重点提升模型在 形式化证明生成 及 编译器反馈理解与修复 方面的能力。其特色在于每个问题/答案对都包含非形式化的推理计划(proof_plan)以及带有编译器反馈标注的变体(*_feedback 列),支持两阶段监督微调(Phase-1 SFT 与 Phase-2 SFT)以及错误修复(proof repair)场景的训练。




