让AI写带注释的代码来解表格题,更准更可解释。
Reasoning by Commented Code for Table Question Answering
- 用多行带注释的代码分步推理表格问题
- 在WikiTableQuestions上达70.9%准确率,融合后最高84.3%
- 适合需要可解释性与高精度的表格问答场景
表格问答(TableQA)对大语言模型构成挑战,因传统表格线性化会破坏结构数据的二维关系。现有方法依赖端到端生成或单行程序查询,常导致数值准确率低且可解释性差。本文提出一种带注释的分步代码生成框架,将表格推理分解为多行可执行代码并辅以简洁自然语言注释,增强推理清晰度与正确代码生成概率。在WikiTableQuestions基准上,该方法使用Qwen2.5-Coder-7B-Instruct达到70.9%准确率,超过Repanda基线(67.6%)。通过轻量级答案选择机制与端到端表问答模型结合,进一步提升至84.3%准确率。
原文摘要 · Abstract (English)
Table Question Answering (TableQA) poses a significant challenge for large language models (LLMs) because conventional linearization of tables often disrupts the two-dimensional relationships intrinsic to structured data. Existing methods, which depend on end-to-end answer generation or single-line program queries, typically exhibit limited numerical accuracy and reduced interpretability. This work introduces a commented, step-by-step code-generation framework that incorporates explicit reasoning into the Python program-generation process. The approach decomposes TableQA reasoning into multi-line executable programs with concise natural language comments, thereby promoting clearer reasoning and increasing the likelihood of generating correct code. On the WikiTableQuestions benchmark, the proposed method achieves 70.9\% accuracy using Qwen2.5-Coder-7B-Instruct, surpassing the Repanda baseline (67.6\%). Integrating the proposed framework with a robust end-to-end TableQA model via a lightweight answer-selection mechanism yields further improvements. This combined approach achieves up to 84.3\% accuracy on the WikiTableQuestions benchmark.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。