Denoising with a Joint-Embedding Predictive Architecture

## Abstract

Abstract Joint-embedding predictive architectures (JEPAs) have shown substantial promise in self-supervised representation learning, yet their application in generative modeling remains underexplored. Conversely, diffusion models have demonstrated significant efficacy in modeling arbitrary probability distributions. In this paper, we introduce Denoising with a Joint-Embedding Predictive Architecture (D-JEPA), pioneering the integration of JEPA within generative modeling. By recognizing JEPA as a form of masked image modeling, we reinterpret it as a generalized next-token prediction strategy, facilitating data generation in an auto-regressive manner. Furthermore, we incorporate diffusion loss to model the per-token probability distribution, enabling data generation in a continuous space. We also adapt flow matching loss as an alternative to diffusion loss, thereby enhancing the flexibility of D-JEPA. Empirically, with increased GFLOPs, D-JEPA consistently achieves lower FID scores with fewer training epochs, indicating its good scalability. Our base, large, and huge models outperform all previous generative models across all scales on class-conditional ImageNet benchmarks. Beyond image generation, D-JEPA is well-suited for other continuous data modeling, including video and audio. Project page: https://d-jepa.github.io/ .

## 1 Introduction

The extraordinary success of generative language models (Radford et al., ; ; Brown et al., ), which excel in next-token prediction, has spurred efforts to adapt autoregressive models for other domains, notably image generation (Kilian et al., ; Zeng et al., ; Li et al., ; Esser et al., ; Yu et al., ). Typically, this involves discretizing visual data into token sequences (Van Den Oord et al., ), a process that can sometimes degrade image quality. Despite this, the technique has gained substantial interest due to its powerful capabilities  (Razavi et al., ; Peng et al., ; Yan et al., ).

Recently, diffusion models (Ho et al., ; Song et al., ; Nichol & Dhariwal, ) have emerged as a dominant force in generative modeling, surpassing generative adversarial networks (GANs) (Goodfellow et al., ; Wang et al., ; Goodfellow et al., ) with their superior performance in producing high-fidelity images. Concurrently, significant advancements have been made in self-supervised representation learning, particularly through masked image modeling (Xie et al., ; Baevski et al., ; Assran et al., ; He et al., ) and invariance-based techniques (Assran et al., ; Caron et al., ; Chen & He, ; Grill et al., ; Zbontar et al., ). However, generative modeling and representation learning development has largely progressed in isolation, with limited cross-fertilization (Li et al., ).

Recent efforts have sought to integrate diffusion models within an autoregressive framework, such as MAR (Li et al., ) and Transfusion (Zhou et al., ). These models, however, primarily focus on enhancing generative model performance from the perspective of generation alone, often overlooking advancements in representation learning. Conversely, within the realm of representation learning, researchers tend to emphasize model performance on downstream tasks  (Assran et al., ), neglecting the potential for these models to excel in generative modeling.
To bridge this gap, we propose a novel framework, termed “Denoising with a Joint-Embedding Predictive Architecture” (D-JEPA), that effectively leverages next-token prediction from a representation learning perspective. Specifically, we adopt the joint-embedding predictive architecture as the core of our design, enabling us to reframe masked image modeling methods into a generalized next-token prediction strategy, thus facilitating autoregressive data generation. Additionally, we incorporate a diffusion loss (or flow matching loss) to model the per-token probability distribution, allowing for data generation in a continuous space.

Specifically, D-JEPA consists of three identical visual transformer backbones (Dosovitskiy et al., ): a context encoder $\phi$, a target encoder $\bar{\phi}$, and a feature predictor $\gamma$. It employs two loss functions: diffusion loss ($\mathcal{L}_{d}$) and prediction loss ($\mathcal{L}_{p}$), both involving a multi-layer perceptron (MLP) network. The denoising MLP, used in diffusion loss, is applied to each masked token $x_{i}$, modeling the conditional probability distribution $p(x_{i}\mid z_{i})$ and evaluating the predicted latent variable $z_{i}$ generated by the feature predictor $\gamma$. The prediction loss ($\mathcal{L}_{p}$), using a smooth loss function $l_{1}$, facilitates the latent variables $z_{i}$ to capture high-level semantic information.

Empirically, D-JEPA exhibits a consistent decrease in FID scores as GFLOPs increase, achieving these results with fewer training epochs, indicating its good scalability. Our base, large, and huge variants outperform all previously generative models across different scales on class-conditional ImageNet benchmarks. In our comprehensive experiments, we further advanced the field of generative models by substituting the diffusion loss with flow matching loss (Lipman et al., ). This substitution enables D-JEPA to excel in image generation and modeling other types of continuous data, including video and audio. Moreover, D-JEPA exhibits remarkable flexibility, extending seamlessly to text-conditioned and multi-modal generations.

Our contributions are threefold. Firstly, we successfully integrate advancements in representation learning into generative modeling, achieving state-of-the-art performance on the ImageNet benchmark. Secondly, we validate the effectiveness of the generalized next-token prediction approach in generative modeling, demonstrating superior scalability, which establishes a robust foundation for developing more powerful text-conditioned models. Lastly, D-JEPA exhibits impressive extensibility, directly applicable to generate images, videos, audio, and more, providing theoretical support for constructing unified multi-modal models.

## 2 Background

Figure: Figure 1: Data flow during D-JEPA training. Initially, the training data is divided into non-overlapping semantic tokens, which can be either in the raw space or in the latent space obtained after VAE encoding. A random subset of these input tokens is then masked. The feature predictor $\gamma$ is employed to predict features for these masked tokens, utilizing the unmasked tokens as contextual information. Each masked token is concurrently subjected to a diffusion loss (or flow matching loss) to learn the distribution of each token $p(x_{i}|z_{i})$, independently. Additionally, a prediction loss is applied, compelling each masked token to regress towards the target tokens $g_{i}$.
Refer to caption: x1.png

D-JEPA is grounded in the principles of joint-embedding predictive architectures (JEPAs) and diffusion models. We provide an overview of these methodologies alongside a generalized next-token prediction strategy to facilitate an understanding of our approach.

#### Joint-embedding predictive architectures (JEPAs).

Self-supervised learning has transformed representation learning by enabling systems to uncover autonomously and model relationships within their inputs (LeCun et al., ). Among these methods, joint-embedding predictive architectures (JEPAs)(LeCun, ; Bardes et al., ; ; Guetschel et al., ) have gained prominence. JEPAs are designed to predict the embeddings of a target signal using a context signal processed through a predictor network, which is conditioned on an additional (potentially latent) variable, such as class labels.

A significant challenge in deploying JEPAs is representation collapse, which occurs when the energy landscape flattens, causing the encoder to produce uniform outputs regardless of the inputs. This uniformity negates the advantages of learned representations (Assran et al., ). Various strategies have been proposed to address this issue. Contrastive losses (He et al., ; Chen & He, ) work by explicitly separating the embeddings of negative samples. Non-contrastive losses (Zbontar et al., ; Bardes et al., ) aims to reduce redundancies between embeddings, thereby improving robustness. Clustering-based methods (Caron et al., ; Assran et al., ; ) increase the entropy of the aggregate embedding to maintain diversity. Additionally, heuristic approaches (Chen & He, ; Grill et al., ; Baevski et al., ; Assran et al., ) often utilize asymmetric architectural designs between the context encoder $\phi$ and the target encoder $\bar{\phi}$ to prevent collapse.

However, the issue of representation collapse is effectively mitigated in D-JEPA due to the introduction of an additional diffusion loss for the predicted embeddings. The diffusion loss does not reside in the same energy landscape as JEPAs, thus effectively avoiding model collapse. Consequently, similar to the approach in LeCun (), we can employ two identical networks as the context and target encoders. The parameters of the target encoder are efficiently updated through an exponential moving average method, significantly enhancing training efficiency and reducing the number of parameters that need to be learned. Refer to Sec. 3.2 for more details.

#### Diffusion models.

Denoising diffusion models provide a robust framework for modeling arbitrary distributions (Croitoru et al., ). Given a ground truth sample $x$ conditioned on a variable $z$, the objective is to model the conditional probability distribution $p(x|z)$. The sample $x$ could represent various domains, such as images in pixel space, features in latent space, or control signals in robotic systems (Chi et al., ; Team et al., ). In our case, $x$ represents a token, while $z$ contains information to aid in reconstructing $x$; here, $z$ corresponds to the predicted embeddings by feature predictor $\gamma$.

Following the formulation presented in Dhariwal & Nichol (), we define the loss function for modeling the underlying probability distribution $p(x|z)$ using a denoising criterion:

$$ $\mathcal{L}(z,x)=\mathbb{E}_{\varepsilon,t}\left[\left\|\varepsilon- \varepsilon_{\theta}(x^{t}|t,z)\right\|^{2}\right],$ (1) $$

where $\varepsilon$ represents a noise sample from the normal distribution $\mathcal{N}(\mathbf{0},\mathbf{I})$. The noise-corrupted sample $x^{t}$ is expressed as $x^{t}=\sqrt{\bar{\alpha}_{t}}x+\sqrt{1-\bar{\alpha}_{t}}\varepsilon$, with $\bar{\alpha}_{t}$ defining a noise schedule (Ho et al., ; Nichol & Dhariwal, ) and $t$ indicating a specific time step within this schedule. The function $\varepsilon_{\theta}(x^{t}|t,z)$ denotes the network processing $x^{t}$, conditioned on both $t$ and $z$. As discussed in Song & Ermon () and Song et al. (), Eq. 1 acts as a form of score matching, associated with a loss function regarding the score function of $p(x|z)$, represented as $\nabla\log_{x}p(x|z)$.

Unlike typical applications of diffusion models that represent the joint distribution of all pixels or tokens, our approach leverages the diffusion model to represent the distribution of individual tokens following Li et al. (), i.e., $p(x_{i}|z_{i})$. This allows us to simultaneously apply both diffusion loss and prediction loss to the tokens. Consequently, the noise estimator $\varepsilon_{\theta}$, parameterized by $\theta$, can be efficiently modeled using a small MLP network in our case. This significantly enhances the efficiency of the denoising process in the continuous space. Further details are provided in Sec. 3.3.

#### Generalized next-token prediction.

Next-token prediction, or autoregressive modeling, typically predicts the next token based on preceding tokens, establishing a sequential dependency (Radford et al., ). Generalized next-token prediction techniques, such as MaskGIT (Chang et al., ) and MAGE (Li et al., ), integrate an MAE-style (He et al., ) encoder and decoder with positional embeddings to streamline the prediction process. This approach facilitates interaction among known tokens and accelerates inference by generating multiple tokens per step, as demonstrated in the next set-of-token prediction strategies like MAR (Li et al., ), even without key-value caching (Shazeer, ).

