I-JEPA Analysis & Implementation
I-JEPA is a self-supervised vision model that learns by predicting hidden parts of an image as representations, not as pixels. My team implemented it on a small backbone, profiled where the training time went, and tested two changes to how it learns.
How I-JEPA learns, in 3D
One training step, taken apart: the model predicts hidden blocks of an image as representations, not pixels. Step through it, sample new blocks, or switch on the two changes my team tested.

Update the encoders
Gradients train only the context encoder and the predictor. The target encoder follows as a moving average (EMA, momentum 0.996).
An explanation, not the trained model
Hover over a part for what it is. Drag to turn, scroll to zoom.Tap a part for what it is. Drag to turn, pinch to zoom.
About this view: an explanation, not our trained model
The steps, block sizes and settings follow the I-JEPA paper and our report: a 224 × 224 image in 16 × 16 patches, one context block covering 85 to 100% of the grid, four target blocks of 15 to 20% each, a ViT-Small encoder, a six-layer predictor, and a target encoder updated as a moving average with momentum 0.996. The picture is drawn for the demo, the vectors are illustrations, and the report does not give the curriculum's starting target size, so the view picks one.
The idea
I-JEPA (Image-based Joint-Embedding Predictive Architecture) learns image representations without labels. A context encoder sees part of an image, and a predictor has to produce what a target encoder computes for the hidden blocks. Comparing representations rather than pixels means no pixel reconstruction and no hand-crafted augmentations.
At a glance
- Course
- ECE 425/525, Fall 2025
- Team
- Five people
- My role
- Co-lead of the literature review
- Backbone
- ViT-Small, six-layer predictor
- Dataset
- Imagenette, 10 classes
This was a five-person project in a combined undergraduate and graduate deep learning course. My team implemented I-JEPA in PyTorch with a ViT-Small backbone (16 × 16 patches) and a six-layer predictor, trained it on Imagenette, a 10-class subset of ImageNet, and measured the learned features with a linear classifier on top. My part was the literature review.
Three ways to learn without labels
I co-led the literature review officially and wrote all of it but one paragraph. It became the report's related-work section: the building blocks (vision transformers, autoencoders, masking, teacher-student training and joint embeddings) and the three families of methods I-JEPA sits among.
What my team changed
Profiling showed the GPU waiting on CPU data loading. The team matched data-loader workers to logical cores, pinned memory, switched to mixed precision, compiled the model with torch.compile, and moved JPEG decoding to the GPU with NVIDIA DALI. Once the model itself was the bottleneck, they replaced standard attention with FlashAttention, a faster implementation of the same computation.
Then came two changes to how the model learns. Additive spatial conditioning passes each mask's normalized position and size through a small two-layer network (MLP) and adds the result to the patch embeddings; adding instead of appending tokens keeps the sequence length the same. Curriculum masking starts easy and moves on a linear per-epoch schedule to the standard setting: one context block at scale 0.85 to 1 and four target blocks at scale 0.15 to 0.2.
What the team measured
The system-level changes cut total CPU time by about 4.3× for training and 6.7× for inference, and FlashAttention was about 1.2× faster than the baseline attention. The report puts the combined gain at roughly 8.5× for training and 2× for inference over the baseline implementation.
The numbers
| CPU time cut, training | about 4.3× |
|---|---|
| CPU time cut, inference | about 6.7× |
| Loss after epoch 2, spatial conditioning | 0.064baseline 0.140 |
| ViT-Small from scratch, Imagenette | about 35% |
| Authors' pre-trained ViT-Huge | 97.7% |
Spatial conditioning made the loss fall faster under the same hyperparameters: 0.183 against 0.254 after epoch 1 and 0.064 against 0.140 after epoch 2, with the two curves nearly meeting by epoch 5. Curriculum masking kept classifier accuracy close to standard masking throughout 35 epochs.
With ViT-Small and a 50-epoch cap, training from scratch reached about 35% on Imagenette. Swapping in the I-JEPA authors' pre-trained ViT-Huge backbone gave 97.7%, which confirmed the evaluation pipeline was correct.




What I took from it
Writing the review taught me to sort a crowded field by one question: where does the loss compare the answer? In pixels, the model is pulled toward low-level detail; across augmented views, it inherits the augmentations you chose; in representation space, it avoids both.
My team's numbers added two practical lessons. Profile before reaching for the clever fix: the system-level changes cut training CPU time about 4.3×, FlashAttention gave 1.2×. And check the measurement against a known-good model, as the 97.7% with the authors' backbone did for the team's 35%.
Where it goes next
The open question is whether spatial conditioning gives better features or only a faster start, since its loss curve nearly met the baseline by epoch 5; longer training and a comparison of classifier accuracy would answer it. And because latent prediction needs no augmentations, the same approach could carry over to data where good augmentations are hard to choose.
Want the details behind this one, or to talk about similar work?

