A Lightweight Library for Energy-Based Joint-Embedding Predictive Architectures
Basile Terver, Randall Balestriero, Megi Dervishi, David Fan, Quentin Garrido, Tushar Nagarajan, Koustuv Sinha, Wancong Zhang, Mike Rabbat, Yann LeCun, Amir Bar
TL;DR
EB-JEPA presents a lightweight, open-source library for learning representations and world models using Joint-Embedding Predictive Architectures, which train by predicting in a learned representation space rather than reconstructing pixels. The framework unifies an energy-based objective with regularization to prevent collapse, covering image representation learning (Image-JEPA), video prediction (Video-JEPA), and action-conditioned world modeling (AC-video-JEPA). The authors implement modular components (encoders, predictors, regularizers, planners) and demonstrate single-GPU training on CIFAR-10, Moving MNIST, and Two Rooms, achieving strong signals such as about 91% linear probing accuracy on CIFAR-10 and 97% planning success. Through exhaustive ablations, they show the critical role of all regularizers (variance, covariance, temporal similarity, inverse dynamics) and provide a practical template for rapid JEPA experimentation at small scale.
Abstract
We present EB-JEPA, an open-source library for learning representations and world models using Joint-Embedding Predictive Architectures (JEPAs). JEPAs learn to predict in representation space rather than pixel space, avoiding the pitfalls of generative modeling while capturing semantically meaningful features suitable for downstream tasks. Our library provides modular, self-contained implementations that illustrate how representation learning techniques developed for image-level self-supervised learning can transfer to video, where temporal dynamics add complexity, and ultimately to action-conditioned world models, where the model must additionally learn to predict the effects of control inputs. Each example is designed for single-GPU training within a few hours, making energy-based self-supervised learning accessible for research and education. We provide ablations of JEA components on CIFAR-10. Probing these representations yields 91% accuracy, indicating that the model learns useful features. Extending to video, we include a multi-step prediction example on Moving MNIST that demonstrates how the same principles scale to temporal modeling. Finally, we show how these representations can drive action-conditioned world models, achieving a 97% planning success rate on the Two Rooms navigation task. Comprehensive ablations reveal the critical importance of each regularization component for preventing representation collapse. Code is available at https://github.com/facebookresearch/eb_jepa.
