Structure-Aware Document Parsing for Large Language Models

This direction is no longer present in the current build. Its last version stays readable and citable here.

Version 1 of 121 papers24 conceptsfrozen 2026-10-04

Most of the world’s specialized knowledge is "trapped" in visually rich formats like PDFs, spreadsheets, and scientific articles. For years, the standard approach to making this data machine-readable was simple text extraction: stripping away the formatting to leave a flat string of characters.

However, recent research suggests that this "lossy" conversion is a primary bottleneck for artificial intelligence. When we remove the visual hierarchy—the bold headers, the indentation of a list, or the spatial alignment of a table—we destroy the semantic scaffolding that allows a reader (human or AI) to understand the logic of a document.

The DocQA Paradox

A striking finding by C. Liu and Ming-Hsuan Yang highlights what they call the "DocQA Paradox." They observed that providing multimodal Large Language Models (MLLMs) with raw OCR text often decreases their accuracy compared to providing the image alone.

The reason is noise and fragmentation. When a model receives a flat stream of text from a complex PDF, it struggles to distinguish a footnote from the main body or a table header from the data below it. By switching the input format to structured markup like LaTeX, the researchers induced "structured attention." This allows the model to leverage its pre-training on code and mathematical documents to focus on semantically meaningful regions rather than wasting computational energy on the "empty space" of a layout.

Preserving the Visual Scaffolding

To solve this, researchers are moving toward layout-aware parsing pipelines that convert unstructured files into structured intermediate formats like Markdown or LaTeX.

  • Hierarchical Integrity: Zejun Kang and Fei Liu demonstrate that converting automotive technical manuals into hierarchical Markdown preserves the logical flow and data dependencies. This is critical for Retrieval-Augmented Generation (RAG), where a chatbot needs to know exactly which header a specific instruction falls under.
  • Spatial Relationships: In scientific and mathematical domains, the exact positioning of an image or an equation relative to the text is a vital semantic cue. Xiaotian Han and Yiren Jian developed specialized scraping techniques for the InfiMM-WebMath-40B dataset to ensure that mathematical notation and image-text alignments remain intact, enabling models to reason about diagrams that reference specific variables in the text.
  • Metadata as Context: Beyond just text, formatting itself carries meaning. Markus Schröder and Christian Jilek have extended the RDF Mapping Language to support Excel files natively. By capturing cell colors, formulas, and relative positioning, they transform spreadsheets into Knowledge Graphs without losing the "nuance" of industrial data.

From Linear Text to Functional Roles

Standard PDF-to-text conversion often results in "structural fragmentation," where a figure caption is accidentally inserted into the middle of a paragraph. Holger Schwenk and Frédéric Blain addressed this in scientific translation by using structure-aware parsing to identify the functional roles of text segments. By labeling a string as a "footnote" or "caption" before it reaches the translation engine, the system avoids the context-breaking errors common in generic pipelines.

Similarly, the DOLFIN test set introduced by Mariam Nakhlé and Marco Dinarelli shifts the evaluation of financial translation from rigid sentence-matching to aligned sections. This acknowledges that in professional documents, meaning is often distributed across tables and headers rather than contained in isolated sentences.

Why Structure Matters for Reasoning

The shift toward structure-aware parsing is not just about "cleaner" data; it is about providing the model with the underlying logic of the document. As Siyan Wang and Bradford Levy argue in their work on the BeanCounter dataset, preserving visual cues like indentation and list formatting helps models capture the hierarchy of complex business documents.

When a model "sees" a document through structured markup, it isn't just reading words; it is navigating a map. By preserving the spatial and hierarchical relationships inherent in the original layout, researchers are enabling LLMs to move from simple pattern matching to sophisticated document understanding.

Papers in this version

History & citationVersion 1 · 2026-10-04

No longer present in the current build · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_structure_aware_document_parsing_for_lar_9a980c6d,
  title = {Structure-Aware Document Parsing for Large Language Models},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/structure-aware-document-parsing-for-large-language-models/rdr_9a980c6d14b64ca38b0456c505167bb8},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-22},
}

This exact version (version 1, frozen text):

@misc{lacuna_structure_aware_document_parsing_for_lar_9a980c6d_v1,
  title = {Structure-Aware Document Parsing for Large Language Models},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/structure-aware-document-parsing-for-large-language-models/rdr_9a980c6d14b64ca38b0456c505167bb8/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-22},
}