arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.24372cs.CL
收藏

通过循环一致性微调改进Lean4自动形式化

Improving Lean4 Autoformalization via Cycle Consistency Fine-tuning

Stanford University(斯坦福大学)

Arsen Shebzukhov

AI总结:

本文通过循环一致性奖励改进Lean4自动形式化,RL在未见数据和PutnamBench上表现优于SFT,且对交叉熵损失影响小。

摘要:

自动形式化-将自然语言数学文本自动翻译成正式证明语言如Lean4-能加速AI辅助数学研究,无论是通过证明验证还是证明搜索。我使用LoRA对Qwen3.5-2B进行微调,以自然语言到Lean4形式化在FineLeanCorpus上训练,并考虑三种训练模式:带课程学习的监督微调(难度1到10)、无课程顺序的监督微调,以及使用群体相对策略优化(GRPO)的强化学习。循环一致性衡量通过NL到Lean4到NL'循环中陈述意义的保持程度,计算为现成句子嵌入的余弦相似度。在FineLeanCorpus的未见子集和PutnamBench上,RL显著优于两种SFT变体(FLC上均循环一致性0.669 vs. 0.513;PutnamBench上0.561 vs. 0.422),同时仅增加0.011 nat的交叉熵损失,对形式化质量影响小。课程顺序在洗牌训练中无明显优势。

英文摘要:

Autoformalization - automatically translating natural language mathematical texts into formal proof language such as Lean4 - can help accelerate AI-assisted mathematical research, be it via proof verification or proof search. I fine-tune Qwen3.5-2B with LoRA for natural language to Lean4 formalization on FineLeanCorpus and consider three training regimes: supervised fine-tuning (SFT) with curriculum learning (difficulty 1 to 10), SFT without curriculum ordering, and reinforcement learning using group relative policy optimization (GRPO) with a cycle consistency reward. Cycle consistency measures how well the meaning of a statement is preserved through a NL to Lean4 to NL' loop, computed as cosine similarity of off-the-shelf sentence embeddings. On an unseen subset of FineLeanCorpus (FLC) and on PutnamBench, RL substantially outperforms both SFT variants (mean cycle consistency 0.669 vs. 0.513 on FLC; 0.561 vs. 0.422 on PutnamBench), while increasing cross-entropy loss by only 0.011 nats, with minimal impact on formalization quality. Curriculum ordering provides no measurable benefit over shuffled training.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