<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JEPA | Mohamed Gad</title><link>https://gad-ma.github.io/tag/jepa/</link><atom:link href="https://gad-ma.github.io/tag/jepa/index.xml" rel="self" type="application/rss+xml"/><description>JEPA</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Mon, 19 Oct 2026 00:00:00 +0000</lastBuildDate><image><url>https://gad-ma.github.io/media/icon_hu1bf27e6a1b39370632df7e1322d372bb_14542_512x512_fill_lanczos_center_3.png</url><title>JEPA</title><link>https://gad-ma.github.io/tag/jepa/</link></image><item><title>Joint Embedding Predictive Architectures (JEPA) Explained</title><link>https://gad-ma.github.io/post/jepa/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://gad-ma.github.io/post/jepa/</guid><description>&lt;p>This is the first post in a series on the Joint Embedding Predictive Architecture (JEPA) family of models. Here we build the foundation: the abstract JEPA idea, the energy-based view behind it, and the training problem it has to solve. The follow-up posts look at how this abstract recipe is instantiated for images and video.&lt;/p>
&lt;p>JEPA was proposed by Yann LeCun in his 2022 position paper &lt;a href="https://openreview.net/pdf?id=BZ5a1r-kVsf" target="_blank" rel="noopener">&lt;em>A Path Towards Autonomous Machine Intelligence&lt;/em>&lt;/a>. The paper lays out a roadmap for building machines that learn how the world works, and JEPA is its proposed answer to the question of &lt;em>how a world model should be trained&lt;/em>. Everything below follows that paper&amp;rsquo;s formulation; the figures are taken from it.&lt;/p>
&lt;details open>
&lt;summary>&lt;b>Table of Contents&lt;/b>&lt;/summary>
&lt;ul>
&lt;li>&lt;a href="#motivation-predicting-what-is-predictable">Motivation: Predicting What Is Predictable&lt;/a>&lt;/li>
&lt;li>&lt;a href="#from-energy-based-models-to-jepa">From Energy-Based Models to JEPA&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#inputs-and-outputs">Inputs and outputs&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#why-predict-in-representation-space">Why Predict in Representation Space?&lt;/a>&lt;/li>
&lt;li>&lt;a href="#representing-multiple-possible-futures">Representing Multiple Possible Futures&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#multimodality-through-encoder-invariance">Multimodality through encoder invariance&lt;/a>&lt;/li>
&lt;li>&lt;a href="#multimodality-through-a-latent-predictor">Multimodality through a latent predictor&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#the-collapse-problem">The Collapse Problem&lt;/a>&lt;/li>
&lt;li>&lt;a href="#contrastive-training">Contrastive Training&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#margin-based-contrastive-loss">Margin-based contrastive loss&lt;/a>&lt;/li>
&lt;li>&lt;a href="#infonce-form">InfoNCE form&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#why-contrastive-training-becomes-problematic">Why Contrastive Training Becomes Problematic&lt;/a>&lt;/li>
&lt;li>&lt;a href="#non-contrastive-jepa-training">Non-Contrastive JEPA Training&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#criteria-1-and-2-preventing-representational-collapse">Criteria 1 and 2: preventing representational collapse&lt;/a>&lt;/li>
&lt;li>&lt;a href="#criterion-3-predictability">Criterion 3: predictability&lt;/a>&lt;/li>
&lt;li>&lt;a href="#criterion-4-limiting-the-latent-variable">Criterion 4: limiting the latent variable&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#a-concrete-non-contrastive-instantiation-vicreg">A Concrete Non-Contrastive Instantiation: VICReg&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#variance-constraint">Variance constraint&lt;/a>&lt;/li>
&lt;li>&lt;a href="#covariance-constraint">Covariance constraint&lt;/a>&lt;/li>
&lt;li>&lt;a href="#prediction-term">Prediction term&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="#the-jepa-objective-as-a-trade-off">The JEPA Objective as a Trade-off&lt;/a>&lt;/li>
&lt;li>&lt;a href="#summary">Summary&lt;/a>&lt;/li>
&lt;li>&lt;a href="#references">References&lt;/a>&lt;/li>
&lt;/ul>
&lt;/details>
&lt;h1 id="motivation-predicting-what-is-predictable">Motivation: Predicting What Is Predictable&lt;/h1>
&lt;p>A central difficulty in learning a predictive model of the physical world is that the future is generally not uniquely determined by the information available in the present. Even when the underlying dynamics are deterministic, the current observation may be incomplete; moreover, many future details may simply be unpredictable from the available context. A video of a car approaching an intersection, for example, may provide enough information to predict that the car will continue along the road, but not whether its driver will turn left or right. At the pixel level, even apparently simple future frames contain large amounts of effectively unpredictable information such as texture, illumination, and small-scale motion.&lt;/p>
&lt;p>A direct pixel-space predictor therefore faces an undesirable objective: instead of learning the aspects of the world that are stable and predictable, it is forced to model every detail of the future observation.&lt;/p>
&lt;p>The Joint Embedding Predictive Architecture (JEPA) instead predicts in representation space rather than observation space ($s_x \longrightarrow s_y$ rather than $x \longrightarrow y$). Given an observed context $x$ and target $y$, a JEPA encodes them into representations&lt;/p>
$$
s_x = f_{\theta_x}(x), \qquad s_y = f_{\theta_y}(y),
$$
&lt;p>and learns a predictor $\tilde{s}_y = P_{\phi}(s_x,z)$ mapping the context representation $s_x$ to the target representation $s_y$, where $z$ is an optional latent variable representing target information that cannot be inferred from $x$.&lt;/p>
&lt;h1 id="from-energy-based-models-to-jepa">From Energy-Based Models to JEPA&lt;/h1>
&lt;p>The JEPA formulation is most naturally understood as a particular energy-based model (EBM). An EBM defines a scalar-valued function $F_{\theta}(x,y)$ whose value is low when $x$ and $y$ are compatible and high when they are incompatible. Importantly, an EBM does not require the scalar energy to be interpreted as the logarithm of a probability density.&lt;/p>
&lt;p>For the JEPA, compatibility is evaluated indirectly through learned representations. The two observations are first mapped to $s_x = f_{\theta_x}(x)$ and $s_y = f_{\theta_y}(y)$, after which a predictor produces a candidate target representation $\tilde{s}_y = P_{\phi}(s_x,z)$.&lt;/p>
&lt;p>The energy associated with a particular latent variable $z$ is then defined as the discrepancy between the actual target representation and its prediction:&lt;/p>
$$
E_{\theta,\phi}(x,y,z) = D\!\bigl(s_y,\, P_{\phi}(s_x,z)\bigr),
$$
&lt;p>where $D(\cdot,\cdot)$ is a distance or discrepancy function in representation space.&lt;/p>
&lt;p>
&lt;figure id="figure-the-generic-jepa-two-encoders-produce-s_x-and-s_y-and-a-predictor-helped-by-a-latent-variable-z-predicts-s_y-from-s_x-the-energy-is-the-prediction-error-source-lecun-2022-figure-12">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="The generic JEPA architecture" srcset="
/post/jepa/images/lecun2022_fig12_hu1e8c3cccad328a4a19182f7a7bc5aa8f_241585_1753ec633e5a4da39e988c5cd97936ad.webp 400w,
/post/jepa/images/lecun2022_fig12_hu1e8c3cccad328a4a19182f7a7bc5aa8f_241585_a4e79d547656bc2d3a3b110f0090d839.webp 760w,
/post/jepa/images/lecun2022_fig12_hu1e8c3cccad328a4a19182f7a7bc5aa8f_241585_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://gad-ma.github.io/post/jepa/images/lecun2022_fig12_hu1e8c3cccad328a4a19182f7a7bc5aa8f_241585_1753ec633e5a4da39e988c5cd97936ad.webp"
width="760"
height="543"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
The generic JEPA. Two encoders produce s_x and s_y, and a predictor, helped by a latent variable z, predicts s_y from s_x. The energy is the prediction error. Source: LeCun, 2022, Figure 12.
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;p>The latent variable is not observed in the training data. For a given pair $(x,y)$, its value can therefore be defined by minimizing the energy:&lt;/p>
$$
\hat{z} = \arg\min_{z\in\mathcal{Z}} E_{\theta,\phi}(x,y,z) = \arg\min_{z\in\mathcal{Z}} D\!\bigl(s_y,\, P_{\phi}(s_x,z)\bigr).
$$
&lt;p>Substituting this inferred latent variable into the energy gives the energy of the pair $(x,y)$:&lt;/p>
$$
F_{\theta,\phi}(x,y) = \min_{z\in\mathcal{Z}} E_{\theta,\phi}(x,y,z) = D\!\bigl(s_y,\, P_{\phi}(s_x,\hat{z})\bigr).
$$
&lt;p>Thus, the JEPA can be viewed as a latent-variable EBM whose compatibility function is evaluated entirely in representation space.&lt;/p>
&lt;h2 id="inputs-and-outputs">Inputs and outputs&lt;/h2>
&lt;p>For the generic JEPA considered here:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Component&lt;/th>
&lt;th>Input&lt;/th>
&lt;th>Output&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Context encoder&lt;/td>
&lt;td>$x$&lt;/td>
&lt;td>$s_x$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Target encoder&lt;/td>
&lt;td>$y$&lt;/td>
&lt;td>$s_y$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Predictor&lt;/td>
&lt;td>$(s_x,z)$&lt;/td>
&lt;td>$\tilde{s}_y$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Energy&lt;/td>
&lt;td>$(s_y,\tilde{s}_y)$&lt;/td>
&lt;td>scalar $E(x,y,z)$&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The encoders are not required to have the same architecture or even to share parameters. Consequently, $x$ and $y$ may in principle belong to different modalities. The essential requirement is that the two encoders map them into representations for which compatibility can be evaluated.&lt;/p>
&lt;h1 id="why-predict-in-representation-space">Why Predict in Representation Space?&lt;/h1>
&lt;p>The central advantage of JEPA follows directly from the change in prediction space. Suppose that one instead trains a predictor directly in observation space, $\hat{y} = G_{\phi}(x,z)$. A conventional reconstruction objective would then require&lt;/p>
$$
\mathcal{L}_{\mathrm{obs}} = D_y(y,\hat{y}).
$$
&lt;p>For high-dimensional observations, this requires the predictor to account for all dimensions of $y$, including dimensions whose future values cannot be inferred reliably from $x$.&lt;/p>
&lt;p>JEPA instead introduces an encoder $s_y=f_{\theta_y}(y)$ whose representation can discard information that is irrelevant to the predictive task. The loss is consequently&lt;/p>
$$
\mathcal{L}_{\mathrm{JEPA}} = D_s\!\bigl(f_{\theta_y}(y),\, P_{\phi}(f_{\theta_x}(x),z)\bigr).
$$
&lt;p>This changes the optimization problem in an important way. The encoder is allowed to map several observations to the same representation whenever their differences are irrelevant to the predictive relationship being learned. Formally, if $y_1 \neq y_2$ but $f_{\theta_y}(y_1)=f_{\theta_y}(y_2)$, then $F(x,y_1)=F(x,y_2)$.&lt;/p>
&lt;p>The energy therefore need not distinguish between observations that differ in unpredictable or task-irrelevant details. This gives the JEPA a natural mechanism for representing multimodal conditional relationships without requiring the model to explicitly generate every possible observation.&lt;/p>
&lt;h1 id="representing-multiple-possible-futures">Representing Multiple Possible Futures&lt;/h1>
&lt;p>The fact that a single $x$ can be compatible with multiple values of $y$ creates a fundamental difficulty for deterministic prediction. A predictor $\tilde{s}_y=P_{\phi}(s_x)$ can produce only one representation for a given $s_x$, whereas the actual conditional relationship may contain many plausible target states.&lt;/p>
&lt;p>The JEPA formulation describes two mechanisms for representing this multimodality.&lt;/p>
&lt;h2 id="multimodality-through-encoder-invariance">Multimodality through encoder invariance&lt;/h2>
&lt;p>The first mechanism is invariance in the target representation. Suppose a set of target observations $\mathcal{Y}(s) = {y_1,y_2,\ldots}$ all represent different realizations of the same predictive state, and the target encoder satisfies&lt;/p>
$$
f_{\theta_y}(y_i)=s_y \qquad \forall\, y_i\in\mathcal{Y}(s).
$$
&lt;p>All of these observations consequently receive the same energy for a given prediction:&lt;/p>
$$
F(x,y_i) = D(s_y,P_{\phi}(s_x,z)).
$$
&lt;p>The encoder therefore induces an equivalence relation over the observation space: multiple observations can be considered equivalent whenever their differences are not represented.&lt;/p>
&lt;p>This mechanism is especially important for video. The model does not have to represent every microscopic detail of a future frame if those details are not necessary for predicting the representation of the future state.&lt;/p>
&lt;h2 id="multimodality-through-a-latent-predictor">Multimodality through a latent predictor&lt;/h2>
&lt;p>The second mechanism is an explicit latent variable. For a fixed context representation $s_x$, let&lt;/p>
$$
\mathcal{P}(s_x) = \bigl\{ P_{\phi}(s_x,z) \;:\; z\in\mathcal{Z} \bigr\}
$$
&lt;p>denote the set of representations reachable by varying $z$. The predictor can therefore represent multiple plausible target states:&lt;/p>
$$
\tilde{s}_y^{(1)} = P_{\phi}(s_x,z_1), \qquad \tilde{s}_y^{(2)} = P_{\phi}(s_x,z_2), \qquad \ldots
$$
&lt;p>The latent variable encodes information necessary to specify the future that cannot be inferred from $x$ alone, such as whether a car approaching a fork follows the left or right branch.&lt;/p>
&lt;p>Representation invariance and latent-variable prediction therefore represent two distinct mechanisms for handling multimodality (both illustrated in the figure above): the former collapses observational differences that the representation does not need to preserve, while the latter explicitly parameterizes alternative plausible outcomes.&lt;/p>
&lt;p>In the car example, $s_x$ and $s_y$ might capture the position, orientation and velocity of the car before and after the fork, ignoring irrelevant details such as the trees bordering the road or the texture of the sidewalk (invariance). The latent variable $z$ then selects which branch the car takes.&lt;/p>
&lt;h1 id="the-collapse-problem">The Collapse Problem&lt;/h1>
&lt;p>Predicting in representation space introduces an optimization hazard absent from observation-space regression: the encoders must not discard all information. Consider the objective&lt;/p>
$$
\mathcal{L} = D\!\bigl(f_{\theta_y}(y),\, P_{\phi}(f_{\theta_x}(x),z)\bigr).
$$
&lt;p>A trivial minimizer occurs when both encoders collapse to a constant, $f_{\theta_x}(x)=c$ and $f_{\theta_y}(y)=c$ for all $x,y$. If the predictor simply outputs $P_{\phi}(c,z)=c$, the loss is identically zero ($\mathcal{L}=D(c,c)=0$) without learning any useful structure.&lt;/p>
&lt;p>More generally, partial collapse occurs if the encoders retain negligible information and become invariant over excessively large regions of input space, making the energy surface nearly flat. Minimizing prediction error alone is therefore insufficient; a viable training objective must balance two opposing pressures:&lt;/p>
&lt;ol>
&lt;li>&lt;em>informativeness&lt;/em>: representations must preserve sufficient information about their inputs;&lt;/li>
&lt;li>&lt;em>predictability&lt;/em>: the target representation must be predictable from the context representation.&lt;/li>
&lt;/ol>
&lt;h1 id="contrastive-training">Contrastive Training&lt;/h1>
&lt;p>A JEPA can be trained as a conventional energy-based model using contrastive learning. For a positive pair $(x,y)$, define the positive energy $F^+ = F_{\theta}(x,y)$. Construct one or more incompatible target samples $\hat{y}_1,\ldots,\hat{y}_K$ and compute their corresponding energies $F_k^- = F_{\theta}(x,\hat{y}_k)$. The desired energy ordering is&lt;/p>
$$
F_{\theta}(x,y) &lt; F_{\theta}(x,\hat{y}_k), \qquad k=1,\ldots,K.
$$
&lt;p>A generic contrastive loss can consequently be written as&lt;/p>
$$
\mathcal{L} = H\bigl(F_{\theta}(x,y),\, F_{\theta}(x,\hat{y}_1),\, \ldots,\, F_{\theta}(x,\hat{y}_K)\bigr),
$$
&lt;p>where $H$ increases as the positive energy increases and decreases as the negative energies increase.&lt;/p>
&lt;h2 id="margin-based-contrastive-loss">Margin-based contrastive loss&lt;/h2>
&lt;p>One simple formulation is the distance-dependent hinge loss:&lt;/p>
$$
\mathcal{L}_{\mathrm{hinge}} = \bigl[ F_{\theta}(x,y) - F_{\theta}(x,\hat{y}) + m(y,\hat{y}) \bigr]_+,
$$
&lt;p>where $[a]_+ = \max(a,0)$ and, in the formulation proposed by LeCun, the margin grows with the distance between the samples:&lt;/p>
$$
m(y,\hat{y}) = \mu \left\| y-\hat{y} \right\|_2^2.
$$
&lt;p>The loss is zero whenever the negative energy is sufficiently larger than the positive energy:&lt;/p>
$$
F_{\theta}(x,\hat{y}) \geq F_{\theta}(x,y)+m(y,\hat{y}).
$$
&lt;h2 id="infonce-form">InfoNCE form&lt;/h2>
&lt;p>With multiple negative samples, the EBM discussion in LeCun&amp;rsquo;s paper gives an InfoNCE-style energy objective:&lt;/p>
$$
\mathcal{L}_{\mathrm{InfoNCE}} = F_{\theta}(x,y) + \log\bigl( \exp\bigl[-F_{\theta}(x,y)\bigr] + \sum_{k=1}^{K} \exp\bigl[-F_{\theta}(x,\hat{y}_k)\bigr] \bigr).
$$
&lt;p>The logarithmic term ensures that reducing the positive energy is not sufficient: the model must also assign relatively higher energies to the contrastive samples.&lt;/p>
&lt;h1 id="why-contrastive-training-becomes-problematic">Why Contrastive Training Becomes Problematic&lt;/h1>
&lt;p>Contrastive training solves collapse by explicitly specifying where the energy should be raised. This creates a fundamental sampling problem. For each context $x$, the model is trained to establish an energy landscape in the target representation space such that the observed compatible target has lower energy than an incompatible one:&lt;/p>
$$
F(x,y) &lt; F(x,\hat{y}).
$$
&lt;p>However, increasing the energy at a finite collection of contrastive points does not constrain the energy elsewhere. If the target representation $s_y\in\mathbb{R}^{d}$ has high dimension, a flexible energy function can potentially remain low in substantial portions of the representation space that have never been sampled as negatives.&lt;/p>
&lt;p>Consequently, successful contrastive training requires sufficiently broad coverage of the negative space. LeCun identifies two practical problems:&lt;/p>
&lt;ol>
&lt;li>a mechanism is required for generating or selecting suitable contrastive samples;&lt;/li>
&lt;li>the number of contrastive samples needed to constrain a high-dimensional energy surface can grow very rapidly with representation dimensionality.&lt;/li>
&lt;/ol>
&lt;p>In the worst case, the required number of samples can grow exponentially with the dimensionality of the representation. Thus, although contrastive learning is a valid way of preventing collapse, its computational cost is coupled to the dimensionality of the representation.&lt;/p>
&lt;p>This observation motivates the alternative that is particularly important to JEPA: &lt;em>non-contrastive, regularized training&lt;/em>.&lt;/p>
&lt;h1 id="non-contrastive-jepa-training">Non-Contrastive JEPA Training&lt;/h1>
&lt;p>Rather than explicitly sampling points whose energy should be high, non-contrastive training attempts to control the geometry and information content of the representation itself. LeCun identifies four criteria:&lt;/p>
&lt;ol>
&lt;li>maximize the information content of $s_x$ about $x$;&lt;/li>
&lt;li>maximize the information content of $s_y$ about $y$;&lt;/li>
&lt;li>minimize the representation prediction error;&lt;/li>
&lt;li>minimize the information content of the latent variable $z$.&lt;/li>
&lt;/ol>
&lt;p>
&lt;figure id="figure-the-four-criteria-for-non-contrastive-jepa-training-criteria-1-2-and-4-together-prevent-the-energy-function-from-collapsing-source-lecun-2022-figure-13">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Non-contrastive training of JEPA" srcset="
/post/jepa/images/lecun2022_fig13_hu2beb6db5967f94e297f444c1f67430d5_149235_580e0947da5877474231066084f62774.webp 400w,
/post/jepa/images/lecun2022_fig13_hu2beb6db5967f94e297f444c1f67430d5_149235_2deeeaada0ae2bf87576af471385df1e.webp 760w,
/post/jepa/images/lecun2022_fig13_hu2beb6db5967f94e297f444c1f67430d5_149235_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://gad-ma.github.io/post/jepa/images/lecun2022_fig13_hu2beb6db5967f94e297f444c1f67430d5_149235_580e0947da5877474231066084f62774.webp"
width="760"
height="431"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
The four criteria for non-contrastive JEPA training. Criteria 1, 2 and 4 together prevent the energy function from collapsing. Source: LeCun, 2022, Figure 13.
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;p>The resulting conceptual objective can be written schematically as&lt;/p>
$$
\mathcal{L}_{\mathrm{JEPA}} = \underbrace{\mathcal{L}_{\mathrm{pred}}}_{\text{predictability}} + \lambda_x \underbrace{\mathcal{R}_x}_{\text{information}} + \lambda_y \underbrace{\mathcal{R}_y}_{\text{information}} + \lambda_z \underbrace{\mathcal{R}_z}_{\text{latent info}},
$$
&lt;p>where&lt;/p>
$$
\mathcal{L}_{\mathrm{pred}} = D\!\bigl(s_y,\, P_{\phi}(s_x,z)\bigr).
$$
&lt;p>The important point is that the original JEPA proposal does &lt;em>not&lt;/em> specify one universal closed-form non-contrastive loss. Instead, it specifies these four information-theoretic requirements and identifies methods such as VICReg and Barlow Twins as possible concrete mechanisms for satisfying them.&lt;/p>
&lt;h2 id="criteria-1-and-2-preventing-representational-collapse">Criteria 1 and 2: preventing representational collapse&lt;/h2>
&lt;p>The first two criteria require the representations to remain informative: $s_x = f_{\theta_x}(x)$ should preserve information about $x$, while $s_y = f_{\theta_y}(y)$ should preserve information about $y$. Without these constraints, the optimization can reduce the prediction error by making the representations constant: $s_x=s_y=c$.&lt;/p>
&lt;p>Thus, information-preserving regularization serves the same conceptual role as negative samples in contrastive learning: preventing the energy surface from becoming uniformly low. Whereas contrastive methods explicitly raise the energy of sampled negatives, non-contrastive methods directly constrain the geometry and variance of the representations.&lt;/p>
&lt;h2 id="criterion-3-predictability">Criterion 3: predictability&lt;/h2>
&lt;p>The third criterion is supplied directly by the JEPA energy:&lt;/p>
$$
\mathcal{L}_{\mathrm{pred}} = D(s_y,\tilde{s}_y).
$$
&lt;p>Information in $s_y$ that cannot be predicted from $s_x$ directly inflates this error. Consequently, the optimization balances retaining input information against retaining only what is predictable from context.&lt;/p>
&lt;h2 id="criterion-4-limiting-the-latent-variable">Criterion 4: limiting the latent variable&lt;/h2>
&lt;p>The latent variable introduces a second collapse mechanism. Consider $\tilde{s}_y=P_{\phi}(s_x,z)$ and suppose that $z$ has at least as much capacity as $s_y$. A sufficiently expressive predictor could simply ignore $s_x$ and learn $P_{\phi}(s_x,z)=z$. For any target representation $s_y$, one could then select $\hat{z}=s_y$, giving&lt;/p>
$$
D(s_y,P_{\phi}(s_x,\hat{z})) = D(s_y,s_y) = 0.
$$
&lt;p>The model can therefore obtain zero prediction error without learning a meaningful dependency between $x$ and $y$. The latent variable must consequently have limited information capacity. Possible constraints include:&lt;/p>
&lt;ul>
&lt;li>discrete latent variables;&lt;/li>
&lt;li>low-dimensional latent variables;&lt;/li>
&lt;li>sparse latent variables;&lt;/li>
&lt;li>noisy or stochastic latent variables.&lt;/li>
&lt;/ul>
&lt;p>For example, if $z$ takes only $K$ discrete values, then for a fixed $s_x$ the predictor can produce at most $K$ zero-error predictions:&lt;/p>
$$
\bigl\{ P_{\phi}(s_x,0),\, P_{\phi}(s_x,1),\, \ldots,\, P_{\phi}(s_x,K-1) \bigr\}.
$$
&lt;p>If instead $z\in\mathbb{R}^d$ with $d &amp;lt; \dim(s_y)$, then, assuming a smooth predictor, the set ${P_{\phi}(s_x,z):z\in\mathbb{R}^d}$ is at most a $d$-dimensional manifold embedded in the higher-dimensional space of $s_y$.&lt;/p>
&lt;p>Thus, limiting the latent capacity directly limits the volume of target representation space that can be assigned low energy.&lt;/p>
&lt;h1 id="a-concrete-non-contrastive-instantiation-vicreg">A Concrete Non-Contrastive Instantiation: VICReg&lt;/h1>
&lt;p>LeCun&amp;rsquo;s paper uses VICReg (Variance-Invariance-Covariance Regularization) as an example of how its abstract information-preservation criteria can be implemented in a differentiable training objective. The central idea is to prevent individual representation dimensions from becoming constant while also discouraging redundancy between dimensions.&lt;/p>
&lt;p>Let&lt;/p>
$$
v_x=g_{\psi}(s_x), \qquad v_y=g_{\psi}(s_y)
$$
&lt;p>be higher-dimensional embeddings obtained by an optional trainable &amp;ldquo;expander&amp;rdquo; network. Given a batch of $B$ samples, let $V\in\mathbb{R}^{B\times d}$ denote the resulting representation matrix.&lt;/p>
&lt;h2 id="variance-constraint">Variance constraint&lt;/h2>
&lt;p>For each representation dimension $j$, VICReg imposes a lower bound on its batch standard deviation:&lt;/p>
$$
\begin{array}{c} \sigma_j = \sqrt{ \frac{1}{B} \sum_{i=1}^{B} \bigl( V_{ij}-\bar V_j \bigr)^2 +\epsilon }. \end{array}
$$
&lt;p>A hinge-style variance penalty can then be written as&lt;/p>
$$
\mathcal{L}_{\mathrm{var}} = \frac{1}{d} \sum_{j=1}^{d} \max(0,\gamma-\sigma_j),
$$
&lt;p>where $\gamma$ is a prescribed minimum standard deviation. This term makes a constant representation dimension expensive. In particular, if $V_{1j}=V_{2j}=\cdots=V_{Bj}$, then $\sigma_j \approx 0$ and the variance penalty is positive.&lt;/p>
&lt;h2 id="covariance-constraint">Covariance constraint&lt;/h2>
&lt;p>Variance alone does not prevent all dimensions from encoding the same information. Let&lt;/p>
$$
C = \frac{1}{B-1} (V-\bar V)^{\top}(V-\bar V)
$$
&lt;p>be the empirical covariance matrix. VICReg penalizes the off-diagonal elements:&lt;/p>
$$
\mathcal{L}_{\mathrm{cov}} = \frac{1}{d} \sum_{i\neq j} C_{ij}^{2}.
$$
&lt;p>The preferred covariance structure is therefore approximately diagonal, $C \approx \operatorname{diag}(\sigma_1^2,\ldots,\sigma_d^2)$, so the representation is encouraged to use its dimensions non-redundantly.&lt;/p>
&lt;h2 id="prediction-term">Prediction term&lt;/h2>
&lt;p>The JEPA prediction criterion supplies the invariance/predictability term, $\mathcal{L}_{\mathrm{pred}} = D(s_y,\tilde{s}_y)$. For the simplest invariant formulation, $x$ and $y$ are two different views of the same underlying content, the predictor is the identity, $\tilde{s}_y=s_x$, and&lt;/p>
$$
\mathcal{L}_{\mathrm{pred}} = \|s_x-s_y\|_2^2.
$$
&lt;p>The full VICReg-style objective can then be written schematically as&lt;/p>
$$
\mathcal{L}_{\mathrm{VICReg}} = \lambda_{\mathrm{inv}}\mathcal{L}_{\mathrm{pred}} + \lambda_{\mathrm{var}}\mathcal{L}_{\mathrm{var}} + \lambda_{\mathrm{cov}}\mathcal{L}_{\mathrm{cov}}.
$$
&lt;p>This is an important conceptual transition. Contrastive methods prevent collapse by making representations of &lt;em>different samples&lt;/em> dissimilar. VICReg instead prevents collapse by making the &lt;em>dimensions of the representation&lt;/em> non-degenerate and non-redundant. LeCun consequently describes VICReg as effectively &amp;ldquo;contrastive over dimensions&amp;rdquo; rather than over samples.&lt;/p>
&lt;p>
&lt;figure id="figure-vicreg-applied-to-a-jepa-the-representations-are-expanded-into-higher-dimensional-embeddings-v_x-and-v_y-and-the-loss-drives-their-covariance-matrix-toward-the-identity-source-lecun-2022-figure-14">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Training a JEPA with VICReg" srcset="
/post/jepa/images/lecun2022_fig14_hu485e6bdadef5a041baf0d93de766be63_104010_4cc8b01f69205ab1ad8ff07061187816.webp 400w,
/post/jepa/images/lecun2022_fig14_hu485e6bdadef5a041baf0d93de766be63_104010_2ecf30507d5ea92ea3cee30d072427a6.webp 760w,
/post/jepa/images/lecun2022_fig14_hu485e6bdadef5a041baf0d93de766be63_104010_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://gad-ma.github.io/post/jepa/images/lecun2022_fig14_hu485e6bdadef5a041baf0d93de766be63_104010_4cc8b01f69205ab1ad8ff07061187816.webp"
width="760"
height="458"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
VICReg applied to a JEPA: the representations are expanded into higher-dimensional embeddings v_x and v_y, and the loss drives their covariance matrix toward the identity. Source: LeCun, 2022, Figure 14.
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;h1 id="the-jepa-objective-as-a-trade-off">The JEPA Objective as a Trade-off&lt;/h1>
&lt;p>The resulting optimization balances three requirements: informativeness ($s_x$ must retain information about $x$), predictability ($s_y$ must be predictable from $s_x$), and non-degeneracy ($s_x, s_y$ must avoid collapse).&lt;/p>
&lt;p>Crucially, the representation should not simply maximize raw mutual information. An invertible encoder $s_y = f_{\theta_y}(y)$ preserves all information in $y$, but retains unpredictable noise and small-scale variations that cannot be inferred from $x$. Instead, JEPA seeks a representation that compresses the data manifold along directions of unpredictable variation while remaining sufficiently non-degenerate along directions needed to distinguish predictable states.&lt;/p>
&lt;h1 id="summary">Summary&lt;/h1>
&lt;p>A generic JEPA can be summarized by the following computational graph:&lt;/p>
$$
\hbox{$x \xrightarrow{\;f_{\theta_x}\;} s_x \xrightarrow{\;P_{\phi}(\cdot,z)\;} \tilde{s}_y \quad\longleftrightarrow\quad s_y \xleftarrow{\;f_{\theta_y}\;} y$.}
$$
&lt;p>The prediction error $D(s_y,\tilde{s}_y)$ defines the energy, while regularization or contrastive training determines how the energy landscape is prevented from collapsing. The essential properties are:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Prediction occurs in representation space rather than observation space.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>The target representation may discard unpredictable or irrelevant details.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Multiple compatible targets can be represented through encoder invariance or latent-variable prediction.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Prediction error alone is insufficient because the representation can collapse.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Contrastive training prevents collapse by explicitly raising the energy of negative samples.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Non-contrastive training instead constrains the information content and geometry of the representations.&lt;/strong>&lt;/li>
&lt;li>&lt;strong>When a latent variable is used, its information capacity must itself be restricted.&lt;/strong>&lt;/li>
&lt;/ol>
&lt;p>These principles define the abstract JEPA. The rest of this series asks a more specific question: &lt;em>how should this abstract architecture and objective be instantiated for high-dimensional images and, eventually, spatiotemporal video?&lt;/em> The next posts take on that question, starting with image-based JEPAs.&lt;/p>
&lt;h1 id="references">References&lt;/h1>
&lt;ul>
&lt;li>LeCun, Y. (2022). &lt;a href="https://openreview.net/pdf?id=BZ5a1r-kVsf" target="_blank" rel="noopener">&lt;em>A Path Towards Autonomous Machine Intelligence&lt;/em>&lt;/a>. OpenReview position paper, version 0.9.2.&lt;/li>
&lt;/ul></description></item></channel></rss>