← Latest papers
💬 NLP

How Do LLMs Cite? A Mechanistic Interpretation of Attribution in Retrieval-Augmented Generation

This paper employs mechanistic interpretability on Llama-3.1-8B-Instruct to reveal that citation decisions in RAG systems arise from a distributed, multi-stage "attributional ensemble" of attention heads and MLPs, demonstrating that selectively amplifying or attenuating these specific components can significantly improve citation faithfulness without compromising answer accuracy.

Original authors: Ian van Dort (University of Amsterdam), Maria Heuss (University of Amsterdam)

Published 2026-06-30
📖 5 min read🧠 Deep dive

Original authors: Ian van Dort (University of Amsterdam), Maria Heuss (University of Amsterdam)

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

The Big Problem: The "Fake Expert"

Imagine you ask a very smart, well-read librarian (the AI) a question. To be helpful, the librarian pulls a book off the shelf, reads a fact, and writes it down for you. Crucially, they also write a little note at the bottom saying, "I found this in Book A."

This is called Retrieval-Augmented Generation (RAG). The idea is that the note (the citation) proves the librarian actually looked at the book, making the answer trustworthy.

The Catch: What if the librarian already knew the answer from memory? They write the answer down, but then, just to look professional, they grab Book A off the shelf, see that it also happens to contain that fact, and slap the citation on it anyway.

  • The Result: The answer is correct, and the citation is "correct" (the book does say that), but the citation is unfaithful. The librarian didn't actually use the book to form the answer; they just used it as a prop to make the answer look verified.

The authors of this paper wanted to find out: Does the AI actually read the book before writing the answer, or does it just slap a citation on at the end to look good?

The Investigation: Looking Inside the Machine

Usually, we treat AI like a "black box." We ask a question, get an answer, and check if it's right. But to see if the AI is lying about its sources, you have to look inside the machine while it's thinking.

The authors used a technique called Mechanistic Interpretability. Think of the AI's brain as a massive city with millions of tiny workers (neurons) and roads (connections). The authors used a tool called Activation Patching.

The Analogy: Imagine the AI is a factory assembling a car.

  • The "Clean" Run: The factory builds a car with the right engine (the relevant document).
  • The "Dirty" Run: The factory builds a car with the wrong engine (a random, irrelevant document).
  • The Patch: The researchers took the specific gears and pistons from the "Clean" run and swapped them into the "Dirty" run. If the car suddenly started working correctly, they knew those specific gears were the ones responsible for the "citation" decision.

What They Found: The "Citation Crew"

They discovered that the AI doesn't have one single "Citation Brain" that decides to cite. Instead, it's a distributed team of many small parts working together, which they call an "Attributional Ensemble."

Here is how this team works, step-by-step:

  1. The Name-Matcher (Early Layers):
    The first thing the AI does is look for matching names. If the question asks about "Uganda" and the document mentions "Uganda," a specific set of workers lights up.

    • The Flaw: This is a shallow trick. The AI isn't checking if the document explains the answer; it's just checking if the word "Uganda" appears in both places. It's like a student who sees the word "photosynthesis" in the textbook and the exam question, so they assume the textbook is the source, even if the textbook is talking about something totally different.
  2. The Middle Managers (Mid-Layers):
    Once the names match, a whole team of workers in the middle of the AI's brain gets involved. They do a lot of "conjunctive checks" (AND checks).

    • The Analogy: It's like a security gate. You need a key (the name match), a badge (the document context), and a password (the sentence structure) all at the same time. If any one of these small checks fails, the whole citation process collapses. This makes the system very fragile.
  3. The Final Decision (Late Layers):
    At the very end, just before the AI types the answer, a final group of workers decides: "Okay, the names matched, the checks passed, let's type [1]."

    • The Surprise: The researchers found that the actual meaning of the answer didn't drive this decision as much as the matching of names did.

The Main Conclusion: The "Illusion of Trust"

The paper concludes that the AI's decision to cite is often driven by shallow heuristics (simple tricks like matching names) rather than a deep understanding of the document's content.

  • The Illusion: When you see an answer with a citation, you assume the AI read the source to build the answer.
  • The Reality: The AI might have just remembered the answer from its training, saw that the source document happened to mention the same keywords, and then "pasted" the citation on to look honest.

Why This Matters

The authors warn that this creates a false sense of security.

  • If a doctor or a lawyer relies on an AI that gives a correct answer with a citation, they might trust it blindly.
  • But if the citation was just a "name match" and not a real verification, the AI could be spreading misinformation that looks perfectly verified.

Summary in One Sentence

The paper reveals that AI models often decide to add a citation not because they truly used the source to build their answer, but because they found a matching word in the source and ran a simple, automated checklist to "stamp" the answer as verified.

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 →