S-JEPA: A Stochastic Latent Variable Generalization of
Joint-Embedding Predictive Architectures

Nikos Giakoumoglou1  ·  Paschalis Giakoumoglou2  ·  Tania Stathaki1
1Imperial College London    2Information Technologies Institute, CERTH

TL;DR

S-JEPA replaces the deterministic auxiliary token \(z\) in JEPAs with a proper stochastic latent variable, trained as a CVAE entirely in representation space, with no decoders and no reconstruction. The result: stronger representations than I-JEPA under matched architectures and schedules, plus error-correlated predictive uncertainty and diverse completions, capabilities no deterministic JEPA predictor has.

Joint-Embedding Predictive Architectures (JEPAs) predict the latent embedding of a target signal from a context signal, with an auxiliary variable \(z\) conditioning the predictor. Despite its prominent role in the original JEPA blueprint, the content of \(z\) has been carried by a fixed deterministic token in every prior instantiation, collapsing the genuinely multi-modal distribution over plausible completions to a point estimate. We present S-JEPA, which realises \(z\) as a proper stochastic latent variable for masked image prediction: a learned posterior infers \(z\) from context and target during training, while a learned context-conditioned prior approximates the distribution of plausible completions at inference, with no decoders and no reconstruction. In its deterministic limit the objective reduces to the I-JEPA loss in functional form, generalising that objective rather than strictly containing the I-JEPA model. Our central finding is that stochasticity adds capabilities, error-correlated predictive uncertainty and diverse completions, at no cost to representation quality: under matched architectures and schedules S-JEPA improves over the deterministic I-JEPA baseline and exceeds LeJEPA at matched architecture, while additionally producing spatially structured uncertainty maps and semantically diverse completions, neither of which the deterministic predictor produces.

JEPA schematic: context encoder, target encoder, predictor conditioned on deterministic z
The JEPA blueprint. In I-JEPA,
\(z\) is a fixed, deterministic token
S-JEPA schematic: learned posterior and context-conditioned prior over a stochastic latent z
S-JEPA overview. In S-JEPA, \(z\) is a stochastic
latent variable with a learned prior and posterior

Why should prediction be stochastic?

A JEPA comprises a context encoder \(f_x\), a target encoder \(f_y\), and a predictor \(g\) that estimates \(\hat{s}_y = g(s_x, z)\) from the context representation \(s_x = f_x(x)\) and an auxiliary variable \(z\). In LeCun's original blueprint, \(z\) is meant to carry the residual information the context lacks: scene-level factors, global style, or the semantic content of a masked region. Yet in every instantiation to date, from I-JEPA's shared learnable mask token to V-JEPA's spatiotemporal analogue, \(z\) is deterministic. Stochasticity has only ever entered the positional component (where to mask), never the content of what is masked.

Given “pavement”, a “parked car”, and “open sky”, the hidden region could equally plausibly contain a fire hydrant, a pedestrian, or a traffic signal. Even with perfect context representations, the distribution over semantically valid completions is genuinely multi-modal. A predictor that collapses this to a point estimate discards the space of plausible completions and gives no signal for where the context under-determines the target.
01

Representation ≠ prediction

Contrastive and self-distillation objectives learn useful embeddings by matching views, but a good embedding does not by itself say what is missing, or what could plausibly come next.

02

Prediction asks a new question

Given what we observe, what other states could be consistent with it? Answering this requires a genuine distribution over completions, not a single point estimate.

03

Toward world models

Inferring missing information under ambiguity is a prerequisite for predicting plausible futures and, eventually, conditioning predictions on actions for planning and control.

Our approach

We realise \(z\) as a proper stochastic latent variable over the content of the masked region, replacing the deterministic predictor with one built on a Conditional Variational Autoencoder (CVAE) operating entirely in representation space, i.e., with no pixel decoder and no reconstruction loss. A learned posterior infers \(z\) from context and target during training; a learned context-conditioned prior anticipates plausible completions from context alone and is used at inference.

From a deterministic predictor to a CVAE in representation space

The I-JEPA objective

A JEPA computes \(s_x = f_x(x)\), \(s_y = f_y(y)\), and \(\hat{s}_y = g(s_x, z)\), and is trained to regress the target representation under a stop-gradient on the (EMA) target encoder:

I-JEPA \[ \mathcal{L}_{\mathrm{JEPA}} = \mathbb{E}\!\left[\, \| g(s_x, z) - \mathrm{sg}(f_y(y)) \|_2^2 \,\right] \]

Here \(z\) is a fixed, learnable mask token, i.e., the same value regardless of what the masked region actually contains.

A latent-variable model over target representations

