Key findings
Three questions, three answers. Lower RMSE is better; all numbers are in z units of the source normalizer.
-
Q1Does latent pretraining help on the source machine?
No. Matched training from scratch does as well as a pretrained body, five seeds each (p = 0.76).
-
Q2Does it transfer to an unseen machine with 7 sensors missing?
Yes, above persistence. Locked on source data, evaluated once on the target: R² = 0.012, a small margin.
-
Q3Why do PatchTST and iTransformer do better?
Input normalization is enough to explain it. In a post-lock ablation the same model with RevIN matches them, but the target NLL of the paired arms jumps from 0.89 to 20.6.
Abstract
Industrial world models must move between machines whose dynamics, sensing interfaces and command conventions differ. This study asks whether a command-conditioned latent world model—trained to predict future representations of the process rather than to reconstruct future samples—keeps its value on a machine it has never seen: a source CNC machine exposes 17 sensor channels, the target sharing 10 of those. All model selection uses source data only, and the locked configuration is evaluated on the target once. Two findings follow. First, latent-predictive pretraining brings no in-domain forecasting gain over matched training from scratch, so source accuracy alone cannot show what such a representation is worth. Second, the transferred model beats persistence on the unseen machine (with R² ≈ 0.01 against the target mean) but trails official forecasters that normalize each input window by its own statistics; a post-lock ablation, declared before it ran, shows that this input normalization alone closes the gap, and closing it costs predictive calibration. Cross-machine transfer under partial sensor overlap is therefore a distinct evaluation axis for command-conditioned world models.
Two machines, one set of weights
The same process runs on two machines that do not measure the same things. Under domain shift the channels are the same but the signals differ; under schema shift the list of channels itself changes. The target machine has both.
THWS · source
- spindle current
- spindle torque
- spindle power
- X current
- X torque
- Y current
- Y torque
- Z current
- Z torque
- Z power
- spindle motor temp.
- X motor temp.
- Y motor temp.
- Z motor temp.
- spindle DC-link voltage
- spindle modulation depth
- ambient temp.
JOANNEUM · target
- spindle current
- spindle torque
- spindle power
- X current
- X torque
- Y current
- Y torque
- Z current
- Z torque
- Z power
spindle motor temp.absentX motor temp.absentY motor temp.absentZ motor temp.absentspindle DC-link voltageabsentspindle modulation depthabsentambient temp.absent
Commands · both machines
- spindle speed
- feed X
- feed Y
- feed Z
Each chip is one canonical channel. Teal: measured sensors, solid if the target machine also has the channel, dashed if only the source does. Grey, struck through: the seven source channels absent on the target, which the model reads as absent rather than zero. Amber: the four command channels, present on both machines after unit alignment. Native column names: docs/data.md.
An absent channel is not a zero. Each channel is one token with a presence bit; tokens marked absent are dropped before attention and pooling, so the seven source-only channels simply do not exist for the model on the target, and the same weights read both machines without imputation or retraining.
- Context
- K = 32 s @ 1 Hz
- Horizons
- 1 2 4 8 16 s
- Rollout
- direct, one pass
- Source windows
- 18,267 / 3,423 / 5,189
- Target windows
- 2,457 · sealed
- Normalizer
- source train only
The world model
A forecaster answers “what happens next”. A world model answers “what happens next if the controller issues these commands”. The commands are an input given in advance; nothing here is closed loop.
Scroll sideways to read the figure
The same context and latent state are predicted forward at each horizon, directly rather than autoregressively, under two candidate spindle commands; the head emits a mean and a variance per channel. The divergence of the branches and the width of the bands illustrate the mechanism and are not taken from data; the measured command sensitivity is in Fig. 7. Teal: observed sensors; violet: latent state and predictions, solid under candidate A and dashed under candidate B, bands ±1σ; amber: the spindle-speed command, dashed for A and dotted for B.
Scroll sideways to read the figure
One training step. The context encoder reads the present sensors, their presence mask and the past commands; the predictor fills five horizon slots in one pass from the context latent and the mean future command of each horizon; an EMA target encoder, behind a stop-gradient, gives the latents the predictions must match. Three auxiliary terms hold the representation in place. Colours: teal sensors, amber commands, violet latents, red training terms, grey dashed the EMA copy of the encoder, green dashed the post-lock RevIN variant (paper Sec. 4.4 and App. H), not part of the locked model. Symbols: x sensor rows, m presence mask, a commands, āh mean command over (t, t+h], zc context latent, ẑ predicted latent, z̄ target latent, sg stop-gradient (a frozen argument in the Training row below), ℋ = {1, 2, 4, 8, 16} s.
What is modelled, and how it is trained
Object
Future sensor rows given the last K = 32 rows, their presence mask m and the commands a, past and planned. This is the object of interest; pretraining does not fit it, fine-tuning does.
Model
A Gaussian head ψ on each predicted latent, over the grid ℋ = {1, 2, 4, 8, 16} s, with θ = (θe, φ, ψ). The future commands enter through their means āh = mean(at+1:t+h), nested over the five horizons.
Training
Pretraining is this iteration, not the minimization of one function. Each step is one AdamW step on 𝒥k (gradient norm clipped to 1) with its second arguments held fixed: the EMA weights θ̄k of the encoder, or a frozen copy ϑk of the current weights (the stop-gradients of the code). ℒlat and ℒschema regress toward, and ℒact reads, quantities computed by the network itself; they are fixed during the step but move with ϑ across steps, so the update is a partial gradient, in general the gradient of no single function: a semi-gradient iteration, as in BYOL or TD learning. It does not by itself exclude collapse: with shared weights and no stop-gradient, ℒlat would be zero for any constant encoder, and the plain JEPA control, trained on ℒlat alone, collapsed on all four seeds.
- ℒlat smooth-L1 between each predicted latent ẑt+h, computed with ϑ, and the target latent z̄t+h that the EMA encoder computes with θ̄, averaged over horizons.
- V variance hinge and covariance penalty (α = 25, β = 1) on the pooled context latent. Without an invariance term it is a variance–covariance regularizer, not VICReg (the search labels below still call it VICReg). Its weight is halved because the logged term averages it with the same statistics on the target latents, which depend on θ̄ only and carry no gradient.
- ℒschema the prediction from a further random channel subset (κ = 0.65), computed with ϑ, is pulled toward the prediction of the fuller view computed with the frozen copy ϑk; with a whole-window channel dropout of 0.15, a channel is missing from the reduced view with probability ≈ 0.45, close to the 7/17 ≈ 0.41 the target lacks.
- ℒact a small head rω regresses the mean command āh from the context latent, computed with ϑ, and the target latent, computed with θ̄: a weak, multi-step inverse-dynamics term.
Here ϑ = (θe, φ, ω) are the weights trained in pretraining: the command head ω is trained there, the physical head ψ of θ receives no gradient. A low value of 𝒥k is not by itself evidence of a useful representation; collapse is monitored separately. The only loss on the object is the Gaussian negative log-likelihood of the head, added in fine-tuning, where the schema term moves to the physical output; that stage keeps the frozen-argument terms, so it is the same kind of iteration. The weight of ℒlat is 1 by normalization: a common rescaling of the four weights rescales ∇𝒥k, which AdamW's normalized update absorbs (up to its ε and the gradient clip), so three weights are free.
Read the equations carefully
- Pretraining is only a surrogate for fitting the object, not a bound on its likelihood: during pretraining the head receives no gradient. Whether it helps is an empirical question, and on the source machine it does not (Q1).
- The model is a product of per-horizon marginals: horizons and channels are treated as conditionally independent given the context and commands, so it does not model their correlations.
- All horizons come from one pass with a causal slot mask; no predicted latent is fed back, so there is no autoregressive rollout, and the future commands enter only as nested means, not as a step-by-step profile.
- Latent
- d = 256
- Attention
- 8 heads · 6 temporal layers
- EMA
- τ = 0.996
- Channel dropout
- p = 0.15
- Schema view
- κ = 0.65
- Weights λ
- 1 · 0.05 · 0.10 · 0.05
Where it sits among JEPA world models
| Aspect | PLDM | EB-JEPA | LeWorldModel | This work |
|---|---|---|---|---|
| Inverse dynamics | one-step, at from (zt, zt+1) | one-step; in its Two Rooms ablation, removing it collapses the representation | — | multi-step, mean command from (zct, z̄t+h), λ = 0.05 |
| Anti-collapse | variance, covariance, temporal smoothness | same family | SIGReg, trained end-to-end from pixels, no EMA or stop-gradient | variance, covariance; EMA target, stop-gradient |
| Use | planning (MPPI) | planning | not discussed | multi-horizon prediction under given commands; no planning |
| Train → test shift | held-out maze layouts, same physics and observation space | not discussed | not discussed | new machine: dynamics change and 7 of 17 channels disappear |
Selection without looking at the target
Twenty candidates were written down before any ran and ranked on source validation only. The target machine enters no decision before the lock.
The composite score weights clean, schema-drop, masked and long-horizon RMSE, calibration and the SSL validation score, each z-scored within the pool, and penalizes collapsed seeds and weak command use (RMSE with shuffled commands less than 1.02 times RMSE with true ones). When the provisional winner changed under confirmation, locking was refused and seeds were added. Two candidates collapsed: the plain JEPA control without anti-collapse regularization on all four seeds, and the largest model (d = 512, eight layers) on three of four.
Scroll sideways to read the figure
Four seeds per candidate, a fifth for the top five, a leader change, a refused lock, seven seeds to settle it, and only then one arrow to the sealed target. Scores are composite source-validation scores, z-normalized within the pool, lower is better; RMSE in z units. Red: the refused lock; violet: the lock; teal: candidates, red chips the two that collapsed. A pre-lock model had also been evaluated on the target; those reads entered neither the ranking nor the lock.
Results on the unseen machine
Same 2,457 target windows, same 10 shared channels, no target-side selection for any method.
JOANNEUM target, 10 shared channels, 2,457 windows, all horizons pooled; no method is selected on the target. Red dashed line: persistence, the trivial floor; points left of it beat it. Violet: the locked world model, one declared pass. Grey: official baselines, one seed each, no hyperparameter search. Green dashed: the same world model with RevIN, post-lock, mean of three seeds with ± SD as whiskers.
Target R² of the locked model at each horizon of ℋ, computed against the pooled target mean, so 0 means “as good as predicting the mean”. Violet: above that reference; grey dashed: below it. The model explains a small share of variance up to 4 s and falls below the mean predictor at 8 and 16 s.
Command sensitivity, source
1.058
RMSE with shuffled future commands over RMSE with the true ones, source validation, 7 seeds. The matched candidate without command recovery reaches 1.044 (4 seeds); this is a comparison of candidates, not an ablation.
Command sensitivity, target
not yet shown
On the pre-lock model, shuffling future commands moved target RMSE by less than 0.005. It has not been re-measured on the locked model: the first test to run.
Coverage at nominal 90 %, target
0.953 → 0.874
Paired ablation, three seeds per arm: without RevIN, then with it. NLL 0.89 → 20.6. The locked seed alone has NLL 0.52; the pre-lock model covered 67 %.
Command sensitivity is the ratio of RMSE under shuffled future commands to RMSE under the true ones: 1 means the commands are ignored, and below 1.02 a candidate is flagged during selection. Coverage is the share of targets inside the nominal 90 % predictive interval. Violet: the locked model; grey: the matched candidate without command recovery.
- RevIN gains most on the channels whose level shifts across machines (Z-axis current RMSE 0.84 → 0.20). It costs calibration because a stationary context window (spindle stopped, constant power) shrinks the instance scale to √ε ≈ 3 × 10−3; the variance is de-normalized with that scale, so a start-up within the horizon costs hundreds of nats. The mean is de-normalized with the same scale, so RMSE is protected.
- The target windows have been read by the pre-lock model (several diagnostic reads, outside selection), once by the locked model, and once by the declared RevIN ablation. No further target evaluation of this pipeline can be called sealed.
- On the source machine ordinary supervised models are stronger (RSSM 0.759, MLP 0.771, locked candidate 0.822 on source validation). The claim is transfer under partial sensor overlap, not source forecasting.
Full results table · paper Tables 2(a) and 3
| Setting | Source RMSE | Target zero-shot RMSE | Notes |
|---|---|---|---|
| Does pretraining help on the source machine? | |||
| Scratch | 0.811 ± 0.022 | — | five matched seeds |
| Pretrained body + fresh head | 0.813 ± 0.022 | — | p = 0.76 vs scratch |
| Complete pretrained checkpoint | 0.812 ± 0.012 | — | third matched control |
| Does it transfer to an unseen machine? | |||
| Persistence | 1.135 | 0.654 | trivial floor; 1.135 on source validation, 1.128 on the source test split |
| Linear drift | 0.928 | — | trivial reference |
| PatchTST (official, RevIN) | 0.804 | 0.503 | deterministic |
| iTransformer (official, RevIN) | 0.822 | 0.498 | deterministic |
| World model (locked, M03) | 0.822 ± 0.009 | 0.546 | probabilistic (mean and log-variance head); NLL 0.52; single declared pass |
| World model + RevIN (post-lock) | 0.766 ± 0.001 | 0.495 ± 0.004 | same model, instance normalization on; NLL 20.6; three seeds, diagnostic |
Adaptation and scope
A few target windows help, on the pre-lock model. That curve is a diagnostic, not a confirmatory result.
Scroll sideways to read the figure
Support is the leading fraction of each target run; the predictor and head are updated for 50 steps and evaluated on the later, disjoint windows. Zero-shot on this model: MAE 0.401, R² = −0.244; at 10 %, R² = 0.046; at 20 %, MAE 0.299, R² = 0.167. RMSE in z units on the 10 shared channels, lower is better; red dashed: persistence from the sealed pass.
What the numbers support today
- One transfer pair. One source machine, one target machine, seven independent target runs. Broader invariance claims wait for more machines.
- One locked checkpoint, evaluated once. The target number is a single seed; run-level confidence intervals and the few-shot curve on the locked model are still to compute.
- The latent terms are not isolated on the target. Every arm, scratch included, trains with the latent terms, so no target arm measures their contribution.
- Predictive, not decision-theoretic. No policy, no planning, no closed loop: the commands are inputs, and downstream control is future work.
Cite
@misc{bouaziz2026worldmodelscrossmachinecnc,
title = {World Models for Cross-Machine CNC Transfer under Partial Sensor Overlap},
author = {Ayoub Louaye Bouaziz and Matthieu Ostertag and Anton Demasles},
year = {2026},
eprint = {2609.16071},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
doi = {10.48550/arXiv.2609.16071},
url = {https://arxiv.org/abs/2609.16071}
}