Our D-JEPA model extends these innovations by integrating the masked image modeling approach as a generalized next-token prediction strategy to facilitate an autoregressive generation manner. We can flexibly adjust the number of tokens predicted in each step by controlling the auto-regressive steps. Contrary to the intuition formed by existing methods (Li et al., ; ), the best performance under the D-JEPA architecture is not achieved when the auto-regressive steps are maximized, i.e., when the generalized next-token prediction predicts only one token at a time. Moreover, as the scale of the model parameters increases, the number of auto-regressive steps required to achieve the best sampling results decreases accordingly. This fully demonstrates that converting the masked image modeling method into a next-token prediction strategy is not only feasible but also highly effective. Refer to the Experiment part in Sec. 4 for more analysis.

## 3 Methodology

In this section, we will first introduce how to convert masked image modeling into the next-token prediction. Following this, we will explain how representation learning and diffusion learning coexist within D-JEPA. Finally, we will describe how to generate samples using the generalized next-token prediction approach. The overall architecture of D-JEPA is illustrated in Fig. 1.

For clarity, we denote a sequence of tokens using blackboard bold letters, such as $\mathbb{X}$, with individual tokens represented by lowercase letters with subscripts (e.g., $x_{i}$ as a token in $\mathbb{X}$). The notation $|\mathbb{X}|$ indicates the number of tokens in the sequence.

### 3.1 Tokenization and Masking

In masked image modeling, certain image regions are randomly masked during training, prompting the feature predictor $\gamma$ to predict the content of these masked areas based on the context (unmasked) regions. In representation learning, masking is typically applied directly to raw pixels (He et al., ; Assran et al., ), and it has been observed that masking contiguous regions significantly enhances the representation learning capability. This is crucial, as it implies that when we patchify an image into tokens, we can randomly mask tokens without degrading performance since each token inherently represents a continuous region. Based on this, we can patchify images into non-overlapping semantic tokens $\mathbb{U}$ based on a specific patch size $p$.

Although images are directly segmented into patches on raw pixels, which is also the standard practice in visual transformers (Dosovitskiy et al., ), recent generative models (Li et al., ; ; Rombach et al., ) tend to first encode images into the latent space using a VAE before performing patchification, arguing that this significantly reduces the training cost of generative models and accelerates the sampling speed. However, we found that this approach noticeably degrades D-JEPA’s performance in representation tasks.(^1^11More analysis about D-JEPA’s performance in representation tasks have been listed in Appendix E.2.) Since the primary goal of this work is to ensure that D-JEPA functions as an outstanding generative model, we adopted the latent space modeling strategy initially proposed by Rombach et al. (). (It is important to note that training in latent space is not a necessity for D-JEPA; it can be trained in raw space and still achieve excellent results.)

Subsequently, we perform random masking on these tokens. Masking ratios $r_{mask}$ are sampled from a truncated normal distribution with a mean of 1.0, a standard deviation of 0.25, and a lower bound of 0.7. Consequently, more than 70% of the tokens are randomly masked. This results in a sequence of randomly masked tokens of length $\lceil r_{mask}\cdot|\mathbb{U}|\rceil$, and a sequence of remaining unmasked tokens, $\mathbb{Y}$. Masking a substantial portion of tokens reduces both pre-training time and memory usage while improving performance, consistent with findings in previous works(He et al., ; Li et al., ; Assran et al., ).

### 3.2 Representation Learning with JEPAs

Earlier masked image modeling methods, such as MAE (He et al., ), directly use a decoder network to predict the missing raw pixels. This approach gives these models some outpainting capabilities (i.e., completing missing parts of an image), but they still cannot directly generate high-quality images. Subsequent works, such as DiffMAE (Wei et al., ), attempted to leverage diffusion models within MAE to enhance the image generation capabilities of these models, but the results were limited. Moreover, this direct raw pixel prediction approach severely restricts the model’s representation ability, especially compared to models like CLIP (Radford et al., ), which use contrastive learning on massive datasets.

Meanwhile, a new architecture called JEPA has gained widespread attention and was successfully applied to representation learning on ImageNet by Assran et al. (), achieving excellent results. JEPA does not directly predict the missing raw pixels; instead, it uses a separate feature predictor $\gamma$ to predict the target embedding $z_{i}$ corresponding to the missing parts. The target embedding $g_{i}$, generated by the target encoder $\bar{\phi}$ by feeding all tokens ($\mathbb{U}$), is used as the ground truth for $z_{i}$.

The prediction loss objective for unsupervised representation learning on each masked token is defined as:

$$ $\mathcal{L}_{p}=\mathbb{E}_{z_{i}=\psi(c_{i}),g_{i}}\left[\mathcal{D}(u_{ \theta}(z_{i}),g_{i})\right],$ (2) $$

where $\mathcal{D}(u_{\theta}(z_{i}),g_{i})$ is a distance measure function, and $u_{\theta}(z_{i})$ is the projection feature of $z_{i}$ using a two-layer MLP $u_{\theta}$. This loss is optimized exclusively for masked tokens, as optimizing for all tokens has been shown to diminish both generative and representational performance, as noted in He et al. (); Li et al. (; ). In fact, the choice of distance measure function $\mathcal{D}$ in Eq. 2 is relatively flexible. In Assran et al. (), the MSE function was chosen, while Bardes et al. () used the $l_{1}$ function. Here, we use the smoothed $l_{1}$ function, following Baevski et al. (), which we found to be more stable.

Since JEPA predicts feature embeddings, they cannot be directly used for generation tasks or even outpainting. Experiments show that token embeddings trained with JEPA can only reconstruct image content somewhat related to the surrounding context and are almost incapable of generating high-quality images (Bardes et al., ). This further diminishes the consideration of JEPA architecture as a generative model. Here, we surprisingly find that as long as the JEPA training process also includes generative task training, excellent generative results can be achieved, which will be elaborated on in the next section.

We use three identical visual transformers as the context encoder $\phi$, target encoder $\bar{\phi}$, and feature predictor $\gamma$. The parameters of $\phi$ and $\gamma$ are randomly initialized and then updated with a gradient descent method. The parameters of the target encoder are initialized identically to the context encoder and then updated via an exponentially moving average of the context encoder parameters:

$$ $\bar{\phi}\leftarrow\alpha\bar{\phi}+(1-\alpha)\phi,$ (3) $$

where $\alpha$ controls the update frequency. In Bardes et al. () and Assran et al. (), a linear warmup is applied to gradually increase $\alpha$ from a smaller value to a larger one to effectively control the update speed of the target encoder, thereby preventing the model collapse. Thanks to the constraint of diffusion loss, for D-JEPA, we simply use a constant $\alpha=0.9999$, which is sufficient.

In Eq. 2, $g_{i}=\text{sg}(\bar{\phi}(\mathbb{U}))$, where $\text{sg}(\cdot)$ denotes a stop-gradient operation, which does not backpropagate through its argument. This ensures that the parameters of the target encoder $\bar{\phi}$ are updated only through exponentially moving average , i.e., Eq. 3, a strategy that has been used to prevent collapse in image pre-training (Grill et al., ), and studied empirically (Xie et al., ) and theoretically (Tian et al., ) (^2^22A theoretical motivation for the effectiveness of this collapse prevention strategy is proposed in Appendix E.1.).

### 3.3 Diffusion Learning with a Denoising MLP

Our method diverges from traditional approaches by focusing on learning the conditional distribution $p(x_{i}|z_{i})$ for each token, given $z_{i}$, rather than capturing the distribution of entire images. This approach eliminates the need to denoise the entire JEPA model, as some prior works require Hatamizadeh et al. (); Peebles & Xie (); Wei et al. (), allowing us to utilize a significantly smaller network to model each token individually.

Hence, the denoising loss objective can be formulated by slightly modifying Eq. 1 to model the token distribution as:

$$ $\mathcal{L}_{d}=\mathbb{E}_{\varepsilon,t}\left[\left\|\varepsilon-\varepsilon _{\theta}(x_{i}^{t}|t,z_{i})\right\|^{2}\right].$ (4) $$

For denoising, we employ a compact multi-layer perceptron (MLP) comprising a few residual blocks (He et al., ) as $\varepsilon_{\theta}$. Each block sequentially applies LayerNorm (LN) (Ba et al., ), a linear layer, the SiLU activation function (Elfwing et al., ), and another linear layer, integrated with a residual connection, following Li et al. ().
$z_{i}$ is added to the time embedding of the noise schedule time-step $t$, then conditions the MLP in the LN layers via AdaLN (Peebles & Xie, ). During training, we independently sample $t$ four times for each token to maximize the utilization of the diffusion loss without recomputing $z_{i}$.

At inference time, it is required to draw samples from the distribution $p(x_{i}|z_{i})$. Sampling is done via a reverse diffusion procedure (Ho et al., ):

$$ $x^{i}_{t-1}=\frac{1}{\sqrt{\alpha_{t}}}\left(x^{i}_{t}-\frac{1-\alpha_{t}}{ \sqrt{1-\bar{\alpha}_{t}}}\varepsilon_{\theta}(x^{i}_{t}|t,z_{i})\right)+ \sigma_{t}\delta,$ $$

where $\delta$ is sampled from the Gaussian distribution $\mathcal{N}(\mathbf{0},\mathbf{I})$ and $\sigma_{t}$ is the noise level at time step $t$. Starting with $x^{i}_{T}\sim\mathcal{N}(\mathbf{0},\mathbf{I})$, this procedure produces a sample $x^{i}_{0}$ such that $x^{i}_{0}\sim p(x_{i}|z_{i})$.

We adopt the temperature sampling method presented in Dhariwal & Nichol (); Li et al. (). Conceptually, with a temperature $\tau$, one would sample from the (renormalized) probability $p(x_{i}|z_{i})^{\frac{1}{\tau}}$, whose score function is $\frac{1}{\tau}\nabla\log p(x_{i}|z_{i})$. Intuitively, we adjust the noise variance $\sigma_{t}\delta$ in the sampler by $\tau$ to control the sample diversity. Experimentally, $\tau=0.98$ and $\tau=0.94$ are suitable for image generation with and without classifier-free guidance, respectively.

Furthermore, we also introduce the recently popular flow matching loss (Lipman et al., ), i.e., Eq. 7, as an alternative to the denoising loss (Eq. 4). Overall, flow matching achieves faster convergence and generates higher-quality visual content, and it can be more easily adapted to different scenarios. However, for scenarios where the diffusion loss can converge, fully trained diffusion loss can achieve better performance than flow-matching loss. (^3^33Here, we discuss flow matching loss and diffusion loss, which are not equivalent to flow matching models and diffusion models. For a detailed analysis, please refer to Appendix F.)

