arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2306.00526cs.CLcs.AIcs.CV
收藏

面向零样本文档图像问答的布局与任务感知指令提示

Layout and Task Aware Instruction Prompt for Zero-shot Document Image Question Answering

Zhejiang University(浙江大学)

Wenjin Wang, Yunhao Li, Yixin Ou, Yin Zhang

AI总结:

针对零样本文档图像问答,提出利用空格和换行符恢复布局信息的LATIN-Prompt及提升小模型性能的LATIN-Tuning,使大模型零样本性能媲美SOTA微调效果。

摘要:

布局感知预训练模型在文档图像问答上取得了显著进展。它们在现有语言模型中引入额外的可学习模块,以从OCR工具获取的文本边界框坐标中捕获文档图像内的布局信息。然而,额外的模块需要在大量文档图像上进行预训练。这阻碍了这些方法直接利用现成的指令微调语言基础模型,而这些模型最近在零样本学习中展现出了有前景的潜力。相反,在本文中,我们发现像Claude和ChatGPT这样的指令微调语言模型能够通过空格和换行符来理解布局。基于这一观察,我们提出了布局与任务感知指令提示(LATIN-Prompt),它由布局感知文档内容和任务感知指令组成。具体而言,前者使用适当的空格和换行符来恢复OCR工具获取的文本片段之间的布局信息,而后者确保生成的答案符合格式要求。此外,我们提出了布局与任务感知指令微调(LATIN-Tuning)来提高像Alpaca这样的小型指令微调模型的性能。实验结果表明,LATIN-Prompt使Claude和ChatGPT的零样本性能在文档图像问答上可与SOTA的微调性能相媲美,并且LATIN-Tuning显著提升了Alpaca的零样本性能。例如,LATIN-Prompt分别将Claude和ChatGPT在DocVQA上的性能提升了263%和20%。LATIN-Tuning将Alpaca在DocVQA上的性能提升了87.7%。定量和定性分析证明了LATIN-Prompt和LATIN-Tuning的有效性。我们在补充材料中提供了代码,并将发布它以促进未来的研究。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