表格LLM:將試算表編碼為大型語言模型
SpreadsheetLLM: Encoding Spreadsheets for Large Language Models
July 12, 2024
作者: Yuzhang Tian, Jianbo Zhao, Haoyu Dong, Junyu Xiong, Shiyu Xia, Mengyu Zhou, Yun Lin, José Cambronero, Yeye He, Shi Han, Dongmei Zhang
cs.AI
摘要
擁有廣泛的二維網格、各種佈局和多樣格式選項的試算表,對於大型語言模型(LLMs)來說具有顯著挑戰。為應對此,我們引入了SpreadsheetLLM,開創了一種高效的編碼方法,旨在釋放和優化LLMs對試算表的強大理解和推理能力。最初,我們提出了一種基本序列化方法,該方法包括單元格地址、數值和格式。然而,由於LLMs的標記限制,這種方法在大多數應用中並不實用。為應對這一挑戰,我們開發了SheetCompressor,一種創新的編碼框架,有效地為LLMs壓縮試算表。它包括三個模塊:基於結構錨點的壓縮、逆向索引轉換和數據格式感知的聚合。在試算表表格檢測任務中,它顯著提高了性能,在GPT4的內文學習環境中,比基本方法高出25.6%。此外,使用SheetCompressor進行微調的LLM具有平均25倍的壓縮比,但實現了78.9%的F1得分,超越了現有最佳模型12.3%。最後,我們提出了Chain of Spreadsheet用於試算表理解的下游任務,並在一個新的、要求嚴格的試算表QA任務中進行驗證。我們系統地利用試算表的固有佈局和結構,展示了SpreadsheetLLM在各種試算表任務中的高效性。
English
Spreadsheets, with their extensive two-dimensional grids, various layouts,
and diverse formatting options, present notable challenges for large language
models (LLMs). In response, we introduce SpreadsheetLLM, pioneering an
efficient encoding method designed to unleash and optimize LLMs' powerful
understanding and reasoning capability on spreadsheets. Initially, we propose a
vanilla serialization approach that incorporates cell addresses, values, and
formats. However, this approach was limited by LLMs' token constraints, making
it impractical for most applications. To tackle this challenge, we develop
SheetCompressor, an innovative encoding framework that compresses spreadsheets
effectively for LLMs. It comprises three modules: structural-anchor-based
compression, inverse index translation, and data-format-aware aggregation. It
significantly improves performance in spreadsheet table detection task,
outperforming the vanilla approach by 25.6% in GPT4's in-context learning
setting. Moreover, fine-tuned LLM with SheetCompressor has an average
compression ratio of 25 times, but achieves a state-of-the-art 78.9% F1 score,
surpassing the best existing models by 12.3%. Finally, we propose Chain of
Spreadsheet for downstream tasks of spreadsheet understanding and validate in a
new and demanding spreadsheet QA task. We methodically leverage the inherent
layout and structure of spreadsheets, demonstrating that SpreadsheetLLM is
highly effective across a variety of spreadsheet tasks.Summary
AI-Generated Summary