Overview
This forum post is an in-depth, Feynman-style explainer of CubiD (Cubic Discrete Diffusion), a method that enables AI to understand and generate images with a single discrete visual representation—breaking the long-standing divide between visual understanding and visual generation systems.
Key points
The problem: two incompatible visual languages
- Language models unified all tasks (reading, writing, translation) via discrete tokens, letting understanding and generation reinforce each other.
- Vision split into two camps: understanding models use rich high-dimensional features (768–1024D, e.g., DINOv2, SigLIP), while generation models use low-dimensional compressed tokens (8–32D via VQ-VAE-style codebooks).
- Fixed-size visual codebooks carry only ~10 bits per patch—insufficient for semantic understanding—while naive discretization of 768D features faces combinatorial explosion (~10⁷⁶⁸ possible combinations).
- Autoregressive generation over high-dimensional tokens would require ~196,608 sequential steps for one 256×256 image, and imposes an unnatural raster-scan order.
- CubiD treats an image's representation as a 3D cube: height (h) × width (w) × feature depth (d), instead of a 2D token grid with oversized tokens.
- Dimension-wise quantization: each feature dimension is independently quantized (e.g., 3 bits per dimension), so complexity grows linearly, not exponentially. Experiments show the discretized tokens retain nearly all semantic information for classification.
- Cubic discrete diffusion: masking can occur at any (position, dimension) element—far finer-grained than MaskGIT-style whole-position masking. The model learns to reconstruct from arbitrary partial views, like a detective reasoning from fragmented clues.
- Bidirectional attention captures both intra-position (across dimensions) and inter-position (across space) dependencies.
- Training: extract 768D features (e.g., DINOv2) → quantize per-dimension → randomly mask elements at a sampled ratio → train a Transformer to predict masked elements via cross-entropy.
- Generation: start fully masked; iteratively predict and demask trusted predictions under a cosine schedule (structure first, details later). Only a few hundred iterations are needed despite 196,608 tokens, thanks to semantic redundancy across dimensions.
- Transformer sequence length depends only on h×w, not on d, keeping computation manageable as dimensionality grows.
- CubiD-XXL (3.7B params) achieves FID 1.88 on ImageNet-256—state-of-the-art among discrete generative models; 2.02 without CFG.
- Scaling is consistent: CubiD-L (0.95B) → 2.29 FID, CubiD-XL (2.4B) → 2.04, CubiD-XXL → 1.88 (with CFG).
- Ablations: per-dimension masking fails completely (texture artifacts); per-position masking yields blurry, inconsistent results; only CubiD's element-wise masking produces clear, coherent images.
- The same discrete tokens achieve near-baseline ImageNet classification accuracy—unlike methods such as VFMTok whose generation tokens differ from understanding representations.
- Works with other encoders (e.g., SigLIP2), showing the framework is general.
- Depends on the quality of the pretrained encoder (reconstruction PSNR ~18dB limits fine detail).
- Still trails the best continuous diffusion models; sampling needs hundreds to thousands of iterations.
- Future work: video and 3D generation, unified text-vision token spaces, faster sampling via distillation/consistency models, and finer conditional control.
- Wang, Y., Ma, C., Lin, Z., et al. (2026). *Cubic Discrete Diffusion: Discrete Visual Generation on High-Dimensional Representation Tokens*. arXiv:2603.19232.
- Code: https://github.com/YuqingWang1029/CubiD
The core idea: a 3D view of visual representations
Architecture and training
Results
Limitations and future directions
Significance
CubiD demonstrates that high-dimensional representations need not imply intractable complexity, and that understanding and generation can share one token vocabulary—a key step toward truly unified multimodal AI architectures.