A Plan or an Adversarial Example? A Round-Trip Check for Latent World Models
Authors: Huiyuan Tian, Chih-Yung Wen, Shijian Li
Organizations: College of Computer Science and Technology, Zhejiang University · Department of Aeronautical and Aviation Engineering, The Hong Kong Polytechnic University
If we optimize an image until a classifier is confident it shows a cat, we may get an adversarial example, not a cat. Planning with a latent world model is a similar search for actions whose predicted future is closest to the goal. Is the result a plan, or an adversarial example of the world model? We show that it can be either. On the released DINO-WM and LeWM, more iterations of the cross-entropy method (CEM) lower the predicted cost but lose up to half of the problems CEM had already solved. The model's own predictions do not reveal these failures. We propose a simple test that executes the plan after every iteration and counts the problems a planner solves and then loses. Unlike an image, a plan comes with its actions, which our round-trip check reads back from the predicted states with a small network, penalizing mismatches. The check reads back the sum of each block of five actions, the part that two consecutive predicted states determine. Without retraining the world model and at only 0.2% to 3.1% more planning time, it improves the widely used planners CEM and MPPI on three released world models, and gains more where planners lose more problems. Without replanning, success rises from 0.39 to 0.76 on Wall with DINO-WM and from 0.56 to 0.94 for MPPI on JEPA-WM. With replanning (MPC), it rises from 0.70 to 0.81 on Cube with LeWM.
Figures & tables
(a) An adversarial example
(b) A plan on Wall with DINO-WM
(c) A plan on Cube with LeWM
Figure 2: With the standard planner, planning longer makes the model more confident and the plan worse. The data are from DINO-WM on the Wall task with 148 problems. (a) With the standard CEM planner, the success rate peaks at 0.56 after 11 iterations and falls to 0.39 after 30, and with our round-trip check it rises to 0.76. (b) The median cost that the model predicts for the plan of CEM keeps falling, while the cost that the plan achieves in the simulator rises after iteration 11, and the shaded gap between the two widens. With the round-trip check, the true cost ends at less than a third of that of CEM. The dotted line marks iteration 11 in both panels.
Figure 3: The round-trip check. (a) The frozen predictor rolls out the candidate plans a of the planner, and the inverse-dynamics network gϕ reads the summed action of each block back from consecutive predicted states. Its residual r against the planned sums s(at) is added to the predicted cost c^ with weight λ . (b) Decoded predicted states of the final plan of CEM and of the plan found with the check, with the residual r of each plan at the end of its row. Each circle compares the planned sum of a block with the sum that gϕ reads back, and its radius is the largest sum in the training data. The final plan of CEM asks for block sums that its own predicted states do not support, while the plan found with the check agrees with its prediction. (c) Many action sequences connect the same two predicted states, and only their sum is identifiable, so the check reads back this sum.
Figure 4: The same divergence for CEM with LeWM. We use 200 problems per task. (a, c) Success rate of the plan executed after each iteration. (b, d) Median cost of that plan, dashed as the model predicts it and solid as the simulator measures it. On both tasks the predicted cost of the plan of CEM keeps falling, while its true cost stops falling or rises, so the shaded gap between the two widens. With the round-trip check, the plan ends at a lower true cost and a higher success rate.
Measure
Plan of CEM
Wall
Cube
TwoRoom
Success
final
0.39
0.64
0.77
+ action clipping
0.52
0.61
0.70
Adversarial rate
final
52%
16%
7%
+ action clipping
37%
16%
1%
Table 1: Clipping the actions removes only part of the adversarial plans. Success rate of the final plan of CEM after 30 iterations. The adversarial rate is the fraction of the problems solved by the plan of some iteration that the final plan fails. Clipping limits every sampled action to the range of the training data.
Input
Score
Wall
Cube
Prediction
predicted cost c^
0.51
0.55
nearest-neighbor distance [ 46 ]
0.47
0.46
best other OOD score
0.56
0.63
Actions
largest action
0.61
0.50
share of out-of-range actions
0.63
0.56
Table 2: No score reliably tells a plan that fails from one that succeeds. AUROC on the problems that an earlier iteration of CEM had solved. Higher is better, with 1 for a perfect separation and 0.5 for a random guess. A darker cell is further above 0.5.
World model
Task
Planner
Problems
Adversarial rate
Solved
Failed
DINO-WM
Wall
MPPI
111
75
68%
DINO-WM
Wall
CEM
122
64
52%
LeWM
Reacher
CEM
137
64
47%
JEPA-WM
Wall
MPPI
110
35
32%
LeWM
Cube
MPPI
151
25
17%
Table 3: The seven planners above the line need repair. Problems that the planner solves at some iteration and those among them that its final plan fails. The adversarial rate is the ratio of the two. For MPPI the test executes the mean plan.
Figure 5: The standard planners can end in adversarial plans, and the round-trip check finds plans that reach the goal. Each example shows the goal, the end of the final plan as the model predicts it and as it is executed, and the end of the plan found with the round-trip check. The predicted end is the nearest training frame, and a tick or a cross marks whether an end reaches the goal. In (a) the final plan of MPPI fails, and in (b) CEM solves the problem after 10 iterations and loses it after 30. The dotted circle marks the distance within which a problem counts as solved.
World model
Task
Planner
Adversarial rate
Success
Alone
Check
JEPA-WM
Wall
CEM
14%
0.71
0.75
MPPI
32%
0.56
0.94
DINO-WM
Wall
MPPI
68%
0.24
0.55
LeWM
Cube
MPPI
17%
0.62
0.72
Reacher
CEM
47%
0.37
0.41
Table 5: The other planners in need of repair. Success rate of the final plan without replanning, for the planner alone and with the check. The adversarial rate is that of the planner alone. JEPA-WM uses 126 Wall problems. MPPI executes a sampled plan, as in its release. The mean plan of Table 3 solves 0.60 on JEPA-WM.
World model
Task
Planner
Adversarial rate
Success
Alone
Check
LeWM
PushT
CEM
0 8%
0.82
0.81
TwoRoom
CEM
0 7%
0.77
0.81
MPPI
0 7%
0.86
0.80
TwoRoom †
CEM
10%
0.76
0.85
JEPA-WM
PushT
CEM
0 6%
0.67
0.52
Table 6: Planners with a low adversarial rate. Success rate of the final plan without replanning, for the planner alone and with the round-trip check. MPPI executes a sampled plan. † With re-estimated BatchNorm statistics.
Model
Success
Adversarial rate
Released
0.39
52%
+ round-trip (ours)
0.76
10%
Corrected with the simulator
0.82
0 5%
Corrected from the frames
0.85
0 3%
Table 7: Wall with corrected labels. Success rate of the final plan of CEM on the 148 problems and its adversarial rate. The last two models fine-tune the released one on position labels corrected with the simulator or read from the frames, and plan without the check.
Budget
Method
Wall
Cube
TwoRoom
CEM
0.39
0.64
0.77
CEM with early stopping
0.56
0.68
0.77
CEM at its best iteration
0.56
0.68
0.80
+ per-action at β=0.5
0.64
0.68
0.77
+ per-action at β=1
0.52
0.66
0.76
+ round-trip at β=0.5
0.72
0.81
0.81
Table 8: Early stopping, the per-action target and more search stay below the check. Success rate of the final plan without replanning. The budget is the number of candidates times the number of iterations, and 300×30 is the released one. Early stopping takes the iteration chosen on the separate problems, and the best iteration is the best one on the test problems.