[EMNLP 2024] MultiDocFusion: Solving the "Contextual Breakage" in Industrial RAG
MultiDocFusion: Hierarchical and Multimodal Chunking Pipeline for Enhanced RAG on Long Industrial Documents
MultiDocFusion is a multimodal RAG pipeline designed for long industrial documents, integrating vision-based layout parsing, OCR, and a specialized "DSHP-LLM" for hierarchical structure reconstruction. By utilizing a DFS-based grouping mechanism, it consistently achieves SOTA performance, improving retrieval precision by up to 15% and QA scores (ANLS) by 2-3% across major benchmarks like DUDE and MPVQA.
TL;DR
Retrieval-Augmented Generation (RAG) often fails on long industrial documents because standard chunking methods cut through logical section hierarchies. MultiDocFusion addresses this by combining vision-based layout analysis with an instruction-tuned LLM (DSHP-LLM) to reconstruct a document's hierarchical tree. By using DFS-based grouping, it ensures every chunk carries its structural lineage (headers), leading to a 15% boost in retrieval precision and superior QA performance on complex scanned reports.
The "Blind Spot" of Semantic Chunking
While semantic chunking uses embeddings to find topical shifts, it is fundamentally "vision-blind" and "structure-deaf." In an industrial manual, a table's value on page 50 might only make sense if you know it's under "Section 4.2: Stress Test Results." Traditional chunking often separates the header from the content, leaving the retriever with fragmented, ambiguous units.
The authors argue that the Visual Layout (where things are) and the Logical Hierarchy (how they relate) are as important as the text itself.
Methodology: The Four Pillars of Fusion
MultiDocFusion operates as a sophisticated pipeline that graduates from pixels to logical trees:
- Vision-Based DP (Document Parsing): Uses models like DETR or VGT to detect bounding boxes for titles, headers, and tables.
- OCR Tailoring: Extracts text from detected regions, linking spatial coordinates to semantic content.
- DSHP-LLM (The Brain): The core innovation. This is a Mistral-8B or Llama-3 model fine-tuned specifically to take a list of headers and output a JSON tree defining Parent-Child relationships (e.g., "3.1.1" belongs to "3.1").
- DFS-based Grouping: It traverses the tree and assembles chunks. Crucially, it prepends the parent hierarchy to every chunk (e.g.,
# Title ## Section 1 ### Subsection 1.1).
Figure 1: The four-stage process: DP -> OCR -> DSHP-LLM -> DFS Grouping.
Quantitative Dominance
The researchers tested this against a battery of "modern" chunkers like LumberChunker and Perplexity chunking. The results across datasets like DUDE (financial) and CUAD (legal) were decisive:
| Chunking Method | DUDE (nDCG) | MPVQA (nDCG) | MOAMOB (nDCG) |
|---|---|---|---|
| Length Chunking | 0.2166 | 0.1933 | 0.6209 |
| Semantic Chunking | 0.0775 | 0.0680 | 0.2453 |
| MultiDocFusion | 0.2505 | 0.2131 | 0.6554 |
Notice the massive failure of Semantic Chunking on complex layouts; it often over-segments, creating tiny, uninformative chunks. MultiDocFusion’s ability to "keep the context alive" through the hierarchy is what drives its 15% Precision gains.
Table 2: Retrieval performance across various domains.
Critical Insight: Why Does It Work?
- Contextual Inheritance: By duplicating headers in child chunks, the embedding model has a much richer "keyword" set to match against queries.
- Robustness to Noise: Even if OCR garbles the text inside a section, the correctly identified header hierarchy (DSHP-LLM) often provides enough signal for the retriever to find the right page.
- Beyond GPT-4: Surprisingly, the study found that out-of-the-box GPT-4 is mediocre at document hierarchy parsing. A specialized, instruction-tuned Mistral-8B (DSHP-LLM) performed significantly better, proving that structural understanding requires domain-specific tuning.
Limitations & Future Work
The main drawback is computational overhead. Prepending hierarchies to every chunk increases the total token count and index size. However, the authors suggest this can be mitigated by graph-structured retrieval (GraphRAG), where you retrieve nodes and paths rather than flattened, redundant chunks.
Conclusion
MultiDocFusion marks a shift from "Text RAG" to "Structural RAG." For enterprise AI looking to ingest thousands of legacy PDF reports or technical manuals, the lesson is clear: don't just extract the text—reconstruct the tree.
