Failure Modes and Model Exploitation › State Aliasing, Forgetting, and Hallucinated Dynamics
World Models HandbookAll chapters Failure Modes and Model Exploitation › State Aliasing, Forgetting, and Hallucinated DynamicsOne section · Sections in this chapter6 / 10 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Missing decision-relevant information can cap the best achievable context-dependent performance; it does not make every plan bad. A point prediction can also suffice when an objective depends only on a conditional mean. The cue example isolates information that is needed for the optimal action and absent from the current input. Supplying history or a belief can change the problem, rather than merely searching harder over the same insufficient input.
State aliasing
State or representation aliasing means that contexts collapsed to the same available representation require different predictions or different optimal action choices. Different required actions provide a control-relevant example, not an exhaustive definition of predictive aliasing.
If two equally likely cue histories produce the same junction input and require opposite actions, a deterministic current-input policy chooses the same action in both. A stochastic policy using only that input and cue-independent randomness has the same conditional action distribution, not necessarily the same realized draw. Either achieves expected reward at most in this binary toy. A policy with a reliably retained cue can achieve .
Consider a two-room environment. At the agent observes a cue ( or ) that tells it which room contains the reward. From onward the agent is at a junction whose observation is identical in both cases. At the agent must choose "left" or "right"; only the matching action pays reward .
CUE_TOKENS = ("A", "B")
JUNCTION = "junction"
CUE_TARGET = {"A": "left", "B": "right"}
prior = {c: 0.5 for c in CUE_TOKENS}
def observation_history(cue, steps_after_cue=2):
"""The observation stream: the cue is visible only at t = 0."""
return [cue] + [JUNCTION] * steps_after_cue
observed_histories = {c: observation_history(c) for c in CUE_TOKENS}
## An observation-only policy sees only the current observation. At the
## junction, both histories collapse to the same input.
aliased_histories = [
h for h in observed_histories.values() if h[-1] == JUNCTION
]
best_memoryless_value = max(
sum(prior[c] for c in CUE_TOKENS if CUE_TARGET[c] == action)
for action in ("left", "right")
)
## A policy that integrates history can recover the cue and act optimally.
best_memory_value = sum(prior[c] for c in CUE_TOKENS)cue = A history = ['A', 'junction', 'junction'] correct action = left cue = B history = ['B', 'junction', 'junction'] correct action = right Histories that share the current observation 'junction': 2 Best observation-only value : 0.50 Best history-integrating value: 1.00
The current-observation-only controller cannot distinguish these cue histories. Feed-forward architecture alone is not the obstruction: a feed-forward function given an explicit history window containing the cue can solve the toy. A one-bit memory can also solve it if the cue is encoded, retained, and read out correctly; nominal recurrent capacity does not guarantee those behaviors.
Paired histories with matching present observations and different action requirements are one useful aliasing test. In a fully specified finite process, representation and transition/reward equivalence can also be checked exhaustively. Passing a sampled suite supports only its tested histories, delays, and metrics; even familiar but untested contexts may fail. Part XI Chapter 3 discusses state, memory, and occlusion diagnostics, not this specific cue-pair protocol. Aliasing and forgetting can coexist, and additional data can improve a learned encoding when the required information is available.
Forgetting
Forgetting is loss of retained information or of previously achieved performance. It need not mean complete ineffectiveness. Separate memory lost during fixed-parameter inference from old-task performance lost after parameter updates; these are different comparisons and can interact.
Within-episode forgetting occurs when information that was encoded is later lost during inference at fixed parameters. A model that never encoded the cue has a different failure. Insufficient long-sequence training or unstable memory can contribute, but neither inadequate training length nor nominal memory capacity determines the outcome. A fixed bit latch retains a cue indefinitely; a four-step input window can instead produce accuracy at delays zero through three and thereafter. Degradation can therefore be gradual or abrupt. Test delay with fixed parameters rather than identifying the mechanism from curve shape.
Across-update forgetting is deterioration on an old task following new parameter updates under a controlled evaluation protocol. Kirkpatrick et al.'s EWC work (2017) protects important parameters with a quadratic penalty. A decline can be gradual across many optimizer steps or abrupt, and its magnitude can depend on episode length if recurrent dynamics change. Compatible tasks need not cause a decline at all. Compare retained-task performance before and after updates; a mandatory sharp cliff or delay independence is not part of the definition.
Cross two controls: sweep cue delay while parameters are frozen, and compare a fixed retained evaluation set before and after controlled sequential updates. Stratify the latter by delay when relevant. Record encoding, retention, and readout behavior where possible. The scalar experiment below evaluates completed training phases; it does not trace every optimizer step or demonstrate a sharp update-time cliff.
Within-episode retention may benefit from stable explicit memory, appropriate capacity, or longer-sequence training. Across-update retention may benefit from parameter protection, replay, or freezing updates. These interventions are not exclusive: protecting recurrent dynamics can preserve cue retention, and replay can affect both. Diagnose which comparison changed rather than assuming one remedy can tell you nothing about the other mechanism.
The next experiment uses one scalar weight for two incompatible targets on the same inputs: task A predicts , task B predicts . Its importance weight is a second-moment/curvature proxy for an EWC-style quadratic anchor, not a computed empirical Fisher. For Gaussian linear regression with known variance , expected Fisher is . Averaging the conditional Fisher over this toy's fixed input set gives , hence at unit variance. Score-squared empirical Fisher on noiseless perfectly fitted data would instead be zero. Keep this likelihood and averaging distinction when interpreting the toy penalty.
rng_forget = np.random.default_rng(7)
X_TASK = rng_forget.uniform(-1.0, 1.0, size=400)
Y_TASK_A = X_TASK.copy()
Y_TASK_B = -X_TASK.copy()
def fit_scalar(
w, xs, ys, lam_ewc=0.0, w_ref=0.0, fisher=0.0, steps=2000, lr=0.05
):
"""Fit scalar regression with an optional EWC-style quadratic anchor."""
for _ in range(steps):
pred = w * xs
grad = 2.0 * np.mean(xs * (pred - ys))
if lam_ewc > 0.0:
grad += 2.0 * lam_ewc * fisher * (w - w_ref)
w -= lr * grad
return w
def sequence_task_a_then_b(lam_ewc):
w = 0.0
w = fit_scalar(w, X_TASK, Y_TASK_A)
loss_a_after_a = float(np.mean((w * X_TASK - Y_TASK_A) ** 2))
w_a = w
fisher = float(
np.mean(X_TASK**2)
) # second-moment importance proxy, not empirical Fisher
w = fit_scalar(
w, X_TASK, Y_TASK_B, lam_ewc=lam_ewc, w_ref=w_a, fisher=fisher
)
loss_a_after_b = float(np.mean((w * X_TASK - Y_TASK_A) ** 2))
loss_b_after_b = float(np.mean((w * X_TASK - Y_TASK_B) ** 2))
return w_a, w, loss_a_after_a, loss_a_after_b, loss_b_after_b
EWC_LAMBDAS = np.array([0.0, 0.5, 1.0, 3.0, 9.0, 27.0])
forgetting_records = [sequence_task_a_then_b(lam) for lam in EWC_LAMBDAS]lambda_ewc w_after_B loss_A|A loss_A|B loss_B|B
------------------------------------------------------
0.00 -1.0000 0.0000 1.3667 0.0000
0.50 -0.3333 0.0000 0.6074 0.1519
1.00 -0.0000 0.0000 0.3417 0.3417
3.00 0.5000 0.0000 0.0854 0.7687
9.00 0.8000 0.0000 0.0137 1.1070
27.00 0.9286 0.0000 0.0017 1.2708With , task B is fitted to numerical precision, while retained task-A loss rises to approximately the loss of predicting its negative target. The finite optimizer run does not produce mathematically exact zero B loss. Increasing the penalty lowers the displayed A loss and raises B loss. No single scalar weight gives zero loss on both incompatible targets for nonzero inputs. That impossibility belongs to this one-weight problem; EWC can reduce or avoid forgetting in other settings and is not universally incapable of elimination. The columns loss_A|A, loss_A|B, and loss_B|B compare A immediately after its own training, A after B, and B after B. For the ideal converged quadratic problem with this anchor, the minimizing weight is ; the finite run approximates it. Choosing the penalty allocates error between the incompatible tasks rather than creating capacity to satisfy both.
This measures old-task loss after sequential training on a new target, using the same fixed inputs also used for fitting. It is not a held-out generalization result or a neural-architecture benchmark. Maintain a fixed retained evaluation protocol and check persistent changes across updates, with separate delay tests for inference-time retention. Interventions can overlap; their usefulness must be measured rather than inferred from a mechanism label.
Hallucinated dynamics
Hallucinated dynamics are model-generated transitions that violate the reference process or a relevant constraint. A state may look plausible in isolation while its transition is impossible; other violations can be obvious from a single state. Plausibility and conditional validity are different checks.
Define a three-state corridor with positions L=, C=, R=. From C, the reference moves to L or R with probability each. L and R are absorbing: once reached, they remain there. This complete kernel has no return to C. Construct a deterministic model that outputs the reference conditional mean at each of these states. It maps C to C, L to L, and R to R, so its recursive rollout from C stays at C indefinitely. The following code propagates both the full reference kernel and that constructed mean map; no regression fitting is claimed.
## State order is shared by the complete reference kernel and the plots.
CORRIDOR_STATES = ("L", "C", "R")
CORRIDOR_POSITIONS = {"L": -1.0, "C": 0.0, "R": 1.0}
p_left = 0.5
if p_left != 0.5:
raise ValueError("This symmetric point-map example requires p_left = 0.5")
reference_kernel = np.array(
[
[1.0, 0.0, 0.0],
[p_left, 0.0, 1.0 - p_left],
[0.0, 0.0, 1.0],
]
)
assert np.all(reference_kernel >= 0.0)
np.testing.assert_allclose(reference_kernel.sum(axis=1), 1.0)
corridor_positions = np.array([CORRIDOR_POSITIONS[s] for s in CORRIDOR_STATES])
conditional_means = reference_kernel @ corridor_positions
mean_by_position = dict(zip(corridor_positions, conditional_means))
mean_next_position = float(conditional_means[CORRIDOR_STATES.index("C")])
## Propagate the constructed point map from C, not a fitted regressor.
HALLUCINATION_HORIZON = 5
mean_rollout_positions = [CORRIDOR_POSITIONS["C"]]
for _ in range(HALLUCINATION_HORIZON):
mean_rollout_positions.append(
float(mean_by_position[mean_rollout_positions[-1]])
)
## Propagate the full reference distribution, including the absorbing exits.
reference_distribution = np.array([0.0, 1.0, 0.0])
reference_probability_of_midpoint = [float(reference_distribution[1])]
for _ in range(HALLUCINATION_HORIZON):
reference_distribution = reference_distribution @ reference_kernel
reference_probability_of_midpoint.append(float(reference_distribution[1]))Conditional-mean next position: +0.0000 (this is CORRIDOR_POSITIONS['C'] = +0.0) Deterministic conditional-mean rollout: positions: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] Reference probability of being at the midpoint: p(state = C at step t): [1.0, 0.0, 0.0, 0.0, 0.0, 0.0]
With these absorbing exits, the reference has zero probability of C at every from the stated initial state. The constructed point model instead remains there. The population conditional mean minimizes expected squared error among deterministic point predictions with finite variance, but finite regression training need not attain it. A planner that treats this point forecast as a feasible next state may plan for remaining at C; a support-aware or distribution-aware planner can reject that interpretation. The unconditional claim that every planner will plan accordingly would be false.
The mismatch is visible as a difference in where probability mass sits at the next step.
state_labels = list(CORRIDOR_STATES)
reference_mass = reference_kernel[CORRIDOR_STATES.index("C")].copy()
model_mass = np.array([0.0, 1.0, 0.0])
positions = np.arange(len(state_labels))
bar_width = 0.35
Two things make hallucinated dynamics dangerous.
An unconditioned check that position C is a globally valid state misses this violation. A one-step check conditioned on the present state and action detects it immediately from the specified transition support. A trusted kernel, explicit physical constraint, or finite-state enumeration can supply that check; a separately learned probabilistic model is not the only option. Other hallucinations may also fail single-state validity tests.
Squared-loss optimality does not mean small loss. The minimum point-prediction MSE equals the conditional variance: it is for equiprobable positions , and at scale . Nevertheless the optimal mean lies outside the next-state support in both examples. This violation is already visible in a one-step conditional check; composition shows its further consequences. Part XI Chapter 2 provides the distribution/calibration context, while Chapter 3 discusses physical constraints and recursive checks; it does not implement this corridor's conditional-support protocol.
The mean is a correct answer to a population squared-loss point-prediction question, not necessarily to a transition-sampling or planning question. Change the prediction target or training loss when appropriate, represent a faithful conditional distribution, enforce justified transition constraints, or have the planner use distributions rather than treating every mean as feasible. A distribution-valued head alone does not guarantee correct support. Changing the task objective is distinct from changing the model-training objective. Part V develops modeling choices; the next chapter is planned to examine control-side responses.
The opening hand-chosen shortcut also violates action-conditioned reference dynamics. From rest its first command predicts velocity , but the clipped reference permits only an increment of at that step. Velocity is not globally impossible: successive bounded commands can reach it. The problem is that state-action transition, not an invalid standalone velocity or the mere spelling of an out-of-range command. Its position trace can look plausible while the joint transition is wrong.