TL;DR
A joint-embedding predictive architecture (JEPA) has two encoders. One encodes a visible part of an input, a second encodes the full input and supplies the embeddings of a hidden part, and a small predictor tries to match those embeddings from the visible part's encoding. The loss is computed between embeddings, not between raw pixels or tokens. That lets the model ignore detail that does not matter for the task, and it avoids the need for hand-made data augmentations.
Where you'll see it: in self-supervised image pretraining, where I-JEPA learns image features by predicting the embeddings of masked blocks from a context block, and in world models that predict the next state in a learned representation.
Intuition
Suppose you are shown a photo of a dog with its lower half hidden. A useful guess is "there are legs and a tail here, and the body continues behind the hidden part." You do not need to guess the exact fur pattern or the exact pixel colours of the hidden grass. What you predict is the high-level content of the hidden region.
Generative methods make the model fill in pixels. A masked autoencoder, for example, reconstructs missing patches exactly. Most of its capacity goes into texture and noise, which carry little meaning. A joint-embedding method instead compares the predicted embedding with an embedding of the target. The target embedding is produced by another network, so the comparison happens in a space where only the meaningful content is kept.
The older family of joint-embedding methods, which grew out of siamese networks (Bromley and colleagues, 1993), learns by making two augmented views of one image produce similar embeddings. That needs carefully chosen augmentations, such as crops and colour jitter, to say which differences should be ignored. JEPA replaces the augmentations with a prediction task: from one part of the image, predict the representation of another part of the same image. The masking itself defines what should be ignored.
flowchart LR X[Context block: visible patches] --> CE[Context encoder] CE --> P[Predictor, conditioned on target positions] Y[Target block: hidden patches] --> TE[Target encoder, updated by moving average] P --> L[Loss in embedding space] TE --> L
The math
Setting
Let be the context and the target, both taken from the same input (an image, a video, or another signal). A context encoder maps to a representation . A target encoder maps the full input to per-patch representations . A predictor takes , together with a conditioning variable that says where the target is, and outputs a prediction .
The conditioning variable matters. Without it, the predictor has no way to know which hidden region it is supposed to fill in. In I-JEPA, is a set of learnable mask tokens, one per hidden patch, each with a positional embedding added. This is the same idea as the mask tokens in masked autoencoders, but the output is compared to embeddings rather than pixels.
The objective
The training loss compares predictions and targets in representation space:
Here is the number of target blocks, is the set of patch indices in block , and is the target embedding of patch in that block. The loss averages over the blocks and sums squared errors over the patches in each block. Gradients flow into the context encoder and the predictor . They do not flow into the target encoder.
The target encoder and collapse
If both encoders and the predictor were trained freely with this loss, the easiest solution would be to map every input to the same constant vector. The loss would then be zero, and the representation would carry no information. This is the failure described in Representation Collapse. JEPA avoids it with two measures.
First, the target encoder is not trained by gradients. Its weights are an exponential moving average of the context encoder weights. With momentum , the update after each step is
Second, the targets are obtained by masking the output of the target encoder, not its input. The target encoder sees the whole image and produces high-level patch embeddings, and the target blocks are selected from those embeddings. The context encoder sees only the visible patches. This asymmetry is part of the design, not an accident of implementation.
In I-JEPA the momentum starts at and rises linearly to over training, so the target changes more slowly as training goes on. Setting would freeze the target encoder entirely.
Masking used in I-JEPA
The paper samples four target blocks with a scale of to of the image and aspect ratio between and . It samples one context block with a scale of to , then removes any patches of the context block that overlap a target block. Large target blocks force the predictor to produce semantic content, and a large, spatially spread context block gives enough information to do it. The paper's ablations show that both choices matter for the quality of the features.
Worked examples
Let one weight of the target encoder be and the matching context encoder weight, after a gradient step, be . Use the first-stage momentum .
- Compute the old-weight term: .
- Compute the new-weight term: .
- Add them: .
Interpretation: the target weight moved by , which is percent of the gap to the context weight. The target lags far behind the context encoder, so it is a slowly changing reference. That slowness is what keeps the regression target from chasing the prediction.
Take one target block with two patches. The predictor outputs and . The target encoder gives and . Use one block, so .
- Patch 1 difference: . Squared norm .
- Patch 2 difference: . Squared norm .
- Sum over the block: .
Interpretation: the loss is 0.14. The second patch is predicted almost exactly, while the first has its error in the second coordinate. Notice that the loss never looks at the pixels of either patch. If the encoders and predictor all mapped every input to the same vector, this loss would fall to zero, which is exactly why the momentum target and the asymmetric design are needed.
- momentum m
Tradeoffs and failure modes
| Situation | Problem | Better choice |
|---|---|---|
| Task needs fine pixel detail (exact texture, precise reconstruction) | Embedding-space loss discards that detail | A generative or reconstruction method such as [[masked-autoencoder |
| Target encoder updated by gradients | Representations collapse to a constant | Momentum (EMA) target encoder, as in I-JEPA |
| Context block too small or too uninformative | The predictor has too little to work with, and the task becomes guessing | Keep the context block large and spread across the image |
| Target blocks too small | The targets are local texture, and the features are weaker for semantic tasks | Sample larger target blocks, as the paper's ablations suggest |
| Masking the input instead of the target-encoder output | The target embeddings are less semantic | Mask the output of the target encoder |
| Domain with no natural predictable structure | There is no clear "hidden part" to predict | Consider a [[contrastive-learning |
JEPA's claims are about the representations it learns for downstream tasks. The paper reports linear-probe and low-shot results on ImageNet, and it compares them with methods that rely on augmentations and with pixel-reconstruction methods. It does not show that the representations are a complete world model, and a reader should not take the name as a claim about that.
History
The term comes from Yann LeCun's 2022 position paper on autonomous machine intelligence, which the I-JEPA paper cites as its source for the architecture. The core ideas of joint embedding go back much further. Siamese networks, which compare two inputs in an embedding space, were used in the early 1990s, for example for signature verification (Bromley and colleagues, 1993). Later self-supervised methods on images used the same comparison with hand-made augmentations to define which inputs should match.
I-JEPA, by Assran and colleagues, appeared as an arXiv preprint in 2023 (arXiv:2301.08243). The paper applies the architecture to images and compares its features, learned without hand-crafted view augmentations, against masked autoencoders, data2vec and augmentation-based methods on ImageNet.
Check yourself
QuestionRecall: what is the difference between a joint-embedding predictive architecture and a generative masked model?Show answer
A generative masked model reconstructs the hidden input, usually pixels or tokens, so its loss is computed in input space. A joint-embedding predictive architecture predicts the embedding of the hidden part from the embedding of the visible part, so its loss is computed in representation space. Because the target is an embedding, the model does not have to model fine detail that is irrelevant to the task.
QuestionComputation: the predicted patch embedding is and the target embedding is . What is the squared L2 loss for this patch?Show answer
The difference is . The squared norm is .
QuestionWhy is the target encoder updated by an exponential moving average instead of by gradients?Show answer
If it were trained by gradients as well, the easiest way to make the loss small would be to map every input to the same constant embedding, which is representation collapse. A slowly moving average keeps the target a stable reference, so the predictor cannot match it by making everything equal.
QuestionApplied: you are pretraining a model on video frames and want the features to ignore pixel noise. Which design choices from I-JEPA would you keep, and which would you question?Show answer
Keep the embedding-space loss, the predictor that receives position-specific mask tokens, and the EMA target encoder, since these are what prevent collapse and keep the target semantic. Question the image-specific masking scales, because video has a time axis, so the masked regions and the context would need to span time as well as space. Also check whether the predicted content is informative for your downstream task, since the paper's results are about images.
Sources
- Assran et al., "Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture," arXiv:2301.08243. https://arxiv.org/abs/2301.08243
- Yann LeCun, "A Path Towards Autonomous Machine Intelligence," 2022 (cited as the source of the JEPA architecture in the I-JEPA paper).
- Bromley et al., "Signature verification using a siamese time delay neural network," 1993 (cited in the I-JEPA reference list).
- Self-supervised learning (Wikipedia)