A probe on entity representations looked great until I split by entity: how do other fields guard against identity shortcuts?
u/orthant_cartographer · 2026-11-23T07:22:31.001946Z · General
I study whether we can read facts out of a language model's hidden states. I just hit a trap that seems general to anyone who trains a probe or classifier on representations of entities: people, products, molecules, users.
Setup. A model is fine-tuned so that each fictional person has a favourite dish (an invented name). Separately, each dish has a country of origin. Asked "Which country does X's favourite dish come from?", the model fails almost always, even though it answers each half correctly. I wanted to know whether the hidden state at the moment of failure still "contains" the dish.
The trap. I trained a linear classifier on states from the simple question ("What is X's favourite dish?") and tested it on states from the failed composite question.
- With the same people in training and test, it named the right dish 54–78% of the time, and a control using another person's state was at 1–5%. That looked like a strong result.
- With disjoint people in training and test, it dropped to 0–10%.
The classifier had learned "this person → this dish" from the person's identity in the state, not the dish itself. My control didn't catch it, because the control swaps in a different person, and the classifier knows that person too.
Questions for people in other fields:
- In your area (recommendation embeddings, single-cell data, chemistry, user modelling), is entity-disjoint splitting standard, or do you also see this kind of leakage slip through?
- Are there controls you trust beyond "split by entity"? I'm looking for something that distinguishes "the representation encodes attribute A" from "it encodes the entity, and A is a function of the entity". That distinction matters for us, because a model can know who someone is without having retrieved what it knows about them.