We instead model the conditional distribution \(p(s_y \mid s_x)\) directly. We introduce \(z \in \mathbb{R}^{d_z}\) as a per-image latent variable that accounts for residual uncertainty, i.e., occlusion, texture variability, and semantic ambiguity, giving the joint and marginal:

Generative model \[ p_{\phi,\theta}(s_y, z \mid s_x) = p_\phi(s_y \mid s_x, z)\, p_\theta(z \mid s_x), \qquad p(s_y \mid s_x) = \int p_\phi(s_y \mid s_x, z)\, p_\theta(z \mid s_x)\, dz \]

The marginal is intractable for a neural predictor \(g_\phi\), so we maximise a variational lower bound instead of computing it directly.

Context-conditioned prior & approximate posterior

The prior sees the context \(s_x\) only, and must learn to anticipate plausible completions without the target. The posterior additionally sees the target \(s_y\) during training, inferring the \(z\) that best explains it. Both are diagonal Gaussians:

Prior (inference-time) \[ p_\theta(z \mid s_x) = \mathcal{N}\!\big(\mu_\theta(s_x),\, \mathrm{diag}(\sigma_\theta^2(s_x))\big) \]
Posterior (training-time) \[ q_\psi(z \mid s_x, s_y) = \mathcal{N}\!\big(\mu_\psi(s_x, s_y),\, \mathrm{diag}(\sigma_\psi^2(s_x, s_y))\big) \]

At inference the target \(s_y\) is unavailable, so \(z\) is drawn from the prior \(p_\theta(z\mid s_x)\). The prior is therefore driven to match the aggregate posterior across the training set.

Evidence lower bound

Introducing the posterior and applying Jensen's inequality to the concave log yields the CVAE ELBO, in representation space:

ELBO \[ \log p(s_y \mid s_x) \;\geq\; \underbrace{\mathbb{E}_{q_\psi}\!\left[\log p_\phi(s_y \mid s_x, z)\right]}_{\text{reconstruction in latent space}} \;-\; \underbrace{\mathrm{KL}\!\left(q_\psi(z\mid s_x,s_y) \,\|\, p_\theta(z \mid s_x)\right)}_{\text{regulariser}} \]

Tight iff \(q_\psi\) equals the true posterior \(p(z \mid s_x, s_y)\). The first term drives accurate prediction; the second prevents the posterior from encoding target information inaccessible at inference.

Gaussian likelihood ⇒ squared error

Assuming a fixed-variance isotropic Gaussian likelihood around the predictor's output, the expected log-likelihood reduces in closed form to a scaled MSE:

Likelihood \[ p_\phi(s_y \mid s_x, z) = \mathcal{N}\!\big(s_y;\, g_\phi(s_x, z),\, \sigma^2 \mathbf{I}\big) \;\;\Longrightarrow\;\; -\mathbb{E}_{q_\psi}\!\left[\log p_\phi(s_y \mid s_x, z)\right] = \tfrac{1}{2\sigma^2}\, \mathbb{E}_{q_\psi}\!\left[\| s_y - g_\phi(s_x, z) \|^2\right] + C \] and the KL between the two diagonal Gaussians is closed-form: \[ \mathrm{KL}\big(q_\psi \,\|\, p_\theta\big) = \frac{1}{2}\sum_{k=1}^{d_z}\left( \log\frac{\sigma_{\theta,k}^2}{\sigma_{\psi,k}^2} + \frac{\sigma_{\psi,k}^2 + (\mu_{\psi,k}-\mu_{\theta,k})^2}{\sigma_{\theta,k}^2} - 1 \right) \]

Sampling uses the reparameterisation trick: \(z = \mu_\psi + \sigma_\psi \odot \epsilon\), \(\epsilon \sim \mathcal{N}(0, I)\), enabling end-to-end gradient flow through the stochastic node.

The S-JEPA objective

Absorbing the constant \(1/(2\sigma^2)\) into a free hyperparameter \(\beta > 0\) that controls the information bottleneck on \(z\) gives the final training objective:

S-JEPA \[ \mathcal{L}_{\text{total}} \;=\; \underbrace{\mathbb{E}_{q_\psi}\!\left[\| \mathrm{sg}(s_y) - g_\phi(s_x, z) \|^2\right]}_{\mathcal{L}_{\text{pred}}} \;+\; \underbrace{\beta \cdot \mathrm{KL}\!\big(q_\psi(z\mid s_x,s_y) \,\|\, p_\theta(z \mid s_x)\big)}_{\mathcal{L}_{\text{reg}}} \]

When \(z\) is collapsed to a deterministic, target-independent code, \(\mathcal{L}_{\text{total}}\) reduces to the I-JEPA loss in functional form, so S-JEPA generalises the objective rather than strictly containing the I-JEPA model, since \(\mu_\psi\) remains target-dependent where the I-JEPA mask token is not.

What this enables at inference

representation

