用Pandas查询验证表格事实,让推理过程可解释、可复现。
RePanda: Pandas-powered Tabular Verification and Reasoning
- 将表格断言转为可执行的Pandas代码,实现透明推理。
- 在TabFact测试集上达84.09%准确率,跨数据集泛化能力更强。
- 适合需要可解释性与结构化推理的研究者与开发者。
表格事实核查对保障结构化信息准确性至关重要。现有方法多依赖黑箱模型,推理过程不透明。我们提出RePanda,一种基于结构化执行的验证方法,将断言转化为可执行的Pandas查询,实现可解释、可验证的推理。为训练RePanda,我们构建了PanTabFact数据集,源自TabFact训练集,通过DeepSeek-Chat生成查询并经自动化纠错修正。在该数据集上微调DeepSeek-coder-7B-instruct-v1.5,RePanda在TabFact测试集上达到84.09%准确率。为评估分布外(OOD)泛化能力,我们将WikiTableQuestions中的问答对解析为事实断言,形成WikiFact数据集。无需额外微调,RePanda在WikiFact上达84.72%准确率,显著优于所有基线,展现出强鲁棒性。该表现接近671B参数量的DeepSeek-Chat零样本性能,表明我们的微调策略成功将大模型的结构化推理能力压缩至7B小模型中。此外,RePanda还可用于表格问答任务,通过生成可执行查询实现精确答案检索。为此,我们引入PanWiki数据集,映射WikiTableQuestions到Pandas查询。在该数据集上微调后,RePanda在直接答案检索任务中达到75.1%准确率。这些结果凸显了基于结构化执行的推理在表格验证与问答中的有效性。数据集已公开于Hugging Face:datasets/AtoosaChegini/PanTabFact。
原文摘要 · Abstract (English)
Fact-checking tabular data is essential for ensuring the accuracy of structured information. However, existing methods often rely on black-box models with opaque reasoning. We introduce RePanda, a structured fact verification approach that translates claims into executable pandas queries, enabling interpretable and verifiable reasoning. To train RePanda, we construct PanTabFact, a structured dataset derived from the TabFact train set, where claims are paired with executable queries generated using DeepSeek-Chat and refined through automated error correction. Fine-tuning DeepSeek-coder-7B-instruct-v1.5 on PanTabFact, RePanda achieves 84.09% accuracy on the TabFact test set. To evaluate Out-of-Distribution (OOD) generalization, we interpret question-answer pairs from WikiTableQuestions as factual claims and refer to this dataset as WikiFact. Without additional fine-tuning, RePanda achieves 84.72% accuracy on WikiFact, significantly outperforming all other baselines and demonstrating strong OOD robustness. Notably, these results closely match the zero-shot performance of DeepSeek-Chat (671B), indicating that our fine-tuning approach effectively distills structured reasoning from a much larger model into a compact, locally executable 7B model. Beyond fact verification, RePanda extends to tabular question answering by generating executable queries that retrieve precise answers. To support this, we introduce PanWiki, a dataset mapping WikiTableQuestions to pandas queries. Fine-tuning on PanWiki, RePanda achieves 75.1% accuracy in direct answer retrieval. These results highlight the effectiveness of structured execution-based reasoning for tabular verification and question answering. We have publicly released the dataset on Hugging Face at datasets/AtoosaChegini/PanTabFact.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。