### 3.4 Training with D-JEPA

By choosing different training objectives, D-JEPA can seamlessly transition between representation learning and diffusion learning without any changes to the network architecture. Typically, when faced with multiple training objectives, one needs to carefully balance each component in the final loss objective to ensure the model’s effectivenes (Kendall et al., ). However, the prediction loss $\mathcal{L}_{p}$ and the diffusion loss $\mathcal{L}_{d}$ in D-JEPA do not have conflicting or mutually exclusive relationships.

The diffusion loss effectively prevents the potential representation collapse issue faced by the prediction loss, while the prediction loss can provide the diffusion model with higher-level semantic feature information $z_{i}$. Therefore, the overall loss function can be simply defined as:

$$ $\mathcal{L}=\mathcal{L}_{d}+\mathcal{L}_{p}.$ $$

Experiments show that this approach plays a crucial role in enabling D-JEPA to converge faster and achieve better results when scaling up the model.

### 3.5 Sampling in Next Set-of-Tokens Prediction

For the evaluation of generative models in generalized next-token prediction, we adopt an iterative sampling strategy analogous to those used in Chang et al. (); Li et al. (; ), as shown in Algo. 1. This strategy gradually reduces the masking ratio from $1.0$ to $0.0$ in accordance with a cosine schedule, typically utilizing $64$ auto-regressive steps. D-JEPA employs fully randomized orderings following Li et al. () to decide the next set of tokens to predict. This design, along with the temperature $\tau$, effectively enhances the diversity of the generated samples.

When the number of auto-regressive steps $T$ equals the total tokens $N$, it means that we sample one token at each step. In this case, the generalized next-token prediction is equivalent to a typical next-token prediction. In another extreme case, $T=1$, all tokens are sampled in one step, i.e., one-step generation like He et al. ().

As analyzed in Appendix C.2, for D-JEPA, adopting a more efficient next set-of-tokens prediction strategy often yields better results. Particularly, as the model scale increases, fewer auto-regressive steps are required. Additionally, as shown in Fig. 5, one-step generation fails to produce high-quality images, which is a major reason for the subpar performance of MAE (He et al., ). Even with just eight steps of iterative sampling, we can generate clearly recognizable content. This fully demonstrates that D-JEPA’s use of the next set of tokens prediction strategy is key to ensuring its strong generative capabilities.

Figure: Algorithm 1 Generalized next token prediction with D-JEPA

## 4 Experiments

To evaluate D-JEPA’s generative performance, we conduct experiments on the ImageNet-1K dataset Russakovsky et al. () for the task of class-conditional image generation. Please refer to Appendix B for detailed experimental settings.

### 4.1 Image Synthetis

**Table 1: System-level comparison on ImageNet $256\times 256$ conditional generation without classifier-free guidance. For ease of comparison, we have omitted earlier works with FID greater than 10. A more detailed table can be found in the appendix.**
|  | #Params | #Epochs | FID$\downarrow$ | IS$\uparrow$ | Pre.$\uparrow$ | Rec.$\uparrow$ |
| --- | --- | --- | --- | --- | --- | --- |
| Base scale model (less than 300M) |  |  |  |  |  |  |
| MAR-B () | 208M | 800 | 3.48 | 192.4 | 0.78 | 0.58 |
| D-JEPA-B | 212M | 1400 | 3.40 | 197.1 | 0.77 | 0.61 |
| MaskGIT () | 227M | 300 | 6.18 | 182.1 | 0.80 | 0.51 |
| MAGE () | 230M | 1600 | 6.93 | 195.8 | - | - |
| Large scale model (300$\sim$700M) |  |  |  |  |  |  |
| GIVT () | 304M | 500 | 5.67 | - | 0.75 | 0.59 |
| MAGVIT-v2 () | 307M | 1080 | 3.65 | 200.5 | - | - |
| MAR-L () | 479M | 800 | 2.60 | 221.4 | 0.79 | 0.60 |
| DiT-XL () | 675M | 1400 | 9.62 | 121.5 | 0.67 | 0.67 |
| SiT-XL () | 675M | 1400 | 8.60 | - | - | - |
| MDTv2-XL () | 676M | 400 | 5.06 | 155.6 | 0.72 | 0.66 |
| D-JEPA-L | 687M | 480 | 2.32 | 233.5 | 0.79 | 0.62 |
| Huge scale model (900+M) |  |  |  |  |  |  |
| MAR-H () | 943M | 800 | 2.35 | 227.8 | 0.79 | 0.62 |
| D-JEPA-H | 1.4B | 320 | 2.04 | 239.3 | 0.79 | 0.62 |
| VDM++ () | 2.0B | 1120 | 2.40 | 225.3 | - | - |

Figure: Figure 2: FID vs. IS under different sampling efficiencies. We can achieve $\text{FID}\approx 4.0$ within 43 milliseconds (not plotted in the figure for compactness). Additionally, the figure shows that D-JEPA can achieve $\text{FID}\approx 2.0$ within 120 milliseconds. Refer to Table 4 for more details. All times are the average inference time using a batch size of 256 on a single H800 GPU for generating $256\times 256$ images.
[Uncaptioned image]: x2.png

#### Quantitative analysis.

We present the Fréchet Inception Distance (FID) along with other metrics in Table 1 without classifier-free guidance. Two critical conclusions can be drawn from the results: State-of-the-Art Performance: D-JEPA achieves state-of-the-art FID and Inception Score (IS) across all model scales. In particular, D-JEPA-L, with only 687M parameters, surpasses all previous works with $\text{FID}=2.32,\text{IS}=233.5$. The larger model, D-JEPA-H, further improves the benchmark set by D-JEPA-L to $\text{FID}=2.04,\text{IS}=239.3$. Efficiency in Training: As the model scale increases, the required number of training epochs for D-JEPA decreases significantly. Both D-JEPA-L and D-JEPA-H achieve state-of-the-art performance with substantially fewer training epochs compared to other models. For instance, D-JEPA-L, with 687M parameters and 480 training epochs, outperforms the previous state-of-the-art model, MAR-H, which has 943M parameters and requires 800 training epochs.

It is well known that selecting an appropriate cfg scale can significantly enhance the quality of generated images. For D-JEPA, in addition to adjusting the cfg scale, it is also necessary to choose an appropriate temperature $\tau$ to ensure optimal generation quality. We employ a coarse-to-fine grid search to determine the optimal sampling parameters, as detailed in the Appendix C.2. The optimal sampling configurations are listed on Tab. 5.

We list additional results in Tab. 2 with classifier-free guidance. To better showcase D-JEPA’s performance, we provide two sets of sampling performance metrics for each model scale, representing the optimal FID and settings more inclined towards IS. The table reveals that D-JEPA achieves superior results in this scenario as well. Specifically, D-JEPA-L and D-JEPA-H reach FID scores of 1.58 and 1.54, respectively, which are very close to the upper limit of the used VAE (FID = 1.199). Although MAR-H achieves a comparable FID (1.55), its IS (303.7) is significantly lower than that of D-JEPA-L (327.2) and D-JEPA-H (341.0), and it requires more training epochs.

#### Qualitative analysis.

In Fig. 3, we present images generated using the next set-of-tokens prediction. Even when trained on ImageNet1k, D-JEPA is capable of producing highly realistic images with rich and clear local details. Notably, the figure also demonstrates that D-JEPA-H can generate high-quality portraits (the second picture in the second row), a capability not seen in previous generative models. Additionally, as shown in Fig. 5, we observe the images generated at different auto-regressive steps. Even with just 8 steps, D-JEPA demonstrates significant generative capabilities, and at 64 steps, it nearly matches the image quality achieved at 256 steps. Fewer auto-regressive steps imply faster image generation, which is crucial for practical applications. In Fig. 2, we use a bubble chart to illustrate D-JEPA’s performance under different computational costs. Remarkably, we can sample high-quality images with $\text{FID}\approx 4.0$ in just 43 milliseconds, which significantly outperforms previous diffusion models and auto-regressive models.

#### Scaling law of D-JEPA.

**Table 2: System-level comparison on ImageNet $256\times 256$ conditional generation. To better showcase model performance, each model is evaluated with two different cfg scales (obtained by grid searching). One cfg scale provides the best FID score, while the other yields a better IS result at the cost of a negligible degradation in the FID score.**
|  | #params | FID$\downarrow$ | IS$\uparrow$ | Pre.$\uparrow$ | Rec.$\uparrow$ |
| --- | --- | --- | --- | --- | --- |
| Base scale model (less than 300M) |  |  |  |  |  |
| MAR-B () | 208M | 2.31 | 281.7 | 0.82 | 0.57 |
| D-JEPA-B(cfg=3.1) | 212M | 1.87 | 282.5 | 0.80 | 0.61 |
| D-JEPA-B(cfg=4.1) | 212M | 2.08 | 320.9 | 0.82 | 0.59 |
| Large scale model (300$\sim$700M) |  |  |  |  |  |
| GIVT () | 304M | 3.35 | - | 0.84 | 0.53 |
| MAGVIT-v2 () | 307M | 1.78 | 319.4 | - | - |
| LDM-4 () | 400M | 3.60 | 247.7 | 0.87 | 0.48 |
| MAR-L () | 479M | 1.78 | 296.0 | 0.81 | 0.60 |
| U-ViT-H () | 501M | 2.29 | 263.9 | 0.82 | 0.57 |
| ADM () | 554M | 4.59 | 186.7 | 0.82 | 0.52 |
| Flag-DiT () | 600M | 2.40 | 243.4 | 0.81 | 0.58 |
| Next-DiT () | 600M | 2.36 | 250.7 | 0.82 | 0.59 |
| DiT-XL () | 675M | 2.27 | 278.2 | 0.83 | 0.57 |
| SiT-XL () | 675M | 2.06 | 270.2 | 0.82 | 0.59 |
| MDTv2-XL () | 676M | 1.58 | 314.7 | 0.79 | 0.65 |
| D-JEPA-L(cfg=3.0) | 687M | 1.58 | 303.1 | 0.80 | 0.61 |
| D-JEPA-L(cfg=3.9) | 687M | 1.65 | 327.2 | 0.81 | 0.61 |
| Huge scale model (900+M) |  |  |  |  |  |
| MAR-H () | 943M | 1.55 | 303.7 | 0.81 | 0.62 |
| D-JEPA-H(cfg=3.9) | 1.4B | 1.54 | 324.2 | 0.81 | 0.62 |
| D-JEPA-H(cfg=4.3) | 1.4B | 1.68 | 341.0 | 0.82 | 0.61 |
| VDM++ () | 2.0B | 2.12 | 267.7 | - | - |

