Evaluating Generative Models via One-Dimensional Code Distributions

Zexi Jia, Pengcheng Luo, Yijia Zhong, Jinchao Zhang, Jie ZhouarXiv 2026

TL;DR

Traditional generative model evaluation metrics like FID rely on continuous features from recognition networks, which are explicitly trained to ignore fine-grained appearance details and local artifacts. This paper introduces a new paradigm that evaluates models using discrete visual tokens via two new metrics: Codebook Histogram Distance (CHD) for distribution fidelity and Code Mixture Model Score (CMMS) for single-image quality. These token-based metrics achieve state-of-the-art alignment with human perception while requiring significantly fewer evaluation samples.

What Problem Does This Paper Address?

Evaluating image generation models (like Stable Diffusion or Midjourney) accurately remains a persistent challenge. The gold standard metric, Fréchet Inception Distance (FID), compares the statistical distributions of real and generated images. However, FID has a fundamental flaw: it relies on features extracted from networks trained for image recognition (like Inception-V3).

Recognition networks are designed to be invariant to appearance variations—meaning they intentionally discard details like texture, sharpness, and local coherence to focus on high-level semantics. As a result, FID often fails to detect local artifacts, structural glitches, or stylistic inconsistencies that are immediately obvious to human eyes. Furthermore, FID assumes a Gaussian feature distribution (which fails on complex, multi-modal artistic data) and requires tens of thousands of images to yield stable scores.

Figure 1. From feature distributions to token statistics. Conventional metrics such as Fr´echet Inception Distance (FID) operate on continuous semantic features and assume a Gaussian distribution in feature space (left), which makes them insensitive to appearance details (e.g., texture, style) and unreliable on non-Gaussian data such as artistic or medical images. Our approach (right) quantizes images into a discrete vocabulary of 1D tokens and compares empirical token statistics directly.

Methods

Instead of continuous recognition features, the authors propose working in the space of discrete visual tokens. They leverage a 1D image tokenizer (a retrained version of TiTok) that quantizes a $256 \times 256$ image into a compact sequence of 128 discrete codebook indices. Because tokenizers are trained to reconstruct images perfectly, their token space naturally preserves both semantic meaning and fine-grained perceptual details.

Using this token space, the authors develop two complementary metrics:

  1. Codebook Histogram Distance (CHD): A training-free metric that evaluates a model's distribution fidelity against real images. It extracts two types of token statistics:
  2. CHD-1D (Unigram): Measures global vocabulary usage (how frequently individual tokens appear).
  3. CHD-2D (Spatial Co-occurrence): Captures local "visual grammar" by analyzing how adjacent tokens pair up horizontally and vertically. The final CHD score is computed using the Hellinger distance between the real and generated token histograms.

  4. Code Mixture Model Score (CMMS): A no-reference, single-image quality metric. The authors train a lightweight Transformer encoder entirely via self-supervision on synthetic image degradations. They inject uniform token corruption, swap semantic fragments, and apply pixel-space distortions (like blur and noise) to natural images, mapping the corruption severity to an exponential quality score. Crucially, CMMS requires zero human annotations to train.

Figure 2. Sensitivity of Token Distributions to Image Degradation. To demonstrate how our discrete token space captures perceptual degradations, we apply 10 levels of progressive distortion to a set of 1,000 images and analyze the resulting shifts in their token distributions. As the severity of distortions like Gaussian noise or block shuffling increases (left), a small subset of perceptually-sensitive tokens exhibits consistent and predictable shifts in their distribution (middle). Our Codebook Histogram Distance (CHD) effectively aggregates these subtle changes, showing a robust, monotonic increase with the degradation level across all distortion types (right).

Datasets

  • Tokenizer & Metric Training: The TiTok tokenizer was retrained on 100M images from the DataComp dataset. CMMS was trained using tokenized images from ImageNet-1K.
  • Evaluation Benchmarks: The metrics were validated on established human preference datasets: AGIQA, HPDv2, and HPDv3 (which contains over 1M text-image pairs and Midjourney user preferences).
  • VisForm Benchmark: The authors introduced a massive new benchmark consisting of 210,000 images spanning 62 distinct visual forms (e.g., oil paintings, 3D renders, scientific diagrams, sketches) generated across 12 modern models, complete with expert human annotations across 14 perceptual dimensions.

Key Insights and Ideas

  • Equivariance over Invariance: Classification features seek invariance to style and texture, whereas discrete codes learn equivariant representations that change predictably with both content and quality.
  • The Entropy of Artifacts: Natural images produce highly structured, low-entropy token patterns. When a generative model introduces noise or structural artifacts, it breaks this local "grammar," causing token distributions to shift toward high-entropy randomness.
  • Ditch the Gaussian Assumption: By framing evaluation as a histogram comparison using Hellinger distance, CHD avoids making restrictive parametric assumptions about the underlying data distribution.

Key Results

  • Superior Human Alignment: On the AGIQA benchmark, CMMS achieved a Spearman correlation of 0.943, outperforming top image quality assessment baselines like DEQA (0.886). On HPDv3, CHD achieved a correlation of 0.867, dramatically outperforming FID (0.648) and CMMD (0.527).
  • High Preference Accuracy: In predicting binary human preferences (which image looks better), CMMS achieved the highest accuracy across all test sets, including 74.9% on HPDv2 and 66.7% on VisForm.
  • Exceptional Sample Efficiency: While FID requires upwards of 10,000 images to stabilize, CHD converges and becomes reliable with roughly 1,000 images, making it far more practical for evaluating expensive models or sample-limited regimes.
Figure 4. Metric–human correlation on VisForm across models and domains. All metrics are normalized to [0, 1], higher is better.

Limitations and Future Work

While highly effective, the current iteration of CHD relies primarily on first- and second-order token statistics (unigrams and adjacent pairs). The authors note that exploring higher-order token statistics could further improve complex, long-range spatial modeling. Additionally, the current framework is strictly tailored to 2D static images; extending this discrete token paradigm to video and 3D asset generation remains an open and promising frontier.

Summary updated

BibTeX
@misc{jia2026evaluating,
  author = {Zexi Jia and Pengcheng Luo and Yijia Zhong and Jinchao Zhang and Jie Zhou},
  title = {{Evaluating Generative Models via One-Dimensional Code Distributions}},
  year = {2026},
  eprint = {2603.08064},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.08064},
}
Figure