LeWorldModel (LeWM) is a Joint-Embedding Predictive Architecture (JEPA) world model that learns directly from raw pixels with a single tunable hyperparameter. It is the first end-to-end JEPA that trains stably without:
Stop-gradient / EMA mechanisms
Pre-trained encoders (e.g., DINOv2)
Complex multi-term losses (e.g., VICReg variants)
Key Innovations
Feature
LeWM
Prior work (PLDM)
Loss terms
2 (prediction + SIGReg)
7 (prediction + 6 regularizers)
Tunable hyperparameters
1 (lambda)
6 (grid search O(n^6))
End-to-end trainable
Yes
Partial (fragile)
Planning speed
48x faster than DINO-WM
Comparable
Params
~18M
Similar
Architecture (from paper section 3.1 & Appendix D)
Raw Pixels (224x224) ---> ViT-Tiny Encoder ---> [CLS] + MLP+BN ---> Latent z_t
| (192-dim)
|
v
+-------------------+
| AR Predictor | <--- Actions (AdaLN-zero)
| 6 layers, 16h |
| Causal masking |
+-------------------+
|
v
Predicted z_{t+1}
|
v
MSE(z_{t+1}, pred) + lambda * SIGReg(z)
Predictor: 6-layer transformer with AdaLN-zero action conditioning, causal temporal masking
SIGReg: Sketch Isotropic Gaussian Regularizer - anti-collapse via Epps-Pulley test on random 1-D projections
Planner: Cross-Entropy Method (CEM) in latent space for goal-conditioned control
SIGReg: The Anti-Collapse Engine
SIGReg is the critical component that makes stable end-to-end training possible.
Problem: Prediction-only loss causes representation collapse (encoder maps everything to a constant).
Solution: SIGReg forces latent embeddings to match an isotropic Gaussian N(0, I).
How it works:
Collect latent tensor Z in R^(TxBxd) (time x batch x dim)
Sample M=1024 random unit-norm directions u^(m) on the hypersphere S^(d-1)
Project: h^(m) = Z dot u^(m) -> (T, B) 1-D marginals
Apply the Epps-Pulley test statistic T(h^(m)) using the characteristic function
Trapezoid quadrature on nodes uniformly in [0, 3] with weighting w(t) = exp(-t^2/2)
By the Cramer-Wold theorem: matching all 1-D marginals <=> matching the full joint distribution
Key insight: The projector uses BatchNorm1d (not LayerNorm) because the ViT final layer already applies LayerNorm - this is essential for SIGReg optimization.
Training
Free GPU Training (Google Colab T4)
python
1# In a Colab notebook with GPU runtime enabled:2!pip install -q transformers einops huggingface_hub matplotlib numpy tqdm
34# Download implementation5from huggingface_hub import hf_hub_download
6hf_hub_download("ar27111994/lewm-implementation","lewm_model.py", local_dir="/content")7hf_hub_download("ar27111994/lewm-implementation","lewm_train.py", local_dir="/content")89# Train with synthetic data (no 12GB download needed)10!python /content/lewm_train.py --use_synthetic \
11--n_episodes 2000--epochs 10--batch_size 128 \
12--lambd 0.1--history_size 3--seq_len 4 \
13--frameskip 5--action_dim 2--output_dir /content/drive/MyDrive/lewm
See COLAB_GUIDE.md for the full notebook, troubleshooting, and real dataset download instructions.
SIGReg Explorer: Adjust collapse level and see real-time distributional analysis
CEM Planning: Visualize Cross-Entropy Method convergence
Key Results: Paper results and hyperparameters
Citation
bibtex
1@article{maes_lelidec2026lewm,
2 title={LeWorldModel: Stable End-to-End Joint-Embedding Predictive Architecture from Pixels},
3 author={Maes, Lucas and Le Lidec, Quentin and Scieur, Damien and LeCun, Yann and Balestriero, Randall},
4 journal={arXiv preprint},
5 year={2026}
6}
License
MIT (same as the official repository).
This implementation is self-contained in standard PyTorch + transformers + einops, with no dependency on the private stable-pretraining or stable-worldmodel packages for the core model logic.
Generated by ML Intern
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.