Skip to main content
QUICK REVIEW

[论文解读] Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding

Kenton Lee, Mandar Joshi|arXiv (Cornell University)|Oct 7, 2022
Multimodal Machine Learning ApplicationsComputer Science被引用 45
一句话总结

Pix2Struct 是一个预训练的图像到文本模型,学习将带掩码的截图解析为类似HTML的结构,并将此知识迁移到跨越四个领域的九个视觉场景语言任务。

ABSTRACT

Visually-situated language is ubiquitous -- sources range from textbooks with diagrams to web pages with images and tables, to mobile apps with buttons and forms. Perhaps due to this diversity, previous work has typically relied on domain-specific recipes with limited sharing of the underlying data, model architectures, and objectives. We present Pix2Struct, a pretrained image-to-text model for purely visual language understanding, which can be finetuned on tasks containing visually-situated language. Pix2Struct is pretrained by learning to parse masked screenshots of web pages into simplified HTML. The web, with its richness of visual elements cleanly reflected in the HTML structure, provides a large source of pretraining data well suited to the diversity of downstream tasks. Intuitively, this objective subsumes common pretraining signals such as OCR, language modeling, image captioning. In addition to the novel pretraining strategy, we introduce a variable-resolution input representation and a more flexible integration of language and vision inputs, where language prompts such as questions are rendered directly on top of the input image. For the first time, we show that a single pretrained model can achieve state-of-the-art results in six out of nine tasks across four domains: documents, illustrations, user interfaces, and natural images.

研究动机与目标

  • 激发对通用的视觉场景语言理解的需求,超越仅限于某一领域的管线。
  • 引入一个仅像素的预训练目标,将带掩码的截图映射到 HTML 解析。
  • 提出可变分辨率的 ViT 输入,以及在输入图片上直接呈现文本提示的方法。
  • 展示将单个预训练模型转移到多个下游任务并取得强劲结果。

提出的方法

  • 在 80M 网页截图及其 HTML 派生解析的配对数据上预训练两个基于 ViT 的图像到文本模型(Base: 282M params;Large: 1.3B params)。
  • 使用截图解析目标:从带掩码的截图预测基于 HTML 的解析,文本遮罩比例为 50% 以鼓励利用上下文。
  • 将 HTML DOM 压缩为可见元素以及适合目标序列长度的最大子树;在截图上对该子树绘制一个边界框。
  • 采用 2D 绝对位置嵌入和可变分辨率输入,以保持纵横比并处理不同分辨率。
  • 在对下游任务进行微调之前,先用一个阅读课程进行热身(对彩色/随机字体文本进行仅文本解码)。
  • 在微调期间,将提示(问题、边界框)渲染到输入图像上,并在任务数据上端到端训练单个图像到文本模型。

实验结果

研究问题

  • RQ1是否可以通过仅像素的模型,使用截图解析目标,跨领域地有效迁移到多种视觉场景语言任务?
  • RQ2可变分辨率输入以及在图像上渲染提示如何影响各任务的性能和鲁棒性?
  • RQ3截图解析的预训练信号在多大程度上覆盖了 OCR、语言建模和图像描述信号,以用于下游迁移?

主要发现

  • Pix2Struct 在跨四个领域的九个基准中有 8 项胜过 Donut 基线。
  • Large 模型相较 Base 模型取得显著提升,提升了若干任务分数。
  • Pix2Struct 在多个人机界面和插图任务上达到了最先进的结果,无需域特定的管线。
  • 在自然图像和文档上,Pix2Struct 与域优化方法具有竞争力,尽管缺乏域内的预训练数据。
  • 一个关键的消融实验表明,移除截图解析目标会显著降低性能,凸显其核心作用。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。