Traditional language models treat text as a one-dimensional sequence, a string of tokens where the only relationship is "before" or "after." However, much of the information humans consume—from tax forms and restaurant menus to maps and user interfaces—is inherently spatial. In these contexts, the meaning of a word is defined as much by its 2D coordinates as by its neighboring text.
A growing body of research suggests that to truly understand "visually-rich" data, models must move beyond 1D sequences and incorporate spatial grounding directly into their pre-training objectives. By forcing models to reconstruct not just what a piece of information is, but where it resides, researchers are building architectures that internalize the structural grammar of the physical and digital world.
Beyond 1D: The Geometry of Meaning
In a standard Masked Language Model (MLM), a model predicts a missing word based on the surrounding text. In the spatial paradigm, this objective is expanded. For example, Chenliang Li and colleagues introduced StructuralLM (StructuralLM: Structural Pre-training for Form Understanding), which treats document "cells" (bounding boxes) as the fundamental units. Instead of just predicting a word, the model performs "Cell Position Classification," predicting which region of a 2D grid a masked cell belongs to.
This shift forces the model to learn that a number at the bottom-right of a page is likely a "Total" or a "Page Number," regardless of the specific words preceding it. By learning the "structural grammar" of layouts, models become robust to the messy "reading orders" often produced by OCR engines.
Area Masking and Spatial Dependencies
One of the most effective ways to build this spatial intuition is through Area Masking. In the BROS framework, Mingi Ji, Teakgyu Hong, and their team (BROS: A Layout-Aware Pre-trained Language Model for Understanding Documents) moved away from masking random tokens. Instead, they mask contiguous 2D regions of a document.
To fill in these "holes," the model cannot simply look at the words immediately before or after in a text stream. It must look "across" the page—leveraging distant spatial cues like headers, logos, or parallel columns. This forces the model to develop a deep understanding of document geometry. Similarly, Yi Tu and Ya Guo proposed LayoutMask (LayoutMask: Enhance Text-Layout Interaction in Multi-modal Pre-training for Document Understanding), which requires the model to predict the 2D coordinates of masked tokens, explicitly training the network to localize text within a 2D plane.
The Synergy of Joint Reconstruction
Why does predicting coordinates help a model understand language? The evidence suggests a powerful synergy between localization and identification.
In UniDoc, Can Huang and Wengang Zhou (UniDoc: A Universal Large Multimodal Model for Simultaneous Text Detection, Recognition, Spotting and Understanding) found that requiring a model to output text content and spatial coordinates simultaneously actually improves the accuracy of the text recognition itself. The joint task acts as a grounding mechanism, forcing the model's attention to align more precisely with visual features.
This principle extends beyond documents:
- Visual Grounding: Bo Wan and Lucas Beyer showed with LocCa (LocCa: Visual Pretraining with Location-aware Captioners) that pre-training vision encoders to predict bounding boxes alongside captions creates a more robust semantic foundation, even for tasks that don't require spatial outputs.
- Geographic Alignment: Juan Hu and Qi Shen applied this to maps with Geo-BERT (Geo-BERT Pre-training Model for Query Rewriting in POI Search), masking geographic attributes like road identifiers to force the model to correlate language with physical location.
- Social/Spatial Cues: In VL4Gaze (VL4Gaze: Unleashing Vision-Language Models for Gaze Following), Shijing Wang demonstrated that combining semantic identification with numerical coordinate regression is essential for understanding complex spatial relationships like human gaze.
Intuition: Spatial Awareness as a Regularizer
The core intuition behind this research direction is that spatial information is not just another feature; it is a structural constraint. When a model like DocTr (DocTr: Document Transformer for Structured Information Extraction in Documents) by Haofu Liao uses "Masked Detection Modeling" to reconstruct both text and boxes, it is essentially learning the "physics" of the document.
By predicting relative distances and grid locations—as seen in DocFormerv2 (DocFormerv2: Local Features for Document Understanding)—models internalize the fact that certain semantic entities (like a table row or a column header) are defined by their alignment. This spatial "regularization" prevents the model from making nonsensical associations based purely on linguistic frequency, leading to a more grounded and reliable form of multimodal intelligence.