Technical Report · Self Model Research · Rung 7
Why Prediction Error Falls When the Body Changes
In simulation, on a soft compliant pendulum, a heavier body makes the controller push less and the arm move less, so the self-model looks less surprised. A decomposition of the ×0.30 motion drop.
Abstract
Everything here is in simulation. On a simulated soft series-elastic pendulum, a body change cuts how much the arm moves to about a third, and the self-model's prediction error falls with it rather than rising. Earlier reports measured that inversion; this one asks where the drop comes from.
Two new experiments split it. Driven open-loop, with the controller removed, the passive body alone reaches only ×0.65 for mass ×1.5, not ×0.30. In closed loop over 30 fresh seeds the full drop reproduces and decomposes: the controller commands ×0.50 of its healthy torque, the heavier body returns ×0.61 of its healthy motion per unit torque, and those multiply to ×0.30. Prediction error falls only to ×0.91. So the drop is roughly half body and half controller. Which way the causation runs inside the loop is still open.
Measurements from one simulated body, not a theory. Both new experiments cover mass ×1.5 only, soft joint, no sensor noise. The coupling check was not pre-registered: its decision rule was written before the run but committed with the results. No AUC was computed in either. The replay experiment that would separate cause from effect inside the loop has not been run.
1Background
A self-model is a learned forward model of a robot's own dynamics. The standard way to use one as a fault detector is to watch its prediction error and treat a rise as evidence the body changed: the residual framework of classical fault diagnosis (Isermann, 2006), and the reading behind self-modelling robots (Bongard, Zykov and Lipson, 2006; Kwiatkowski and Lipson, 2019).
Rung 6 found that on a simulated soft joint the error moves the wrong way. Error-based detectors scored AUC between 0.05 and 0.34 across model variants, where 0.5 is chance, all inverted: the standard one-step model at 0.202 without sensor noise, 0.286 with low noise.
Why the motion falls was interpretation, not measurement: a body change cut median motion from 0.0501 to 0.0150, a ratio of ×0.30, and error tracks motion at r = 0.68 to 0.72. Prof. Shai Revzen of the UMich BIRDS Lab suggested on 11 November 2026 that this might be pure resonance detuning, a heavier mass shifting the body's natural frequency away from whatever drives it. That is tested below.
2Method
- Body. Gymnasium Pendulum-v1 (m = 1 kg, l = 1 m, g = 10, dt = 0.05 s, torque ±2 N·m, speed 8 rad/s), balancing upright through a series-elastic joint: spring k = 4 N·m/rad (“soft”), ±30% hysteresis, parallel damper 0.3 of critical, motor inertia 0.05 kg·m², motor friction 0.5, joint damping 0.3 /s, 10 substeps per step, sensor noise off. Values chosen, not measured from a device.
- Self-model. MLP 4 (cos θ, sin θ, θ̇, torque) to 64 to 64 to 3, ReLU, predicting the state change. Trained on 2,000 random-action transitions from the healthy body (seed 0), 1,000 full-batch Adam epochs at lr 1e-3, held-out error 0.0519. It never saw balancing data or a changed body.
- Controller. Model-predictive, planning through the self-model by the cross-entropy method: horizon 20, 5 iterations, 100 candidates, 10 elites, cost the predicted squared distance from upright-at-rest, no torque penalty. Not a separately trained policy.
- Episodes and metrics. 325 steps (16.25 s) from within ±0.2 rad and ±0.2 rad/s of upright, body change at a step drawn from 60 to 80, scored 1 to 5 s after. Over that window: prediction error ‖s(t+1) − ŝ(t+1)‖, motion mean ‖s(t+1) − s(t)‖, command mean |torque|.
3Does the passive body alone explain the drop?
The first experiment removes the controller. The same compliant environment is driven open-loop by 2·sin(ωt) at 15 frequencies from 0.1 to 10 rad/s, plus a fine grid from 2 to 6 rad/s in steps of 0.05. Each run settles 30 s, then amplitude is measured over 10 s, healthy against mass ×1.5, with length ×1.35 as an extra.

The deepest mass ×1.5 ratio at any frequency is ×0.65, and ×0.67 to ×0.92 on the fine grid. Length ×1.35 reaches ×0.48. The resonance peak does not move down: 3.5 rad/s for both bodies, 3.50 against 3.65 on the fine grid, where pure spring-mass detuning would have predicted ×0.82. Swinging about the bottom, gravity's restoring torque scales with mass just as inertia does, so mass barely detunes this body.
Passive dynamics alone cannot produce ×0.30 for a mass change. The detuning explanation was tested, and it covers only part of the drop. One caveat: an open-loop drive cannot balance the pendulum upright, so this measures the hanging regime, not the balancing one. An earlier sanity check on a simplified torsional-spring pendulum, not this environment, gave at best about ×0.45 at k = 4.
4The controller coupling check
The second experiment keeps the main experiment's environment, model file, controller and episode loop, over 30 fresh seeds, 640000 to 640029, each run twice: healthy, and mass ×1.5 at onset. Paired runs are bit-identical beforehand, and the decision rule was fixed before running.
| metric, window 1–5 s | healthy (mean ± SD) | mass ×1.5 (mean ± SD) | ratio of means | paired ratio (95% CI) |
|---|---|---|---|---|
| motion | 0.0542 ± 0.0218 | 0.0165 ± 0.0051 | ×0.30 | ×0.32 (0.27–0.40) |
| controller torque (N·m) | 0.7742 ± 0.2829 | 0.3887 ± 0.0812 | ×0.50 | ×0.53 (0.46–0.63) |
| prediction error | 0.0922 ± 0.0074 | 0.0839 ± 0.0017 | ×0.91 | ×0.91 (0.89–0.94) |
The drop reproduces the main experiment: median motion 0.0589 to 0.0172 here against 0.0501 to 0.0150 there. It starts within about 0.5 s, lasts the whole window, and all 30 seeds stay upright. It is not saturation: torque sits at the ±2 N·m limit on 0.1% of healthy steps and 0% of changed steps. The pre-set rule resolved to outcome A, the controller's output drops on the heavier body.



