ChatPaper.aiChatPaper

电子表格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,用于电子表格理解的下游任务,并在一个新的、要求严格的电子表格问答任务中进行验证。我们系统地利用电子表格的固有布局和结构,证明了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

PDF13718November 28, 2024