Concept animation

Hero diagram

Paper: 2603.24372 Authors: Arsen Shebzukhov Categories: cs.CL

Abstract

This paper studies autoformalization from natural language to Lean4. It fine-tunes Qwen3.5-2B with LoRA on FineLeanCorpus and compares three setups: supervised fine-tuning with curriculum, supervised fine-tuning without curriculum, and GRPO reinforcement learning using a cycle-consistency reward based on sentence-embedding similarity between the original statement and a round-tripped NL version. The RL approach gives the strongest results on both an unseen FineLeanCorpus subset and PutnamBench, with little change in formalization quality.

Key Contributions

  • Uses Qwen3.5-2B with LoRA for natural-language-to-Lean4 autoformalization
  • Compares curriculum SFT, shuffled SFT, and GRPO with cycle-consistency reward
  • Defines cycle consistency through embedding similarity after NL → Lean4 → NL round-tripping
  • Shows the RL approach performs best on both evaluation sets
  • Finds no measurable benefit from curriculum ordering over shuffled training

Methodology

The work treats autoformalization as a sequence-to-sequence generation problem and adapts Qwen3.5-2B with LoRA on FineLeanCorpus. The model is trained under three regimes so the authors can isolate the effect of curriculum ordering and reinforcement learning. In the GRPO setup, the reward is computed from a cycle-consistency signal: a generated Lean4 statement is translated back to natural language, and the resulting text is compared with the original statement using sentence-embedding cosine similarity.

This makes the optimization target less about matching formal syntax alone and more about preserving the meaning of the original theorem statement. That matters because a formal proof script can look plausible while quietly drifting from the intended semantics.

Results

The reinforcement-learning variant outperforms both supervised baselines on the unseen FineLeanCorpus subset and on PutnamBench. The paper reports that formalization quality remains largely stable, so the improvement comes from better semantic preservation rather than a trade-off with output quality.

The curriculum experiment is also informative: ordering the training examples by difficulty does not provide a clear advantage over shuffled training. That suggests the cycle-consistency objective is doing more of the useful work than dataset ordering in this setting.

Takeaways

  1. Autoformalization benefits from reward signals that check meaning, not just surface-form correctness
  2. Cycle consistency is a practical way to measure whether formalization preserved the original statement
  3. GRPO can improve Lean4 autoformalization without hurting output quality
  4. Curriculum learning did not show a clear gain in this experiment
  5. Semantic round-tripping is a useful pattern for training language-to-formal-language systems

论文: 2603.24372 作者: Arsen Shebzukhov 分类: cs.CL

摘要

本文研究从自然语言到Lean4的自动形式化。作者使用LoRA对Qwen3.5-2B在FineLeanCorpus上进行微调,并比较了三种设置:带课程学习的监督微调、无课程学习的监督微调,以及基于循环一致性奖励的GRPO强化学习。该奖励通过比较原始陈述与经过“自然语言→Lean4→自然语言”回译后的句子嵌入相似度来衡量一致性。结果显示,强化学习方法在未见的FineLeanCorpus子集和PutnamBench上都取得了最好效果,且形式化质量基本没有下降。

主要贡献

  • 使用Qwen3.5-2B和LoRA完成自然语言到Lean4的自动形式化
  • 比较课程学习监督微调、打乱顺序监督微调以及带循环一致性奖励的GRPO
  • 通过自然语言→Lean4→自然语言回译后的嵌入相似度定义循环一致性
  • 证明强化学习方法在两个评测集上表现最佳
  • 发现课程学习顺序相比打乱训练没有可测量优势

方法论

这项工作将自动形式化视为序列到序列生成问题,并在FineLeanCorpus上使用LoRA调整Qwen3.5-2B。作者设计了三种训练机制,用于隔离课程顺序和强化学习的影响。在GRPO设置中,奖励来自循环一致性信号:模型生成的Lean4语句先被翻译回自然语言,再将回译文本与原始陈述的句子嵌入余弦相似度进行比较。

这样优化的目标就不只是让模型生成看起来像样的形式语法,而是尽量保持原始定理陈述的语义。这一点很重要,因为一个形式化脚本可能在表面上正确,但语义已经悄悄偏离原意。

结果

强化学习版本在未见的FineLeanCorpus子集和PutnamBench上都优于监督基线。论文还指出,形式化质量基本保持稳定,因此性能提升来自更好的语义保持,而不是以输出质量为代价。

课程学习实验同样值得注意:按难度排序训练并没有比打乱训练带来明显收益。这说明在这个任务里,循环一致性目标比数据顺序更能带来实际帮助。

要点总结

  1. 自动形式化更适合依赖能检查语义的奖励信号,而不仅是表面正确性
  2. 循环一致性是衡量形式化是否保留原始陈述含义的实用方法
  3. GRPO可以在不损害输出质量的情况下改进Lean4自动形式化
  4. 本实验中课程学习没有显示明显收益
  5. 语义回译是训练自然语言到形式语言系统的有用模式