AI

HippoRAG: Neurobiologically Inspired Long-Term Memory for LLMs (NeurIPS 2024)

HippoRAG is a novel RAG framework inspired by human long-term memory that combines LLMs with knowledge graphs for 20% better multi-hop QA.

Keeping this site alive takes effort — your support means everything.
無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分! 無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分!
HippoRAG: Neurobiologically Inspired Long-Term Memory for LLMs (NeurIPS 2024)

Retrieval-Augmented Generation (RAG) has become the standard approach for grounding LLM outputs in external knowledge. But standard RAG has a fundamental limitation: it treats each query independently, with no memory of past retrievals or ability to connect information across documents. HippoRAG takes inspiration from the human brain’s hippocampus to overcome this, creating a long-term memory system that dramatically improves multi-hop question answering.

Published at NeurIPS 2024 and available at github.com/OSU-NLP-Group/HippoRAG, HippoRAG combines LLMs with knowledge graphs in a framework modeled on the hippocampal indexing theory of human memory. The result is a RAG system that builds a persistent knowledge structure from documents, enabling it to answer complex questions that require connecting information across multiple sources – achieving approximately 20% improvement over standard RAG on multi-hop QA benchmarks.

The project was developed by researchers at Ohio State University’s NLP Group and has rapidly gained attention in both academic and industrial circles. HippoRAG 2, the latest version, introduced further improvements in retrieval accuracy and computational efficiency. The framework is model-agnostic and can be applied to any document collection.

What is HippoRAG?

HippoRAG is a neurobiologically inspired RAG framework that creates a long-term memory for LLMs by combining knowledge graphs with retrieval-augmented generation. It is modeled on the hippocampal indexing theory, where the hippocampus creates and stores index pointers to information distributed across the neocortex. HippoRAG achieves state-of-the-art performance on multi-hop question answering benchmarks.

How does HippoRAG work?

HippoRAG operates in two phases: the offline indexing phase and the online retrieval phase.

PhaseComponentWhat HappensAnalogy
Offline indexingLLM-based extractionExtract open knowledge graph triplets from documentsHippocampus encoding
Offline indexingNamed entity recognitionIdentify entities and link them across documentsPattern separation
Offline indexingGraph constructionBuild a unified knowledge graph connecting all documentsCognitive map formation
Online retrievalQuery encodingEncode question into graph-level queryHippocampal recall
Online retrievalGraph traversalFollow entity and relationship paths to find answersPattern completion
Online retrievalContext assemblyGather relevant passages for LLM contextEpisodic memory retrieval

This two-phase approach means that once the knowledge graph is built, retrieval is significantly more efficient than re-embedding and searching over all documents for each query.

What improvements does HippoRAG 2 bring?

HippoRAG 2 addresses several limitations of the original and introduces new capabilities.

FeatureHippoRAG 1HippoRAG 2
Graph constructionSingle-pass LLM extractionIterative refinement with verification
Entity linkingExact string matchingSemantic + fuzzy matching
Retrieval scopeTop-k passagesAdaptive retrieval depth
Computational costHigh indexing cost40% lower indexing cost
Multi-hop accuracy (2WikiMultihop)51.3%59.8%
Multi-hop accuracy (HotpotQA)58.2%65.1%
Single-hop accuracy (Natural Questions)44.7%51.4%

The improvements in HippoRAG 2 make it practical for larger document collections and higher-throughput applications.

How do you install and use HippoRAG?

HippoRAG is available as a Python package with a straightforward API:

# Install
pip install hipporag

# Basic usage
from hipporag import HippoRAG

# Index documents
rag = HippoRAG()
rag.index(documents)

# Query
answer = rag.query("What is the relationship between protein X and disease Y?")
print(answer)

The library integrates with common document loaders and embedding models, and supports both OpenAI and open-source embedding backends.

How should HippoRAG be cited?

If you use HippoRAG in academic work, please cite the NeurIPS 2024 paper:

@inproceedings{hipporag2024,
  title={HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Models},
  author={Gutierrez, Bernal Jimenez and others},
  booktitle={NeurIPS},
  year={2024}
}

Frequently Asked Questions

What is HippoRAG?

HippoRAG is a neurobiologically inspired RAG framework that creates a long-term memory for LLMs using knowledge graphs. It achieves approximately 20% better accuracy on multi-hop QA compared to standard RAG and was published at NeurIPS 2024.

How does HippoRAG work?

HippoRAG has two phases: offline indexing (extracting knowledge graph triplets from documents, linking entities, and building the graph) and online retrieval (encoding the query, traversing the graph, and assembling relevant passages for the LLM). This mirrors the hippocampal indexing theory of human memory.

What improvements does HippoRAG 2 offer?

HippoRAG 2 introduces iterative graph refinement, semantic entity matching, adaptive retrieval depth, and 40% lower computational cost. Accuracy improves from 51.3% to 59.8% on 2WikiMultihop and from 58.2% to 65.1% on HotpotQA.

How do I install HippoRAG?

Install via pip install hipporag. The library supports OpenAI embeddings and open-source embedding models, with integrations for common document loaders.

How should HippoRAG be cited?

Cite the NeurIPS 2024 paper by Gutierrez et al. The BibTeX entry is available in the GitHub repository’s README.

Further Reading

TAG
CATEGORIES