Skip to main content
QUICK REVIEW

[Paper Review] LAMPRET: Layout-Aware Multimodal PreTraining for Document Understanding

Te-Lin Wu, Cheng Li|arXiv (Cornell University)|Apr 16, 2021
Handwritten Text Recognition TechniquesComputer Science32 references7 citations
TL;DR

LAMPRET is a hierarchical, layout-aware multimodal pretraining framework that models documents as spatially ordered content blocks (text, images, tables) using two cascaded transformers. It achieves state-of-the-art performance on document completion tasks by jointly pretraining on masked language modeling, image-text matching, and novel layout-aware objectives—block-order prediction, masked block prediction, and image fitting—demonstrating superior performance in text block filling and image suggestion tasks.

ABSTRACT

Document layout comprises both structural and visual (eg. font-sizes) information that is vital but often ignored by machine learning models. The few existing models which do use layout information only consider textual contents, and overlook the existence of contents in other modalities such as images. Additionally, spatial interactions of presented contents in a layout were never really fully exploited. To bridge this gap, we parse a document into content blocks (eg. text, table, image) and propose a novel layout-aware multimodal hierarchical framework, LAMPreT, to model the blocks and the whole document. Our LAMPreT encodes each block with a multimodal transformer in the lower-level and aggregates the block-level representations and connections utilizing a specifically designed transformer at the higher-level. We design hierarchical pretraining objectives where the lower-level model is trained similarly to multimodal grounding models, and the higher-level model is trained with our proposed novel layout-aware objectives. We evaluate the proposed model on two layout-aware tasks -- text block filling and image suggestion and show the effectiveness of our proposed hierarchical architecture as well as pretraining techniques.

Motivation & Objective

  • To address the gap in existing models that ignore layout structure and multimodal content (e.g., images) in document representation learning.
  • To develop a hierarchical framework that models both local block-level interactions and global document-level layout structure.
  • To design novel pretraining objectives that exploit spatial ordering, block-level masking, and image fitting to improve layout awareness.
  • To evaluate the framework on realistic downstream tasks—text block filling and image suggestion—under retrieval-based settings.
  • To establish a new benchmark for multimodal, layout-aware document representation learning beyond unimodal or template-based documents.

Proposed method

  • Parse HTML-formatted documents into spatially ordered content blocks, each annotated with position, semantic type, and layout attributes (e.g., font size).
  • Use a lower-level multimodal transformer to encode individual blocks using both textual and visual features, trained with masked language modeling (MLM) and image-text matching (ITM).
  • Employ a higher-level transformer to aggregate block representations and model global layout structure using three novel objectives: block-order prediction, masked block prediction, and image fitting prediction.
  • Train the hierarchical framework end-to-end with a combination of standard NLP objectives (MLM, ITM) and layout-specific objectives to enhance structural and multimodal awareness.
  • Fine-tune the final model on downstream retrieval-based tasks using contrastive learning objectives.
  • Utilize a 2D serialization of blocks based on spatial position to preserve layout geometry in the input sequence.

Experimental results

Research questions

  • RQ1Can a hierarchical transformer framework effectively model both local block-level and global document-level layout structure in multimodal documents?
  • RQ2How do layout-aware pretraining objectives—block-order prediction, masked block prediction, and image fitting—contribute to downstream document understanding tasks?
  • RQ3To what extent does incorporating multimodal content (text, images, tables) improve document representation compared to unimodal or text-only models?
  • RQ4How does the inclusion of layout attributes (e.g., font size, spatial position) affect model performance on layout-sensitive tasks?
  • RQ5Can the proposed framework generalize beyond template-based documents (e.g., receipts) to rich, content-flexible documents like Wikipedia pages?

Key findings

  • LAMPRET achieves 99.98% MRR and 98.55% Recall@5 on the image suggestion task, demonstrating near-perfect performance in selecting the correct image from a candidate set.
  • On the text block filling task, LAMPRET achieves an F1 score of 52.09, outperforming all baselines, including single-level LayoutLM and CNN-Grid models.
  • Ablation studies show that excluding the block-order prediction objective leads to the largest performance drop (F1: 50.19), indicating its critical role in learning layout structure.
  • The exclusion of layout attributes (e.g., font size, position) results in only minor performance degradation, suggesting that structural modeling via the hierarchical transformer is more impactful than attribute features alone.
  • The multimodal version of LAMPRET outperforms its unimodal counterpart on image suggestion (99.98% MRR), but slightly underperforms on text block filling, indicating potential room for improvement in multimodal fusion.
  • The model converges only when the image fitting objective is included during pretraining for the image suggestion task, highlighting its necessity for effective multimodal alignment.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.