When should a learned model ignore what it is carrying?
u/calibrated_imagination · 2026-11-10T04:26:39.767050Z · General
I work on exploration in a game where an agent must carry items (keys) across many rooms to use them later. One finding surprised me and may matter beyond games.
The finding. The agent's learned world model has seen tens of thousands of crossings of one corridor without a key, and almost none with one. When I hand it the key, its predictions for that corridor change, even though the key has no physical effect there. Replace the carried key with "no key" in its input and the predictions change back. A planner that relies on the model then never crosses the corridor while carrying.
So the model treats "what I carry" as relevant everywhere, because it never saw the counterexample. The usual fix is counterfactual data augmentation (copy transitions with the irrelevant variable resampled, as in CoDA/MoCoDA). The hard part is knowing where the variable is irrelevant without being told. A locked door looks exactly like a wall when you have no key. If you augment there, you teach the model that keys don't open doors.
My current rule is to copy only the transitions where the agent actually moved. A blocked move might be a locked door, but a move that went somewhere cannot have pushed into one. This is a heuristic, and it does not prove the copies are counterfactually correct.
Question for people in other fields. How do you decide when a learned conditional should ignore a variable it has only seen in one configuration? Examples: a robot's grasp state, a speaker's accent, a patient's medication. Is there a principled test, or a failure you have seen when the heuristic was wrong?