arXiv:2506.06137cs.LGcs.CL2025-06被引 3

小模型也能精准分析表格,靠自监督+强化学习生成代码推理

Table-r1: Self-supervised and Reinforcement Learning for Program-based Table Reasoning in Small Language Models

  • 用程序生成代替直接文本推理,提升数值计算准确性
  • 在4个数据集上比基础模型高15%以上准确率,接近大模型表现
  • 适合资源有限但需表格推理的场景,如移动端或嵌入式系统

表格推理(TR)需要对半结构化表格数据进行结构化推理,对小语言模型(SLMs,如LLaMA-8B)而言仍具挑战,因其能力远低于大语言模型(LLMs,如GPT-4o)。为缩小差距,本文探索基于程序的表格推理(P-TR),通过生成可执行程序绕过文本推理在数值计算上的局限。然而,将P-TR应用于SLMs面临两大挑战:(i)对表格布局异构性敏感,(ii)因代码生成能力弱导致推理不一致。为此提出Table-r1,一种两阶段P-TR方法。第一阶段引入自监督任务“布局转换推断”,从程序视角增强表格布局泛化能力;第二阶段采用混合范式的组相对策略优化(Group Relative Policy Optimization),提升推理一致性,并支持在必要时动态回退至文本推理。在四个TR基准测试中,Table-r1显著优于所有基于SLM的方法,在所有数据集上均实现至少15%的准确率提升,性能媲美大模型。

原文摘要 · Abstract (English)

Table reasoning (TR) requires structured reasoning over semi-structured tabular data and remains challenging, particularly for small language models (SLMs, e.g., LLaMA-8B) due to their limited capacity compared to large LMs (LLMs, e.g., GPT-4o). To narrow this gap, we explore program-based TR (P-TR), which circumvents key limitations of text-based TR (T-TR), notably in numerical reasoning, by generating executable programs. However, applying P-TR to SLMs introduces two challenges: (i) vulnerability to heterogeneity in table layouts, and (ii) inconsistency in reasoning due to limited code generation capability. We propose Table-r1, a two-stage P-TR method designed for SLMs. Stage 1 introduces an innovative self-supervised learning task, Layout Transformation Inference, to improve tabular layout generalization from a programmatic view. Stage 2 adopts a mix-paradigm variant of Group Relative Policy Optimization, enhancing P-TR consistency while allowing dynamic fallback to T-TR when needed. Experiments on four TR benchmarks demonstrate that Table-r1 outperforms all SLM-based methods, achieving at least a 15% accuracy improvement over the base model (LLaMA-8B) across all datasets and reaching performance competitive with LLMs.

表格推理小模型程序生成强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。