In summary, as the parameter scale increases, D-JEPA achieves better performance with fewer training epochs, demonstrating excellent scalability. Although similar conclusions have been observed in  Peebles & Xie () and  Li et al. (), for the former, the required training epochs increase with model size, and for the latter, the required training epochs do not decrease with model size.

Moreover, with increasing model size, we are surprised to find that the number of auto-regressive steps required for D-JEPA to achieve optimal sampling results also significantly decreases(^4^44Refer to Appendix C.2 for more details.). Specifically, for D-JEPA-H, we achieve the best sampling results with just 64 steps. This property ensures performance for constructing larger models and generating ultra-high-definition images and videos such as Sora (OpenAI, ) in the future.

### 4.2 Comprehensive Experiments

In the Appendix, we further demonstrate the excellent inpainting and outpainting capabilities of the D-JEPA model (Appendix D.3). Beyond diffusion loss, we also designed a flow matching loss to construct D-JEPA (Appendix F). Experiments show that flow matching loss performs better on many tasks. Consequently, we extended our experiments based on flow matching loss to include text-to-image/audio generation and class-conditional video generation. These extended experiments fully demonstrate that D-JEPA is capable of generating various types of continuous data, not limited to images. Furthermore, we attempted to construct a multimodal generation model based on D-JEPA. The results indicate that D-JEPA can generate continuous data and be used to build multimodal understanding and generation models (Appendix G).

## 5 Conclusion

In this study, we have introduced D-JEPA as a novel generative model that can handle the generation of continuous data. Through extensive experiments, we have preliminarily validated the feasibility of this approach. However, scaling up the D-JEPA model remains a significant challenge that warrants further investigation. Additionally, the acceleration strategies and application ecosystems for diffusion models and auto-regressive models have already reached a high level of maturity. Adopting these successful strategies for the further development of D-JEPA is crucial. We hope that this work will inspire future researchers to explore the D-JEPA architecture, laying the groundwork for the construction of a unified multimodal model in the future.

Figure: Figure 3: D-JEPA achieves state-of-the-art image quality. We showcase selected high-fidelity examples of class-conditional generation on ImageNet $256\times 256$ using D-JEPA-H.
Refer to caption: x3.png

## Appendix A Related Work

#### Self-supervised learning.

Early efforts in unsupervised learning emphasized pretext tasks designed to predict pseudo labels, such as solving jigsaw puzzles (Noroozi & Favaro, ), restoring missing patches (Pathak et al., ), and predicting image rotations (Gidaris et al., ). Despite yielding useful representations, these methods lagged behind those acquired through supervised learning.

The advent of contrastive learning marked a significant leap forward, achieving near-supervised performance with techniques like MoCo (He et al., ) and contrastive multiview coding (Tian et al., ). BYOL (Grill et al., ) further advanced the field by eliminating the need for negative pairs and employing peer networks for mutual learning. However, these methods primarily focused on image data and could not be directly applied to other continuous data types, such as audio.

Inspired by developments in natural language processing, masked image modeling (MIM) emerged as an effective approach to self-supervised learning (Kenton & Toutanova, ), extendable to continuous data types such as audio (Baevski et al., ). Models such as BEiT (Bao et al., ), PeCo (Dong et al., ), and MAE He et al. () focus on recovering visual tokens or performing pixel-level reconstruction. DiffMAE (Wei et al., ) leverages denoising diffusion decoders primarily for representation learning rather than image generation. While MIM-based methods prioritize downstream performance, they often result in suboptimal reconstructions (He et al., ; Bao et al., ).

Recent advances such as MAGE (Li et al., ) achieve high-quality representations and image generation. However, these methods are limited to image data, failing to empirically demonstrate mutual reinforcement between tasks. Our work uniquely verifies the mutual benefits of representation learning and generative modeling through empirical evidence, demonstrating how these processes can be synergistically combined for superior performance across different types of continuous data.

#### Generative modeling.

Generative models have seen significant advances in image synthesis. Generative adversarial networks (GANs) (Goodfellow et al., ; Zhang et al., ; Karras et al., ; Zhang et al., ; Brock et al., ) excel in producing realistic images but often face challenges such as training instability and mode collapse. Two-stage models (Van Den Oord et al., ; Chang et al., ; Yu et al., ; Lee et al., ) tokenize images and apply maximum likelihood estimation in the latent space, with VQ-VAE-2 (Razavi et al., ) generating diverse samples. ViT-VQGAN (Yu et al., ) utilizes vision transformers (Dosovitskiy et al., ), while MaskGIT (Chang et al., ) employs bidirectional transformers for faster decoding. Additionally, diffusion models (Ho et al., ; Song et al., ; Dhariwal & Nichol, ; Rombach et al., ) have achieved remarkable results in image synthesis.

Autoregressive models (Gregor et al., ; Van Den Oord et al., ; Van den Oord et al., ; Parmar et al., ; Chen et al., ; ) generate images as pixel sequences, utilizing recurrent neural networks (Van Den Oord et al., ), convolutional neural networks  (Van den Oord et al., ; Chen et al., ), and transformers  (Parmar et al., ; Chen et al., ). Recent approaches  (Van Den Oord et al., ; Razavi et al., ; Esser et al., ; Ramesh et al., ) adopt discrete tokens inspired by language models for image modeling. However, training these discrete tokenizers is challenging for high-quality image generation (Kolesnikov et al., ; Yu et al., ; Mentzer et al., ).

Recent developments, such as GIVT (Tschannen et al., ) and MAR (Li et al., ), introduce continuous-valued tokens, yielding promising results. Our method directly processes continuous-valued tokens via the diffusion process, ensuring high-quality image generation.

## Appendix B Experimental Setup

#### Network configuration.

We constructed three variants of D-JEPA using different visual transformer backbones: D-JEPA-B with ViT-B, D-JEPA-L with ViT-L, and D-JEPA-H with ViT-H. In all configurations, $u_{\theta}$ is implemented as a simple two-layer MLP. The denoising MLP, denoted as $\epsilon_{\theta}$, follows the implementation described in Li et al. (), comprising 6, 8, and 12 residual blocks with linear layers, respectively.

We adhered to the standard practice outlined in LeCun () for parameter counting, considering only the learnable parameters updated through gradients. Since the target encoder $\bar{\phi}$ is updated via exponential moving average and is not utilized during sampling, its parameters are excluded from the count. The number of parameters for each model is detailed in Tab. 1.

#### Training.

We trained class-conditional latent D-JEPA models at a $256\times 256$ image resolution on the ImageNet dataset (Krizhevsky et al., ), a highly competitive benchmark for generative modeling. The VAE trained by Li et al. () encodes images into a latent space of size $16\times 32\times 32$. Subsequently, we employ a patch size of $p=1$ to segment the latent space into semantic tokens, resulting in $N=256$ tokens. After sampling all tokens with D-JEPA according to Algorithm 1, we decode them to pixels using the corresponding VAE decoder. We retain the diffusion hyperparameters from ADM (Dhariwal & Nichol, ); specifically, we use a $t_{\text{max}}=1000$ linear variance schedule ranging from $1\times 10^{-4}$ to $2\times 10^{-2}$, ADM’s parameterization of the covariance $\Sigma_{\theta}$, and their method for embedding input timesteps and labels.

The final linear layer is initialized with zeros, while other layers follow standard weight initialization techniques from ViT (Dosovitskiy et al., ). We train all models using AdamW (Loshchilov & Hutter, ) with a learning rate of $8\times 10^{-4}$, incorporating a 100-epoch linear warmup and a linear weight decay from 0.02 to 0.2 for all parameters except $u_{\theta}$, $\epsilon_{\theta}$, and $\bar{\phi}$. The experiments are conducted on four workers, each equipped with 8 H800 GPUs, with a total batch size 2048. The only data augmentation applied is horizontal flipping.

Following standard practices in generative modeling, we maintain an exponential moving average of D-JEPA weights throughout training, with a decay rate of 0.9999. All reported results are based on the EMA model. The number of training epochs varies depending on the model’s performance during evaluation; training is halted once the evaluation metrics show no significant improvement.

#### Evaluation metrics.

We measure scaling performance using the Fréchet Inception Distance (FID) (Heusel et al., ), the standard metric for evaluating generative models of images. In line with convention, we compare against prior works and report FID-50K using 100 DDPM sampling steps (Ho et al., ). FID is known to be sensitive to small implementation details (Parmar et al., ); to ensure accurate comparisons, all values reported in this paper are obtained by exporting samples and using ADM’s evaluation suite (Dhariwal & Nichol, ). FID numbers reported in this paper do not use classifier-free guidance except where otherwise stated. Additionally, we report the Inception Score (IS) (Salimans et al., ) and Precision/Recall (Kynkäänniemi et al., ) as secondary metrics.

## Appendix C Sampling with generalized next token prediction

### C.1 Grid searching for optimal classifier-free guidance scale and temperature

Figure: (a) D-JEPA Base, Coarse Searching
Refer to caption: x4.png

As described in Sec. 3.3, the temperature $\tau$ controls the noise level added at each iteration during the denoising process and significantly influences the final sampling results. Therefore, we conducted a grid search to determine each model’s optimal $\tau$. Similarly, the classifier-free guidance scale cfg is known to affect sampling results notably and was also included in the grid search. We use 100 DDPM sampling steps for the denoising MLP following Li et al. (); Ho et al. () and set the auto-regressive steps to 64, which balances sampling efficiency and image quality.

#### Coarse searching.

In the coarse searching stage, we began by exploring $\tau$ from 0.90 to 1.05 with a step size of 0.01, considering $\text{cfg}\in\{1.0,2.0,3.0,4.0\}$. The results are plotted in Fig. 4(a), Fig. 4(c), and Fig. 4(e).

#### Fine searching.

Based on $\text{cfg}=3.0,4.0$ and $\tau=0.97$, we conducted a fine search for the best $\text{cfg}_{c}-\tau_{c}$ combinations. In this stage, a 2D grid search was performed with cfg ranging from $[\text{cfg}_{c}-0.3,\text{cfg}_{c}+0.3]$ with a step size of 0.1, and $\tau_{c}$ ranging from $[\tau_{c}-0.01,\tau_{c}+0.01]$ with a step size of 0.01, as illustrated in Fig. 4(b), Fig. 4(c), and Fig. 4(f).

When $\text{cfg}=1.0$, i.e., no classifier-free guidance, we found that $\tau$ in the range $[0.94,0.95]$ works well for all models. For $\text{cfg}\geq 1.0$, $\tau$ in the range $[0.97,0.99]$ performs better for all models. Fig. 4 also indicates that $\text{cfg}=3.0$ can achieve a lower FID, while $\text{cfg}=4.0$ can achieve a better IS. Therefore, we recommend setting $\tau$ to 0.98 for classifier-free guidance and cfg to either 3.0 or 4.0 as the default.

