TL;DR
When building latent generative models for medical images, researchers usually lock in a tokenizer as a boring preprocessing step and spend all their energy tuning the generator. Through a rigorous 70-cell experimental grid, Liam Chalcroft shows that this separation is an illusion: the "best" tokenizer completely flips depending on your generator and sampler settings, and crisp image reconstructions actually tell you almost nothing about how well a model will generate new images.
What Problem Does This Paper Address?
To generate synthetic X-rays or MRIs without melting a GPU cluster, modern pipelines rely on a two-step trick. First, a tokenizer compresses raw pixels into a compact "latent" space (either a grid of discrete dictionary codes or smooth continuous channels). Second, a generator (like a diffusion or autoregressive model) learns to create new patterns inside that compressed space, which are then decoded back into images.
In medical imaging, toolkits usually provide one or two standard tokenizers, so researchers treat compression as a solved, static foundation. Meanwhile, studies on everyday natural images have begun noticing a rate-distortion-modelability tradeoff: a tokenizer that compresses and reconstructs images with pinpoint accuracy might create a jagged, complex latent distribution that a generator struggles to learn. Because medical datasets are smaller and anatomical nuances are subtle, Chalcroft asks: can we really judge medical tokenizers and generators in isolation, or are they secretly entangled?
Methods
Instead of introducing a flashy new neural network, the novelty here is clean, controlled experimental design. Every confounder—backbone architecture, compute budget, and latent grid size ($8 \times 8$ derived from $64 \times 64$ images)—is locked down so components can be swapped apples-to-apples across 70 distinct configurations:
- 54 Discrete Cells: Three quantization methods—classic learned codebooks (VQ), lookup-free quantization (LFQ), and finite scalar quantization (FSQ)—tested across three vocabulary sizes (1K, 2K, and 4K) and paired with six generators: Autoregressive (AR), parallel masked decoding (MaskGIT), discrete flow matching (DFM), two discrete diffusion variants (D3PM and SEDD), and Bayesian flow networks (BFN).
- 16 Continuous Reference Cells: Variational Autoencoders (VAEs) sweeping across channel counts and regularization weights—all the way down to zero regularization (a plain Autoencoder, AE)—paired with Latent Diffusion (LDM) and Rectified Flow (RF).
- Sampler Sweeps & Evaluation: All generators share matched Diffusion Transformer (DiT) backbones. At inference, sampling knobs (step counts, temperature) are systematically swept. Generation quality is tracked using FID-192 (a fast, low-dimensional Fréchet Inception Distance variant that measures how closely generated feature distributions match real ones; lower is better), validated against standard FID-2048 and classifier two-sample tests.
Datasets
All experiments use public $64 \times 64$ greyscale benchmarks from the MedMNIST suite—no new datasets are introduced. The entire 70-cell grid runs on ChestMNIST (78K chest X-rays), while six representative configurations are replicated on OrganAMNIST (abdominal CT slices) and PneumoniaMNIST (a ~17$\times$ smaller pediatric X-ray set) to test external validity.
Key Insights and Ideas
- Tokenizers and generators refuse to be separated: If a tokenizer were universally superior, plotting generator performance across quantizers would yield parallel lines. Instead, the lines violently cross. Under D3PM diffusion, LFQ easily beats FSQ; swap the generator to MaskGIT, and FSQ beats LFQ.
- Great reconstructions don't make great generations: Picking a tokenizer by how cleanly it reconstructs test images (PSNR) is a trap. Across both discrete and continuous setups, correlation between reconstruction fidelity and generation quality is basically zero. A plain Autoencoder (AE) ditching Gaussian constraints altogether yields the best generation in the entire study when paired with Rectified Flow.
- Default samplers unfairly kneecap iterative models: Out of the box, simple autoregressive (AR) models appear to sweep all discrete rows. However, discrete diffusion models (D3PM, SEDD) exhibit U-shaped cost-quality curves—the canonical 1,000 denoising steps actually degrades image quality compared to stopping early at 100–500 steps with a cooler temperature.
Key Results
- Variance Breakdown: Across the discrete grid, generator family drives 59.5% of quality variation, quantizer choice drives 10.1%, and 23.4% stems directly from interaction effects between the tokenizer, vocabulary, and generator.
- The Power of Sampler Tuning: Validation-based retuning of D3PM and SEDD on LFQ-1024 slashed FID-192 from 0.44 and 0.41 down to 0.09 and 0.10, while boosting D3PM sampling speed nearly 9$\times$ (from 3.7 to 33 samples/sec by dropping from 1,000 to 100 steps).
- Reconstruction vs. Generation: Discrete rank correlation between PSNR and FID-192 is $\rho = -0.03$. FSQ-4096 reconstructs sharpest (29.7 dB) with mediocre generation (0.37 FID-192), whereas LFQ-1024 has blurrier reconstructions (28.0 dB) yet reaches 0.33 by default (and 0.09 tuned). Continuous AE + RF achieves the overall best score at 0.07 FID-192.
- No Exact Copying: Nearest-neighbour probes in feature, pixel, and perceptual spaces confirm these low FID scores aren't an artifact of memorizing training images.
Limitations and Future Work
Chalcroft is refreshingly candid about what this study is not: it is a controlled mechanic's shop, not a clinical trial. Experiments are restricted to $64 \times 64$ unconditional greyscale images without pathology conditioning, radiologist review, or downstream diagnostic utility tests. Because of compute constraints (556 GPU-hours), only the 1K-vocabulary block was trained across three random seeds, leaving the broader grid single-seed. Furthermore, FID-192 is a convenient internal proxy rather than a clinical metric (and occasionally disagrees with FID-2048 on noisy runners-up). For future benchmarks, the author recommends treating tokenizers as core model hyperparameters: use reconstruction quality merely as a sanity-check floor to ensure anatomy isn't erased, then run a compact joint sweep over tokenizers, generators, and sampler budgets before declaring a winner.
Summary updated