Research & Papers

KGERMAR boosts long-context AI with dynamic knowledge graphs – 8.5% lower perplexity

New framework combines real-time entity graphs with memory banks for 2-2.5x better efficiency.

Deep Dive

KGERMAR addresses a core limitation in long-context language modeling: maintaining coherent understanding of entity states and relationships across thousands of tokens. Traditional retrieval-augmented models rely solely on semantic similarity, missing explicit relational patterns. KGERMAR constructs dynamic knowledge graphs from input text in real time during inference, extracting entities and relations to build contextual graphs. These graph-structural embeddings are integrated with textual semantics through a multi-component memory architecture comprising three banks: contextual, semantic, and structural. Retrieval signals from each bank are fused via learned weights, capturing both surface-level semantics and deeper relational patterns.

Evaluated on four datasets—SlimPajama (84.7K training examples), WikiText-103 (4,358 examples), PG-19 (100 examples), and Proof-pile (46.3K examples)—KGERMAR consistently outperforms memory-augmented baselines. Across context lengths from 1K to 32K tokens, it achieves up to 8.5% lower perplexity and 2–2.5x better memory efficiency. The approach also shows superior in-context learning performance across five natural language understanding tasks. By enabling domain-adaptive knowledge representation that adjusts to input contexts rather than relying on fixed knowledge bases, KGERMAR advances memory-augmented language modeling for practical long-document applications.

Key Points
  • KGERMAR builds real-time knowledge graphs from input text, extracting entities and relations during inference.
  • Achieves up to 8.5% lower perplexity and 2–2.5x better memory efficiency vs. baselines on 1K–32K token contexts.
  • Tested on 4 datasets (SlimPajama, WikiText-103, PG-19, Proof-pile) and 5 NLU tasks with superior in-context learning.

Why It Matters

Enables AI to track entity relationships across long documents without fixed knowledge bases, boosting efficiency and accuracy.

📬 Get the top 10 AI stories daily