Encoder features

Use \(s_x\) directly for downstream tasks, i.e., linear probing and low-shot transfer, exactly as with a deterministic JEPA.

sampling

Alternative completions

Reuse the context features and draw a fresh \(z \sim p_\theta(z\mid s_x)\) to obtain a different, equally plausible target prediction.

calibration

Uncertainty maps

Measure the variance across many sampled target predictions, which is zero by construction for a deterministic predictor but informative here.

Stronger representations, at matched compute

Under matched architectures and training schedules, S-JEPA improves over the deterministic I-JEPA baseline on linear evaluation and low-shot ImageNet-1K, and exceeds LeJEPA at matched architecture on a longer schedule, all with only \(1.01\times\) the parameters of I-JEPA and negligible overhead in FLOPs and inference latency.

+0.6 / +0.8
linear probe points over I-JEPA (ViT-B/16 & ViT-L/16, matched 600ep)
+1.2 / +1.4
1%-label low-shot points over I-JEPA (ViT-B/16 & ViT-L/16)
1.01×
parameters of I-JEPA, with negligible FLOPs / latency overhead
ImageNet-1K linear evaluation and 1% low-shot accuracy versus parameter count, comparing S-JEPA, I-JEPA, LeJEPA, MAE, iBOT, MSN, and data2vec

S-JEPA (blue) consistently sits above the I-JEPA / LeJEPA frontier (teal) at matched parameter count, on both linear evaluation (left) and 1% low-shot transfer (right) on ImageNet-1K. At ViT-L/16 (600 epochs), S-JEPA reaches 78.3% linear top-1, above I-JEPA (77.5%) and data2vec (77.3%, 1600 epochs); at ViT-B/16, S-JEPA reaches 73.5%, above I-JEPA (72.9%) and MAE (68.0%, 1600 epochs).

PCA projections of encoder features

We project block-4 patch representations onto their first three principal components (foreground-masked, mapped to RGB) across three ViT-B/16 encoders trained with different objectives. No localisation signal supervises this map, so the structure emerges purely from the pretraining objective. Select an example:

All three methods recover coherent object/background structure, with S-JEPA exhibiting particularly clear object boundaries and spatially consistent representations, suggesting that stochastic prediction preserves, and potentially sharpens, the semantic structure of the learned features.

Error-correlated uncertainty maps

For S-JEPA we draw \(N=50\) samples \(z \sim p_\theta(z\mid s_x)\) from the full-image context and compute the predictive variance \(U_p\) across the resulting target predictions. I-JEPA's deterministic predictor gives \(U_p = 0\) everywhere by construction, so its column below carries no information about the image, reflecting only the colour-map normalisation. S-JEPA's uncertainty, by contrast, consistently concentrates on the animal or object rather than the background, and correlates with where its own mean prediction actually errs. Select an example:

Sampling the masked region

Each example shows a masked input and five completions, each from a distinct draw \(z_i \sim p_\theta(z\mid s_x)\), decoded via a lightweight diffusion decoder (RCDM) trained on frozen S-JEPA predictor representations. Decoding uses a fixed noise seed across all five draws, so the pixel-level variation you see reflects only the sampled latent, not decoder-side stochasticity. Select an example:

Samples vary in object identity and configuration, reflecting genuine uncertainty over the masked region encoded in \(z\), a capability the deterministic I-JEPA predictor does not have, since it produces exactly one completion per context.

Stochasticity as a free capability

S-JEPA realises the auxiliary variable \(z\) in JEPAs as a stochastic latent over the content of the masked region, with a learned context-conditioned prior and no reconstruction. A CVAE operating purely in representation space replaces I-JEPA's deterministic predictor with a probabilistic model whose objective recovers the I-JEPA loss as a deterministic special case. Under matched architectures and schedules, S-JEPA improves over I-JEPA on linear probing, low-shot, and most transfer tasks, exceeds LeJEPA at matched architecture on a longer schedule, produces error-correlated uncertainty maps at negligible cost, and generates diverse completions.

Limitations

  • scope\(z\) is a single per-image latent rather than a per-target-region one.
  • scaleOur largest backbone is ViT-L/16; scaling to ViT-H/14 and beyond is untested.

Looking forward

Inferring missing information under ambiguity is a step toward predicting plausible futures with uncertainty, and, eventually, conditioning predictions on actions for planning and control, extending from masked images toward the kind of world model LeCun's original JEPA blueprint set out to motivate.

BibTeX

@misc{giakoumoglou2026sjepa,
      title={{A Stochastic Latent Variable Generalization of Joint-Embedding Predictive Architectures}},
      author={Nikos Giakoumoglou and Paschalis Giakoumoglou and Tania Stathaki},
      year={2026},
      eprint={2611.09302},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2611.09302},
}