MoDora: Tree-Based Semi-Structured Document Analysis System

Bangrui Xu, Qihang Yao, Zirui Tang, Xuanhe Zhou, Yeye He, Shihan Yu, Qianqian Xu, Bin Wang, Guoliang Li, Conghui He, Fan Wu

TL;DR

MoDora is an LLM-powered system designed for robust natural language question answering over complex, semi-structured documents containing interleaved text, tables, and charts. By structuring raw OCR outputs into a hierarchical "Component-Correlation Tree" (CCTree) and utilizing a question-type-aware retrieval strategy, MoDora bridges the gap between layout structure and semantic meaning, outperforming existing RAG and multimodal baselines by up to 61% in accuracy.

What Problem Does This Paper Address?

Real-world documents—such as scientific papers, financial statements, and technical manuals—are rarely just flat blocks of text. They are semi-structured, featuring complex layouts where text paragraphs are tightly coupled with tables, charts, and hierarchical headings.

Current Document QA methods fall short in three major ways:

  1. Context Fragmentation: Optical Character Recognition (OCR) tools extract text pieces but strip away their original semantic and visual context.
  2. Structural Blindness: Existing models treat documents either as flat text sequences or isolated page images, failing to capture nested hierarchies (e.g., knowing exactly which subsection a table belongs to) or layout distinctions (e.g., separating sidebars from main content).
  3. Scattered Evidence Alignment: Answering complex questions often requires retrieving and cross-referencing multi-modal information spread across different regions or pages.

As illustrated in Figure 1, standard pipelines like vanilla Retrieval-Augmented Generation (RAG) or pure Vision-Language Models (VLMs) frequently hallucinate or fail to align textual cues (like "winter") with structured data inside tables.

Figure 1: Example Semi-Structured Document Analysis.

Methods

MoDora introduces a structured, three-stage framework to model and query semi-structured documents:

  1. Local-Alignment Element Aggregation: Instead of processing raw OCR tokens linearly, MoDora groups visually and semantically coherent elements into self-contained "Document Components" (COs). It uses a format-aware Multimodal LLM (MLLM) prompt to detect title hierarchies and extracts structured (title, metadata, data) triples for non-text elements like charts and tables.
  2. Component-Correlation Tree (CCTree): Document components are organized into a tree structure that preserves the document's logical architecture (see Figure 2). To pass information up the tree without overwhelming the context window, MoDora employs a bottom-up cascade summarization process, propagating concise keywords from child nodes to parent nodes using a mathematically defined attenuation formula.
  3. Question-Type-Aware Retrieval: Queries are parsed and routed through specialized pipelines:
  4. Location-based queries are resolved by mapping spatial cues to a 3x3 page grid.
  5. Semantics-based queries use a forward-search pruning strategy on the CCTree via LLM selection, backed by an embedding-based fallback to ensure high recall. A final MLLM backward-verification step filters out false positives before generating the answer.
Figure 2: Example Semi-structured Document Layouts.

Datasets

The authors evaluate MoDora on three established benchmarks: DUDE, MP-DocVQA, and M3DocVQA.

Additionally, they introduce a new, more challenging benchmark called MMDA (Multi-Modal Document Analysis). MMDA contains 1,065 human-refined QA pairs across 537 documents. It is specifically curated to feature much higher Element Diversity (variety of text, tables, charts, and images) and Layout Diversity (multi-column formats, mixed modalities) than existing datasets.

Key Insights and Ideas

  • Explicit Structure Beats Raw Scale: Simply feeding full-page images into powerful VLMs (like GPT-5) often fails because they overlook fine-grained textual details or cross-element relationships. Explicitly parsing the document into a logical tree yields far superior reasoning.
  • The Necessity of Hybrid Retrieval: Relying solely on LLM-guided tree pruning can miss subtle semantic links. Combining high-level LLM selection with a localized embedding-based fallback ensures high recall without blowing up the context window.
  • Isolating Supplements Prevents Noise: Separating non-standard layout elements (headers, footers, sidebars) into independent branches of the CCTree prevents them from polluting the main semantic content during retrieval.

Key Results

  • State-of-the-Art Accuracy: MoDora consistently outperforms all baselines across all datasets. On the new MMDA benchmark, it achieves a 16.24% absolute accuracy improvement over the best-performing baseline.
  • Robust Across Question Types: As shown in the paper's evaluation, MoDora leads significantly in structural hierarchy questions (76.73% accuracy vs. DocAgent's 55.97%) and hybrid data questions involving charts and tables.
  • Cost Efficiency: By offloading simpler tasks to local models and optimizing tree traversal, MoDora operates at an average API cost of $0.025 per query—significantly cheaper than agentic baselines like DocAgent ($0.09 per query), which require expensive multi-round interactions.

Limitations and Future Work

  • OCR Bottleneck: MoDora's tree construction is highly dependent on the initial OCR quality. Errors in layout detection or title misclassifications can propagate downstream. The authors plan to integrate native PDF structural parsing to mitigate this.
  • Single-Document Scope: The current implementation is limited to analyzing one document at a time. Future work aims to scale the CCTree architecture into a "cross-document forest" to support multi-document QA.
  • Dynamic Traversal: The team plans to explore more advanced tree-search algorithms, such as dynamic backtracking and query-driven skipping, to handle highly complex, multi-hop reasoning paths more efficiently.

Summary updated

BibTeX
@article{xu2026modora,
  author = {Bangrui Xu and Qihang Yao and Zirui Tang and Xuanhe Zhou and Yeye He and Shihan Yu and Qianqian Xu and Bin Wang and Guoliang Li and Conghui He and Fan Wu},
  title = {{MoDora: Tree-Based Semi-Structured Document Analysis System}},
  journal = {Proc. ACM Manag. Data},
  year = {2026},
  doi = {10.1145/3802089},
}
Figure