### C.2 Abalation on auto-regressive steps

**Table 3: Ablation in auto-regressive steps. $(\text{cfg},\tau)$ combinations: Base, $(1.0,0.93)$, $(3.1,0.98)$, $(4.1,0.97)$; Large, $(1.0,0.94)$, $(3.0,0.98)$, $(3.9,0.98)$; Huge, $(1.0,0.95)$, $(3.9,0.99)$, $(4.3,0.98)$.**
| AR Steps | 32 | 64 | 96 | 128 | 160 | 192 | 224 | 256 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| FID$\downarrow$ | 4.027 | 3.452 | 3.431 | 3.404 | 3.419 | 3.467 | 3.437 | 3.421 |
| IS$\uparrow$ | 184.42 | 194.57 | 195.74 | 197.07 | 196.00 | 195.29 | 194.79 | 196.03 |
| Pre.$\uparrow$ | 0.756 | 0.764 | 0.764 | 0.766 | 0.767 | 0.763 | 0.765 | 0.763 |
| Rec.$\uparrow$ | 0.614 | 0.613 | 0.602 | 0.608 | 0.609 | 0.609 | 0.604 | 0.607 |
| Sec/Img | 0.043 | 0.078 | 0.114 | 0.150 | 0.189 | 0.227 | 0.261 | 0.294 |

Unlike the typical next token prediction that predicts only the next token in raster order, the generalized next token prediction can predict multiple tokens in random order, referred to as the next set-of-token prediction in Li et al. (). As mentioned in Sec. 3.5, we use an iterative sampling strategy with a cosine step schedule. The auto-regressive steps $N$ directly affect image quality and sampling efficiency.

We started with $T=32$ and incrementally increased by 32 to 256. Note that at $T=256$, the next set-of-tokens prediction decays to the typical next token prediction. We conducted experiments both with and without classifier-free guidance. The former requires additional null condition inference, thus doubling the computational cost.

Figure: (a) One step generateion. (AR Steps=1)
Refer to caption: x10.png

The results are summarized in Tab. 3. We found that sampling with more than 64 steps for models across all scales significantly outperforms 32 steps. We also visualize the samples in Fig. 5. Notably, at 64 steps, the sampled images are already very close to the optimal results more efficiently. Contrary to our initial assumptions, we discovered that achieving the best sampling performance does not necessarily require 256 steps. This highlights the advantage of the next set-of-token prediction over typical next-token prediction in terms of sampling efficiency.

Another interesting observation is that the steps required to achieve the best FID consistently decrease as the model size increases. Specifically, we achieve the best performance for the huge model with only 64 steps.

#### Sampling efficiency.

**Table 4: Details of efficiency configuration. Sec/Img denotes the average time to generate one image (measured with a batch size of 256 on an H800 GPU).**
| Model | cfg | $\tau$ | AR Steps | FID$\downarrow$ | IS$\uparrow$ | Pre.$\uparrow$ | Rec.$\uparrow$ | Sec/Img |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Base | 1.0 | 0.93 | 32 | 4.027 | 184.42 | 0.756 | 0.614 | 0.043 |
| Base | 3.1 | 0.98 | 32 | 2.261 | 271.57 | 0.785 | 0.603 | 0.069 |
| Base | 4.1 | 0.97 | 64 | 2.081 | 320.94 | 0.817 | 0.590 | 0.120 |
| Base | 3.1 | 0.98 | 64 | 1.912 | 281.46 | 0.800 | 0.603 | 0.120 |
| Large | 3.0 | 0.98 | 64 | 1.633 | 297.46 | 0.796 | 0.627 | 0.248 |
| Huge | 4.3 | 0.98 | 64 | 1.661 | 339.62 | 0.814 | 0.614 | 0.463 |
| Huge | 3.9 | 0.99 | 128 | 1.542 | 324.17 | 0.806 | 0.619 | 0.800 |

We measured sampling efficiency using H800 hardware with a batch size 256, averaging the time to generate one image with a resolution of $256\times 256$. Results under selected configurations are plotted in Fig. 2, and more details are listed in Tab. 4.

**Table 5: The sampling configuration for results listed in Tab. 2, Tab. 1 and Tab. 6.**
|  | w/o cfg | w/ cfg (best FID) | w/ cfg (better IS) |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Model | AR Steps | $\tau$ | cfg | AR Steps | $\tau$ | cfg | AR Steps | $\tau$ |
| D-JEPA-B | 128 | 0.93 | 3.1 | 224 | 0.98 | 4.1 | 64 | 0.97 |
| D-JEPA-L | 160 | 0.94 | 3.0 | 256 | 0.98 | 3.9 | 192 | 0.98 |
| D-JEPA-H | 192 | 0.95 | 3.9 | 128 | 0.99 | 4.3 | 224 | 0.98 |

D-JEPA can generate images with an FID of 4.0 in 47 ms, demonstrating strong competitiveness. Moreover, we can achieve state-of-the-art FID within 1 second. In Tab. 5, we list the configuration used in Sec. 4.1.

## Appendix D Additional results on ImageNet

### D.1 Full comparison on ImageNet

**Table 6: System-level comparison on ImageNet $256\times 256$ conditional generation without classifier-free guidance.**
|  | #Params | FID$\downarrow$ | IS$\uparrow$ | Pre.$\uparrow$ | Rec.$\uparrow$ |
| --- | --- | --- | --- | --- | --- |
| Base scale model (less than 300M) |  |  |  |  |  |
| MAR-B () | 208M | 3.48 | 192.4 | 0.78 | 0.58 |
| D-JEPA-B | 212M | 3.40 | 197.1 | 0.77 | 0.61 |
| MaskGIT () | 227M | 6.18 | 182.1 | 0.80 | 0.51 |
| MAGE () | 230M | 6.93 | 195.8 | - | - |
| Large scale model (300$\sim$700M) |  |  |  |  |  |
| GIVT () | 304M | 5.67 | - | 0.75 | 0.59 |
| MAGVIT-v2 () | 307M | 3.65 | 200.5 | - | - |
| LDM-4 () | 400M | 10.56 | 103.5 | 0.71 | 0.62 |
| MAR-L () | 479M | 2.60 | 221.4 | 0.79 | 0.60 |
| ADM () | 554M | 10.94 | 101.0 | 0.63 | 0.63 |
| DiT-XL () | 675M | 9.62 | 121.5 | 0.67 | 0.67 |
| SiT-XL () | 675M | 8.60 | - | - | - |
| MDTv2-XL () | 676M | 5.06 | 155.6 | 0.72 | 0.66 |
| D-JEPA-L | 687M | 2.32 | 233.5 | 0.79 | 0.62 |
| Huge scale model (900+M) |  |  |  |  |  |
| MAR-H () | 943M | 2.35 | 227.8 | 0.79 | 0.62 |
| D-JEPA-H | 1.4B | 2.04 | 239.3 | 0.79 | 0.62 |
| Autoreg.  () | 1.4B | 15.78 | 78.3 | - | - |
| VDM++ () | 2.0B | 2.40 | 225.3 | - | - |

We provide a more comprehensive comparison with earlier works in Tab. 6. D-JEPA-B, with only 212M parameters, performs only slightly worse than MAR-L (with 479M parameters), MAR-H (with 943M parameters), and VDM++ (with 2.0B parameters). It is also worth noting that D-JEPA-B significantly outperforms DiT-XL (with 675M parameters) by a large margin in terms of FID (3.40 vs. 9.62) and IS (197.1 vs. 121.5).

D-JEPA-L and D-JEPA-H achieve state-of-the-art performance in both FID and IS metrics. Furthermore, D-JEPA-H sets unprecedented records in both of these metrics. Although D-JEPA performs well in Tab. 2, it is not outstanding. However, we believe that the metrics without classifier-free guidance better reflect the actual performance of each model, as the value of cfg can significantly impact the results. Determining the optimal cfg value for each model is challenging. Therefore, the metrics presented in Tab. 6 are considered more convincing.

### D.2 Training curve

Figure: Figure 6: Training dynamics of model architectures. The sampling parameters for the images evaluated to obtain the FID and IS in the figure are: $\text{cfg}=1.0,\tau=0.95,\text{AR Steps}=256$.
Refer to caption: x17.png

In Fig. 6, we present the FID and IS metrics as a function of training epochs. It is evident that irrespective of the model size, 160 training epochs are essential for convergence when employing diffusion loss. Models with a smaller parameter count necessitate a more significant number of training epochs. Although the Base, Large, and Huge models were trained for 1400, 480, and 320 epochs, respectively, the trends in the metrics suggest that further increasing the number of training epochs could potentially enhance D-JEPA’s performance.

Moreover, it is crucial to highlight that the model size directly influences the attainable performance ceiling. For smaller models, such as D-JEPA-B, achieving the performance levels of larger models, like D-JEPA-L and D-JEPA-H, is unattainable, even with extensive training. As illustrated in Fig. 6, it is apparent that when the parameter size exceeds 500M, D-JEPA exhibits markedly superior learning capabilities.

### D.3 Inpainting and Outpainting

Figure: Figure 7: Inpainting and outpainting capabilities of D-JEPA on training data. The percentages below the images indicate the proportion of the reference input that was dropped.
Refer to caption: x18.png

Figure: Figure 8: Inpainting and outpainting capabilities of D-JEPA on previously unseen data. The percentages below the images indicate the proportion of the reference input that was dropped.
Refer to caption: x19.png

In Fig. 7 and Fig. 8, we demonstrate D-JEPA’s capabilities in image restoration and inpainting and outpainting on both ImageNet1k images and unseen images. As shown in Fig. 7, D-JEPA can reconstruct highly similar images from only 10% of the original features, showcasing its visual solid retrieval capabilities. In Fig. 8, D-JEPA effectively supplements missing visual features based on contextual content.

We believe that training on larger-scale datasets will significantly enhance D-JEPA’s painting capabilities. Additionally, from the results in these two figures, it is evident that the quality of the training data plays a decisive role in the final generated image quality. D-JEPA, like all other generative models, essentially strives to fit the training data distribution better and finds it challenging to create data distributions that are perceived as better by human standards.

## Appendix E D-JEPA for representation learning

### E.1 Theoretical motivation

A theoretical motivation for the effectiveness of the collapse prevention strategy was proposed in  Grill et al. (). We adapt their analysis for our smoothed l1 loss in Eq. 2. For ease of exposition, we will disregard the effect of the conditioning variable and consider one-dimensional representations like  Bardes et al. (). The optimal predictor under Eq. 2 is thus given by the following functional expression:

