← notes Generative & world models

JEPA: predict the embedding, not the pixels

Hide part of an image or video and predict the embedding of the hidden part. The line from I-JEPA to V-JEPA 2-AC, LeJEPA and VL-JEPA: the mechanism, the collapse problem, and what the evidence says about LeCun’s case.

22 min read 7 interactive

Predict the embedding, not the pixels

Self-supervised learning makes its own training task from the data: hide part of a photo, then ask the model about the hidden part. An encoder maps the input to an embedding (a vector per patch or per image); after pre-training, only the encoder is kept for the real tasks. There are three ways to set up the task.

  • Generative (MAE, VideoMAE, GPT): a decoder redraws the hidden part, and the loss compares pixels or tokens.
  • Joint embedding (SimCLR, CLIP, DINO, VICReg): two augmented views of one image go through encoders, and their embeddings must agree. The hand-made augmentations decide what the encoder learns to ignore.
  • JEPA (LeCun, 2022): an xx-encoder reads the visible part, a yy-encoder reads the hidden part, and a predictor guesses yy‘s embedding from xx‘s.
sx=Encx(x),sy=Ency(y),E(x,y,z)=D(sy, Pred(sx,z))s_x = \mathrm{Enc}_x(x),\qquad s_y = \mathrm{Enc}_y(y),\qquad E(x,y,z) = D\big(s_y,\ \mathrm{Pred}(s_x, z)\big)

EE is an energy: low means ”yy fits xx”. The variable zz was meant to carry the uncertain part of the future (does the car turn left or right?). In I-JEPA and V-JEPA, zz is only the set of positions of the hidden patches: it says where to predict.

animation

Where the loss lives in each family

Switch the family. Press Play, or click a step in the list.

