Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Predict the meaning of the hidden part, not its pixels
A masked autoencoder hides parts of an image and redraws their pixels exactly, including details nobody could guess, like the exact texture of grass. A JEPA hides parts too, but only predicts a compact description (an embedding) of the hidden parts, produced by a slowly updated copy of its own encoder. The idea is that predicting meaning rather than pixels lets the model ignore unpredictable detail and focus on structure. The demo shows patch masking, the starting point for both approaches.
Predicting in latent space is the basis of world models for planning: a robot needs to predict what matters about the future, not every pixel. V-JEPA brings this to video.
- 1. A JEPA predicts…
- 2. The targets come from…
- 3. JEPA needs hand-designed augmentations?
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Blocks: I-JEPA samples 4 target blocks and one large context block, and removes target patches from the context.
- A context of 12 patches overlapping 5 target patches keeps 7.
- Four target blocks of 3 patches give 12 patches to predict.
- Encoders: the context encoder (a ViT on context patches) is trained; the target encoder (EMA of the context encoder) embeds the full image, and only target-block embeddings are used.
- Predictor: a narrow ViT takes the context embeddings plus positional mask tokens for each target block, and predicts each target patch’s embedding.
- Loss: squared distance between predicted and target embeddings, with the targets fixed. For normalised vectors this is 2 − 2·cos.
- Contrast with MAE: MAE regresses pixels (high-dimensional, includes unpredictable detail); JEPA regresses embeddings (abstract, learned).
- 1. Context patches: 12 with 5 overlapping targets removed:
- 2. Target blocks per image in I-JEPA:
- 3. Latent loss for unit vectors with cos = 0:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.I-JEPA in code
Exercise 1.
- Context and target blocks were built without overlap.
- The latent loss was 0 for aligned embeddings and 2 for orthogonal ones.
Practice.
- The official I-JEPA and V-JEPA code uses ViT encoders: target blocks at scale 0.15–0.2 with aspect ratio 0.75–1.5, a context block at scale 0.85–1.0, an EMA momentum 0.996 → 1, and a narrow predictor.
- Evaluate with linear probes and low-shot fine-tuning. I-JEPA is notably compute-efficient compared with pixel-reconstruction and augmentation-heavy methods.
ctx_idx, tgt_blocks = sample_blocks() # 1 context block, 4 target blocks
z_ctx = context_encoder(patches[:, ctx_idx])
with torch.no_grad():
z_all = target_encoder(patches) # EMA encoder on the full image
loss = sum(F.mse_loss(predictor(z_ctx, ctx_idx, tb), z_all[:, tb]) for tb in tgt_blocks)- 1. I-JEPA's target block scale:
- 2. I-JEPA is notable for…
- 3. The target encoder is updated by…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Why latent targets.
- Pixel-level reconstruction penalises every unpredictable detail, so a model must either spend capacity guessing it or blur. Predicting embeddings lets the target encoder decide what is worth predicting.
- In principle this pushes representations toward predictable, semantic structure (LeCun’s argument for world models).
Collapse risk. Latent targets can be made trivially predictable by collapsing the target encoder. I-JEPA relies, like BYOL, on an EMA target and an asymmetric predictor to avoid this; others add variance or covariance terms (VICReg-style).
What makes it work. The empirical gains rest on (1) semantic target blocks large enough to require context, (2) ViT encoders that treat patches as tokens, and (3) scale. If the data’s dominant variation is nuisance, such as global gain, offset or noise, the target encoder’s embedding is dominated by that nuisance too, and predicting it teaches little about content.
- 1. Pixel reconstruction penalises…
- 2. JEPA avoids collapse with…
- 3. If dominant variation is nuisance, latent targets…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Is predicting embeddings better than predicting pixels?
History.
- Y. LeCun, “A path towards autonomous machine intelligence” (2022), the JEPA proposal.
- M. Assran et al., “Self-supervised learning from images with a joint-embedding predictive architecture” (I-JEPA, CVPR 2023).
- A. Bardes et al., “Revisiting feature prediction for learning visual representations from video” (V-JEPA, 2024).
Exercise 2.
- World: the noisy-signal world from the MAE page (gain × class template + offset + noise; 8 patches).
- Masking: 50% of patches hidden for both models.
- Pixel target (MAE): reconstruct the hidden samples.
- Latent target (JEPA): a predictor maps the context encoding to the EMA target encoder’s normalised embedding of the full signal (1500 steps, learning rate 0.01).
- Evaluation: a nearest-centroid probe, plus the embedding spread as a collapse check.
| target | probe accuracy | embedding spread |
|---|---|---|
| raw signals | 0.628 | — |
| pixels (MAE) | 0.598 | 0.217 |
| embeddings (JEPA) | 0.514 | 0.219 |
- A negative replication: latent prediction did worst, below both pixel prediction and raw signals. Seeds 1 and 2 gave the same order (0.55 < 0.61 < 0.67 and 0.50 < 0.53 < 0.63).
- It is not collapse: JEPA’s embeddings stayed as spread out as MAE’s (0.22).
- Likely reason: the signals’ biggest variations are random gain and offset. The target encoder’s embedding is dominated by them, and predicting them from context, which is easy because gain and offset are global, teaches nothing about class. I-JEPA’s gains rely on semantic image blocks, ViTs and scale, none of which this toy has.
- Lower learning rate: at learning rate 0.003, JEPA scored lower still (0.42).
JEPA in AI, robotics and aerospace
- World models: predicting future latent states for planning and control (V-JEPA-based robot planning).
- Efficient pre-training: representation learning without augmentation engineering, useful for new sensor types.
- Design lesson: latent prediction is only as good as what the target encoder chooses to represent. If nuisance dominates the data, the targets will too.
References
- M. Assran et al. (2023). “Self-supervised learning from images with a joint-embedding predictive architecture.” Proc. CVPR.
- Y. LeCun (2022). “A path towards autonomous machine intelligence.” OpenReview position paper.
- A. Bardes et al. (2024). “Revisiting feature prediction for learning visual representations from video.” arXiv:2404.08471.