← Latest papers
🤖 machine learning

Irminsul: MLA-Native Position-Independent Caching for Agentic LLM Serving

Irminsul introduces a native position-independent caching system for Agentic LLMs that leverages Multi-Head Latent Attention's architectural structure to enable content-addressed key-value caching, achieving up to 83% prompt token recovery and 63% prefill energy savings by overcoming the cache invalidation issues inherent in traditional prefix-matching approaches.

Original authors: Bole Ma, Jan Eitzinger, Harald Köstler

Published 2026-05-08
📖 5 min read🧠 Deep dive

Original authors: Bole Ma, Jan Eitzinger, Harald Köstler

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a very busy, high-speed library where a librarian (the AI) has to read a massive stack of documents to answer a question. To be fast, the librarian keeps a "cheat sheet" (a cache) of the most recent pages they've read so they don't have to re-read them from scratch every time.

The Problem: The "Where" vs. The "What"

In the old way of doing things (called Prefix Caching), the librarian's cheat sheet was organized strictly by location.

  • "Page 1 is the System Prompt."
  • "Page 2 is Document A."
  • "Page 3 is Document B."

If the librarian asks a new question and the order changes slightly—say, "Page 1 is still the System Prompt, but now Document A is on Page 5"—the old cheat sheet breaks. The librarian thinks, "Oh, Page 2 is different, so I must throw away the whole cheat sheet and re-read everything from the beginning."

In the world of Agentic AI (AI that uses tools, searches the web, and talks to other AIs), this happens constantly. The AI might pull up the same document, but because it's inserting it into a different part of the conversation, the "location" changes. The old system sees this as a brand new, unreadable mess, forcing the AI to waste time and energy re-reading things it already knows.

The Solution: Irminsul (The "Content" Librarian)

The paper introduces a new system called Irminsul. Instead of organizing the cheat sheet by where a page sits, Irminsul organizes it by what the page actually says.

Think of it like this:

  • Old Way: "I only remember the book if it's on the 3rd shelf."
  • Irminsul: "I remember the book because it's a copy of Harry Potter, no matter which shelf it's on."

Irminsul breaks the conversation into chunks based on the actual text (content). If the AI sees "Document A" again, even if it's in a different spot, Irminsul says, "I've seen this exact text before! I can reuse my notes."

The Secret Sauce: The "Position" Adjustment

You might ask: "If the text is the same, but the position is different, won't the AI get confused?"

Yes, usually. In AI, the "position" of a word matters a lot (it's like knowing if a word is at the start or end of a sentence).

  • The Old Problem: To fix the position, the old systems had to rewrite the entire cheat sheet for every single word. It was like rewriting a whole book just to change the page number. This was slow and expensive.
  • The Irminsul Trick: The paper focuses on a specific type of AI architecture called MLA (Multi-Head Latent Attention). This architecture is special because it splits the "notes" into two parts:
    1. The Content (90%): The actual meaning of the words. This part is identical regardless of position.
    2. The Position (10%): A tiny tag that says "I am here."

Irminsul realizes it only needs to adjust that tiny 10% tag. It uses a clever mathematical "twist" (called a δ\delta-rotation) to instantly update the position tag without rewriting the whole book. It's like taking a photo of a document and just sliding it to a new spot on the desk, rather than taking a new photo of the whole room.

The Results

The paper tested this on three real-world AI systems (DeepSeek, Kimi, and JoyAI) that act like agents.

  • Recovery: On complex tasks where the AI moves documents around, Irminsul was able to reuse about 77% to 83% of the work that the old system threw away.
  • Energy: Because it doesn't have to re-read the text, it saves about 63% of the energy needed to process those repeated parts.
  • Accuracy: The AI answers just as correctly as before; it doesn't get confused by the new method.

The "First Page" Rule

There is one small catch. The very first few words of any conversation act like a "gravity anchor" for the AI's attention. The paper found that if you try to reuse a chunk that starts right at the beginning of a conversation, the AI gets confused.

  • The Fix: Irminsul simply re-reads the very first chunk of text (the first 32 words) every time, but for everything after that, it uses the smart "content-based" reuse. This tiny cost ensures the rest of the system works perfectly.

Summary

Irminsul is a smarter way for AI to remember things. Instead of saying, "I remember this because it was in slot #5," it says, "I remember this because it's the same story." By realizing that the "story" (content) is more important than the "slot" (position), and by using a special trick to fix the position tag quickly, it makes AI agents faster, cheaper to run, and much better at handling complex, shifting conversations.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →