M3DocRAG: Il Retrieval Multi-modale è Ciò di Cui Hai Bisogno per la Comprensione di Documenti Multi-pagina e Multi-documento
M3DocRAG: Multi-modal Retrieval is What You Need for Multi-page Multi-document Understanding
November 7, 2024
Autori: Jaemin Cho, Debanjan Mahata, Ozan Irsoy, Yujie He, Mohit Bansal
cs.AI
Abstract
Le pipeline di Document Visual Question Answering (DocVQA) che rispondono a domande basate su documenti hanno ampie applicazioni. I metodi esistenti si concentrano sulla gestione di documenti a pagina singola con modelli linguistici multimodali (MLM) o si basano su sistemi di generazione aumentata tramite recupero di informazioni (RAG) basati su testo che utilizzano strumenti di estrazione del testo come il riconoscimento ottico dei caratteri (OCR). Tuttavia, l'applicazione di questi metodi in scenari reali presenta delle difficoltà: (a) le domande richiedono spesso informazioni provenienti da pagine o documenti diversi, contesti in cui gli MLM non riescono a gestire molti documenti lunghi; (b) i documenti contengono spesso informazioni importanti in elementi visivi come figure, ma gli strumenti di estrazione del testo li ignorano. Introduciamo M3DocRAG, un nuovo framework RAG multimodale che si adatta flessibilmente a vari contesti documentali (dominio chiuso e dominio aperto), tipi di domande (a singolo salto e multi-salto) e modalità di evidenza (testo, grafico, figura, ecc.). M3DocRAG individua i documenti rilevanti e risponde alle domande utilizzando un sistema di recupero multimodale e un MLM, in modo da gestire efficientemente documenti singoli o multipli preservando le informazioni visive. Poiché i precedenti dataset DocVQA pongono domande nel contesto di un documento specifico, presentiamo anche M3DocVQA, un nuovo benchmark per valutare il DocVQA in dominio aperto su oltre 3.000 documenti PDF con più di 40.000 pagine. In tre benchmark (M3DocVQA/MMLongBench-Doc/MP-DocVQA), i risultati empirici mostrano che M3DocRAG con ColPali e Qwen2-VL 7B raggiunge prestazioni superiori rispetto a molte solide baseline, inclusi risultati allo stato dell'arte in MP-DocVQA. Forniamo analisi complete di diversi modelli di indicizzazione, MLM e recupero. Infine, mostriamo qualitativamente che M3DocRAG può gestire con successo vari scenari, come quando le informazioni rilevanti sono distribuite su più pagine o quando l'evidenza per la risposta esiste solo nelle immagini.
English
Document visual question answering (DocVQA) pipelines that answer questions
from documents have broad applications. Existing methods focus on handling
single-page documents with multi-modal language models (MLMs), or rely on
text-based retrieval-augmented generation (RAG) that uses text extraction tools
such as optical character recognition (OCR). However, there are difficulties in
applying these methods in real-world scenarios: (a) questions often require
information across different pages or documents, where MLMs cannot handle many
long documents; (b) documents often have important information in visual
elements such as figures, but text extraction tools ignore them. We introduce
M3DocRAG, a novel multi-modal RAG framework that flexibly accommodates various
document contexts (closed-domain and open-domain), question hops (single-hop
and multi-hop), and evidence modalities (text, chart, figure, etc.). M3DocRAG
finds relevant documents and answers questions using a multi-modal retriever
and an MLM, so that it can efficiently handle single or many documents while
preserving visual information. Since previous DocVQA datasets ask questions in
the context of a specific document, we also present M3DocVQA, a new benchmark
for evaluating open-domain DocVQA over 3,000+ PDF documents with 40,000+ pages.
In three benchmarks (M3DocVQA/MMLongBench-Doc/MP-DocVQA), empirical results
show that M3DocRAG with ColPali and Qwen2-VL 7B achieves superior performance
than many strong baselines, including state-of-the-art performance in
MP-DocVQA. We provide comprehensive analyses of different indexing, MLMs, and
retrieval models. Lastly, we qualitatively show that M3DocRAG can successfully
handle various scenarios, such as when relevant information exists across
multiple pages and when answer evidence only exists in images.