MegaRAG: Multimodal Knowledge Graph-Based Retrieval Augmented Generation

Chi-Hsiang Hsiao, Yi-Cheng Wang, Tzung-Sheng Lin, Yi-Ren Yeh, Chu-Song ChenarXiv 2025 · DOI

Introduction

While Large Language Models (LLMs) have revolutionized information retrieval, standard Retrieval-Augmented Generation (RAG) still faces significant hurdles when processing complex, long-form documents like textbooks or technical reports. Two major bottlenecks persist: context window limits, which lead to fragmented comprehension of high-level conceptual links, and "modality blindness," where systems ignore the rich information stored in diagrams, maps, and charts.

MegaRAG addresses these challenges by introducing a framework that treats visual elements as first-class citizens within a Multimodal Knowledge Graph (MMKG). This allows for "parallel reading" of text and images, enabling deep, cross-modal reasoning over extensive document sets.

Methodology

The MegaRAG pipeline consists of four primary stages designed to build a cohesive understanding of multimodal data:

  1. Initial MMKG Construction: Document pages are processed in parallel. A Multimodal LLM (MLLM) extracts entities and relations from text, tables, and figures. Crucially, figures are treated as standalone nodes with their own descriptions.
  2. MMKG Refinement: To prevent the "fragmented graph" problem caused by processing chunks in isolation, MegaRAG uses a two-round approach. It utilizes the initial graph as "global guidance" to help the MLLM identify missing cross-modal or cross-page relationships in a second pass.
  3. Indexing: Using a unified multimodal encoder called GME (General Multimodal Embedder), the system maps entities, relations, and full-page images into a shared vector space, allowing for seamless text-to-image and text-to-graph retrieval.
  4. Retrieval & Two-Stage Generation: When a query is processed, MegaRAG retrieves relevant subgraphs and page images. To avoid "modality bias," it generates intermediate answers from the graph and visual content separately before synthesizing them into a final response.
The MMKG refinement process uses initial graph data as global context to discover cross-page relationships.

Key Insights

  • Figures as Entities: Instead of relying solely on captions, MegaRAG treats a figure as a node in the graph. This allows the model to understand that a chart on one page may support a textual claim on another.
  • The Power of Refinement: The refinement stage is critical for "stitching" together relationships missed during isolated extraction. By feeding retrieved subgraphs back into the MLLM, the system builds a more dense and accurate knowledge structure.
  • Decoupled Reasoning: By forcing the model to generate intermediate answers for the graph and images separately, MegaRAG significantly reduces the tendency of models to over-rely on text and ignore visual evidence.
The retrieval and generation pipeline decouples graph-based and visual-based reasoning to ensure balanced modality usage.

Evaluation and Results

MegaRAG was evaluated on both global (book-level) and local (page-level) QA tasks, outperforming strong baselines like NaiveRAG, GraphRAG, and LightRAG:

  • SlideVQA: Achieved 64.85% accuracy, more than doubling the score of the strongest baseline (LightRAG at 27.66%).
  • Multimodal Global QA: In head-to-head LLM-based evaluations, MegaRAG achieved an average win rate of ~89.5% against text-only graph methods.
  • Ablation Criticality: Disabling MMKG-based retrieval led to a near-complete collapse in performance, proving that structured multimodal knowledge is the core driver of the system's success.

Conclusion

MegaRAG demonstrates that integrating visual cues directly into a graph structure enables superior performance in multimodal reasoning tasks. While computational costs for multi-pass MLLM processing remain a consideration, the framework provides a robust path forward for scaling graph-based RAG to complex, visual-rich document libraries.

Summary updated

BibTeX
@misc{hsiao2025megarag,
  author = {Chi-Hsiang Hsiao and Yi-Cheng Wang and Tzung-Sheng Lin and Yi-Ren Yeh and Chu-Song Chen},
  title = {{MegaRAG: Multimodal Knowledge Graph-Based Retrieval Augmented Generation}},
  year = {2025},
  eprint = {2512.20626},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.20626},
}
Figure