SheetCompass: Hierarchical Relation Graphs for Agentic Spreadsheet Reasoning
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
SheetCompass: Hierarchical Relation Graphs for Agentic Spreadsheet Reasoning Panjing He, Mingyue Cheng, Yucong Luo,Li Li, Xiaohan Zhang State Key Laboratory of Cognitive Intelligence, University of Science and Technology of China Hefei, China {hepanjing,lili0516,zxh25126485ïijŒprime666}@mail.ustc.edu.cn mycheng@ustc.edu.cn
arXiv:2608.14452v1 [cs.AI] 14 Aug 2026
Abstract Spreadsheets are widely used to organize, analyze, and manipulate semi-structured data in real-world scenarios. However, automated spreadsheet reasoning remains a long-standing challenge for large language models (LLMs). Practical workbooks often feature a complex web of implicit cross-table associations and fine-grained column dependencies. To process them, existing methods typically flatten these multi-dimensional structures into sequential strings, which strips away the critical intra-sheet boundaries and inter-sheet semantics. As a result, LLMs are deprived of the global spatial layouts that human experts naturally leverage during visual scanning. To bridge this gap, we propose SheetCompass, a graph-guided and memory-driven agentic framework for spreadsheet automation reasoning. The key idea is to transform spreadsheets from raw tabular data into structured evidence spaces that can guide agent planning, execution, and reflection. Specifically, SheetCompass constructs a hierarchical graph to explicitly formalize implicit layouts into stable anchors at both the table and column levels, thereby mapping structural topologies while encoding spatial relations. To further enhance agent reliability, SheetCompass introduces a dual-level memory mechanism, which includes an expert knowledge memory that provides tool-use and domain knowledge and a reasoning experience memory that is dynamically updated from previous execution trajectories to support workflow evolution and prevent continuous mistakes. Based on these components, SheetCompass coordinates three specialized agents—the navigational explorer, logical programmer, and critical reflector—to handle perception, execution, and iterative verification. Driven by this multi-agent coordination, extensive empirical evaluations across various datasets demonstrate that SheetCompass achieves state-of-the-art performance in complex spreadsheet automation tasks. Our code is available at https://anonymous.4open.science/r/sheetcompass-411C.
Keywords Natural Language Processing, Spreadsheet Manipulation, MultiAgent Workflow Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. Conference acronym ’XX, Woodstock, NY © 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM ISBN 978-1-4503-XXXX-X/2018/06 https://doi.org/XXXXXXX.XXXXXXX
ACM Reference Format: Panjing He, Mingyue Cheng, Yucong Luo,Li Li, Xiaohan Zhang . 2018. SheetCompass: Hierarchical Relation Graphs for Agentic Spreadsheet Reasoning. In Proceedings of Make sure to enter the correct conference title from your rights confirmation email (Conference acronym ’XX). ACM, New York, NY, USA, 12 pages. https://doi.org/XXXXXXX.XXXXXXX
1
Introduction
As a key knowledge representation medium, spreadsheets inherently include business logic and domain expertise[39, 55, 56, 60]. Nevertheless, the volume of heterogeneous data and the demand for repetitive manipulation make spreadsheet automation a critical bottleneck to increase industrial productivity[8, 23, 46]. In this context, Large Language Models (LLMs) emerge as a robust technical pathway for achieving automated spreadsheet[26, 43, 54]. Although LLMs demonstrate superior semantic understanding, their performance suffers a sharp decline when processing complex spreadsheets[1, 4, 12]. This weakness primarily stems from existing methodologies predominantly rely on an information-flattening paradigm, which linearizes multi-dimensional spreadsheets into sequential string representations such as Markdown or JSON. While preserving textual content[34, 35, 43, 44], this approach fundamentally leads to the loss of intra-sheet topological structure and inter-sheet semantic understanding[11, 40, 41, 61]. On the intrasheet level, sequential string fundamentally shatters the inherent orthogonal positioning system of spreadsheet rows and columns. Consequently, complex layouts lose their spatial neighborhood within the token stream[27, 41, 64]. This separation makes it difficult for the model to understand the original grid layout of the spreadsheet[21, 52]. At the inter-sheet level, this flattening process hides the implicit data dependencies and business logic across different worksheets[40, 61]. Critical elements, such as the direct correspondences between cost and price sheets, are broken down into isolated text fragments[11, 52, 64]. Without explicit inter-sheet semantic dependencies, the model fails to reconstruct the dynamic data flow across the workbook, leading to structural misalignment especially in cross-table reasoning[3, 43, 52, 61]. This dual-level information loss reveals a fundamental mismatch with the original design intent of the spreadsheeas visual grid-based tables instead of linear text. Spreadsheets are a semi-structured medium grounded in visual cognition, not a flat collection of data[42, 57]. Its layout is aligned with the human visual processing system[22]. As shown in Figure 1, human experts rely on rapid visual scanning to instantaneously reconstruct the spatial topology of a spreadsheet. By leveraging spatial cues alone, they immediately identify column hierarchies, data entities, and distinct data regions. This intuitive
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY
Panjing He, Mingyue Cheng, Yucong Luo,Li Li, Xiaohan Zhang
• We propose SheetCompass, a novel framework that bridges structural space perception with multi-agent reasoning, effectively overcoming the structural information loss of conventional flat sequences. • We introduce a hierarchical contextual graph that preserves intra-sheet spatial layouts and inter-sheet semantic linkages, combined with a dual-level memory and a coordinated multiagent workflow to guarantee high-fidelity task execution. • Extensive experiments on diverse complex benchmarks demonstrate that SheetCompass achieves state-of-the-art performance, empirically confirming the critical impact of structural and semanticon cross-table reasoning.
Work out the monthly total sales in a new row called “Total”. Visual Scan
Information Flatten
Data Subject
Human Export
Excel to Markdown
Sales Jan Feb Mar Temporal Peel 696 420 722 Axis Grooms 429 419 146 Data Area Total
Traditional Methods
Implicit Alignment Hierarchical Graph
Multi-agent
| Sales | Jan | Feb | Mar | | Peel | 696 | 420 | 722 | | Grooms | 429 | 419 | 146| ⚫ Intra-sheet and Inter sheet Information Loss Final output
Table
SheetCompass
column
Jan Feb Mar Explicit 2D Structure
Structural Reasoning
Figure 1: A comparison of various methods. Traditional markdown flattening collapses the 2D layout that human visual scanning effortlessly recovers. SheetCompass closes this gap with the hierarchical graph and multi-agent workflows.
process establishes an implicit alignment that bridges the semantic gaps between distant cells[45, 50, 67]. The intricate intra-table topologies and inter-table dependencies of complex spreadsheets lead to profound information loss when fed into LLMs. Human experts utilize multi-dimensional layout perception[9, 37], to extract latent semantic information. In contrast, models must rely on statistical structural approximation within linear sequences. This neglect of physical topology and the failure to recognize inter-sheet relationships forces the model to attempt complex reasoning in a dimensionally unconstrained sequential space. Consequently, this spatial understanding gap primarily impedes high-fidelity spreadsheet automation. To address those information loss, this paper proposes the SheetCompass framework. This framework restores lost structural dependencies and ensures high-fidelity processing of complex tasks through a multi-agent workflow. For structural modeling, SheetCompass recasts neighborhoods into a hierarchical graph. Hierarchical edges explicitly connect table-level and column-level nodes to preserve both intra-sheet spatial layouts and inter-sheet semantic structures. Building on this recovered topology, the framework introduces a dual-level memory mechanism, including expert knowledge memory and reasoning experience memory to provide stable tool-use knowledge and drive dynamic trajectory evolution. Driven by these structured spaces and memories, a multi-agent workflow coordinates a suite of specialized agents, where the navigational explorer handles topological sensing and target anchoring, the logical programmer generates structured code execution, and the critical reflector conducts closed-loop validation. Empirically, across various complex spreadsheet datasets, SheetCompass substantially outperforms existing methods in task success rate. Ultimately, this structural-and-reasoning decomposition built around graph topology resolves this major bottleneck by enabling downstream agents to navigate multi-dimensional grids without losing their intrinsic grid properties. Our contributions are threefold:
2 Related Work 2.1 Automated Spreadsheet Manipulation Early work on spreadsheet automation centers on program synthesis for repetitive tasks[13, 23, 24, 48]. Representative systems such as FlashFill[23] search a domain specific language (DSL) for programs that satisfy user-provided specifications[2, 36, 49]. While these methods are highly precise for deterministic tasks, they suffer from a severe curse of dimensionality because the DSL search space expands exponentially as constraints increase[32]. This makes traditional program synthesis techniques struggle when handling complex tasks involving multi-tier dependencies and cross-table references[25, 36]. To mitigate rigid symbolic pipelines, later work uses deep learning to infer implicit spreadsheet structure[6, 15, 26, 28, 31]. SpreadsheetCoder introduces a neural formula prediction model that encodes row and column level context. TableSense[14] applies convolutional neural networks to layout detection. And TUTA[59] adopts a tree-structured transformer to model hierarchical dependencies. These methods move the field beyond brittle pattern matching toward semantic modeling, but cross-table logical reasoning remains challenging. LLMs push automation further toward intent understanding and autonomous reasoning[7, 47, 65]. SpreadsheetLLM[16] utilizes inverted index translation to compress layout formats, while SheetAgent[7] and SheetCopilot[39] use multi-agent pipelines that split tasks into subtasks and call a code interpreter. Most LLM-based pipelines still serialize sheets as flat text[17]. That representation hides nonlinear topology and makes it harder to match how human experts work.
2.2
LLM-based Agents
Early research predominantly focused on augmenting the logical reasoning capabilities of individual LLMs[4, 10]. While prompting methods like Chain-of-Thought (CoT) enhance problem-solving by unlocking step-by-step reasoning [38, 58], modern frameworks like ReAct [26] carry this multi-step paradigm further by anchoring reasoning in empirical action. This integration enables agents to dynamically interact with their environments, alternating between internal thought generation, external tool execution, and subsequent feedback adaptions [30, 53]. Nevertheless, when confronted with long-horizon tasks of extreme complexity, single-agent systems frequently encounter the error accumulation effect inherent in protracted reasoning chains[20]. Furthermore, they are susceptible to falling into self-verifying logical closures, which precipitates severe hallucinations and a fundamental lack of systemic robustness[33,
SheetCompass: Hierarchical Relation Graphs for Agentic Spreadsheet Reasoning
66]. To transcend the performance bottlenecks and reliability constraints of monolithic models, the research community has progressively pivoted toward Multi-Agent Systems (MAS)[63]. This paradigm reconfigures complex global objectives into orchestrated subtask workflows by introducing structured role-playing and granular labor-division mechanisms such as MetaGPT[29] and ChatDev[51]. By leveraging inter-agent debate[19] or collaboration[5], MAS can effectively rectify the inherent biases and stochastic errors of individual models[62]. This evolutionary shift from isolated individual intelligence toward synergetic collective intelligence provides profound theoretical inspirations for constructing more resilient, specialized, and interpretable research methodologies within highly dynamic and complex scenarios[18].
3
Methods
In this section, we present the SheetCompass framework. We first formalize the problem of automated spreadsheet manipulation, followed by a detailed elaboration on our methodological design. Specifically, we introduce our coordinate-based structural perception through comprehensive graph representations, followed by the memory mechanisms and the subsequent logical reasoning workflow driven by our multi-agent.
3.1
Problem Formulation
Let T = {𝑇1,𝑇2, . . . ,𝑇𝑀 } denote the initial set of spreadsheets, where 𝑀 denotes the total number of distinct tables across all sheets and each sheet may contain multiple tables. Each userissued instruction 𝑞 specifies a series of automated operations to be performed on T . Formally, spreadsheet automation is defined |D| as D = {(T , 𝑞, A ∗ )𝑖 }𝑖=1 , where A ∗ is the ground-truth response consisting of the target tables. The goal of the task is to model the probability of a generated table sequence  conditioned on the input collection T and the query 𝑞, formulated as:  = arg max 𝑝 (A ′ | 𝑞, T ; 𝜃 ) ′ A
(1)
where 𝜃 denotes the parameters of the model.
3.2
Overview of the SheetCompass Framework
To bridge the gap in structured grid processing, the SheetCompass framework decouples spreadsheet automation into space reconstruction and coordinated reasoning. As shown in Figure2, the framework first rebuilds the spreadsheet’s missing structural dependencies by transforming raw grids into a unified hierarchical graph. By mapping columns and cross-sheet relationships into connected topological nodes, this graph successfully preserves both localized layout geometry and global semantic connections. Guided by this reconstructed space, SheetCompass employs a dual-level memory system, combining static expert knowledge with dynamic reasoning experience, to provide the foundation for robust decision-making. This rich pool of structural and cognitive knowledge ultimately drives a collaborative multi-agent workflow. Within this execution loop, specialized agents dynamically navigate the graph topology to anchor targets, generate precise execution scripts, and perform closed-loop self-reflection. Through this integration of topological
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY
mapping, dual memory guidance, and multi-agent synergy, SheetCompass ensures high-fidelity execution across multi-dimensional spreadsheet tasks without losing the intrinsic properties of the data.
3.3
Hierarchical Graph Construction
3.3.1 Graph Modeling. The fundamental challenge in automated spreadsheet reasoning lies in the severe loss of structural information during data serialization. Traditional approaches typically flatten multi-dimensional grids into text sequences, discarding critical spatial layouts and global dependencies across multiple tables. To resolve this, we model the spreadsheet as a hierarchical graph, formally defined as G = (V, E). Here, the vertex set V encompasses multi-level spreadsheet components, while the edge set E maps out the intricate relationships among them. To mimic how human experts naturally comprehend data, we divide these edges into structural edges (𝐸 str ) for physical layouts and semantic edges (𝐸 sem ) for logical associations. This representation effectively transforms scattered cells into a connected knowledge space, providing global navigation and contextual constraints for downstream reasoning. Guided by the human habit of visual scanning, we organize the vertex set V into a two-tier hierarchy consisting of table nodes and column nodes. Specifically, for each table node, we extract its constituent columns to establish ownership and structural dependencies. A column node 𝑣𝑖 ∈ 𝑉col within the table is then defined by pairing its header name with a representative sample of its raw data entries. By avoiding dense cell-level modeling, this design successfully captures both semantic identity and factual context. Upon establishing these node representations, we automatically construct structural edges (𝐸 str ⊆ E) directly from the sheet layout using deterministic parsing rules. This edge set 𝐸 str primarily consists of two functional categories: inclusion edges, which link each table node to its constituent column nodes based on structural boundaries, and adjacency edges, which connect neighboring column nodes according to their horizontal order, denoted as pos(𝑖) and pos(𝑖 + 1). Together, these rule-extracted edges form the stable backbone of our graph. 3.3.2 Semantic Alignment. The main upgrade in SheetCompass is how it connects related columns, even if they are far apart in the spreadsheet. To do this, we first give each column node a rich background by header name and actual data rows into a feature vector x. Next, we use a pre-trained transformer Φ to map these features into representations h𝑖 = Φ(x𝑖 ) and calculate their spatial-semantic similarity score using the cosine similarity function, denoted as 𝑠𝑖𝑚𝑖 𝑗 = (h𝑖 · h 𝑗 )/(∥h𝑖 ∥∥h 𝑗 ∥).To prevent mistakes, we also ask an LLM to score their logic relationship (FLLM ), checking things like primary and foreign keys. We then mix these two scores together using a simple formula to make the final decision: ( 1, if 𝛽 · 𝑠𝑖𝑚𝑖 𝑗 + (1 − 𝛽) · FLLM (𝑣𝑖 , 𝑣 𝑗 ) > 𝛼 𝜖𝑖 𝑗 = (2) 0, otherwise. Here 𝛼 is the confidence threshold and 𝛽 decides which score matters more. If the combined total passes the threshold, we draw a logical link (𝜖𝑖 𝑗 = 1) between the columns. Otherwise, we ignore it. This clear cut-off filters out wrong guesses and leaves only highquality connections. Ultimately, this turns the messy spreadsheet
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY
Sales Record Date
Product Quantity
2015/9/8
Aspen
33
2015/12/11
Yanaki
29
2015/12/19
Bellen
3
2015/8/23
Quad
36
…
…
…
Detail: product sales date.. Examples:2015.09.08...
Details: Each sales transaction. Column: date, product, quantity
Date
…
21.95 … Sales Record
Aspen
21.95
…
Carlota Crested Beaut …
19.95
…
17.95
…
…
…
Map
Semantic Edge
Structural Edge
Sales
Sheet Node
Product
Extracting tabular data and aligning steps to construct the unified graph.
Shared
Join Sales transactions to pricing to fill Revenue. Build a PivotTable on new sheet counting boomerang sales by website. Add a bar chart titled……
lesson
Steps Explorer
Instruction
hint
2 Fill in each transaction revenue = Retail Price ×Quantity ….
grounding
Build a pivot table on the new sheet: filter…
3 Use the pivot result to create a bar chart..
Programmer
Microsoft Excel Subgraph 2
Subgraph 3
33
604.8323
29
590.3675
2015/12/19 Bellen
3
73.575
…
…
Checklist
1. Revenue 2. Pivot table 3. Bar chart
…
2 Pivot Table Websites Baidu Alibaba Google Amazon Sum
Reflector State Check
Sandbox
Aspen
Final Output
State: Without pivot table
Python Interpreter Subgraph 1
Multi-Agent Workflow
Product Quantity Revenue
2015/12/11 Yanaki
…
Graph
Column Node
Hierarchical Graph
1
2015/9/8
Reasoning Experience
Node Semantic
Date
Alpine
1 Revenue
Dual-level Memory
Expert Knowledge
Sales Record
Date
Retail Price Product Retail Price
Panjing He, Mingyue Cheng, Yucong Luo,Li Li, Xiaohan Zhang
Count 15 10 8 2 35
3 Bar Chart Sales frequency by website Amazon
Geogle
Alibaba
baidu
0
5
10
15
Figure 2: An overview of the SheetCompass framework. into a clean, smart network, helping our downstream agents quickly find the right data across different sheets.
3.4
Dual-level Memory
To support multi-step reasoning under iterative feedback, SheetCompass introduces the expert knowledge memory as a permanent, general knowledge base. This component equips the dynamic agent ensemble with both stable domain knowledge and reliable tooluse knowledge, transforming risky text generation into precise engineering execution. Specifically, domain knowledge organizes procedural skills into clear rules, such as frequent formulas and common charts. Meanwhile, tool-use knowledge extracts general repair lessons by logging historical code-execution histories, which systematically captures the root causes of errors alongside their correct programming solutions. By looking up these verified rules and templates, the framework establishes a solid cognitive baseline that prevents large language models from making wrong guesses during complex spreadsheet tasks. In contrast, the reasoning experience memory is initially limited to the single task, functioning as a dynamic record of the active reasoning session. It carefully logs the episodic details of the current task, including where the agent moved on the graph, the error messages from the sandbox code, and the mismatches found by the checker. Feeding this short-term history directly back into the next prompting rounds ensures that each new action builds correctly upon previous outcomes, keeping data perception and automated reasoning tightly aligned. Crucially, the experiences accumulated during this active reasoning process are not discarded. Instead, successful trajectories and high-value reasoning lessons are extracted and transferred into long-term storage, continuously expanding the core repository of the expert knowledge memory.
3.5
Multi-agent Workflow
To transform complex instructions into executable code, SheetCompass coordinates a multi-agent workflow consisting of three dedicated roles: the explorer, the programmer, and the reflector. The explorer is designed to resolve the challenges of task decomposition and spatial locating within heterogeneous spreadsheet structures. It first maps high-level user instructions 𝑞 onto a sequence of logically dependent atomic steps T = {𝑡 1, 𝑡 2, . . . , 𝑡𝑛 }. Upon determining the target worksheet set, the explorer extracts topological features from the hierarchical graph G that are highly correlated with each sub-task 𝑡𝑖 . To achieve this, it constructs a seed node set S𝑖 using a filtering mechanism based on semantic similarity: S𝑖 = {𝑣 𝑗 ∈ 𝑉 | cos(t𝑖 , h 𝑗 ) ≥ 𝜆},
(3)
where 𝜆 represents the seeding coefficient that acts as the filtering threshold. This mechanism ensures that seed nodes possess high semantic confidence while maintaining a compact context size, effectively preventing prompt overflow. Subsequently, the system performs adaptive subgraph evolution originating from S𝑖 . By running a breadth-first search (BFS) on G and finding the intersection of subgraph sequences, the globally shared subgraph Ñ Gshared = 𝑛𝑖=1 G𝑖 is extracted. This approach significantly compresses the context length. The programmer acts as a constrained logic generation engine, whose primary responsibility is to combine the globally shared subgraph to transform each step 𝜏𝑖 into executable scripts. The Programmer follows a strict graph-grounded constraint mechanism. Unlike traditional text-to-code generation, the programmer must check entity alignment to ensure that all generated code variables are strictly anchored within the verified node sets of the spreadsheet graph. Within a secure sandbox environment equipped with a python interpreter and an excel engine, the programmer iterates
SheetCompass: Hierarchical Relation Graphs for Agentic Spreadsheet Reasoning
through the tasks, producing explicit planning and action trajectories for each round. This restricts the search space of code generation to the verified physical layout of the spreadsheet, maintaining semantic consistency during multi-step reasoning. The reflector implements a state-check feedback mechanism to ensure the robustness of task execution. Its core logic is to translate the explicit constraints within the user instruction 𝑞 into a concrete checklist, and then validate whether the metadata state M of the spreadsheet after running the code satisfies each item. Upon detecting any discrepancy between the actual execution state Δ(M) and the checklist requirements, the reflector transforms the logical contradictions into clear diagnostic notes and feeds them back to the workflow to trigger an iterative refinement process. Within this closed-loop feedback logic, a hyperparameter 𝜏 defines the maximum number of correction cycles allowed. Each time the reflector intercepts an error and requests a realignment from the explorer, one cycle is recorded, continuing until the task satisfies all items on the checklist or the threshold 𝜏 is reached.
4
Experiments
To validate the overall effectiveness of SheetCompass and the contributions of its core components, we conduct comprehensive experiments, including main comparisons against strong baselines and detailed ablation studies.
4.1
Experimental Setup
4.1.1 Datasets. To comprehensively evaluate the performance of the proposed framework, we adopted the SCB[39], SB[43],and SheetRM[7] dataset as our experimental benchmarks. Within all datasets, each instance is characterized by a complex sheet structure. Furthermore, for the SB dataset, each task instance is accompanied by three independent test cases to rigorously assess the robustness and accuracy of the model’s reasoning outcomes. 4.1.2 Metrics. To evaluate our framework comprehensively, we employ tailored metrics for the SCB and SB benchmarks. For SCB and SheetRM dataset, we utilize exec@1 to measure the runtime success rate and pass@1 to verify functional correctness against the ground truth[39]. For SB dataset, which contains multiple independent test cases per task, we adopt soft restriction and hard restriction metrics. The soft restriction calculates the average success rate across all test cases, evaluating general competence without heavily penalizing rare edge cases. Conversely, the hard restriction requires a solution to perfectly pass all test cases to receive credit[43]. 4.1.3 Baselines. To evaluate the effectiveness of SheetCompass, we select several representative baseline methods that cover two main technical paths: static generation and dynamic interaction. First, we include Binder, a classic table QA approach that translates natural language into SQL or Python code for data retrieval. We also incorporate traditional VBA script generation schemes, which use LLMs to generate macro code for native excel interfaces. These methods follow a static paradigm characterized by one-time generation. While they perform well on simple and fixed tasks, they cannot perceive or correct errors during execution. To evaluate more advanced interactive capabilities, we compare our framework against LLM-based agents, including SheetCopilot, SheetAgent, and
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY
OS-Copilot. These frameworks use a closed-loop architecture based on a plan-action-observation cycle, allowing them to break down complex instructions into steps and dynamically adjust their actions based on environment feedback. 4.1.4 Backbones. We choose two representative LLMs from the GPT family as the backbones to evaluate model performance on different scales. Specifically, we select GPT-5 as our primary closedsource LLM due to its exceptional reasoning and instruction-following capabilities in complex spreadsheet tasks. In addition, we employ GPT-4o-mini as a highly cost-efficient backbone. This choice allows us to verify the generalizability and robustness of SheetCompass under more constrained model capacities.
4.2
Experimental Results
As presented in Table 1, our proposed SheetCompass consistently outperforms all baseline methods across all benchmarks, demonstrating substantial and robust improvements. Under the GPT4 backbone, SheetCompass advances the state-of-the-art by improving pass@1 on SCB to 63.2%, hard restriction on SB to 18.3% and pass@1 on SheetRM to 43.5% ,which noticeably surpass the strongest baseline. This performance edge becomes even more pronounced when scaling to the GPT-5 backbone. Notably, on the challenging SB dataset, SheetCompass achieves absolute improvements of 6.4% on soft restriction and 6.9% on hard restriction. This steady performance edge is primarily driven by SheetCompass’s architecture, which effectively bridges structural perception with iterative execution. While existing baselines leverage LLM planning, they typically operate on flattened data sequences and struggle to capture the complex, non-linear topology of spreadsheets. In contrast, SheetCompass explicitly models the spreadsheet environment through its Hierarchical Graph, maintaining a high-fidelity structural skeleton while preserving cross-cell semantic dependencies. Guided by this topological grounding, the multi-agent workflow coordinates distinct roles to construct a holistic reasoning loop. Instead of relying on directly code generation, SheetCompass dynamically adapts to execution feedback while remaining anchored to stable structural constraints, thereby achieving state-of-the-art performance in spreadsheet automation.
4.3
Ablation Study
4.3.1 Effect of Main Components. The ablation results presented in Table 2 indicate that each major component of the SheetCompass framework contributes significantly to the overall performance. Completely removing the hierarchical graph causes the sharpest performance drop, lowering the pass@1 on SCB and SheetRM by 14.9% and 10.9% respectively, while reducing the hard restriction on SB by 7.5%. This substantial decrease demonstrates that the structure provided by the graph is a foundational source of grounding rather than an optional enhancement. Similarly, disabling the multi-agent workflow or the dual-level memory leads to noticeable performance degradation across all metrics. These findings confirm that high-fidelity structural perception, collaborative multi-agent execution, and continuous memory retention are all indispensable and complementary to the robustness of SheetCompass.
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY
Panjing He, Mingyue Cheng, Yucong Luo,Li Li, Xiaohan Zhang
Table 1: Comparison of the performance of SheetCompass with other approaches on the SCB, SB, and SheetRM benchmarks(%). ↑ indicates that a higher value is better. The best results are in bold and the second best are underlined.
Backbone
SCB
Method
SB
SheetRM
Exec@1 ↑
Pass@1 ↑
Soft ↑
Hard ↑
Exec@1 ↑
Pass@1 ↑
GPT-4
Binder VBA OS-Copilot SheetCopilot SheetAgent Ours
/ 77.8 / 87.3 94.1 95.1
15.6 37.1 50.1 44.3 61.1 63.2
1.2 8.3 17.0 13.8 17.6 22.6
0.0 5.2 14.0 10.1 13.5 18.3
/ 56.2 63.7 68.1 92.4 93.7
6.3 2.8 12.3 0.0 31.2 42.5
GPT-5
Binder VBA OS-Copilot SheetCopilot SheetAgent Ours
/ 86.4 / 65.0 90.0 96.4
60.0 42.2 60.0 55.0 70.0 71.3
18.1 10.3 18.0 16.5 18.3 24.7
14.7 8.4 14.0 13.1 15.1 22.0
/ 61.3 74.8 52.7 89.3 94.2
8.1 5.4 20.5 2.2 44.8 52.3
Table 2: Ablation study of the SheetCompass framework across different datasets (%). The results quantify the performance contributions of the hierarchical graph, dual-level memory, and multi-agent workflow, coupled with a fine-grained analysis of their internal components. ↑ indicates that higher values represent better performance.
Category
SCB
Component
SB
SheetRM
Exec@1 ↑
Pass@1 ↑
Soft ↑
Hard ↑
Exec@1 ↑
Pass@1 ↑
Full Model
SheetCompass
96.4
71.3
24.7
22.0
94.2
52.3
Main Component
w/o Hierarchical Graph w/o Multi-agent w/o Dual-level Memory
87.2 89.5 92.6
56.4 59.1 60.4
18.1 19.3 21.2
14.5 15.2 18.8
85.2 87.4 90.5
41.4 43.3 44.3
w/ Hierarchical Graph
w/o Structural Edge w/o Semantics Edge
90.8 95.0
62.3 68.2
20.5 21.0
16.8 17.1
88.7 92.8
45.7 50.0
w/ Dual-level Memory
w/o Expert Knowledge w/o Reasoning Experience
93.8 94.5
69.7 68.9
22.7 23.1
17.3 18.4
91.7 92.3
51.1 50.5
w/ Multi-agent
w/o Explorer w/o Reflector
92.4 94.5
64.8 61.5
21.5 22.8
18.0 16.2
90.3 92.3
47.5 45.1
4.3.2 Effect of Hierarchical Graph. Further analysis of the hierarchical graph reveals the relative importance of its internal structural cues. Removing the structural edges reduces the SheetRM exec@1 from 94.2% to 88.7%, which suggests that the table-column topology effectively preserves essential layout information. This layout preservation allows the model to capture the coarse organization of spreadsheets without facing excessive token overhead from modeling every individual cell relation. On the other hand, removing semantic edges severely harms performance on the challenging SB hard restriction task, where the score drops from 22.0% to 17.1%. This indicates that topological structure alone is insufficient when complex tasks require tracking cross-column dependencies and implicit formulas. 4.3.3 Effect of Dual-level Memory. The dual-level memory provides essential task guidelines and interactive execution experiences necessary for long-term reasoning stability. Disabling expert
knowledge reduces the SB hard restriction from 22.0% to 17.3%, which confirms that complex logical constraints in spreadsheets require explicitly injected professional rules to guide the LLM. Furthermore, removing reasoning experience causes the SCB pass@1 score to drop from 71.3% to 68.9%. This performance loss indicates that learning from historical execution trajectories helps SheetCompass avoid repetitive mistakes and handle long-range dependencies more effectively during multi-step tasks. 4.3.4 Effect of Multi-agent Workflow. At the execution stage, the multi-agent workflow coordinates distinct roles to generate and validate solutions through a collaborative process. As shown in Table 2, removing this workflow lowers the SCB pass@1 to 59.1%, confirming that a single-path generation strategy is inadequate for complex operations. The fine-grained analysis reveals a clear division of labor between the agents. Removing the explorer decreases
SheetCompass: Hierarchical Relation Graphs for Agentic Spreadsheet Reasoning