N Neurarch Architectures Models Checks Data Docs Open the app

Architectures / Computer Vision

🧩 I-JEPA (Joint-Embedding Predictive Architecture)

CVPR 2023 - prediction in representation space rather than pixel space. The target encoder is an EMA copy that carries no gradient.

From Assran et al. (2023). Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture. CVPR 2023. This page is the graph, not the PDF: open it, edit it, verify it, export it.

Layers
11
Parameters
40.74M
Input
3 × 224 × 224
Output
196 × 768
Verifier
Clean

Every number on this page is computed from the graph by the same functions the app runs, not written by hand.

Open I-JEPA (Joint-Embedding Predictive Architecture) on the canvas Free, no account needed

When to pick it

Pick for self-supervised pretraining without a hand-built augmentation pipeline. The stop-gradient on the target branch is what prevents representation collapse.

Structure

11 layers. Output shapes are propagated from the input shape, batch dimension excluded.

LayerTypeParametersOutput shape
1Image 224x224Inputshape=[3, 224, 224]3 × 224 × 224
2Context Patch EmbedPatch EmbedembedDim=768, patchSize=16196 × 768
3Context Encoder Block 1Transformer BlockembedDim=768, numHeads=12, ffDim=3072196 × 768
4Context Encoder Block 2Transformer BlockembedDim=768, numHeads=12, ffDim=3072196 × 768
5Predictor (narrow, 384)JEPA PredictorembedDim=768, numHeads=12196 × 768
6predicted target repsOutput196 × 768
7Target Patch EmbedPatch EmbedembedDim=768, patchSize=16196 × 768
8Target Encoder Block 1Transformer BlockembedDim=768, numHeads=12, ffDim=3072196 × 768
9Target Encoder Block 2Transformer BlockembedDim=768, numHeads=12, ffDim=3072196 × 768
10EMA Target (stop-gradient)EMA Target / Stop-Gradient196 × 768
11target reps (no grad)Output196 × 768

What the verifier says

The same 43 structural checks that run on every edit in the app, on this graph.

info8 layers with no BatchNorm, LayerNorm, or GroupNorm. Without normalization, activations can explode or vanish across layers, causing slow or unstable training. Fix: Add BatchNorm after Conv2d (CV tasks), LayerNorm after attention/FFN (NLP/LLM), or GroupNorm for small batch sizes.
deep-no-norm

The PyTorch it exports

Generated from the graph above. First 46 lines; the app exports the whole file, plus the training loop, the data contract and a deploy bundle.

# Architecture designed with Neurarch: https://neurarch.com
# PyTorch: compatible with Python 3.8+ and torch>=1.12
# Colab: pip install torch torchvision  (usually pre-installed)

import torch
import torch.nn as nn
import torch.nn.functional as F
from typing import Tuple

class JEPAPredictor(nn.Module):
    """I-JEPA's predictor, narrow on purpose: a predictor as wide as the encoder
    is a second encoder. Prediction happens in representation space."""

    def __init__(self, embed_dim: int = 768, predictor_dim: int = 384,
                 depth: int = 6, num_heads: int = 12):
        super().__init__()
        heads = num_heads if predictor_dim % num_heads == 0 else 1
        self.inp = nn.Linear(embed_dim, predictor_dim)
        self.blocks = nn.ModuleList([
            nn.TransformerEncoderLayer(
                d_model=predictor_dim, nhead=heads,
                dim_feedforward=4 * predictor_dim, batch_first=True)
            for _ in range(max(1, depth))
        ])
        self.out = nn.Linear(predictor_dim, embed_dim)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        h = self.inp(x)
        for blk in self.blocks:
            h = blk(h)
        return self.out(h)


class EMATarget(nn.Module):
    """Not a computation: a declaration that this branch is an exponential
    moving average of its upstream and carries NO gradient. Dropping the detach
    is how BYOL / SimSiam / I-JEPA collapse to a constant."""

    def __init__(self, momentum: float = 0.996):
        super().__init__()
        self.momentum = momentum

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return x.detach()

For agents

This architecture is machine-readable end to end. An agent can list the set, fetch this graph, edit it, and have the edit verified before any GPU time is spent.

Also in Computer Vision

🖼️ Simple CNN
Simple Convolutional Neural Network for image classification
9 layers · 804.6K
🔗 ResNet Block
ResNet residual block with skip connections
9 layers · 74.0K
🩻 U-Net
Encoder-decoder with skip connections — Ronneberger et al
24 layers · 720.7K
👁️ ViT-B/16
Vision Transformer — patch embedding stem + 1 encoder block
13 layers · 8.45M