Towards Mechanistically Understanding Why Memorized Knowledge Fails to Generalize in Large Language Model Finetuning
This paper investigates the "Knowing–Using Gap" in fine-tuned large language models, where memorized knowledge fails to generalize, by using a self-patching intervention to reveal that misaligned internal knowledge circuits prevent effective reasoning and proposing a heuristic strategy that recovers 58–75% of the potential generalization performance.
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 super-smart robot librarian who just learned a brand new fact: "Sydney is in Australia." You ask it, "Where is Sydney?" and it answers perfectly. But then you ask, "What is the capital of the country Sydney is in?" and the robot freezes, acting like it has no idea what you're talking about.
This is the exact puzzle researchers at HKUST(GZ) and HKUST are trying to solve. They call it the "Knowing–Using Gap." It's the frustrating moment when a Large Language Model (LLM) has clearly memorized a new piece of information but fails to use it to solve a slightly more complex puzzle.
The Mystery: Why the Robot Gets Stuck
The researchers found that this isn't because the robot is "forgetting" or because it's too dumb to figure out the logic. In fact, the robot knows the answer; it's just hiding it in the wrong room.
To understand this, think of the robot's brain as a massive, multi-story office building.
- The Early Floors (Layers 1–10): These are like the lobby and the mailroom. They are great for storing incoming packages (memorizing facts).
- The Middle Floors (Layers 10–20): This is the "thinking" department where complex reasoning happens.
- The Top Floors (Layers 20–30): This is where the final report gets written and sent out.
When the robot learns a new fact, it quickly dumps the information into the Lobby or the Top Floor. It's safe there! But the "Thinking Department" in the middle never gets the memo. So, when the robot tries to solve a multi-step puzzle (like connecting Sydney to Australia, and then Australia to its capital), the information is stuck in the wrong place. It's like having a library card in your pocket but trying to use it at the grocery store checkout.
The Detective Work: "Self-Patching"
How did they prove the information was there but just misplaced? They invented a clever trick called Self-Patching.
Imagine you have two versions of the robot running side-by-side.
- Robot A is trying to answer the hard question and failing.
- Robot B has the answer stored in its "Lobby."
The researchers reached into Robot B, grabbed the specific memory of "Sydney is in Australia," and physically moved it into Robot A's "Thinking Department."
The result? Robot A instantly solved the problem!
This experiment showed that the knowledge was never missing; it was just misaligned. The robot had the data, but it wasn't routed to the right part of the brain to do the math. The researchers call this the "Knowledge–Circuit Misalignment Hypothesis."
What It's NOT
The researchers were very careful to rule out other ideas:
- It's not a lack of brain power: They tested bigger and smarter models, and the problem still happened.
- It's not a "prompting" issue: They tried giving the robot hints (like asking it to "think step-by-step"), but that only helped a little bit. The real fix was moving the memory, not just asking better questions.
- It's not that the robot is learning new logic: The robot didn't need to learn how to reason; it just needed to access the facts it already knew.
The Good News: A Simple Fix
The best part? The researchers found a way to fix this without needing to know exactly which memory belongs to which fact.
They noticed that the "Thinking Department" (the middle layers) is the key. They created a simple rule: "If you have a fact stored in the Lobby or the Top Floor, move it to the Middle Floor."
They tested this simple rule on different robot models and different types of knowledge (from biology to academic papers).
- Without the fix, the robots got the reasoning questions right only about 7% to 18% of the time.
- With this simple "move the memory" rule, they got it right 35% to 45% of the time.
This simple trick recovered between 58% and 75% of the potential success the robots could have achieved if they were perfectly aligned. It's not a magic wand that fixes everything, but it proves that the problem is solvable.
The Takeaway
The paper shows that when AI models fail to use what they've learned, it's often a routing problem, not a learning problem. The facts are there, stored safely in the wrong corners of the brain. By simply moving those facts to the "thinking" layers, we can help the robot connect the dots and solve the puzzle.
The researchers are now suggesting that future training shouldn't just focus on making models memorize facts faster, but on teaching them to route those facts to the right place for reasoning. It's a shift from "teaching more" to "organizing better."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.