Abstract
Traditional Retrieval-Augmented Generation (RAG) systems often treat documents as linear text sequences, discarding critical spatial and hierarchical information. We present SuperRAG, a framework that utilizes Layout-Aware Graph Modeling (LAGM) to represent documents as structured knowledge graphs. By preserving relationships between text, tables, and figures, SuperRAG enables more precise retrieval and reasoning. Evaluated on benchmarks like DOCBENCH and SPIQA, SuperRAG achieves a 75.8% average accuracy, outperforming standard RAG pipelines and state-of-the-art models including GPT-4 and Claude 3 Opus.
Introduction
Most Retrieval-Augmented Generation (RAG) systems treat documents as a continuous string of text, segmenting them into "flat" chunks for vector embedding and retrieval. However, real-world documents—such as financial reports, technical manuals, and scientific papers—rely heavily on layout to convey meaning. Structural elements like table headers, figure captions, and section hierarchies provide essential context that is often lost during the flattening process. Consequently, traditional RAG systems frequently struggle with queries requiring synthesis across different modalities or navigation through complex document hierarchies.
Methodology: Layout-Aware Graph Modeling (LAGM)
To address these limitations, we introduce Layout-Aware Graph Modeling (LAGM), a framework that transforms documents into structured Knowledge Graphs (KG).
Multimodal Parsing and Structure
The process begins with an advanced multimodal parser that identifies nine distinct layout labels, including titles, headers, tables, and figures. Unlike standard extractors, this system reconstructs reading orders and table structures. The resulting data is modeled as a hierarchy of nodes (e.g., Company, Document, Page, Section, Table) connected by semantic edges.
Advanced Retrieval and Traversal
SuperRAG employs a dual-track retrieval strategy:
- LLM-Based Graph Traversal: The system prompts a Large Language Model (LLM) to generate Cypher queries, allowing for precise navigation of the document's graph structure.
- Heuristic-Based Retrieval: Utilizing the Table of Contents (ToC) and semantic similarity, the system identifies relevant sections and expands the context to include adjacent tables or diagrams.
- Graph Augmentation: K-Nearest Neighbors (KNN) is used to create
is_similarlinks between nodes, facilitating jumps between conceptually related but physically distant document parts.
Experimental Evaluation
SuperRAG was evaluated on two primary benchmarks:
- DOCBENCH: A comprehensive benchmark covering five domains (academia, finance, government, law, and news) with over 1,100 questions.
- SPIQA: A dataset of 27,000 research papers requiring complex reasoning over figures and tables.
Results and Discussion
SuperRAG demonstrated a clear advantage over both standard RAG and proprietary "black-box" models. On the DOCBENCH benchmark, SuperRAG achieved an average accuracy of 75.8%, significantly outperforming its non-layout-aware counterpart (68.5%) and surpassing the performance of GPT-4 and Claude 3 Opus in standard RAG configurations.
The most significant improvements were observed in the Financial (11.9 point gain) and Academic (9.8 point gain) sectors, where document structure is particularly dense. Furthermore, on the challenging "Test-C" portion of the SPIQA dataset, SuperRAG improved accuracy by 9 points over non-layout baselines, validating its effectiveness in multimodal reasoning.
Conclusion
SuperRAG demonstrates that document layout is inherently semantic. By encoding structural hierarchies into a knowledge graph, the system gains a "map" of the document that enables logical and precise retrieval. While the system's performance is currently dependent on the quality of initial parsing and involves higher computational overhead than simple vector indexing, it represents a significant step toward more robust, layout-aware document intelligence. Future work will focus on improving layout-foundation models to handle highly irregular document formats.
Summary updated