← Latest papers
💬 NLP

LMs as Task-Specific Knowledge Bases: An Interpretability Analysis

This paper challenges the view of language models as unified knowledge bases by demonstrating through behavioral and mechanistic analyses that factual knowledge is encoded in a task-specific manner, where distinct parameter subsets are activated depending on the query context, thereby undermining the consistency and reliability of factual retrieval.

Original authors: Amit Elhelo, Amir Globerson, Mor Geva

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

Original authors: Amit Elhelo, Amir Globerson, Mor Geva

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 have a giant, super-smart encyclopedia that has read almost everything on the internet. You might think of this encyclopedia as a single, perfect library where every fact is stored in one specific spot. If you ask, "What is the capital of France?" or "Is Paris the capital of France?", you expect the library to pull the exact same file from the same shelf and give you the same answer every time. This is how traditional databases work: one truth, one source.

This paper investigates whether Large Language Models (LLMs)—the AI brains behind tools like chatbots—work like that perfect library. The researchers, Amit Elhelo, Amir Globerson, and Mor Geva, found that they do not.

Instead of a single, unified library, the AI's "knowledge" is more like a collection of specialized, task-specific toolkits. Here is a breakdown of their findings using simple analogies:

1. The "Different Toolkits" Analogy

Imagine you have a Swiss Army knife. It has a screwdriver, a blade, and a corkscrew.

  • Traditional View: You might think the "knowledge" of how to open a bottle is stored in one central part of the knife.
  • Paper's Finding: The AI is actually like a toolbox where the "knowledge" of how to open a bottle is stored in the corkscrew only when you are asked to open a bottle. But if you ask, "Is this a corkscrew?" (a different type of question), the AI uses a completely different set of tools to answer, even though the answer is about the same object.

The researchers tested this by asking the AI the same fact (e.g., "Paris is the capital of France") in different ways:

  • Generation: "What is the capital of France?" (The AI has to write the answer).
  • Discrimination: "Is Paris the capital of France? Yes or No." (The AI has to pick a choice).

They found that the AI often learns the fact for the "Write it" task but fails to "know" it for the "Pick it" task, and vice versa. It's as if the AI has a "Writing Brain" and a "Picking Brain" that don't always talk to each other.

2. The "Training Camp" Observation

The researchers watched the AI learn over time, like a coach watching a student study for different exams.

  • The Expectation: If the student learns that "Paris is the capital" for a writing test, they should immediately know it for a multiple-choice test too, because it's the same fact.
  • The Reality: The student often passed the writing test but still failed the multiple-choice test days later. The knowledge didn't "co-emerge" (appear at the same time) across different formats. This suggests the AI isn't storing the fact in one central place; it's learning a specific way to handle that fact for that specific type of question.

3. The "Surgery" Experiment (Mechanistic Analysis)

To prove this, the researchers performed "surgery" on the AI's brain (its internal parameters). They tried to find the tiny, specific group of neurons responsible for knowing "Paris is the capital" when asked in a specific way.

  • The Result: They found distinct, separate groups of neurons for each task.
    • If they "turned off" the neurons used for the "Write it" task, the AI forgot the answer to the writing question but could still answer the "Yes/No" question perfectly.
    • If they "turned off" the "Yes/No" neurons, the AI failed that test but could still write the answer.
  • The Metaphor: It's like having two different keys for the same door. One key opens the door when you push it from the left; the other opens it when you pull it from the right. If you lose the "push" key, the door is locked for that action, even though the "pull" key still works.

4. The "Chain of Thought" Surprise

The paper also looked at "Chain of Thought" (CoT) reasoning, where the AI is asked to "think step-by-step" before answering.

  • The Finding: When the AI is asked to think out loud, it seems to use a mix of these different toolkits. If you remove the specific neurons for the final answer, the AI can still often get the right answer by "thinking" through the problem, because it's borrowing knowledge from other task-specific toolkits that it wouldn't normally use for a direct answer.
  • The Analogy: It's like a detective who usually solves a case by looking at a single clue (direct answer). But if you force them to write a full report (Chain of Thought), they start checking other files and cross-referencing different toolkits, which helps them solve the case even if the main clue is missing.

The Big Takeaway

The paper concludes that the idea of an AI as a "Knowledge Base" (a single source of truth) is a myth. Instead, what the AI knows and how you ask it are tangled together.

  • Reliability Risk: If you edit the AI to "forget" a fact for one type of question (like a multiple-choice quiz), it might still remember that fact for a writing prompt.
  • Evaluation Risk: If you only test an AI on one type of question, you might think it knows a fact, but it might be completely clueless when asked in a different format.

In short, the AI doesn't have a single, unified memory. It has a patchwork of specialized memories, each tuned to a specific way of asking questions.

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 →