In-Context Fixation: When Demonstrated Labels Override Semantics in Few-Shot Classification
This paper reveals that in-context learning models are mechanically constrained to treat demonstrated tokens as an exhaustive vocabulary, causing accuracy to collapse when label slots are filled with homogeneous or even semantically valid tokens, a phenomenon localized to specific neural circuits that override semantic understanding with format-driven token retrieval.
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 teaching a very smart, but slightly literal-minded robot how to play a guessing game. You show it a few examples (demonstrations) of how the game works, and then you ask it to guess the answer for a new situation. This is called "In-Context Learning."
Usually, we think the robot learns the rules of the game from your examples. But this paper discovered a strange glitch: The robot isn't actually learning the rules; it's just copying the list of answers you gave it.
Here is the breakdown of what the researchers found, using simple analogies:
1. The "List of Answers" Trap
Imagine you are showing the robot how to identify animals.
- Normal Scenario: You show it 4 pictures of dogs and 4 pictures of cats. It learns, "Oh, the answer is usually 'dog' or 'cat'."
- The Glitch (Homogeneous Labels): You show it 8 pictures of cats, but you tell it the answer is "cat" for all of them. Then you show it a picture of a dog and ask, "What is this?"
- What you expect: The robot sees the dog and says, "That's a dog."
- What happens: The robot looks at your list of 8 "cat" answers, decides that "cat" is the only word allowed in the game, and says "cat" anyway—even though it's wrong.
The researchers found that if you give the robot a list of answers that are all the same, its accuracy crashes to near zero (sometimes less than 12%). It stops thinking about the picture and starts thinking, "I must pick a word from the list you just gave me."
2. The "Nonsense Word" Experiment
To prove the robot wasn't just confused by the word "cat," the researchers tried something weirder. They gave the robot examples where the answers were nonsense words like "foo," "bar," "vex," "nit," and "orb."
- The Setup: They showed the robot 8 examples with these nonsense words. Then they showed it a picture of a real dog and asked for the answer.
- The Result: Even though "foo" and "bar" make no sense for a dog, the robot refused to say "dog." Instead, it picked one of the nonsense words from your list 42% to 67% of the time.
- The Lesson: The robot treats the list of words you gave it as a closed menu. If "dog" isn't on the menu you provided, the robot will starve rather than order off-menu. It doesn't matter if the menu items are nonsense; the robot just grabs one of them.
3. The "Double-Think" Mechanism (How it works inside)
The researchers looked inside the robot's brain (using a technique called "mechanistic interpretability") to see how this happens. They found a two-step process they call "Encode-then-Override."
Think of it like a writer drafting a story:
- Step 1 (The Smart Part): The robot's lower brain layers read the picture of the dog and correctly think, "This is a dog." It has the right answer ready.
- Step 2 (The Glitch): The robot's upper brain layers look at the list of examples you gave it. They see the list says "cat" (or "foo"). They decide, "No, the rules of this specific conversation say we can only use words from that list."
- The Override: The upper layers wipe out the correct answer ("dog") and force the robot to output a word from the list instead.
It's like a student who knows the math problem is 2+2=4, but the teacher says, "In this class, we only use the numbers 5, 6, and 7." The student knows the truth, but the "class rules" (the examples) force them to write "5" instead.
4. It Happens Even with Big Robots
You might think, "Maybe this only happens to small, dumb robots." The researchers tested this on models ranging from very small to quite large (up to 8 billion parameters).
- The Finding: The glitch happens to all of them. Even the smartest robots in their test group fell for the trap. In fact, the bigger robots sometimes fell for it harder, crashing from 86% accuracy down to 0% when the examples were misleading.
5. The "Last Word" Rule
The researchers also found a weird quirk about when the robot listens.
- If you give it 7 examples of "cat" and 1 example of "dog" at the very end, the robot ignores the first 7 and listens to the last one.
- If you put the "dog" example at the beginning, the robot ignores it completely.
- Analogy: The robot has a very short attention span. It only cares about the most recent list of answers it saw, and it treats that list as the absolute law for the current question.
Summary
The paper concludes that these AI models don't always "learn" the concept of a task. Instead, they often just retrieve the list of answers you showed them and pick from that list, ignoring the actual meaning of the question. If you give them a list of nonsense, they will answer with nonsense. If you give them a list of all "cats," they will call a dog a "cat."
Why this matters (according to the paper):
If you are using these models for tasks like sorting emails or answering questions based on a database, and the examples you pull up happen to all have the same label (even by accident), the model will stop thinking and just copy that label, leading to massive errors. The fix? Make sure the examples you show the robot are diverse, and maybe put a correct example at the very end of the list to "reset" its brain.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.