$$ $\displaystyle\gamma^{\star}(\phi(x_{i}))$ $\displaystyle=\text{argmin}_{\gamma}\parallel\gamma(\phi(x_{i}))-g_{i} \parallel_{1}$ $\displaystyle=\text{media}(g_{i}|\phi(x_{i})),$ $$

Substituting this expression for the optimal predictor into the loss function and evaluating the expected gradient of the encoder gives

$$ $\nabla_{\theta}\mathbb{E}\parallel\gamma^{\star}(\phi_{\theta}(x_{i}))-g_{i} \parallel_{1}=\nabla_{\theta}\text{MAD}(g_{i}|\phi_{\theta}(x_{i})),$ $$

where $\text{MAD}(\cdot|\phi_{\theta}(x_{i}))$ is the median absolute deviation of a random variable conditioned on $\phi_{\theta}(x_{i})$. Thus, in the case where the predictor is optimal, the encoder must learn to capture as much information about the video as possible to minimize the deviation of the target. The hypothesis is that incorporating an exponential moving average to compute the representation of $y_{i}$ ensures that the predictor evolves faster than the encoder and remains close to optimal, thereby preventing collapse.

### E.2 Image classification

D-JEPA, a generative model built on the foundation of JEPA LeCun (), inherits the exceptional representation capabilities of JEPA. This intrinsic quality positions D-JEPA as a potentially superior source of pre-training weights for downstream tasks compared to other generative models. To rigorously affirm this hypothesis, we conducted extensive evaluations on two prevalent ImageNet classification tasks: linear probing and fine-tuning.

#### Experiment settings.

We use the context encoder $\phi$ as the pre-trained model for all downstream tasks, following the approach reported by  Assran et al. (), demonstrating better performance. For representation learning, we globally average pool the output of the feature by the context encoder and use these pooled features as input for the classification head, in alignment with the methodologies described in  He et al. () and  Li et al. ().

We conducted experiments in both the raw pixel space and the continuous token space. The primary distinction between these two experiments is whether a VAE is utilized to encode the images. For the former, we fully retain the experimental setup of I-JEPA Assran et al. (), while for the latter, the training settings are entirely retained from MAGE Li et al. ().

To ensure a fair comparison, for D-JEPA-B, we use the checkpoint saved at 600 epochs for the related experiments, and for D-JEPA-L, we use the checkpoint saved at 300 epochs, consistent with the practices in  Assran et al. ().

**Table 7: Top-1 accuracy of linear probing on ImageNet-1K. For reference, we also list the performance of other state-of-the-art representation models as well.**
| Method | Model | #Params | Acc. |
| --- | --- | --- | --- |
| Gemerative models |  |  |  |
| BigBiGAN () | RN50 | 23M | 56.6 |
| MaskGIT () | BERT | 227M | 57.4 |
| ViT-VQGAN () | VIM-Base | 650M | 65.1 |
| ViT-VQGAN () | VIM-Large | 1697M | 73.2 |
| D-JEPA (token space) | ViT-B | 86M | 46.8 |
| D-JEPA (token space) | ViT-L | 304M | 47.6 |
| D-JEPA (pixel space) | ViT-B | 86M | 73.1 |
| D-JEPA (pixel space) | ViT-L | 304M | 77.9 |

#### Linear probing.

Linear probing is a primary evaluation protocol for self-supervised learning. As shown in Table 7, D-JEPA, trained directly on raw pixels, surpasses all generative models in ImageNet-1K linear probe top-1 accuracy, achieving state-of-the-art results. Furthermore, when compared with representation models, D-JEPA remains remarkably competitive.

**Table 8: Fine-tuning performance on ImageNet-1K. We report the top-1 accuracy improvement over training from scratch for different methods (other numbers are taken from the respective papers). The ViT models trained from scratch on semantic tokens follow the exact same training settings as the ViT models trained from scratch on original image pixels in He et al. (). It is worth noting that ViT-L’s performance is slightly lower than ViT-B’s when trained from scratch on continuous tokens, likely due to only 50 epochs of training. However, we used this setting to ensure a fair comparison with other methods.**
| Method | ViT-B | ViT-L |
| --- | --- | --- |
| Patchify on raw pixels |  |  |
| Scratch | 82.3 | 82.6 |
| DINO () | +0.5 | - |
| MoCo v3 () | +0.9 | +1.5 |
| BEiT () | +0.9 | +2.6 |
| MAE () | +1.3 | +3.3 |
| CAE () | +1.6 | +3.7 |
| MVP () | +2.1 | +3.7 |
| PeCo () | +2.2 | +3.9 |
| D-JEPA | +2.0 | +3.2 |
| Patchify on vector-quantinized tokens |  |  |
| Scratch | 80.7 | 80.9 |
| MAGE () | +1.8 | +3.0 |
| MAGE-C () | +2.2 | +3.4 |
| Patchify on continuous tokens |  |  |
| Scratch | 79.1 | 78.7 |
| D-JEPA | +1.6 | +2.9 |

#### Fine-tuning.

Table 8 displays the fine-tuning performance of D-JEPA and other self-supervised learning methods, where all the pre-trained encoder parameters are fine-tuned. It is important to note that directly comparing the final performance of these various methods is inappropriate due to their different data-pacifying approaches. Nonetheless, we can compare their performance improvements relative to training-from-scratch models. The results presented in the tables show that D-JEPA demonstrates strong competitiveness as a representation model. Although its ultimate performance does not surpass that of methods operating in raw space, we observe a substantial performance enhancement compared to training from scratch.

#### Analysis on raw pixel space and semantic token space.

Although the D-JEPA model trained in the continuous token space has demonstrated impressive performance on generative tasks, an analysis of the results in Tab. 7 and Tab. 8 reveals that directly training D-JEPA in the pixel space significantly outperforms training in the token space, particularly in linear probing tasks. We attribute this suboptimal performance in both from-scratch and fine-tuning scenarios to using VAE, as discussed in Li et al. (). Expressly, the training process of VAEs typically excludes complex image preprocessing techniques such as mixup Zhang et al. (), which impairs the VAE’s ability to effectively encode preprocessed images for classification tasks, thereby resulting in a performance deficit. We are optimistic that retraining the VAE with these advanced preprocessing techniques will address this issue and yield improved results.

## Appendix F Flow Matching Loss

In this section, we transition from the Gaussian denoising setting as described in Ho et al. () to the flow matching formulation (Ma et al., ; Mo et al., ; Lipman et al., ), thereby providing additional flexibility to D-JEPA. We adhere to the formulation presented in Zhuo et al. () and reformulate it for modeling token distribution.

The schedule that defines how to corrupt data to noise significantly impacts the training and sampling of standard diffusion models. Consequently, numerous diffusion schedules, such as VE (Song et al., ), VP (Ho et al., ), and EDM (Karras et al., ), have been carefully designed and utilized. In contrast, flow matching (Lipman et al., ; Albergo et al., ) emerges as a simple alternative that linearly interpolates between noise and data along a straight line. More specifically, given the data $x_{i}\sim p(x_{i})$ and Gaussian noise $\epsilon\sim\mathcal{N}(0,I)$, we define an interpolation-based forward process:

$$ $x_{i}^{t}=\alpha_{t}x_{i}+\beta_{t}\epsilon,$ $$

where $\alpha_{0}=0$, $\beta_{t}=1$, $\alpha_{1}=1$, and $\beta_{1}=0$. This interpolation for $t\in[0,1]$ bridges $x_{i}^{0}=\epsilon$ and $x_{i}^{1}=x_{i}$. Similar to the diffusion schedule, this interpolation schedule offers flexible choices of $\alpha_{t}$ and $\beta_{t}$. For example, we can utilize the original diffusion schedules, such as $\alpha_{t}=\sin\left(\frac{\pi}{2}t\right)$ and $\beta_{t}=\cos\left(\frac{\pi}{2}t\right)$ for the VP cosine schedule. However, in our framework, we adopt a linear interpolation schedule between noise and data for its simplicity:

$$ $x_{i}^{t}=tx_{i}+(1-t)\epsilon.$ $$

This formulation represents a uniform transformation with constant velocity between the data and noise. The corresponding time-dependent velocity field is defined as:

$$ $\displaystyle v_{t}(x_{i}^{t})$ $\displaystyle=\dot{\alpha}_{t}x_{i}+\dot{\beta}_{t}\epsilon$ (5) $\displaystyle=x_{i}-\epsilon,$ (6) $$

where $\dot{\alpha}$ and $\dot{\beta}$ denote the time derivatives of $\alpha$ and $\beta$. This time-dependent velocity field $v:[0,1]\times\mathbb{R}^{d}\to\mathbb{R}^{d}$ defines an ordinary differential equation known as the Flow ODE:

$$ $dx_{i}=v_{t}(x_{i}^{t})dt.$ $$

We use $\phi_{t}(x_{i})$ to represent the solution of the Flow ODE with the initial condition $\phi_{0}(x_{i})=x_{i}$.
By solving this Flow ODE from $t=0$ to $t=1$, we transform noise into data samples using the approximated velocity fields $v_{\theta}(x_{i}^{t},t)$. During training, the flow-matching objective directly regresses to the target velocity:

$$ $\mathcal{L}_{v}=\int_{0}^{1}\mathbb{E}\left[\parallel v_{\theta}(x_{i}^{t},t)- \dot{\alpha}_{t}x_{i}-\dot{\beta}_{t}\epsilon\parallel^{2}\right]dt,$ (7) $$

which is termed the Conditional Flow Matching loss (Lipman et al., ), sharing similarities with the noise prediction or score prediction losses in diffusion models.

#### Analysis of flow matching loss

Figure: Figure 9: Comparison between flow matching loss in Eq. 7 and diffusion loss in Eq. 4 on FID.
Refer to caption: x20.png

We experimented to evaluate the performance of flow matching loss using the D-JEPA-B model on the ImageNet1k dataset for image generation, training the model for 300 epochs. The experimental settings were consistent with those described in Sec. 4. The FID convergence curve is illustrated in Fig. 9. As anticipated, the flow matching loss demonstrated a faster convergence rate than the diffusion loss, achieving convergence within approximately 160 epochs.

However, it was observed that the flow matching loss encounters difficulties in reducing the FID score during the later stages of training. We hypothesize that this limitation may be attributed to the denoising MLP being too lightweight to manage the continuous-space denoising operations required by flow matching efficiently. This issue can potentially be alleviated by increasing the network capacity of the denoising MLP. Despite this, the images generated using flow matching loss exhibit superior texture quality.

Figure: (a) Diffusion loss
Refer to caption: x21.png

As illustrated in App. G, the flow matching loss significantly outperforms the diffusion loss for more challenging tasks. In specific scenarios, the diffusion loss may even lead to training failures, as depicted in Fig. 10. Consequently, we adopt the flow-matching loss for the remainder of this paper.

