Skip to main content
QUICK REVIEW

[论文解读] Layout and Task Aware Instruction Prompt for Zero-shot Document Image Question Answering

Wenjin Wang, Yunhao Li|arXiv (Cornell University)|Jun 1, 2023
Multimodal Machine Learning Applications被引用 6
一句话总结

本文提出 LATIN-Prompt,一种零样本文档图像问答方法,通过在 OCR 输出中使用空格和换行符来编码布局信息,使指令微调模型(如 Claude 和 ChatGPT)无需微调即可理解文档布局。该方法在零样本设置下的性能与微调后的 SOTA 模型相当,在 DocVQA 上使 Claude 的性能提升 263%,使用 LATIN-Tuning 时 Alpaca 的性能达到 87.7%。

ABSTRACT

Layout-aware pre-trained models has achieved significant progress on document image question answering. They introduce extra learnable modules into existing language models to capture layout information within document images from text bounding box coordinates obtained by OCR tools. However, extra modules necessitate pre-training on extensive document images. This prevents these methods from directly utilizing off-the-shelf instruction-tuning language foundation models, which have recently shown promising potential in zero-shot learning. Instead, in this paper, we find that instruction-tuning language models like Claude and ChatGPT can understand layout by spaces and line breaks. Based on this observation, we propose the LAyout and Task aware Instruction Prompt (LATIN-Prompt), which consists of layout-aware document content and task-aware instruction. Specifically, the former uses appropriate spaces and line breaks to recover the layout information among text segments obtained by OCR tools, and the latter ensures that generated answers adhere to formatting requirements. Moreover, we propose the LAyout and Task aware Instruction Tuning (LATIN-Tuning) to improve the performance of small instruction-tuning models like Alpaca. Experimental results show that LATIN-Prompt enables zero-shot performance of Claude and ChatGPT to be comparable to the fine-tuning performance of SOTAs on document image question answering, and LATIN-Tuning enhances the zero-shot performance of Alpaca significantly. For example, LATIN-Prompt improves the performance of Claude and ChatGPT on DocVQA by 263% and 20% respectively. LATIN-Tuning improves the performance of Alpaca on DocVQA by 87.7%. Quantitative and qualitative analyses demonstrate the effectiveness of LATIN-Prompt and LATIN-Tuning. We provide the code in supplementary and will release it to facilitate future research.

研究动机与目标

  • 在无需微调的情况下,利用现成的指令微调语言模型实现零样本文档图像问答。
  • 解决现有布局感知模型需要在文档图像上进行大量预训练的局限性。
  • 探究指令微调模型是否可以通过空白字符(空格和换行符)理解布局,而非依赖基于坐标的嵌入。
  • 通过有针对性的指令微调,提升小型指令微调模型(如 Alpaca)在布局理解方面的能力。
  • 开发一种与闭源及大规模开源大语言模型兼容的方法,避免高昂的预训练成本。

提出的方法

  • LATIN-Prompt 通过在 OCR 提取的文本片段之间插入适当的空格和换行符,将布局信息编码到文档内容中,从而构建具有布局感知能力的文本。
  • 它集成了一种任务感知的指令提示,引导模型以所需格式(如跨度或列表)生成答案。
  • 该方法利用了 Claude 和 ChatGPT 等指令微调模型固有的从空白字符中解析布局的能力,从而无需依赖基于坐标的模块。
  • 引入 LATIN-Tuning,通过将 CSV 表格转换为使用空格和换行符编码的字符串,为小型指令微调模型(如 Alpaca)生成合成的指令微调数据,以增强其性能。
  • 该方法与视觉输入的使用相互独立,作者在 DocVQA、InfographicVQA 和 MP-DocVQA 上验证了其有效性。
  • 通过消融研究和案例分析评估该方法,以证明布局和任务组件的贡献。

实验结果

研究问题

  • RQ1指令微调语言模型(如 Claude 和 ChatGPT)是否仅通过空格和换行符就能理解文档布局?
  • RQ2使用空白字符编码的基于提示的方法是否能在文档图像问答任务中实现与微调后的 SOTA 模型相当的零样本性能?
  • RQ3LATIN-Tuning 在提升小型指令微调模型(如 Alpaca)的布局理解能力方面有多有效?
  • RQ4在 LATIN-Prompt 的整体性能中,布局感知内容与任务感知指令的相对贡献如何?
  • RQ5底层大语言模型的规模和能力是否与该设置下的零样本性能相关?

主要发现

  • LATIN-Prompt 使 Claude 在 DocVQA 上的零样本性能相比普通提示提升了 263%,达到与微调后的 SOTA 模型相当的水平。
  • ChatGPT 在 DocVQA 上的零样本性能通过 LATIN-Prompt 提升了 20%,同样达到微调后 SOTA 模型的水平。
  • LATIN-Tuning 使 Alpaca 在 DocVQA 上的零样本性能提升了 87.7%,显著增强了其布局理解能力。
  • 消融研究证实,布局感知内容和任务感知指令均至关重要,其中任务指令对 Claude 性能的贡献更大。
  • 该方法在 MP-DocVQA 上优于微调基线模型(如 Longformer 和 Big Bird),在 InfographicVQA 上除 TILT 外也超过大多数微调模型。
  • LATIN-Tuning 的性能随指令微调数据量增加而提升,但当样本数超过 2000 个后增益趋于饱和。

更好的研究,从现在开始

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

无需绑定信用卡

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