Large Language Models Understand Layout

Weiming Li, Manni Duan, Dong An, Yan Shao
7/8/2024
cs.CL

No official code found. Best implementation: liweim/TextLayoutLLM (7 stars, MIT, last commit 2025-09-15).

Abstract

Large language models (LLMs) demonstrate extraordinary abilities in a wide range of natural language processing (NLP) tasks. In this paper, we show that, beyond text understanding capability, LLMs are capable of processing text layouts that are denoted by spatial markers. They are able to answer questions that require explicit spatial perceiving and reasoning, while a drastic performance drop is observed when the spatial markers from the original data are excluded. We perform a series of experiments with the GPT-3.5, Baichuan2, Llama2 and ChatGLM3 models on various types of layout-sensitive datasets for further analysis. The experimental results reveal that the layout understanding ability of LLMs is mainly introduced by the coding data for pretraining, which is further enhanced at the instruction-tuning stage. In addition, layout understanding can be enhanced by integrating low-cost, auto-generated data approached by a novel text game. Finally, we show that layout understanding ability is beneficial for building efficient visual question-answering (VQA) systems.

View on arXivView PDF

Code Implementations(1)

MIT
74PythonApr 22, 20241 years agoMIT

Similar Papers

Cite this paper

@article{li2024large,
  title  = {Large Language Models Understand Layout},
  author = {Weiming Li and Manni Duan and Dong An and Yan Shao},
  year   = {2024},
  eprint = {2407.05750},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.05750v3}
}

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/2407.05750.svg)](https://codeofpaper.com/paper/2407.05750)

Discussion