## Appendix G Comprehensive Experiments

This section presents detailed experimental procedures and results for D-JEPA across various tasks. It is important to emphasize that our objective is not to achieve state-of-the-art performance on these tasks, as this is beyond the scope of the current study and will be explored in future research. Instead, we aim to demonstrate that D-JEPA is a robust and versatile generative model capable of handling various continuous data types. Consequently, we did not perform extensive hyperparameter tuning; unless otherwise specified, all training settings are consistent with those used for image generation on ImageNet. As noted in Appendix F, we employ flow matching loss instead of diffusion loss for all experiments in this section.

### G.1 Text-to-Audio Generation

Figure: Figure 11: Visualizations of the generated waveform over training epochs. From top to bottom, each waveform represents the result sampled every 400 epochs. The corresponding text of the generated speech samples is “Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition.”
Refer to caption: x23.png

In this experiment, we adapted D-JEPA-B for speech synthesis, incorporating a phoneme and pitch encoder. To integrate text conditions, we replaced the attention module in the vision transformer with multimodal attention, as first proposed by  Esser et al. (). The phoneme vocabulary size is set to 73. For the pitch encoder, the lookup table size is set to 300, and the encoded pitch embedding size is 256, with a hidden channel size of 256.

We utilized the LJSpeech benchmark dataset (Ito, ), which consists of 13,100 audio clips sampled at 22,050 Hz from a female speaker, totaling approximately 24 hours. Text sequences were converted into phoneme sequences using an open-source grapheme-to-phoneme conversion tool (Sun et al., ). Following common practices (Chen et al., ; Min et al., ; Zhuo et al., ), we preprocessed the speech and text data by (1) extracting the spectrogram with an FFT size of 1024, hop size of 256, and window size of 1024 samples; (2) converting it to a mel-spectrogram with 80 frequency bins; and (3) extracting the F0 (fundamental frequency) from the raw waveform using Parselmouth. Our implementation is based on the open-source project by  Huang et al. ().

Notably, the diffusion loss did not perform optimally on this small-scale dataset. To better accommodate the varying lengths of sentences, we employed 1D Rotary Position Embedding (RoPE) (Su et al., ) as the positional embedding. D-JEPA-B was trained for 134,000 steps, approximately 2,600 epochs, using 4 NVIDIA A100 GPUs with a total batch size of 256 sentences. HiFi-GAN (Kong et al., ) (V1) was utilized as the vocoder to synthesize the waveform from the generated mel-spectrogram.

#### Analysis

Figure: Figure 12: Visualizations of the reference and generated waveform. The corresponding texts of generated speech samples is “Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition”.
Refer to caption: x24.png

Figure: Figure 13: Visualizations of the reference and generated mel-spectrograms. The corresponding texts of generated speech samples is “Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition”.
Refer to caption: x25.png

In Fig. 11, we demonstrate the sampling results of the trained model at intervals of 400 epochs. We observed that after 1,600 epochs, D-JEPA-B can generate relatively clear audio. As training proceeded, the speech quality steadily improved, with pronunciations becoming clearer and the intonation and pauses closely matching those of natural speech. Fig. 13 and Fig. 12 show sampled mel-spectrogram and waveform, respectively. It is evident that after 2,600 epochs of training, the sampled audio closely resembles the reference audio.

### G.2 Text-to-Image Generation

In this experiment, we adapted D-JEPA-L for the task of text-to-image generation. Similar to previous experiments, we incorporated text conditions using multimodal attention. Additionally, we utilized a more powerful VAE model from  Esser et al. (). A $256\times 256$ resolution image is encoded into a latent representation of size $16\times 32\times 32$, which is then patched with a patch size of 2. We replaced the positional encoding with a 2D RoPE suitable for images for this task. We employed the QWen2-1.5B language model (Yang et al., ) as the text encoder, which offers superior text understanding capabilities compared to models like CLIP (Radford et al., ) or T5 (Raffel et al., ).

We conducted experiments on an internal dataset composed of both public and private data. The public dataset comprises millions of images from  Sun et al. (). We performed meticulous data cleaning, referencing the methods used by PixelArt (Chen et al., ) and SD3.0 (Esser et al., ). Since we did not intend to explore multi-scale resolution generation at this stage (reserved for future work), we resized all images to a $256\times 256$ resolution for training.

We trained D-JEPA-L from scratch for approximately 500 epochs (measured by the ImageNet data volume) without additional pre-training. Unlike many diffusion models such as  Chen et al. (), we found that training from scratch yielded satisfactory results for D-JEPA-L; using pre-trained weights from ImageNet resulted in decreased performance, consistent with the findings in  Zhuo et al. (). We conducted this experiment on four workers, each with 8 H800 GPUs. We maintained a total batch size of 2048 with the help of gradient checkpointing techniques.

#### Analysis

Figure: Figure 14: Text to image samples during training. From left to right, the results are sampled at intervals of 40 epochs, from the 40th to the 200th epoch. The corresponding prompt: a photo of a backpack below a cake.
Refer to caption: x26.png

In Fig. 14, we show the images sampled every 40 epochs during the early training stages (up to 200 epochs). Early in training, D-JEPA tended to generate single objects and struggled to understand multiple objects or spatial relationships. After 120 epochs of training, the model could generally generate single objects well, but various objects were still missing. As training progressed, D-JEPA began generating multiple objects and gradually grasped the correct spatial relationships. We observed that after about 160 epochs, the model could generate high-quality images, as shown in the penultimate image in Fig. 14. However, it still struggled to create accurate spatial relationships between objects. For instance, when given the prompt ”a backpack below a cake,” the generated content showed ”a backpack behind a cake,” which is more consistent with common sense. In other words, the model could understand conventional spatial relationships at this stage but still struggled with abstract spatial relationships, especially those not present in the training data. As training continued, the model’s ability to understand abstract concepts improved, as demonstrated in the last image in the figure, which correctly generated the spatial relationship.

Figure: (a) A beautiful girl.
Refer to caption: x27.png

In Fig. 15, we demonstrate the model’s capabilities to generate high-quality images after 300 training epochs. D-JEPA can already produce detailed portraits and rich scenes, although some local artifacts still exist. We believe that by using larger models, conducting more extensive training, and utilizing higher-resolution data, D-JEPA’s text-to-image generation capabilities will be significantly enhanced.

### G.3 Class Conditioned Video Generation

In this experiment, we adapted D-JEPA-L for class-conditioned video generation. We utilized the open-source VideoVAE from  Yang et al. (), which compresses the video’s temporal and spatial resolutions by factors of 4 and 8, significantly reducing the computational burden during video generation. We divided each video frame into tokens with a patch size of 2 along the spatial and four along the temporal dimensions. Empirically, we found that using a larger patch size in the temporal dimension helps the model learn more consistent motion.

We conducted the experiments on the UCF101 dataset (Soomro, ), a widely recognized benchmark in human action recognition, consisting of 13,320 video clips spanning 101 action categories, including a diverse range of activities such as sports, musical instruments, and human-object interactions. This richly annotated dataset covers a broad spectrum of real-world scenarios captured under varying conditions, making it an essential resource for advancing and evaluating video generation methods. It has been widely used in recent works (Ma et al., ; Ho et al., ). We trained our model on the original $240\times 320$ resolution. We sampled eight frames per second to generate 20-second videos, totaling 160 frames. We used zero padding for videos shorter than 20 seconds to align the number of frames. During training, each input video clip was sized at $160\times 240\times 320$, yielding a latent embedding with $40\times 30\times 40$, and subsequently patched into $10\times 15\times 20=3000$ tokens. During sampling, we completed video generation in 64 steps. We trained D-JEPA-L from scratch on four workers, each equipped with 8 H800 GPUs, maintaining a global batch size of 512. We also utilized gradient checkpointing to reduce the demand for GPU memory.

**Table 9: Quantitative comparisons of short video generation on UCF101. ^⋆ indicates training on additional image data.**
|  | DIGAN () | StyleGAN-V () | Latte^⋆ () | LVDM () | MoStGAN-V () | PVDM () | D-JEPA |
| --- | --- | --- | --- | --- | --- | --- | --- |
| FVD-16 | 1630.2 | 1431.0 | 333.61 | 372.0 | 1380.3 | 1141.9 | 365.2 |

Figure: Figure 16: The training curve of flow matching loss on UCF101.
Refer to caption: x31.png

#### Analysis

Current video generation models based on diffusion typically require pre-training or joint training on images and videos. We found this approach unnecessary for video generation; instead, it introduces an artificial separation between spatial and temporal aspects, hindering motion generation. The D-JEPA-based video generation model is trained directly on videos, treating all tokens as standard tokens without incorporating 3D attention or other structural designs. These straightforward yet effective mechanisms enable D-JEPA to generate videos more holistically. Since D-JEPA randomly generates the next token from the entire token sequence, it captures the overall video quality more effectively. It decides when to terminate video generation, thereby avoiding the production of redundant video segments, as illustrated in Fig. 10. Fig. 16 also indicates that D-JEPA maintains stability throughout the training process. We also present the FVD metrics in Table 9, where D-JEPA achieves results second only to Latte (Ma et al., ), which is trained on additional image data.

### G.4 Multi-Modal Generation

In this experiment, we aim to demonstrate the potential of D-JEPA as a unified multimodal model. This is an ambitious attempt, as D-JEPA can generate text using next token prediction and create images, videos, etc., using next set of tokens prediction. Essentially, we adopted the design philosophy of Transfusion (Zhou et al., ) but replaced the diffusion model with the D-JEPA model.

To simplify the task, we constructed a model that simultaneously generates text and images. Unlike the text-to-image generation described in App. G.2, image generation in the multimodal mode does not rely on any text embedding model. Text and images are directly used as inputs to the model, which then simultaneously predicts both text and image.

Figure: Figure 17: Samples of text to image generation by multi-modal models build on the top of D-JEPA.
Refer to caption: x32.png

During the sampling process, we input the image caption that needs to be generated and let the network continuously predict the next tokens until it samples a “$<|\textit{visual_start}|>$” control token. Then, it switches to the next set of tokens prediction mode to complete the sampling of the entire image. The specific sampling process and training details follow the methodology described by  Zhou et al. (). We showcase the image generation effects of this novel architecture in Fig. 17.

Empirically, we found that the multimodal model built with D-JEPA can more effectively couple discrete text and other continuous data types in terms of architecture and engineering implementation. Further exploration of this field will be presented in future work.

## Appendix H Limitations

#### Potential performance bottleneck from denoising MLP.

