Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ JEPA Lab: The Ultimate Self-Supervised Latent Space Playground!

Welcome to JEPA Lab, a clean-room educational and experimental laboratory designed for understanding, implementing, and probing Joint Embedding Predictive Architectures (JEPAs)!

Joint Embedding Predictive Architectures, pioneered and advocated by Yann LeCun, represent a major paradigm shift in self-supervised learning (SSL). Unlike generative architectures that predict pixels directly in the input space, JEPAs predict representations in a latent (embedding) spaceβ€”ignoring chaotic, unpredictable high-frequency noise and focusing entirely on high-level semantic content!


πŸš€ Why JEPA Lab? (Our Mission)

This repository is built for youβ€”the AI enthusiast, the YouTube learner, the curious student, and the seasoned researcher. We have structured this lab to demystify advanced representation learning concepts through concrete, hands-on experiments you can run on standard consumer hardware.

🌟 Start Here!

If you are new to JEPAs or want to quickly get up to speed with how self-supervised models learn features, check out our newly launched: πŸ‘‰ JEPA Starter Guide: Zero to Hero in Latent Representation Learning πŸ‘ˆ


πŸ“‚ Repository Structure

The laboratory is laid out to support structured, step-by-step learning:

jepa-lab/
β”œβ”€β”€ README.md               # You are here! Main landing page & overview
β”œβ”€β”€ pyproject.toml          # Project configuration & dependencies
β”œβ”€β”€ docs/                   # Conceptual guides and educational deep-dives
β”‚   β”œβ”€β”€ 01_jepa_basics.md   # Foundations of Joint Embedding Predictive Architectures
β”‚   β”œβ”€β”€ 02_collapse.md      # Representation collapse and how to prevent it
β”‚   β”œβ”€β”€ 03_sigreg.md        # Similarity, Information, Variance, and Covariance regularization
β”‚   β”œβ”€β”€ 04_masked_prediction.md # Masking strategy, target encoder, and predictor networks
β”‚   β”œβ”€β”€ 05_world_models.md  # World models, actions, and predicting future latent states
β”‚   └── 06_starter_guide.md # πŸš€ MUST READ: Zero-to-Hero educational guide!
β”œβ”€β”€ scripts/                # Interactive, high-speed visualization and testing scripts
β”‚   β”œβ”€β”€ train.py            # High-performance AMP training with gradient clipping & checkpoints
β”‚   β”œβ”€β”€ inspect_data.py     # Verify and visualize multi-view data loading
β”‚   β”œβ”€β”€ inspect_latent.py   # Probes for measuring standard deviations and similarity
β”‚   β”œβ”€β”€ plot_spectrum.py    # Compute and plot singular-value spectrum curves
β”‚   β”œβ”€β”€ evaluate.py         # Standard k-NN and Linear Probing evaluators
β”‚   └── evaluate_ood.py     # Out-Of-Distribution spatial & lighting robustness evaluator
β”œβ”€β”€ experiments/            # Automated parametersweeping and ablation studies
β”‚   └── run_suite.py        # Run weight and dimensionality ablate sweeps
β”œβ”€β”€ src/                    # Underlying source code (data loader, ResNet-18 model, SIGReg)
β”‚   β”œβ”€β”€ data.py             # TwoView dataset loader
β”‚   └── model.py            # Modified ResNet-18 and Predictor MLP models

πŸ› οΈ Getting Started in 3 Steps

1. Installation

Clone the repository and install the developer dependencies:

git clone https://github.com/your-username/jepa-lab.git
cd jepa-lab
pip install -e ".[dev]"

2. Run an Interactive Experiment!

See the model learn and stabilize its representations in real-time under extreme regularization:

python3 scripts/train.py --epochs 20 --lr 0.0001 --sigreg_weight 20.0 --gradient_clip_norm 1.0

3. Evaluate and Plot!

Generate a gorgeous singular-value spectrum plot of your model's representations and test its robustness against spatial and lighting distortions:

# Plot singular-value spectrum
python3 scripts/plot_spectrum.py

# Test OOD robustness
python3 scripts/evaluate_ood.py

🀝 Join the Research Lab & Contribute!

We encourage you to experiment with your own theories and contribute back! Whether you want to ablate new regularizers, implement custom MLP architectures, or optimize data pipelines, we welcome your pull requests!

Let's build the future of latent space world models together! πŸš€

About

πŸš€ The ultimate hands-on educational laboratory for Joint Embedding Predictive Architectures (JEPAs). Train, probe, and master Yann LeCun's vision of Self-Supervised Learning from first principles. High-speed in-memory pipelines, SVD singular-value spectrum plotting, and OOD robustness evaluations on CIFAR-10. Breaks the 50% linear-separability bar

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages