SheetBrain: A Neuro-Symbolic Agent for Accurate Reasoning over Complex and Large Spreadsheets
Ziwei Wang, Jiayuan Su, Mengyu Zhou, Huaxing Zeng, Mengni Jia, Xiao Lv, Haoyu Dong, Xiaojun Ma, Shi Han, Dongmei Zhang
TL;DR
This work tackles the challenge of reasoning over complex spreadsheets with large language models by introducing SheetBrain, a neuro-symbolic agent built around an understand-execute-validate pipeline. The Understanding Module provides a global, query-aware overview with preserved spatial context; the Execution Module uses a Python sandbox, Excel tooling, and a symbolic dataflow architecture to perform precise, multi-turn reasoning; and the Validation Module enforces quality assurance with iterative re-execution. SheetBench is proposed as a challenging benchmark for large, multi-table, and structurally complex spreadsheets, and SheetBrain achieves state-of-the-art performance on public QA and manipulation datasets as well as SheetBench, aided by ablations that demonstrate the importance of understanding, validation, and a robust tool-suite. The results underscore the value of symbolic dataflow and structured, global verification for reliable spreadsheet reasoning and manipulation, enabling more robust deployments in real-world enterprise contexts.
Abstract
Understanding and reasoning over complex spreadsheets remain fundamental challenges for large language models (LLMs), which often struggle with accurately capturing the complex structure of tables and ensuring reasoning correctness. In this work, we propose SheetBrain, a neuro-symbolic dual workflow agent framework designed for accurate reasoning over tabular data, supporting both spreadsheet question answering and manipulation tasks. SheetBrain comprises three core modules: an understanding module, which produces a comprehensive overview of the spreadsheet - including sheet summary and query-based problem insight to guide reasoning; an execution module, which integrates a Python sandbox with preloaded table-processing libraries and an Excel helper toolkit for effective multi-turn reasoning; and a validation module, which verifies the correctness of reasoning and answers, triggering re-execution when necessary. We evaluate SheetBrain on multiple public tabular QA and manipulation benchmarks, and introduce SheetBench, a new benchmark targeting large, multi-table, and structurally complex spreadsheets. Experimental results show that SheetBrain significantly improves accuracy on both existing benchmarks and the more challenging scenarios presented in SheetBench. Our code is publicly available at https://github.com/microsoft/SheetBrain.
