Discrete JEPA: Learning Discrete Token Representations without Reconstruction

Junyeob Baek, Hosung Lee, Christopher Hoang, Mengye Ren, Sungjin Ahn

TL;DR

Discrete-JEPA introduces a novel framework that learns discrete semantic image tokens without relying on pixel reconstruction. By combining latent predictive coding with vector quantization, it eliminates compounding errors in autoregressive world models and enables robust, long-horizon symbolic reasoning.

What Problem Does This Paper Address?

To achieve "System 2" cognitive intelligence—deliberate, logical planning and problem-solving—AI agents need world models that can abstract visual observations into high-level symbolic concepts.

Current image tokenization methods fall short in two major ways:

  1. Reconstruction Bias: Standard discrete tokenizers (like VQ-VAE or TiTok) rely on pixel-level reconstruction losses. This forces tokens to encode fine-grained local features and textures rather than abstract semantic concepts.
  2. Error Accumulation: While Joint-Embedding Predictive Architectures (JEPAs) avoid reconstruction by predicting masked features in a continuous latent space, their continuous nature leads to compounding errors when rolled out autoregressively over long time horizons.

Discrete-JEPA bridges this gap by creating a discrete token space optimized for abstract reasoning rather than pixel-perfect generation.

Comparison of tokenization approaches: patch-level, semantic with reconstruction, and Discrete JEPA.

Methods

Discrete-JEPA extends the standard JEPA framework by applying Vector Quantization (VQ) exclusively to global semantic representations while keeping local patch representations continuous during training.

The architecture consists of three core components:

  • Context and Target Encoders: The context encoder processes masked image patches to produce continuous semantic ($z_s$) and patch ($z_p$) tokens. The target encoder processes the full image to provide ground-truth targets ($\bar{z}_s, \bar{z}_p$) and is updated via an Exponential Moving Average (EMA).
  • Vector Quantization (VQ): VQ is applied only to the semantic representations, mapping them to a shared codebook to produce discrete semantic tokens ($z_s^{\text{discrete}}$).
  • Complementary Predictive Objectives: To ensure effective information flow without pixel reconstruction, the model optimizes three distinct predictors:
  • Semantic-to-Patch (S2P): Predicts continuous spatial patches from discrete semantic tokens, forcing the discrete tokens to retain global context.
  • Patch-to-Semantic (P2S): Extracts semantic abstractions from continuous patch tokens to ensure consistency.
  • Patch-to-Patch (P2P): Maintains spatial coherence by predicting masked patches from visible ones (the classic JEPA objective).
Discrete-JEPA Architecture Overview showing the context/target encoders and the three predictive objectives.

Datasets

The authors evaluated the model on two challenging synthetic visual sequence benchmarks designed to isolate symbolic and temporal reasoning from complex background textures:

  • Dancing-Sprites-Pattern: 64×64 color image sequences featuring a single object that changes color based on abstract algorithmic rules (e.g., Linear, Repeat, Zigzag). It tests the model's ability to predict color, shape, and position over 200 steps.
  • Blinking-Ball: 64×64 sequences containing four balls at fixed positions. At each step, a single ball changes color based on interconnected position and color permutations. This tests simultaneous tracking of spatial and chromatic dependencies over 1,000 steps.

Key Insights and Ideas

  • Discretization as an Error-Correcting Bottleneck: In continuous latent spaces, minor prediction errors compound at each autoregressive step, causing the world model to quickly drift into nonsense. Mapping predictions to a discrete codebook acts as a regularizer, snapping slightly imperfect predictions back to valid symbolic states.
  • Purer Semantics via Latent Coding: By completely avoiding pixel-level reconstruction, the learned tokens are unburdened by local details like exact lighting or texture, allowing them to focus entirely on high-level properties (like object identity and color state).
  • Emergence of Deliberate Planning: Instead of myopically predicting the immediate next frame (reactive prediction), Discrete-JEPA maintains structural and rule-based pattern integrity over massive temporal horizons, indicating that it internalizes the underlying symbolic rules of the environment.

Key Results

  • Perfect Long-Horizon Stability: On the Dancing-Sprites-Pattern color prediction task, Discrete-JEPA maintained a perfect 1.0 accuracy across all 200 rollout steps, whereas continuous I-JEPA baselines degraded rapidly due to accumulated errors.
Long-horizon prediction performance comparing Discrete-JEPA against continuous I-JEPA variants.
  • Superior Performance on Complex Tracking: On the 1,000-step Blinking-Ball task, Discrete-JEPA stabilized after an initial adjustment phase. At step 1,000, it achieved 6× better LPIPS and 5× better Mean Squared Error (MSE) than the continuous I-JEPA baseline, preserving the systematic pattern integrity where the baseline completely broke down.
Visualization of semantic planning on the Blinking-Ball task over 1,000 timesteps.

Limitations and Future Work

  • The Abstraction-Precision Trade-off: Because Discrete-JEPA prioritizes global semantic abstractions, it sacrifices fine-grained spatial precision. This was evident in position-tracking tasks, where continuous baselines initially outperformed Discrete-JEPA. The authors suggest exploring hierarchical tokenization (maintaining tokens at multiple granularities) to mitigate this.
  • Synthetic Evaluation Scope: The model was validated on controlled, synthetic environments. Testing its capabilities on complex, real-world datasets—such as video understanding or robotic manipulation planning—remains an open and vital next step.

Summary updated

BibTeX
@inproceedings{baek2025discrete,
  author = {Junyeob Baek and Hosung Lee and Christopher Hoang and Mengye Ren and Sungjin Ahn},
  title = {{Discrete JEPA: Learning Discrete Token Representations without Reconstruction}},
  booktitle = {TokShop @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=91kfdrEafN},
}
Figure