Multi-Head RAG: Solving Multi-Aspect Problems with LLMs
This addresses a bottleneck in RAG systems for complex queries requiring diverse documents, offering a domain-specific improvement.
The paper tackled the problem of multi-aspect queries in Retrieval-Augmented Generation (RAG), where existing methods struggle to retrieve multiple documents with different content, and introduced Multi-Head RAG (MRAG) using Transformer multi-head attention activations as retrieval keys, achieving up to 20% higher retrieval success ratios over baselines and improved downstream generation.
Retrieval-Augmented Generation (RAG) improves Large Language Models (LLMs) by retrieving supporting documents into the prompt, but existing methods do not explicitly target queries that require fetching multiple documents with substantially different content. Such multi-aspect queries are challenging because relevant documents can be far apart in embedding space, making joint retrieval difficult. We introduce Multi-Head RAG (MRAG), which addresses this gap with a simple yet powerful idea: using Transformer multi-head attention activations rather than the standard decoder-layer embedding, as retrieval keys. It leverages the observation that different heads capture different semantic aspects. This yields multi-aspect embeddings for both documents and queries, improving retrieval accuracy on complex queries. We show MRAG's design advantages over 18 RAG baselines, up to 20% higher retrieval success ratios for real-world use cases, and improved downstream LLM generation. MRAG integrates seamlessly with existing RAG frameworks and benchmarks.