FLAME: A Small Language Model for Spreadsheet Formulas
Harshit Joshi, Abishai Ebenezer, José Pablo Cambronero Sánchez, Sumit Gulwani, Aditya Kanade, Vu Le, Ivan Radicek, Gust Verbruggen
Abstract
Spreadsheets are a vital tool for end-user data management. Using large language models for formula authoring assistance in these environments can be difficult, as these models are expensive to train and challenging to deploy due to their size (up to billions of parameters). We present FLAME, a transformer-based model trained exclusively on Excel formulas that leverages domain insights to achieve competitive performance while being substantially smaller (60M parameters) and training on two orders of magnitude less data. We curate a training dataset using sketch deduplication, introduce an Excel-specific formula tokenizer, and use domain-specific versions of masked span prediction and noisy auto-encoding as pre-training objectives. We evaluate FLAME on formula repair, formula completion, and similarity-based formula retrieval. FLAME can outperform much larger models, such as the Davinci (175B) and Cushman (12B) variants of Codex and CodeT5 (220M), in 10 of 14 evaluation settings for the repair and completion tasks. For formula retrieval, FLAME outperforms CodeT5, CodeBERT, and GraphCodeBERT.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- SheetCopilot: Bringing Software Productivity to the Next Level through Large Language ModelsHongxin Li, Jingran Su, Yuntao Chen, Qing Li et al.NeurIPS 2023 · 75 citations
- Encoding Spreadsheets for Large Language ModelsHaoyu Dong, Jianbo Zhao, Yuzhang Tian, Junyu Xiong et al.EMNLP 2024 · 4 citations
- Can an LLM Find Its Way Around a Spreadsheet?Cho-Ting Lee, Andrew Neeser, Shengzhe Xu, Jay Katyan et al.ICSE 2025 · 1 citation
- Learning from Near-Misses: Error-Aware Contrastive Few-Shot Learning for NL2FormulaZhihao Shuai, Yiyun Chen, Maolin Ma, Yutong Chen et al.ACL 2026
- Unlocking SLM Potential for Data Analysis Code Generation via Non-Parametric Knowledge DistillationJinyang Li, Jack Williams, Nick McKenna, Arian Askari et al.NeurIPS 2025
Builds on20
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad et al.ACL 2020 · 1,224 citations
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 citations
- Deduplicating Training Data Makes Language Models BetterKatherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang et al.ACL 2022 · 844 citations
Related papers
- From Rows to Reasoning: A Retrieval-Augmented Multimodal Framework for Spreadsheet UnderstandingAnmol Gulati, Sahil Sen, Waqar Sarguroh, Kevin PaulKDD 2026 · 6 citations
- SpreadsheetCoder: Formula Prediction from Semi-structured ContextXinyun Chen, Petros Maniatis, Rishabh Singh, Charles Sutton et al.ICML 2021 · 63 citations
- Neurosymbolic repair for low-code formula languagesRohan Bavishi, Harshit Joshi, José Cambronero, Anna Fariha et al.OOPSLA 2022 · 11 citations
- PyDex: Repairing Bugs in Introductory Python Assignments using LLMsJialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le et al.OOPSLA 2024 · 38 citations
- FormaT5: Abstention and Examples for Conditional Table Formatting with Natural LanguageMukul Singh, José Cambronero, Sumit Gulwani, Vu Le et al.VLDB 2024 · 13 citations