In the D-JEPA framework, the context encoder, target encoder, and feature predictor all utilize standard visual transformer structures. This work and numerous other studies extensively validated the scalability and capacity for scaling up these structures, suggesting significant potential for D-JEPA. However, diffusion or flow matching loss is implemented using a simple Multi-Layer Perceptron (MLP) structure. Although it is theoretically proven that a 3-layer MLP can fit any function, we have observed in practice that the MLP may become a bottleneck for the final performance of the D-JEPA model. More critically, our experiments indicate that increasing the number of MLP layers or widening the MLP dimensions does not significantly improve performance. Recent works, such as KAN (Liu et al., ), have demonstrated significant advantages over MLPs in various tasks. We also attempted to construct a network of comparable scale using KAN, but so far, it has not resulted in a significant performance improvement. While the current MLP structure has achieved satisfactory results in our experiments, exploring alternative network structures to replace the MLP remains a crucial area for further investigation.

#### Efficiency issues due to bi-directional attention.

Although D-JEPA employs a generalized next-token prediction strategy, its primary structure is entirely realized through visual transformers, which use bi-directional attention during training and inference. This prevents highly effective key-value caching strategy based on causal attention to reduce computation. Notably, in the feature predictor network, we train with all masked and context tokens together using bi-directional attention. This means that each token must continuously attend to information from context and masked tokens. This behavior during training forces us to feed all tokens into the network simultaneously during sampling, especially at the beginning, leading to substantial unnecessary computational overhead. Simple estimates suggest that this process can result in up to $50\%$ useless computation for the feature predictor in extreme cases.

Intuitively, when predicting the features of masked tokens, we should only need information from context tokens without attending to other masked tokens. This would allow us to avoid feeding all masked tokens into the network during inference, significantly reducing extra computational costs. Based on this, we attempted to develop a new attention mechanism during training. In this approach, the attention for masked tokens in the feature predictor is restricted to all context tokens and itself, while context tokens always attend to all context tokens.

Surprisingly, training with this new attention mechanism did not effectively reduce the FID on ImageNet (FID remained above 50 after 160 epochs). This aligns with findings in Zhou et al. (), emphasizing that diffusion models must use bi-directional attention during training to ensure effectiveness. Similar observations were made in the MAR (Li et al., ) context. Therefore, improving the efficiency of the attention module during training and inference for D-JEPA remains a critical issue.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 5
presentation: 3
questions: My main concerns with this paper relate to its performance compared to the similar approach, MAR. The absence of ablation studies on model components and evaluation on other datasets makes it challenging to assess the impact of each design choice.
soundness: 3
strengths: (1) This paper introduces a straightforward and effective approach to enhance generation quality by bridging representation learning and image generation.
(2) In the appendix, the authors offer an in-depth analysis of the model design, including additional insights on representation learning as well as applications in video and audio generation, showcasing the versatility of the proposed methods across multiple tasks.
(3) The presentation is clear, and the ideas are easy to understand.
summary: This paper extends the JEPA framework—a masked-image-based self-supervised representation learning model—to image generation by incorporating an additional MLP head that operates on image patches. This design unifies representation learning and image generation within a single framework, demonstrating improved image generation quality over recent state-of-the-art methods in specific model configurations.
weaknesses: (1) The performance is comparable to similar approaches like MAR, which does not use the JEPA loss. In Table 1, the proposed method requires more training epochs (1400 vs. 800 for D-JEPA-B VS ) to achieve similar results to MAR-B. While D-JEPA-L/H outperforms MAR-L/H, it also involves more parameters. Similar trends are observed in Table 2.
(2) There is no comparison to baseline methods, such as the effect of removing the JEPA loss.
(3) How does the model perform in unconditional generation tasks or on more complex datasets, such as COCO?

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 1
questions: Listed in Weakness.
soundness: 2
strengths: 1. Suffieicnt experiments, including generative reuslts on Imagenet-256, sufficient abaltion studies and the exps about representation learning.

2. Authors present the effectiveness of D-JEPA  over multi-modalities including videos, images and audio.

3. Authors provide a theretical support about the proposed models.

4. Beyond the generative results, authors provides the empirical study about the linear performance of the proposed D-JEPA with the pixel/latent-level inputs.
summary: The proposed D-JEPA is the combination of Joint-embedding Predictive Architecture (I-JEPA) with MAR's dfiffusion parts, ie, leveraging a feautre from JEPA as the condition of diffusion parts.  Good generative performance is achieved by the proposed model.
And authors provide the exps over multi-modalities.
weaknesses: 1. The organization and the structure of the current version should be improved. The writing of chapter 3 is very confusing for me. And some important results and discussions should be re-located in the main paper not the appendix.

2. The novelity is limited:
 It seems that this work just replace the MAGE parts of MAR. The simple combination of I-JEPA and MAR's dfiffusion parts. It doesn't solve the core issue between the gap of representation learning and generative modeling.
Such an archecture cannot bring huge improvement on representation learning with latent-level input (Results in AppendixE over  down-stream tasks are good, just for pixel-level inputs), and the corresponding performance are very poor.
Could you please provide the similar settings for MAR? Use both the pixel-level and latent-level inputs to check the representation performance? I think your design with JEPA cannot solve the inherent limitation (latent input -> bad representation results) of such an TOKEN learning + diffusion framework.

3. The core of I-JEPA is the small-block-wise masks to perform the feature-level augmentation to achieve the better linear performance without the help of data-level augmentation. But in your work, the random mask strategy with high ratio is applied. Could you please provide some empirical evidence and intuitions about such a design？


4. Line 200： “It is important to note that training in latent space is not a necessity for D-JEPA; it can be trained in raw space and still achieve excellent results.” WHERE is the corresponding generative results？ I haven't found it.

5. It is unfair to compare Huge scale models in Table1 and 2. The parameters of the proposed D-JEPA is not aligned with MAR-H. 

6. How about the D-JEPA-H linear and finetuning performance in Table 7/8.

7. Please provide the exps on Imagenet-512x512 to compare with  SOTAs in a more comoutation situation.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 2
questions: n/a
soundness: 3
strengths: * Interesting combination of JEPA representation learning with generative AI, showing that representation learning can help generative AI
* Strong SOTA results on ImageNet 256x256, better or equal than MAR
* When applied for representation learning, the context encoder achieves good results on ImageNet classification
* Experiments showing generalization to text conditioned image generation (and not just class conditioned)
* Experiments showing that it works with audio as well, class conditioned video generation, and CFG
summary: The author describes a JEPA based architecture which combines a prediction loss and a diffusion loss.
* The prediction loss learns to predict the representation of the mask tokens
* The diffusion loss learns to predict the raw pixels (or the latent representation of the patch in case of VAE)

The architecture itself is based on a three ViTs:
* The context encoder takes the unmasked tokens and outputs Y
* The feature predictor takes Y, pad it, and learns to reconstruct the full representation Z
* The target encoder takes all tokens (no masking) and produces the target representation Z'
* The prediction loss is a smooth l1 loss between Z and Z'
* The diffusion loss takes Z as input and tries to predict the pixels / latents
* The target encoder is itself an EMA of the context encoder

The paper explores this architecture and shows that:
1) The diffusion loss prevents the collapse of traditional JEPA architectures
2) This architecture is scalable, as the results improves with increased compute budget
3) At inference, instead of predicting all unmasked tokens, we can predict a subset of them, as do MaskGIT, to provide better results
4) They reach SOTA performance on class conditional generation on ImageNet 256x256, equating the results of MAR with CFG
weaknesses: * It would be interesting to have generation results at higher resolution than 256x256 px to see if inference speed suffers when bi-directional attention meets lots of tokens

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. Could the authors provide an ablation study that isolates the MAE branch to elucidate its specific impact on the AR branch's performance?

2. How does the model's performance on representation learning tasks vary between training in pixel space and latent space, and what does this indicate about the model's ability to serve as a unified architecture?

3. It’s interesting to see from Tables 1 and 2 that D-JEPA has more parameters than MAR. I’m curious—shouldn’t these models have similar architectures? Can the authors explain why D-JEPA is larger? What additional components does D-JEPA include that MAR doesn't?
soundness: 2
strengths: The ideas tha integrating joint-embedding predictive architectures(e.g. MAE and MIM) with diffusion-based generative modeling makes sense. 

The experiments in the paper are robust, covering a wide range of applications, which showcases the versatility of the D-JEPA model. This extensive experimental validation strengthens the paper's claims about the model's effectiveness across different types of generative tasks.
summary: The paper, D-JEPA, explores a novel approach by merging joint-embedding predictive architectures with generative modeling. It applies masked image modeling as a generalized next-token prediction strategy for autoregressive data generation. D-JEPA employs a combination of diffusion losses and MAE loss to model token distributions effectively. It aims to enhancing generative tasks across various domains like images, videos, and audio. Extensive experiments demonstrate the model's scalability and effectiveness, claiming state-of-the-art performance on ImageNet class-conditional benchmarks.
weaknesses: However, the paper presents a significant methodological oversight—it appears as a mere combination of existing MAE (Masked Autoencoder) and MAR (Masked Autoregressive Model) methods without a critical analysis or ablation study showing how the MAE branch impacts the AR branch. Specifically, the absence of experiments where the MAE branch is removed casts doubt on the incremental benefit of this integration.

The representation learning capability of D-JEPA is also questionable. According to Table 7, the best ImageNet accuracy is obtained when the model is trained on pixel-level data, while the generative experiments focus on a D-JEPA trained on VAE latent space. This discrepancy points to a lack of a truly unified model approach, as the performance seems to depend heavily on the training specifics rather than the model architecture itself.

Meta-review: The paper introduces a new architecture called Joint-Embedding Predictive Architecture (JEPA), which aims to enhance generative modeling tasks. The authors have demonstrated that JEPA achieves state-of-the-art performance on the ImageNet benchmarks. Moreover, its potential extends to various domains such as speech, video, and multimodal tasks, highlighting its versatility and scalability.

The paper's primary strength lies in its innovative approach of incorporating JEPA into generative modeling, marking a significant departure from traditional methods. The extensive experimentation and the results further support the model's capabilities in different domains.

The paper has faced criticism regarding the perceived incremental nature of integrating Masked Autoencoders (MAE) and Masked Autoregressive (MAR) methods. Additionally, there was some initial confusion about the model's approach to representation learning and generation. Concerns were also raised about the fairness of experimental comparisons due to discrepancies in training specifics and parameter sizes.

The authors have effectively addressed the concerns about the integration of MAE and MAR by providing additional results and explanations. The confusion regarding the model's unified approach has been cleared up with a revised focus on generative capabilities. Furthermore, the authors have discussed the parameter size differences in detail and provided supporting results, which helps to validate the model's performance.

Decision: Accept (Poster)