All models

bros (base layout aware document)

A layout-aware BERT-style encoder that reads OCR text with bounding boxes to extract key information from documents.

Documents and OCR · 463 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (36 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
109.5M
Operations
463
Framework
PyTorch
Recurrent
No
Published
AAAI 2022
Cited by
152 (as of 20 October 2026)
Authors
Teakgyu Hong, Donghyun Kim, Mingi Ji and others
Name in source
bros:base-layout-aware-document
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3720
Graph hash
9cf8b539a0d49e5b3daf805cc3e7a9baa37ad82eb77ae74595b770f9238b25f1
Skeleton hash
1d759c211b9a3b4bbf47c9da5e4fd4ec5b46f6dfa7c8fd562c82ca75f7423b88
Architecture hash
401a64bb8d0d723b0fa7f1c5813222a85dd09d89d13fd630d0dc29ed86971ed0
Diagram SHA-256
4c69573ba6089af15f08ef50262a9cbaa564a8501df34197bcb2c1051ad7fca9
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

BROS (BERT Relying On Spatiality) is a pre-trained language model for extracting key information from documents, using text and layout together. Its input is the output of OCR on a document image: pieces of text paired with their bounding boxes. Where many studies of the time added visual features from the document image, this paper concentrated on combining text and layout effectively.

The main structure follows LayoutLM, with two changes. First, instead of absolute positions, BROS encodes the relative positions between text blocks. These position differences go directly into the Transformer's attention mechanism. Second, alongside the token masking used in BERT, pre-training adds an area-masked language model that masks all text blocks in a randomly chosen area of the page.

Pre-training used the IIT-CDIP Test Collection 1.01, which consists of approximately 11M document images. The paper reports comparable or better performance than previous methods on four key information extraction benchmarks (FUNSD, SROIE*, CORD and SciTSR) without relying on visual features. It also reports that BROS fine-tuned on only 20 to 30% of the FUNSD examples performs better than LayoutLM with 100% of them.

Key idea. BROS is a pre-trained language model that encodes relative positions of texts in 2D space and learns from unlabeled documents with an area-masking strategy.

  • bros
  • bert relying on spatiality
  • bros-base-uncased
  • key information extraction
  • kie
  • document understanding
  • layout-aware language model
  • area masking
  • text and layout

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{hong2022brospretrainedlanguagemodel,
      title={BROS: A Pre-trained Language Model Focusing on Text and Layout for Better Key Information Extraction from Documents}, 
      author={Teakgyu Hong and Donghyun Kim and Mingi Ji and Wonseok Hwang and Daehyun Nam and Sungrae Park},
      year={2022},
      eprint={2108.04539},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2108.04539}, 
}