Skip to main content
QUICK REVIEW

[论文解读] ICL-D3IE: In-Context Learning with Diverse Demonstrations Updating for Document Information Extraction

Jiabang He, Lei Wang|arXiv (Cornell University)|Mar 9, 2023
Topic Modeling被引用 7
一句话总结

ICL-D3IE 是一种新颖的少样本提示学习框架,通过利用多样且迭代更新的示范样例,使大语言模型(LLMs)能够执行文档级信息抽取(DIE)。该方法通过采用难度高、布局感知强且格式规范的示范样例,超越微调模型的性能,在 SROIE、FUNSD 和 CORD 数据集上均达到当前最优结果,即使在分布内和分布外设置下也优于 LayoutLMv3。

ABSTRACT

Large language models (LLMs), such as GPT-3 and ChatGPT, have demonstrated remarkable results in various natural language processing (NLP) tasks with in-context learning, which involves inference based on a few demonstration examples. Despite their successes in NLP tasks, no investigation has been conducted to assess the ability of LLMs to perform document information extraction (DIE) using in-context learning. Applying LLMs to DIE poses two challenges: the modality and task gap. To this end, we propose a simple but effective in-context learning framework called ICL-D3IE, which enables LLMs to perform DIE with different types of demonstration examples. Specifically, we extract the most difficult and distinct segments from hard training documents as hard demonstrations for benefiting all test instances. We design demonstrations describing relationships that enable LLMs to understand positional relationships. We introduce formatting demonstrations for easy answer extraction. Additionally, the framework improves diverse demonstrations by updating them iteratively. Our experiments on three widely used benchmark datasets demonstrate that the ICL-D3IE framework enables Davinci-003/ChatGPT to achieve superior performance when compared to previous pre-trained methods fine-tuned with full training in both the in-distribution (ID) setting and in the out-of-distribution (OOD) setting. Code is available at https://github.com/MAEHCM/ICL-D3IE.

研究动机与目标

  • 为解决将大语言模型(LLMs)应用于文档信息抽取(DIE)时存在的模态与任务差距问题,即 LLMs 缺乏对视觉和布局信息的直接访问能力。
  • 通过设计多样化的示范类型,解决泛化能力、布局理解与答案可提取性等关键挑战,从而提升 DIE 任务中的少样本提示学习性能。
  • 通过利用模型在训练数据上的预测反馈,迭代更新难度高的示范样例,提升模型在测试实例上的泛化能力。
  • 在分布内与分布外设置下评估该框架的有效性,证明其在鲁棒性方面超越标准微调基线模型。

提出的方法

  • 通过识别在训练文档中对 LLMs 预测最具挑战性的、具有显著差异的文本片段,提取难度高的示范样例。
  • 通过提示 LLMs 描述文本内容框之间的位置关系,构建具有布局感知能力的示范样例,以增强空间推理能力。
  • 使用从训练数据中随机选取的片段设计格式化示范样例,引导 LLMs 以结构化、机器可读的格式预测标签,便于后续提取。
  • 通过利用 LLM 自身在训练数据上的预测结果,迭代地更新和优化难度高的示范样例,经过多轮迭代逐步提升其质量。
  • 实施标签映射,将模糊或不自然的实体标签转换为更符合 LLMs 训练分布的术语。
  • 按照特定顺序组织最终提示:标签映射、难度高、布局感知、格式化示范样例,以最大化少样本提示学习的效果。
Figure 1 : Two approaches for solving the DIE task: (a) previous pre-trained document understanding models [ 15 , 42 ] fine-tuned with full training examples, and (b) in-context learning over LLMs with a few examples.
Figure 1 : Two approaches for solving the DIE task: (a) previous pre-trained document understanding models [ 15 , 42 ] fine-tuned with full training examples, and (b) in-context learning over LLMs with a few examples.

实验结果

研究问题

  • RQ1使用多样且任务特定的示范样例进行少样本提示学习,是否能够在文档信息抽取任务中超越微调的视觉-语言模型?
  • RQ2引入布局感知示范样例后,LLMs 在理解文档结构和提升实体预测准确率方面的能力有何变化?
  • RQ3通过少样本提示反馈迭代更新难度高的示范样例,对模型在测试实例上的泛化能力有何影响?
  • RQ4不同示范样例类型的排序如何影响 DIE 任务中少样本提示学习的性能?
  • RQ5与微调模型相比,ICL-D3IE 框架在分布外设置下是否仍保持优越性能?

主要发现

  • 在 SROIE 数据集上,ICL-D3IE 搭配 Davinci-003 模型实现了 97.88% 的 F1 分数,优于 LayoutLMv3 base 模型(96.89%),在分布内设置下表现更优。
  • 在 CORD 数据集上,ICL-D3IE(Davinci-003)实现了 95.12% 的 F1 分数,显著优于 LayoutLMv3 base(92.45%),并在分布外设置下展现出强大的泛化能力。
  • 在所有示范样例数量(1 到 12)下,该框架均持续优于微调的 LayoutLMv3 模型,尤其在低 shot 设置下优势更明显。
  • 对难度高的示范样例进行迭代更新可提升性能,最优结果出现在 20 次迭代后,表明基于反馈的优化能有效增强泛化能力。
  • M-H-L-F 顺序(标签映射、难度高、布局感知、格式化)在所有数据集上均优于 M-L-H-F 顺序,证实示范样例的排序对少样本提示学习的成功至关重要。
  • 案例研究证实,ICL-D3IE 能够准确描述位置关系,并正确预测实体(如区分 'question' 与 'header'),而标准少样本提示学习则失败,证明了布局感知与难度高示范样例的价值。
Figure 2 : A detailed illustration of ICL-D3IE framework, including obtaining nearest neighbor documents for test samples from the training dataset, constructing iteratively updated diverse demonstrations, and performing inference.
Figure 2 : A detailed illustration of ICL-D3IE framework, including obtaining nearest neighbor documents for test samples from the training dataset, constructing iteratively updated diverse demonstrations, and performing inference.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。