{
  "id": "ijepa",
  "name": "I-JEPA (Joint-Embedding Predictive Architecture)",
  "description": "Assran et al. CVPR 2023 - prediction happens in REPRESENTATION space, not pixel space. The target encoder is an exponential-moving-average copy that carries no gradient, and that stop-gradient is the only thing standing between this design and representation collapse.",
  "icon": "🧩",
  "category": "Computer Vision",
  "components": [
    {
      "id": "in-img",
      "type": "input",
      "name": "Image 224x224",
      "position": {
        "x": 300,
        "y": 60
      },
      "params": {
        "shape": [
          3,
          224,
          224
        ]
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "ctx-patch",
      "type": "patchEmbed",
      "name": "Context Patch Embed",
      "position": {
        "x": 80,
        "y": 180
      },
      "params": {
        "imgSize": 224,
        "patchSize": 16,
        "embedDim": 768,
        "inChans": 3
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "ctx1",
      "type": "transformerBlock",
      "name": "Context Encoder Block 1",
      "position": {
        "x": 80,
        "y": 280
      },
      "params": {
        "embedDim": 768,
        "numHeads": 12,
        "ffDim": 3072
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "ctx2",
      "type": "transformerBlock",
      "name": "Context Encoder Block 2",
      "position": {
        "x": 80,
        "y": 380
      },
      "params": {
        "embedDim": 768,
        "numHeads": 12,
        "ffDim": 3072
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "pred",
      "type": "jepaPredictor",
      "name": "Predictor (narrow, 384)",
      "position": {
        "x": 80,
        "y": 480
      },
      "params": {
        "embedDim": 768,
        "predictorDim": 384,
        "depth": 6,
        "numHeads": 12
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "out-pred",
      "type": "output",
      "name": "predicted target reps",
      "position": {
        "x": 80,
        "y": 580
      },
      "params": {},
      "inputs": [],
      "outputs": []
    },
    {
      "id": "tgt-patch",
      "type": "patchEmbed",
      "name": "Target Patch Embed",
      "position": {
        "x": 520,
        "y": 180
      },
      "params": {
        "imgSize": 224,
        "patchSize": 16,
        "embedDim": 768,
        "inChans": 3
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "tgt1",
      "type": "transformerBlock",
      "name": "Target Encoder Block 1",
      "position": {
        "x": 520,
        "y": 280
      },
      "params": {
        "embedDim": 768,
        "numHeads": 12,
        "ffDim": 3072
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "tgt2",
      "type": "transformerBlock",
      "name": "Target Encoder Block 2",
      "position": {
        "x": 520,
        "y": 380
      },
      "params": {
        "embedDim": 768,
        "numHeads": 12,
        "ffDim": 3072
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "ema",
      "type": "emaTarget",
      "name": "EMA Target (stop-gradient)",
      "position": {
        "x": 520,
        "y": 480
      },
      "params": {
        "momentum": 0.996,
        "stopGradient": true
      },
      "inputs": [],
      "outputs": []
    },
    {
      "id": "out-tgt",
      "type": "output",
      "name": "target reps (no grad)",
      "position": {
        "x": 520,
        "y": 580
      },
      "params": {},
      "inputs": [],
      "outputs": []
    }
  ],
  "connections": [
    {
      "id": "c1",
      "from": "in-img",
      "to": "ctx-patch",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c2",
      "from": "ctx-patch",
      "to": "ctx1",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c3",
      "from": "ctx1",
      "to": "ctx2",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c4",
      "from": "ctx2",
      "to": "pred",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c5",
      "from": "pred",
      "to": "out-pred",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c6",
      "from": "in-img",
      "to": "tgt-patch",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c7",
      "from": "tgt-patch",
      "to": "tgt1",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c8",
      "from": "tgt1",
      "to": "tgt2",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c9",
      "from": "tgt2",
      "to": "ema",
      "fromPort": "bottom",
      "toPort": "top"
    },
    {
      "id": "c10",
      "from": "ema",
      "to": "out-tgt",
      "fromPort": "bottom",
      "toPort": "top"
    }
  ]
}