SHITIANYU-hue/SheetasToken

Implementation and resources for Sheet as Token, a graph-enhanced framework for multi-sheet spreadsheet understanding and retrieval.

What it solves

This project implements a two-stage retrieval pipeline designed to help AI systems understand and retrieve relevant information from complex, multi-sheet spreadsheets. It addresses the challenge of identifying the correct sheet within a large corpus of spreadsheets when given a specific query, using only metadata like sheet names and column headers rather than full cell values.

How it works

The system operates in two distinct stages:

  1. Stage 1: Sheet Token Encoder: A fine-tuned BGE (BGE-base-en-v1.5) model acts as a bi-encoder to serialize sheet metadata (names, dimensions, and column headers) into tokens and retrieve an initial set of top-50 candidate sheets.
  2. Stage 2: Graph Retriever: A gated relational Graph Neural Network (GNN) performs query-conditioned cross-sheet retrieval over the candidates. This stage refines the selection to find the most relevant sheet based on relational composition.

Who it’s for

Researchers and developers working on spreadsheet understanding, document retrieval, and RAG (Retrieval-Augmented Generation) systems that need to handle structured data across multiple sheets.

Highlights

  • Two-Stage Pipeline: Combines efficient bi-encoder retrieval with a high-precision graph-based reranking stage.
  • Metadata-Only Approach: Operates using sheet IDs, names, dimensions, and column names, avoiding the need to process every single cell value.
  • Graph-Enhanced Representation: Uses a GNN to capture relational dependencies between sheets.
  • Comprehensive Baselines: Includes implementations of frozen embedding retrieval, OpenAI LLM selectors, and local LLM selectors (via Ollama) for performance comparison.

Related

  • Project
  • Project
  • Project
  • Project
  • Project