Improving Language Understanding from Screenshots

Tianyu Gao, Zirui Wang, Adithya Bhaskar, Danqi Chen
2/21/2024
cs.CLcs.CVcs.LG

No official code found. Best implementation: princeton-nlp/PTP (32 stars, MIT, last commit 2024-07-09).

Abstract

An emerging family of language models (LMs), capable of processing both text and images within a single visual view, has the promise to unlock complex tasks such as chart understanding and UI navigation. We refer to these models as screenshot language models. Despite their appeal, existing screenshot LMs substantially lag behind text-only models on language understanding tasks. To close this gap, we adopt a simplified setting where the model inputs are plain-text-rendered screenshots, and we focus on improving the text ability of screenshot LMs. We propose a novel Patch-and-Text Prediction (PTP) objective, which masks and recovers both image patches of screenshots and text within screenshots. We also conduct extensive ablation studies on masking rates and patch sizes, as well as designs for improving training stability. Our pre-trained model, while solely taking visual inputs, achieves comparable performance with BERT on 6 out of 8 GLUE tasks (within 2%) and improves up to 8% over prior work. Additionally, we extend PTP to train autoregressive screenshot LMs and demonstrate its effectiveness--our models can significantly reduce perplexity by utilizing the screenshot context. Together, we hope our findings can inspire future research on developing powerful screenshot LMs and extending their reach to broader applications.

View on arXivView PDF

Code Implementations(1)

princeton-nlp/PTPCommunity100%
MIT

Improving Language Understanding from Screenshots. Paper: https://arxiv.org/abs/2402.14073

321C++, ShellFeb 8, 20242 years agoMIT

Similar Papers

Cite this paper

@article{gao2024improving,
  title  = {Improving Language Understanding from Screenshots},
  author = {Tianyu Gao and Zirui Wang and Adithya Bhaskar and Danqi Chen},
  year   = {2024},
  eprint = {2402.14073},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.14073v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.14073.svg)](https://codeofpaper.com/paper/2402.14073)

Discussion