Page 267 - 《软件学报》2025年第5期
P. 267
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
2025,36(5):2167−2187 [doi: 10.13328/j.cnki.jos.007206] [CSTR: 32375.14.jos.007206] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
*
多粒度单元格对比的文本和表格数值问答模型
琚江舟, 毛云麟, 吴 震, 陈宇飞, 戴新宇, 陈家骏
(计算机软件新技术国家重点实验室 (南京大学), 江苏 南京 210023)
通信作者: 吴震, E-mail: wuz@nju.edu.cn
摘 要: 在文本和表格的数值问答任务中, 模型需要在给定的文本和表格下进行数值推理. 任务目标是生成一个包
含多步数值计算的计算程序, 并将计算程序结果作为问题的答案. 为了建模文本和表格, 当前工作通过模板将表格
线性化为一系列单元格句子, 再基于文本和单元格句子设计生成器以产生计算程序. 然而, 这种方法面临一个特定
问题: 由模板生成的单元格句子间差异微小, 生成器难以区分回答问题所必需的单元格句子 (支撑单元格句子) 和
回答问题无关的单元格句子 (干扰单元格句子), 最终导致模型基于干扰单元格句子生成错误的计算程序. 为了解
决这个问题, 在生成器上设计一个多粒度单元格语义对比方法, 其主要目的是增加支撑单元格句子和干扰单元格
句子表示距离, 进而帮助生成器区分它们. 这个方法由粗粒度单元格语义对比和细粒度单元格语义构成元素对比
(包括行名对比, 列名对比及单元格数值对比) 共同构成. 实验结果验证所提出的多粒度单元格语义对比方法可以
使生成器在 FinQA 和 MultiHiertt 数值推理数据集上取得优于基准模型的表现. 在 FinQA 数据集上, 多粒度单元格
语义对比方法上最高可以提升答案正确率达到 3.38%; 特别地, 在更为困难的层次化表格数据集 MultiHiertt 中, 该
方法使生成器的正确率显著提高了 7.8%. 同大语言模型 GPT-3 结合思维链相比, 基于多粒度单元格语义对比的生
成器性能在 FinQA 和 MultiHiertt 上分别表现出 5.44% 和 1.69% 的答案正确率提升. 后续分析实验进一步验证多
粒度单元格语义对比方法有助于生成器区分支撑单元格句子和干扰单元格句子.
关键词: 表格和文本学习; 数值问答模型; 多粒度对比学习
中图法分类号: TP18
中文引用格式: 琚江舟, 毛云麟, 吴震, 陈宇飞, 戴新宇, 陈家骏. 多粒度单元格对比的文本和表格数值问答模型. 软件学报, 2025,
36(5): 2167–2187. http://www.jos.org.cn/1000-9825/7206.htm
英文引用格式: Ju JZ, Mao YL, Wu Z, Chen YF, Dai XY, Chen JJ. Text and Table Numerical Question-answering Model Based on
Multi-granularity Cell Contrast. Ruan Jian Xue Bao/Journal of Software, 2025, 36(5): 2167–2187 (in Chinese). http://www.jos.org.cn/
1000-9825/7206.htm
Text and Table Numerical Question-answering Model Based on Multi-granularity Cell Contrast
JU Jiang-Zhou, MAO Yun-Lin, WU Zhen, CHEN Yu-Fei, DAI Xin-Yu, CHEN Jia-Jun
(State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China)
Abstract: In the task of numerical question-answering with texts and tables, the models are required to perform numerical reasoning based
on given texts and tables. The goal is to generate a computational program consisting of multi-step numerical calculations, and the
program’s results are used as the answer to the question. To model the texts and tables, the current work linearizes the table into a series
of cell sentences through templates and then designs a generator based on the texts and cell sentences to produce the computational
program. However, this approach faces a specific problem: the differences between cell sentences generated by templates are minimal,
making it difficult for the generator to distinguish between cell sentences that are essential for answering the question (supporting cell
sentences) and those irrelevant to the question (distracting cell sentences). Ultimately, the model generates incorrect computational
programs based on distracting cell sentences. To tackle this issue, this study proposes an approach called multi-granularity cell semantic
* 基金项目: 国家自然科学基金 (62376120, 61936012, 62206126)
收稿时间: 2023-12-21; 修改时间: 2024-03-01; 采用时间: 2024-04-02; jos 在线出版时间: 2024-06-20
CNKI 网络首发时间: 2024-07-02