Family
    loss computed in
    needs
    main failure
    forward data gradient EMA weight copy
    Generative models compare pixels and need a decoder. Joint-embedding models compare embeddings of two views. JEPA compares a predicted embedding with a target embedding, and the gradient stops at the target side.

    The argument has a limit. If the encoder keeps the ball position, a deterministic latent predictor again predicts the average. Latent prediction removes the blur only for details that the encoder drops. I-JEPA, V-JEPA and V-JEPA 2 have no zz for uncertainty and rely on “drop what is unpredictable”.

    Collapse, and how to block it

    If both encoders output the same constant vector for every input, “predict the target embedding” has zero loss and the representation is useless. This is complete collapse. In dimensional collapse the embeddings vary but only inside a low-dimensional subspace.

    Contrastive methods make collapse expensive with negatives: other samples in the batch must stay far away. With four images on the unit circle, InfoNCE at temperature 0.5 is 0.339 for a healthy row and log⁡4=1.386\log 4 = 1.386 when everything collapses. The price is many negatives. JEPA avoids negatives and uses one of two families of tools:

    1. Architectural asymmetry (BYOL, DINO, data2vec, I-JEPA, V-JEPA): a predictor on the online side, a stop-gradient on the target side, and a target encoder whose weights follow the online encoder by an exponential moving average (EMA), θˉ←mθˉ+(1−m)θ\bar\theta \leftarrow m\bar\theta + (1-m)\theta. With m=0.996m = 0.996 the target remembers about 1/(1−m)=2501/(1-m) = 250 steps. There is no proof that this prevents collapse; it works in practice and depends on the EMA schedule, the predictor size and the learning rate.
    2. Explicit regularisers (VICReg, Barlow Twins, LeJEPA): a loss term on the batch statistics that is large for a collapsed batch. VICReg’s variance term asks for a standard deviation of at least 1 in every dimension; its covariance term penalises correlated dimensions.

    playground

    Make a joint-embedding model collapse, then stop it

    With all parts off, the run below has already collapsed. Turn on parts of the recipe, then press Reset and Play.

    Recipe parts
    online embedding f(x) target embedding (EMA copy) start position
    state
    step
    prediction loss
    target memory ≈ 1/(1−m)
    Toy numbers: a linear 2-D encoder trained in your browser on two noisy views of 64 points. Without help, the embeddings shrink to a point. The variance term alone leaves a line (dimensional collapse); covariance fixes that. Stop-gradient alone collapses too, and a slow EMA only slows it. Stop-gradient plus a predictor keeps the spread at every momentum in this toy.

    I-JEPA: hide four blocks, describe them

    I-JEPA (Assran et al., CVPR 2023) is the first working JEPA for images. A 2242224^2 image becomes a 16×1616 \times 16 grid of patches for ViT-H/14. The context encoder (a ViT) sees only the context patches. The target encoder, an EMA copy with momentum 0.996→1.00.996 \to 1.0, sees the whole image, and the four target blocks are cut from its output. Masking the output instead of the input matters: 67.3 vs 56.1 in the paper’s ablation.

    The predictor is a narrow ViT (width 384 for every model size). Its input is the context tokens plus one mask token per target patch: a shared learned vector plus the positional embedding of that patch. The loss averages the squared L2 distance over the M=4M = 4 blocks:

    L=1M∑i=1M ∑j∈Bi∥s^yj−syj∥22\mathcal L = \frac{1}{M}\sum_{i=1}^{M}\ \sum_{j \in B_i} \big\| \hat s_{y_j} - s_{y_j} \big\|_2^2

    Each target block covers 15–20% of the image with aspect ratio 0.75–1.5. The context block covers 85–100% and loses every patch that lies in a target. Targets must be large enough to be semantic, and the context must be spread out enough to be informative.

    playground

    Paint an I-JEPA mask

    Drag a numbered target block. Change the number of blocks or the block size, or switch the strategy.

    Masking

    What each network receives

    context encoder
    target encoder
    256 (all)
    predictor queries

    context, % of image
    IN-1K 1% labels, top-1
    context (visible to the context encoder) target (predict its embedding) in 2+ targets unused
    The sampler follows the released multiblock.py: one random number r sets both scale and aspect ratio. The top-1 values are the paper's ablations (ViT-B/16, 300 epochs, ImageNet with 1% labels): random and single-block masks almost fail. For those two, the context rule (the rest of the image) is assumed; the source does not state it.

    Over 200 batches of the official sampler, the context had 86 patches on average (about 34% of the image), and the four targets covered about 113 patches. Three more ablations explain the design. Predicting representations beats predicting pixels by 26 points (66.9 vs 40.7, ViT-L), although the pixel run trained longer. A narrow predictor beats a wide one (70.7 at width 384 vs 68.4 at 1024): a weak predictor forces the encoder to do the work. One to four target blocks give 9.0, 22.0, 48.5 and 54.2.

    The headline: ViT-H/14 reaches 79.3% ImageNet linear probe in under 72 hours on 16 A100 GPUs, more than 10× less compute than MAE ViT-H/14. The comparison is fair only against augmentation-free methods. iBOT is better on all three transfer sets, MAE wins on Clevr counting (90.5 vs 86.7), and after full fine-tuning MAE is still ahead (87.8 vs 87.1).

    V-JEPA: tubes through time

    V-JEPA (Bardes et al., 2024) plays the same game on video. A clip has 16 frames with stride 4 (about 2.1 s). A tubelet of 2×16×162 \times 16 \times 16 pixels becomes one token, so a 2242224^2 clip gives 8×14×14=15688 \times 14 \times 14 = 1568 tokens. Each clip gets two masks: short-range (8 blocks of 15% each) and long-range (2 blocks of 70% each). Each mask is a tube: the same 2-D hole in every time slot. In a simulation of the official collator, the context encoder sees 367 tokens (76.6% masked) or 109 tokens (93.1% masked).

    The loss is L1 against the EMA target (m=0.998→1.0m = 0.998 \to 1.0), with Δy\Delta_y the positions of the hidden tokens:

    min⁡θ,ϕ ∥Pϕ(Eθ(x),Δy)−sg(Eˉθ(y))∥1\min_{\theta,\phi}\ \Big\| P_\phi\big(E_\theta(x), \Delta_y\big) - \mathrm{sg}\big(\bar E_\theta(y)\big) \Big\|_1

    The paper’s argument for L1: an optimal L1 predictor outputs the conditional median, so the encoder is pushed to keep the information that makes the hidden part predictable. This explains what is learned when training works, not why it does not collapse.

    animation

    Tube masks through time

    Press Play to move through the 8 time slots. Switch the mask, then try Per frame.

    Mask
    Through time
    visible: context encoder input hidden: predict its embedding moving object
    visible of 1568
    hidden
    copy from slot t±1
    visible neighbour in slot
    K400 frozen, paper
    With tubes, no hidden token can be copied from the same spot one slot earlier or later. Random tubes hide 90% but scatter the visible tokens, so about a third of the hidden tokens touch a visible one; they fail (K400 51.5 vs 72.9). Causal masks (predict later slots) are also worse: V-JEPA is a space–time inpainting model in feature space. The moving object is a toy; Per frame is not a paper ablation. Assumed, not stated in the source: the block aspect range 0.75–1.5, and Causal drawn as slots 1–3 (6 frames) visible.

    V-JEPA is strong where motion matters and weaker where appearance matters. On Something-Something v2 (“pushing something from left to right”), frozen V-JEPA ViT-H/16 at 384 px reaches 72.2, vs 50.6 for DINOv2 and 34.8 for OpenCLIP. On ImageNet, Places and iNat21 it is 6–16 points below DINOv2. It saw about 270M samples, vs 1.9B for DINOv2 and 39B for OpenCLIP.

    Two caveats. The features need an attentive probe (a cross-attention block with a learned query over all frozen tokens): with average pooling, K400 drops from 73.7 to 56.7. And the gain of feature targets over pixel targets is in frozen quality: +5.1 on K400 frozen, but only +0.2 after fine-tuning (85.6 vs 85.4).

    V-JEPA 2 and 2-AC: watch, then act

    V-JEPA 2 (Assran et al., 2025) keeps the V-JEPA objective and scales four things: data (VideoMix22M, more than 1M hours), model (ViT-g, 1B parameters), training length (90K → 252K iterations), and a final phase with 64 frames at 384 px. Together they add 4.0 points on a 6-task average. Running only the last 12K iterations at the expensive resolution cuts GPU time by 8.4×. The frozen encoder reaches 77.3 on SSv2 and 39.7 recall@5 on EPIC-Kitchens-100 action anticipation, vs 27.6 for the previous best. Connected to Llama 3.1 8B, the encoder that never saw text gives the best scores on 5 of 7 video-QA benchmarks.

    V-JEPA 2-AC is the second stage. The encoder is frozen. A new 300M-parameter predictor (24 layers, block-causal) learns from under 62 hours of DROID robot video: for each time step it gets an action token, a state token (7 numbers: position, Euler angles, gripper) and the 256 frozen patch features, and it predicts the features of the next frame. It trains with teacher forcing over 15 steps plus a 2-step rollout on its own predictions. Because the targets come from a frozen encoder, the predictor cannot move them, and collapse is impossible by construction.

    To plan, the robot gets a goal image xgx_g and scores a candidate action sequence by the distance between the predicted and the goal embedding:

    E(a^1:T)=∥P(a^1:T; sk,zk)−zg∥1,zg=E(xg)\mathcal E(\hat a_{1:T}) = \big\| P(\hat a_{1:T};\ s_k, z_k) - z_g \big\|_1,\qquad z_g = E(x_g)

    It minimises E\mathcal E with the cross-entropy method (CEM: sample action sequences, keep the best, refit a Gaussian, repeat), executes the first action, observes, and plans again. The paper uses 800 samples, 10 iterations, the top 10 and horizon T=1T = 1; one action takes 16 s on an RTX 4090.

    animation

    Plan with a world model, one CEM step at a time

    Press Step to walk through sample, score, keep the best, refit and execute. Drag the goal.

    1. encode the current frame: zk = E(xk)
    2. sample candidate actions â ~ N(μ, σ²)
    3. roll the predictor: ẑ = P(â; sk, zk)
    4. energy ‖ẑ − zgoal‖1 for each candidate
    5. keep the best, refit μ and σ
    6. execute the first action, observe, re-plan

    gripper state s predicted state for one candidate goal (drag it) action box ±0.075
    MPC step · CEM iter
    best candidate energy
    energy of state now
    Toy numbers from the walkthrough's worked example: world model s′ = s + a, energy = L1 distance, 16 samples, top 4, 3 iterations, actions clipped to ±0.075 m. The default goal needs two actions because 0.10 > 0.075. In V-JEPA 2-AC the state is a 16×16×1408 feature map and s + a is the 300M-parameter predictor.

    Zero-shot, in two labs that are not in DROID (10 trials per task):

    MethodReachGrasp cupPick & place cupPick & place box
    Octo (behaviour cloning)100%15%15%10%
    V-JEPA 2-AC100%65%80%65%

    Against Cosmos, a 7B video-diffusion world model fine-tuned on DROID, V-JEPA 2-AC needs 16 s instead of 4 minutes per action, and reaches 80% / 50% on pick-and-place where Cosmos reaches 0%. The limits are stated by the authors: pick-and-place needs hand-given sub-goal images, the horizon is short because rollout errors accumulate, goals are images and not language, and the predicted action directions rotate when the camera moves.

    V-JEPA 2.1 (2026) fixes the dense features. V-JEPA 2 grades only the hidden tokens, so the visible tokens become scratch space and their per-patch features are messy. A context loss on the visible tokens, plus prediction at four encoder levels, lifts ADE20K segmentation from 22.2 to 47.9 mIoU and NYUv2 depth RMSE from 0.682 to 0.307. The context loss alone hurts global tasks by 10 points; the deep supervision restores them.

    LeJEPA: a shape rule instead of a slow teacher

    LeJEPA (Balestriero and LeCun, 2025) asks what a good cloud of embeddings looks like. For a probe trained on frozen features for an unknown task, the paper proves that an isotropic Gaussian is optimal: a stretched cloud raises the bias or the variance of linear probes, and among clouds with a fixed covariance budget the isotropic Gaussian minimises the bias of k-NN and kernel probes (under smoothness assumptions). The theory says nothing about fine-tuning.

    Testing whether a KK-dimensional cloud is Gaussian is hard; testing a 1-D sample is easy. By the Cramér–Wold idea, two distributions are equal if all their 1-D projections are equal. SIGReg draws MM random unit directions ama_m, projects the batch to un,m=am⊤znu_{n,m} = a_m^\top z_n, and compares the empirical characteristic function with that of N(0,1)\mathcal N(0,1) by the Epps–Pulley statistic:

    EPm=N∫∣φ^m(t)−e−t2/2∣2e−t2/2 dt,φ^m(t)=1N∑ne itun,m\mathrm{EP}_m = N \int \big| \hat\varphi_m(t) - e^{-t^2/2} \big|^2 e^{-t^2/2}\, dt,\qquad \hat\varphi_m(t) = \frac{1}{N}\sum_n e^{\,i t u_{n,m}}

    SIGReg is the mean of EPm\mathrm{EP}_m over directions. The characteristic function is a plain average, so it is differentiable, linear in the batch size, and needs one all-reduce across GPUs. The full loss mixes a prediction term (every view’s embedding should be close to the mean of the global views) with SIGReg, weighted by a single knob λ\lambda (default 0.05). There is no EMA, no stop-gradient and no learned predictor.

    playground

    SIGReg on a 2-D cloud

    Drag the violet handle to rotate the slice. Pick a start cloud and press Optimise.

    Start cloud
    embedding slice direction a (drag the handle) N(0, 1) target
    EP on this slice
    SIGReg, 64 slices
    std on this slice
    gradient steps
    Toy numbers: 256 points in 2-D, optimised directly with the paper's Epps–Pulley formula (17 points on [−5, 5]). Every collapse shape scores high on some slice; after optimisation every slice looks like N(0, 1). In LeJEPA the gradient reaches the encoder, not the points.

    In the walkthrough’s 8-D check (N=512N = 512), SIGReg is 1.16 for N(0,I)\mathcal N(0, I), 35.1 with one stretched direction, 142.0 for dimensional collapse, 201.1 for a shrunk Gaussian and 313.4 for complete collapse. A uniform cloud with the same variance scores 1.10: the statistic has a noise floor of about 1, so at normal batch sizes SIGReg mainly enforces “centred, unit variance, isotropic, not collapsed”.

    LeJEPA reaches 77.1% ImageNet linear probe with ViT-L after 100 epochs. Its most practical result: the training loss tracks downstream accuracy (Spearman correlation about 85%, about 99% after rescaling by λ−0.4\lambda^{-0.4}), so you can select models without labels. In the I/V-JEPA recipe the loss is measured against a moving EMA target and says little. Caveats: the theory justifies the regulariser, not the prediction task, and the views are crops again, the augmentation bias that I-JEPA wanted to remove. Structurally, LeJEPA is close to VICReg with a better regulariser.

    VL-JEPA, and the line at a glance

    VL-JEPA (2025) moves the JEPA idea to the output of a vision-language model. A normal VLM is trained to reproduce the exact words of the reference answer, so “the room becomes dark” is punished against “the man turns off the light”. VL-JEPA predicts the embedding of the answer instead. The frozen V-JEPA 2 ViT-L reads the video, a predictor built from the last 8 layers of Llama-3.2-1B reads the video features and the query, and EmbeddingGemma-300M encodes the target answer. The loss is InfoNCE in a 1536-d space; a small decoder turns the embedding into text only when needed.

    In a controlled test (same frozen encoder, same data, only the objective differs), VL-JEPA reaches 14.8 CIDEr and 41.0% top-5 after 15M samples, vs 7.1 and 27.2% for a token-predicting VLM with twice the trainable parameters. On streaming video, decoding only where the embedding changes needs 2.85× fewer decoding operations at the same CIDEr. Two limits: its VQA is discriminative (pick the closest candidate answer), and its anti-collapse term is InfoNCE with batch negatives, the contrastive tool that LeCun’s position paper argues against.

    playground

    One template, eight fillings

    Click a paper. Marked rows changed from the paper it builds on.

    The x / y / z / target-encoder / anti-collapse / distance slots of the JEPA definition, filled by each paper of the line. The scaling steps (V-JEPA 2, 2.1) change few slots; the new uses (2-AC, LeJEPA, VL-JEPA) refill almost all of them.

    LeCun’s case, and what the evidence supports

    LeCun’s bet: intelligence starts with a model of how the world behaves, learned mostly by watching, and a system should act by planning with that model. His arguments come from the 2022 position paper and from talks; they are arguments, not established facts.

    • Bandwidth. A 4-year-old has about 16,000 waking hours at about 20 MB/s on the optic nerves, about 1.2×10151.2 \times 10^{15} bytes. An LLM reads about 101310^{13} tokens, 2×10132 \times 10^{13} bytes: a ratio of about 50×. With 2 MB/s the ratio drops to about 5×. Counter-point: video is very redundant, text is dense, and bytes are not information.
    • Generative prediction is the wrong target for the world. A softmax over a vocabulary works for text; a continuous space of next frames has no such distribution, and L2 regression blurs. He does not say generative models fail for text.
    • Errors compound. If each token leaves the correct set with independent probability ee, an nn-token answer is correct with probability (1−e)n(1-e)^n: 0.37 for e=0.01e = 0.01, n=100n = 100. Counter-points: errors are not independent, models correct themselves, and reasoning models improved strongly in 2024–2026. V-JEPA 2-AC has the same problem and plans with T=1T = 1.
    • LLMs do not plan. An LLM spends fixed compute per token; his architecture reasons by optimisation under a world model. Recent “thinking” modes partly answer this with search in token space.
    ClaimEvidence forLimits
    Latent targets beat pixel targetsI-JEPA 66.9 vs 40.7; V-JEPA K400 frozen 73.7 vs 68.6nearly equal after fine-tuning (85.6 vs 85.4)
    Better motion understandingSSv2: V-JEPA 2 77.3 vs PE-core 55.4, SigLIP2 49.9appearance tasks below image models
    A latent world model can planpick-and-place 65–80% vs Octo 10–15%; 16 s vs 4 min (Cosmos)horizon 1, sub-goal images, camera-sensitive
    No hand-made augmentationsI-JEPA, V-JEPA use masking onlymasks are a hand-made prior; LeJEPA uses crops
    Regularised beats contrastiveLeJEPA trains stably without negativesVL-JEPA uses InfoNCE

    Weaknesses of the method itself: collapse is managed, not solved, in I/V-JEPA (V-JEPA 2 and 2.1 still use EMA); “discard the unpredictable” also discards scene text and fine texture; there is no real latent zz for multiple futures; and without a decoder you cannot look at what the model predicts. A JEPA has no language and no stored knowledge: every JEPA system in this note that answers questions uses an LLM.