From 83f97d72ad067855bc89a1b74b4aff11d4dfdf0c Mon Sep 17 00:00:00 2001 From: Lucas Maes <43337476+lucas-maes@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:56:21 -0400 Subject: [PATCH] Initial commit --- LICENSE | 21 +++ README.md | 127 ++++++++++++++ assets/lewm.gif | Bin 0 -> 5960159 bytes config/eval/cube.yaml | 61 +++++++ config/eval/launcher/local.yaml | 7 + config/eval/pusht.yaml | 48 ++++++ config/eval/reacher.yaml | 50 ++++++ config/eval/solver/adam.yaml | 13 ++ config/eval/solver/cem.yaml | 9 + config/eval/tworoom.yaml | 47 +++++ config/train/data/dmc.yaml | 11 ++ config/train/data/ogb.yaml | 13 ++ config/train/data/pusht.yaml | 13 ++ config/train/data/tworoom.yaml | 11 ++ config/train/launcher/local.yaml | 11 ++ config/train/lewm.yaml | 64 +++++++ eval.py | 171 +++++++++++++++++++ jepa.py | 153 +++++++++++++++++ module.py | 285 +++++++++++++++++++++++++++++++ train.py | 183 ++++++++++++++++++++ utils.py | 57 +++++++ 21 files changed, 1355 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 assets/lewm.gif create mode 100644 config/eval/cube.yaml create mode 100644 config/eval/launcher/local.yaml create mode 100644 config/eval/pusht.yaml create mode 100644 config/eval/reacher.yaml create mode 100644 config/eval/solver/adam.yaml create mode 100644 config/eval/solver/cem.yaml create mode 100644 config/eval/tworoom.yaml create mode 100644 config/train/data/dmc.yaml create mode 100644 config/train/data/ogb.yaml create mode 100644 config/train/data/pusht.yaml create mode 100644 config/train/data/tworoom.yaml create mode 100644 config/train/launcher/local.yaml create mode 100644 config/train/lewm.yaml create mode 100644 eval.py create mode 100644 jepa.py create mode 100644 module.py create mode 100644 train.py create mode 100644 utils.py diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9a0803f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Lucas Maes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..55b0396 --- /dev/null +++ b/README.md @@ -0,0 +1,127 @@ + +# LeWorldModel +### Stable End-to-End Joint-Embedding Predictive Architecture from Pixels + +[Lucas Maes*](https://x.com/lucasmaes_), [Quentin Le Lidec*](https://quentinll.github.io/), [Damien Scieur](https://scholar.google.com/citations?user=hNscQzgAAAAJ&hl=fr), [Yann LeCun](https://yann.lecun.com/) and [Randall Balestriero](https://randallbalestriero.github.io/) + +**Abstract:** Joint Embedding Predictive Architectures (JEPAs) offer a compelling framework for learning world models in compact latent spaces, yet existing methods remain fragile, relying on complex multi-term losses, exponential moving averages, pretrained encoders, or auxiliary supervision to avoid representation collapse. In this work, we introduce LeWorldModel (LeWM), the first JEPA that trains stably end-to-end from raw pixels using only two loss terms: a next-embedding prediction loss and a regularizer enforcing Gaussian-distributed latent embeddings. This reduces tunable loss hyperparameters from six to one compared to the only existing end-to-end alternative. With ~15M parameters trainable on a single GPU in a few hours, LeWM plans up to 48× faster than foundation-model-based world models while remaining competitive across diverse 2D and 3D control tasks. Beyond control, we show that LeWM's latent space encodes meaningful physical structure through probing of physical quantities. Surprise evaluation confirms that the model reliably detects physically implausible events. + +
+ [ Paper | Data | Website ] +
+ +
+
+
PKZ}%I` |=jTg9x1a50tTr&GaC_rm1!f* EioqehYC;ai?x1YZu6jkw{mNvym4PI8bEa~(@|JyZuG2Iwnx>Vwa@R8L
zV!gvUpR-gzqo2U}M-o~C+h*o~$A>JNWEetK&5*(t3g&3PMOD^VU0UK#V@mBI=LrIy
z1fC}tZ0188%e-C66&R=u9OD3}NT
y%ZG|nVmAd-jWU2)O{N5qFl*gR+;MQQGQML$z
z?cjBrH3L?n_9jOzjU3C`x
`IqWaHwm+xhrm
bB?)}_a;t)Tg#ya?
zuqcD6)VG5n$~c=|L2D{*+|f!QlePDklEk_O#O*1ZN4K>cFw5s44s7M>jTh2S_H(*`XKI;0Pc}W3*ZVUi+`R^yFG99D
zBUO(>Wr4=MYa!8Vt_~??ar71j!MY(7(x@8Gka}FjGO}G7(j8XoTUa#a5w`=VIk`v+
z(W$XbaW!~cmv@*$Yf^ZBDmiWgU!PlF3X`VdZxH_}%eEn&X<4WJvr^Q{g!JH!g|&|U
zte7lX`I)TxgXz!
zAD&P-n0L#wKTS=}*kpV?@4{d8+U_z0`MiFfX9Y(MNYuw=ntEeX7;!wxmM*?jS7u1A
z?BFr!C#7=Ji0?d%m^DdFDYCfhk}tP9EcR&VMIRMN+Z1N`E5*&fnzk+l1$rh|t{gnZ
zTgQI8WxsTz+OZenO#xS{p?rVP*nUbk?-k*fq&3~P>HNH+rn&K9q<*eUn(6Zf*h!jL
zk{(!JQm7OL`t7FV=
1wn)Uw^)=
zyP>P95N!Ijb_kO^|6#Ysc6op)+()v}y)Rc~Ym{p!+&2RuI=s7xM(i0bwx_cSm`m2p
z-0hr?%qlC;EeBt&yVf2l{PohzTT
9R(WEf{h_o#BEm
$Q)WVGx#8LzON&?9Q`VZAf%Jh;*Dn5su^UkfrA+5#(?IvxL5*=Ybq2x`?
ziBhwsWkT`UvCZzPjh~uZEQ2YeaEW^rhLKr7bKe}`#GKRet}NP*9FIX{ri5g-rC+Df
zUeRLK{FtBkM1?go_BFSima4ER