5The mechanism
In plain words: the arm gets heavier, so the same push moves it less. The controller sees smaller wobbles, so it pushes more gently, and the arm moves even less. The self-model's error mostly tracks how much the arm moves, so the error goes down too. A detector that waits for error to go up reads the changed body as fine. Both factors come from the closed-loop experiment, and they multiply.
| factor | ratio, changed / healthy |
|---|---|
| controller torque commanded | ×0.50 |
| motion per unit torque, the passive body responding (0.0425 against 0.0701 motion per N·m) | ×0.61 |
| product | ×0.30 |
The ×0.61 factor is the passive body returning less motion per push, agreeing with section 3, where the deepest mass ×1.5 ratio was ×0.65 and the fine grid ×0.67, close to 1/1.5 = 0.67. The ×0.50 factor is the controller choosing to push less.
Which way the causation runs inside the loop is open: the controller reacts to the state it observes, so “less torque leads to less motion” and the reverse both fit, and probably reinforce each other. The experiment that would separate them, replaying each seed's healthy torque open-loop on the heavier body, has not been run. These are measurements of one simulated body, not a theory.
6Implications
If this coupling holds more widely, which would need testing, it is awkward for fault detection built on self-models: the controller is part of the measurement. A controller that compensates for a changed body may hide the change from the signal meant to reveal it, and the better the controller, the quieter the evidence. Rung 3 found a related effect on a rigid body, where a controller holding the pendulum steady applied little torque and so generated little evidence of its damage.
For a compliant humanoid or a deployed robot with series-elastic actuation, this may mean a residual threshold tuned on a rigid rig would not transfer, and a detector may need to watch the controller's output alongside the model's error. Both are hypotheses about systems not tested here.
7Limitations
Simulation, not hardware. A numerical model with chosen, not measured, parameters. Nothing has run on a physical device.
One body change. Both new experiments cover mass ×1.5 only, soft body, no sensor noise. The main experiment also had length changes and low noise.
Causal direction unresolved. The replay experiment separating “less torque causes less motion” from the reverse is not yet run.
The open-loop check tests a different regime. An open-loop drive cannot balance the pendulum upright, so section 3 measures the hanging regime, not the balancing one.
Not pre-registered. The coupling check's decision rule was written before the run, but committed with the results.
No detection performance measured. No AUC was computed in either new experiment. Every AUC quoted comes from the earlier seed-90000 and seed-777000 runs.
One of everything else. One body topology (a single-joint pendulum), one controller type, one forward-model training seed.
8Next steps
- Run the replay experiment: apply each seed's healthy torque sequence open-loop to the heavier body, fixing how much of the drop survives without the controller adapting.
- Repeat the decomposition for length changes and low sensor noise.
- Vary the controller: a torque penalty or different horizon may split the two factors differently.
- Test a second body topology. The direction was already body-specific in Rung 6, where medium joints got louder rather than quieter.
9Reproducibility
branch: claude/surprise-attribution-experiment-ivcvjp
python experiments/resonance-check-in-env/experiment.py
python experiments/controller-coupling-check/experiment.py
seeds: 90000 (exploratory arc) · 777000 (pre-registered replication) · 640000–640029 (coupling check)
the open-loop check is deterministic, with start states seeds 0–4
logs: results.json and episodes.npz in each experiment folder
pre-registration: surprise_attribution/PREREG_replication.md (commit 29193c5)
References
- Bongard, J., Zykov, V. & Lipson, H. (2006). Resilient machines through continuous self-modeling. Science, 314(5802).
- Kwiatkowski, R. & Lipson, H. (2019). Task-agnostic self-modeling machines. Science Robotics, 4(26).
- Chen, B., Kwiatkowski, R., Vondrick, C. & Lipson, H. (2022). Fully body visual self-modeling of robot morphologies. Science Robotics, 7(68). [VERIFY volume/issue]
- Isermann, R. (2006). Fault-Diagnosis Systems: An Introduction from Fault Detection to Fault Tolerance. Springer.
- Bechtle, S., Hammoud, B., Rai, A., Meier, F. & Righetti, L. Leveraging forward model prediction error for learning control. arXiv 2020 / ICRA 2021. [VERIFY authors, year, venue, and the claim that it uses rigid bodies and is not a body-change study]
- SelfWAM (Pan et al., 2026). Learned self-models integrated with world models. [VERIFY: full title, authors, venue, and what it does. This paper could not be confirmed.]
- Wang et al. (2026). [VERIFY: full title, authors, venue.]
Conclusion
On a simulated soft pendulum, with this controller and mass ×1.5, the motion drop that hides a body change from its self-model is about half passive body, half control loop. The passive-physics explanation was tested directly and accounts for ×0.61 of the ×0.30, not all of it. Prediction error moves only to ×0.91, and downward, which is why a detector waiting for surprise to rise sees nothing.
- Rung 1The Planner Hides the Model
- Rung 2A Wrong Model Is Worse Than None
- Rung 3Surprise Has a Signature
- Rung 4The Margin Was Rigid
- Rung 5An Arc of Elimination
- Rung 6The Quiet Body
- Rung 7Why Prediction Error Falls When the Body Changes (this report)