arXiv:2607.19354cs.AI2026-07ACL

用自对弈训练让AI自动优化表格公式生成,无需额外标注数据。

FormulaSPIN: Self-Play Fine-Tuning for Natural Language to Spreadsheet Formula Generation

论文配图:FormulaSPIN: Self-Play Fine-Tuning for Natural Language to Spreadsheet Formula Generation
图 1 · 摘自论文原文
  • 构建两玩家博弈框架,利用执行结果区分语义错误与风格差异。
  • 在NL2FORMULA上达74.9%精确匹配,87.1%执行准确率,超越传统SFT。
  • 适合数据稀缺场景,可推广至其他可执行任务的模型优化。

电子表格应用全球用户超亿计,但编写公式仍是主要障碍。现有方法依赖静态监督数据,标注有限导致性能饱和。本文提出FORMULASPIN,一种无需额外数据的自对弈框架,实现迭代自我优化。传统SPIN在此任务中失效:对非匹配输出统一惩罚,导致执行等价的变体在不同样本中被矛盾地视为负例或真值,引发冲突梯度。本框架利用公式生成的独特优势——二元可执行性提供隐式监督,能有效区分语义错误与合法风格差异。将训练设为两玩家博弈:主玩家学习偏好当前版本的真值公式,执行反馈则按粒度划分输出,实现从语义正确到风格优化的自适应课程。为进一步提升精度,引入ExecVote机制,在语义层面聚合多种有效表达形式。多个基准测试表明,FORMULASPIN在NL2FORMULA上达到74.9%精确匹配和87.1%执行准确率,媲美使用额外偏好标注的模型,同时优于传统SFT及前沿专有模型。结果验证了自对弈在数据稀缺任务中的潜力,并为扩展至其他可执行领域开辟路径。

原文摘要 · Abstract (English)

Spreadsheet applications are used by hundreds of millions worldwide, yet writing formulas remains a significant barrier. Existing approaches rely on static supervised data, which quickly saturates on limited annotations. In this paper, we introduce FORMULASPIN, a self-play framework that breaks the ceiling of supervised fine-tuning by enabling iterative self-improvement without any additional data. Vanilla SPIN fails on this task: it uniformly penalizes every non-matching output, so execution-equivalent alternatives are punished as negatives in one example while serving as ground truth in another, producing contradictory gradients. Our framework resolves this by exploiting formula generation's unique advantage: binary executability provides implicit supervision that separates semantic errors from valid stylistic variants. We frame training as a two-player game in which the main player learns to prefer ground-truth formulas over those from its previous version, while execution feedback sorts outputs into distinct granularities-enabling an adaptive curriculum that shifts from semantic correctness to stylistic refinement. To further increase accuracy, we incorporate ExecVote, a semantic-level voting mechanism that naturally handles multiple valid formulations. Experiments on multiple benchmarks demonstrate that FORMULASPIN achieves state-of-the-art performance, with 74.9% exact match and 87.1% execution accuracy on NL2FORMULA, matching models trained with additional preference annotations while outperforming both traditional SFT and frontier proprietary models. These findings underscore self-play's potential to tackle scarce data tasks and open the door to extending it beyond executable domains.

公式生成自对弈数据稀缺

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。