用程序化方法提升大模型处理表格推理的能力
ProgramTab: Boosting Table Reasoning of LLMs via Programmatic Paradigm

- 让大模型用Python代码自动清洗和提取表格数据
- 在多个数据集上超越现有基于大模型的基线方法
- 适合需要精准处理复杂表格的应用场景
基于大语言模型(LLMs)的表格推理任务,要求根据自然语言问题和结构化表格数据进行推理,受到广泛关注。然而,现有方法在面对大型表格时性能显著下降,主要受限于长文本建模困难和输入长度限制。以往的文本转SQL方法虽能高效提取关键信息并生成小规模子表,但网络表格等数据常缺乏必要结构与一致性,难以通过SQL执行数学逻辑操作。为此,我们提出ProgramTab框架,利用上下文学习引导大模型以Python代码形式完成表格预处理、行列提取及SQL生成。实验结果表明,该框架能有效应对表格推理任务,在多个数据集上优于所有基于大模型的基线方法。
原文摘要 · Abstract (English)
Table-based reasoning with large language models (LLMs), which requires reasoning based on natural language questions and structured tabular data, has gained widespread attention. However, a series of issues still constrain the application of this task. The previous approaches suffered from significant performance degradation when faced with large tables due to the difficulty of long text modeling and the limitation of input length for LLMs. The text-to-SQL approach is used to efficiently extract key information from tables and generate smaller sub-tables. However, tabular data, especially web tables, often lack the necessary structure and consistency, making them unsuitable for performing mathematical logic operations using SQL queries. We propose the ProgramTab framework, which guides LLMs employing in-context learning to perform tabular data preprocessing with Python code, as well as the momentous contents extraction with row and column extraction and SQL generation. The experiment results on table reasoning datasets demonstrate that the ProgramTab framework effectively deals with table-based reasoning tasks and outperforms all LLM-based baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。