FormulaSPIN Boosts Spreadsheet Formula Generation via Self-Play

Cy Xie· July 23, 2026 View original

Summary

FORMULASPIN is a self-play framework that significantly improves natural language to spreadsheet formula generation by leveraging binary executability for implicit supervision. It resolves issues with traditional self-play by distinguishing semantic errors from stylistic variants, achieving state-of-the-art accuracy without extra data.

Generating spreadsheet formulas from natural language remains a significant challenge for millions of users, with existing methods often limited by static supervised data. This paper introduces FORMULASPIN, a novel self-play framework designed to overcome these limitations and enable iterative self-improvement in formula generation without requiring additional labeled data. Traditional self-play methods struggle with this task because they penalize all non-matching outputs uniformly, even if they are semantically equivalent but stylistically different. FORMULASPIN addresses this by exploiting the unique characteristic of formula generation: binary executability. This allows the system to differentiate between semantic errors and valid stylistic variations, providing more nuanced feedback. The framework frames training as a two-player game where the model learns to prefer ground-truth formulas over its previous versions, with execution feedback guiding an adaptive curriculum from semantic correctness to stylistic refinement. Additionally, ExecVote, a semantic-level voting mechanism, further enhances accuracy by handling multiple valid formula formulations. FORMULASPIN achieves state-of-the-art performance on multiple benchmarks, demonstrating the potential of self-play for data-scarce executable domains.

Why it matters

Professionals in data analysis, finance, and business operations can benefit from more accurate and reliable AI tools for generating spreadsheet formulas, significantly reducing manual effort and potential errors in data manipulation.

How to implement this in your domain

  1. 1Explore integrating advanced natural language to formula generation tools into your data analysis workflows.
  2. 2Evaluate existing AI assistants for spreadsheet tasks and compare their performance against models using self-play fine-tuning.
  3. 3Consider developing custom tools that leverage execution feedback for tasks requiring precise, executable outputs.
  4. 4Train internal teams on best practices for using AI-powered formula generation to maximize efficiency and accuracy.

Who benefits

BFSIConsultingData AnalyticsEducationSoftware Development

Key takeaways

  • FORMULASPIN uses self-play to improve natural language to formula generation.
  • Binary executability provides crucial implicit supervision for training.
  • The framework differentiates semantic errors from stylistic formula variants.
  • It achieves state-of-the-art accuracy without needing more labeled data.

Original post by Cy Xie

"arXiv:2607.19354v1 Announce Type: new Abstract: 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 pap…"

View on X

Originally posted by Cy Xie on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses