Same Tokenizer, Better Tokens: Choosing Image Tokens by MAP Inference
Authors: Piotr Kubaty, Jacek Tabor, Łukasz Struski
Organizations: Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland · Doctoral School of Exact and Natural Sciences, Jagiellonian University, Kraków, Poland · Centre for Credible Artificial Intelligence, Warsaw University of Technology, Poland
Discrete visual tokens encode images for reconstruction and serve as training targets for autoregressive image generators. Vector-quantized tokenizers typically assign each encoder feature its nearest code independently. The decoder uses these codes jointly, so a sequence of individually nearest codes can reconstruct an image less faithfully than an alternative assignment. A local model of the reconstruction loss yields a closest-vector problem with a decoder-dependent target and metric. Reconstruction-only search improves PSNR across the frozen tokenizers we test. Different code sequences can achieve similar reconstruction quality, leaving room to favour more predictable ones. We introduce RecaP (Reconstruction and Predictability), which selects codes for a frozen tokenizer by balancing how faithfully they reconstruct the image with how likely their sequence is under a pretrained autoregressive prior. On ImageNet, LlamaGen GPT-B trained on RecaP tokens achieves lower early-checkpoint FID against training images than GPT-B trained on nearest-neighbour tokens. The difference is smaller against held-out images. On an ImageNet subset, the prior improves generation at comparable reconstruction FID. Our code is available at: https://github.com/gmum/recap
Figures & tables
Figure 2: Code assignment changes the generator’s training targets. (a) The same frozen tokenizer encodes each view using NN or RecaP . Coloured cells mark differences between the resulting token maps. Both GPT-B models use the same training recipe. (b) On IN-1k at cfg 2.0, RecaP at epoch 100 reaches the FID-10k of NN at epoch 300 (dashed line); FID-10k against training images, mean and range over three seeds. At epoch 100, gFID-50k improves by 16% on IN-1k ( p=0.003 ) and 9.5% on IN-100 ( Tab. 2 ).
Figure 4: Where changing tokens improves reconstruction. A COCO image (LlamaGen VQ-16): some patches whose token RecaP 0 leaves unchanged (clear cells) also show lower squared error. The left column shades each changed token by the rank of its new code by distance to the encoder feature; the darkest shade covers ranks 16 and above. The right column shows the smoothed change in squared error, blue favouring RecaP 0 and red favouring NN. Bottom row: the four 64 px windows with the most changed tokens, magnified 2 × .
rFID-50k ↓
FID ∞ ↓
Tokenizer
K , tokens
NN
RecaP 0
change
NN
RecaP 0
Δ PSNR (dB) ↑
Δ LPIPS-A ↓
LlamaGen VQ-16 [ 63 ]
214 , 16 × 16
2.25
1.30
− 42%
1.73
0.86
+1.27
− 5.4%
SimVQ [ 79 ] (128 px)
210 , 16 × 16
3.67
2.60
− 29%
3.54
2.51
+1.22
− 9.2%
SimVQ (128 px)
218 , 16 × 16
2.00
1.43
− 28%
1.91
1.34
+1.04
− 13.1%
Open-MAGVIT2-L [ 46 ]
218 LFQ, 16 × 16
1.25
1.01
− 19%
0.89 §
0.64 §
+1.06
− 1.1%
IBQ [ 61 ]
214 , 16 × 16
1.38
1.08
− 21%
0.97 §
0.69 §
+1.17
− 0.2%
Table 1: The assignment gap on twelve released tokenizers ; only the assignment changes. RecaP 0 searches using reconstruction loss alone ( Sec. 4 ). rFID uses ImageNet-1k validation images (50k, or the first 10k for TiTok) and each tokenizer’s evaluator in Main Tab. 8 . FID ∞ estimates clean-fid rFID at infinite sample size using the closed form in Sec. 2 ( § uses the 1/N fit). Its values are directly comparable to rFID only for clean-fid rows. Changes are relative to NN. Bold and underlining mark the largest and second-largest improvements in each change column.
Figure 5: Fine texture after reassignment. RecaP 0 smooths the parrot’s feathers (top) and the hummingbird’s throat feathers (bottom); adding the local energy term ( γ=0.02 ) brings their finest-scale energy closer to the original’s. Percentages are relative to the original window. 64 px windows (yellow boxes) at 4 × zoom of a DIV2K image (top) and an ImageNet validation image (bottom) (LlamaGen VQ-16), selected for the largest energy recovery among textured windows.
tokens
bits ↓
gFID-50k ↓
held-out gFID ↓
FID ∞ ↓
FID(X,R) ↓
Prec.
Rec.
IN-100
NN
12.22
12.05 ± 0.15
16.57 ± 0.20
11.55
2.95
0.73
0.35
RecaP 0 ( λ=0 )
12.66
11.54 ± 0.13
16.41 ± 0.14
11.04
1.48
0.72
0.36
RecaP ( λ=0.01 )
12.09
10.90 ± 0.16
15.97 ± 0.16
10.40
1.51
0.73
0.36
IN-1k
NN
11.07
6.90 ± 0.19
6.79 ± 0.06
6.35
1.93
0.87
0.48
RecaP ( λ=0.01 )
10.89
5.77 ± 0.21
6.19 ± 0.27
5.20
0.99
0.84
0.53
released GPT-B, 300 epochs
10.97
5.20
5.86
4.63
1.88
0.83
0.55
Table 2: GPT-B after 100 epochs of training on different token assignments of the same images. Values are means over three seeds, with SD where shown. FID(X,R) compares training images with their reconstructions and is measured once per token set. Bits are validation bits per token on each model’s own token set. gFID-50k uses the training images as reference. Held-out gFID uses the validation images ( IN-100 : 5,000; IN-1k : 50,000, every run at cfg 2.0; post hoc). p against NN (Welch, two-sided, uncorrected): IN-100 gFID-50k p<0.001 for RecaP and 0.012 for RecaP 0 , held-out 0.018 for RecaP ; IN-1k gFID-50k 0.003, held-out 0.057. Two NN runs used cfg 2.5 for the precision and recall columns. At matched cfg 2.0 the two arms are comparable. The released GPT-B used ten-crop NN tokens and 300 epochs (FID(X,R): one of the ten crops per image). We report its scores under our evaluator. Bold and underlining mark the best and second-best scores within a setting (underlining on IN-100 only). Precision, recall and the released model are unranked.
IN-1k , GPT-B, epoch 100
NN
RecaP
p
gFID-50k (registered)
6.90 ± 0.19
5.77 ± 0.21
0.003
OpenAI’s evaluator, FID
6.92 ± 0.21
5.73 ± 0.22
0.002
second sampling seed
6.84 ± 0.14
5.81 ± 0.23
0.005
FID-10k, no guidance
34.51 ± 1.12
29.55 ± 0.69
0.005
held-out, cfg 2.0 †
6.79 ± 0.06
6.19 ± 0.27
0.057
FD DINOv2 , cfg 2.0 †
327.7 ± 7.3
299.9 ± 4.0
0.009
Table 3: Where the generation gain holds (GPT-B on IN-1k , epoch 100). Mean ± SD over three seeds per arm. Two-sided Welch p -values, unadjusted; † post hoc. Bold: the lower score where p<0.05 . The DINOv2 rows compare both arms at the same cfg. Main Table 12 reports epoch 300.
Figure 6: ImageNet-1k samples from GPT-B trained on NN and RecaP tokens. Each row shows the first five of 50k samples at cfg 2.0 from training seed 0, after 100 epochs. The NN row uses the corresponding cfg 2.0 evaluation. Each column shares a class and sampling seed. Main Figure 10 shows further samples.
arm
tokens: prior, λ
gFID-50k ↓
held-out ↓
bits ↓
NN
none (NN)
12.05 ± 0.15
16.57 ± 0.20
12.22
RecaP 0
none, 0
11.54 ± 0.13
16.41 ± 0.14
12.66
RecaP
released, 0.01
10.90 ± 0.16
15.97 ± 0.16
12.09
RecaP
released, 0.03
11.36 ± 0.05
16.55 ± 0.06
11.35
RecaP own
own, 0.01
11.54 ± 0.31
16.54 ± 0.14
12.13
RecaP cross
cross-fitted, 0.01
12.02 ± 0.28
16.90 ± 0.29
12.25
Table 4: What carries the gain on IN-100 (GPT-B, three seeds per arm, mean ± SD). RecaP own : prior = IN-100 ’s own NN GPT-B (seed 0, epoch 25). RecaP cross : each half of the images tokenized under a GPT-B trained on the other half’s NN tokens. KD: 0.5 cross-entropy + 0.5 distillation from the released GPT-B, temperature 1; bits: as in Tab. 2 ; held-out gFID: pre-registered for KD and RecaP cross , post hoc for the rest ( Main Fig. 9 ). Bold: best in a column; underlined: second best.
Prior
NLL advantage (bits/token)
gFID-50k change (%)
Cross-fitted GPT-B
0.16
−0.2
Our GPT-B
0.40
−4.3
Released GPT-B
1.21
−9.5
Our GPT-L
1.23
−7.0
Released GPT-L
1.49
−6.6
Table 5: Prior predictability and generation on IN-100 . The NLL advantage is the NN-trained GPT-B’s NLL (12.22 bits/token) minus the prior’s, both on the same validation NN tokens. For the cross-fitted pair we report prior A. The last column gives the change in training-reference gFID-50k from NN-trained GPT-B (three-seed means). We relate NLL to gFID post hoc. Tables 4 and 17 give the individual scores.
IN-100
IN-1k
tokens
views
gFID-50k ↓
held-out ↓
gFID-50k ↓
held-out ↓
NN
2
12.05 ± 0.15
16.57
6.90 ± 0.19
7.482
RecaP
2
10.90 ± 0.16
15.97
5.77 ± 0.21
6.193
RecaP , 3 maps
2
8.81 ± 0.22
13.75
5.57 ± 0.06
6.186
NN
10
8.26 ± 0.05
13.31
6.23 ± 0.08
6.436
RecaP
10
7.61 ± 0.19
13.12
not run ∗
Table 6: More views per image: GPT-B on two views (centre crop and flip) or on LlamaGen’s ten crops. 3 maps: RecaP ’s map and two restarts from noisy logits, per view. Mean ± SD over three seeds; held-out scores use each run’s selected cfg ( Sec. 5 ). Pre-registered; tests in the text. Bold: best in a column; underlined: second best. ∗ Ten-crop RecaP on IN-1k would take an estimated 3,900 RTX 4090 GPU-h ( Sec. 6 ).
Appendix figures & tables29 assets
Supplementary material from the paper’s appendix.
Appendix
result
needs
evidence
Lem. 1 (CVP)
(A1)
(A1) only qualitative
Lem. 2 (NN exact)
(A1)
fails on trained encoders
Prop. 1
(A1), (A2)
derivation checked by MC
Cor. 1
(A1), (A2)
factors from measured H
Lem. 3 (near-ties)
(A2)
fits run overlap
Prop. 2
pθ>0
applies via (A3)
Appendix
Table 1: Results of this section and of Sec. 2 , their assumptions and the evidence for them (descriptive; MC: Monte Carlo). Lem. 2 ’s conditions fail on trained encoders (cosine 0.30–0.54); Main Cor. 1 ’s factors come from the measured tangent metric (secant metric: 1.05 and 1.18); Main Prop. 2 holds for any prior with pθ>0 and a finite objective, and applies to our tokens under (A3), which Main Alg. 1 approximates.
Figure 1: Reconstructions of LlamaGen VQ-16 that differ only in the tokens: the released NN, RecaP 0 ( λ=0 , as in Tab. 1 ), RecaP ( λ=0.01 ) and RecaP 0 with a local energy term ( γ=0.02 , Main Sec. 3.1 ); numbers: PSNR. NN’s detail is sharp but partly wrong (the letters of the sign, the knit); RecaP 0 and RecaP keep the structure and smooth fine texture, which the energy term partly restores. The examples have large LPIPS-A gains, to make the gain clear. Main Fig. 3 shows a large random sample.
tokenizer
N
Δ PSNR (dB)
images better
Δ LPIPS-A [95% CI]
Δ rFID ± SE ( z )
Δ KID ×103 ( z )
LlamaGen VQ-16
50k
+1.269 ± 0.002
99.99%
− 5.37% [ − 5.44, − 5.29]
− 0.951 ± 0.091 ( − 10.4)
− 0.954 ( − 13.4)
SimVQ- 210
50k
+1.222 ± 0.002
99.99%
− 9.15% [ − 9.28, − 9.03]
− 1.072 ± 0.077 ( − 14.0)
− 1.303 ( − 16.6)
SimVQ- 218
50k
+1.042 ± 0.002
99.996%
− 13.11% [ − 13.23, − 12.98]
− 0.566 ± 0.039 ( − 14.3)
− 0.684 ( − 16.7)
Open-MAGVIT2-L
50k
+1.060 ± 0.001
99.99%
− 1.06% [ − 1.14, − 0.98]
− 0.237 ± 0.033 ( − 7.2)
− 0.308 ( − 11.0)
IBQ- 214
50k
+1.166 ± 0.002
99.86%
− 0.20% [ − 0.29, − 0.12]
− 0.296 ± 0.046 ( − 6.4)
− 0.348 ( − 10.5)
IBQ- 218
50k
+1.090 ± 0.001
99.99%
− 0.03% [ − 0.11, +0.06]
− 0.159 ± 0.027 ( − 5.8)
− 0.203 ( − 10.0)
Appendix
Table 2: Paired statistics of Tab. 1 : RecaP 0 − NN on the same images; ± : SE, ( z ): the difference over its SE, images better: the share whose PSNR rises, [ ]: 95% interval (definitions in Sec. 3 ). Bold: the largest improvement in a column; underlined: the second largest (not marked where five rows tie).
Figure 2: rFID change from NN to RecaP 0 on the twelve tokenizers of Tab. 1 , sorted (blue: a fall). rFID falls by 11–42% on eleven tokenizers and rises by 10% on GigaTok B-L with a DINO discriminator.
tokenizer
FD DINOv2 NN → RecaP 0
Δ± SE ( z )
change
FD ∞ NN → RecaP 0 ( z )
rFID change
SimVQ- 218 (128 px)
96.83 → 85.23
− 11.61 ± 0.51 ( − 22.7)
− 12.0%
68.75 → 59.87 ( − 18.7)
− 26%
SimVQ- 210 (128 px)
182.2 → 160.5
− 21.8 ± 0.8 ( − 26.5)
− 11.9%
141.0 → 122.8 ( − 23.5)
− 26%
Open-MAGVIT2-L
43.07 → 38.12
− 4.96 ± 0.27 ( − 18.2)
− 11.5%
23.05 → 20.17 ( − 14.8)
− 22%
TiTok-S-128
201.5 → 190.2
− 11.3 ± 1.2 ( − 9.1)
− 5.6%
164.3 → 156.4 ( − 6.9)
− 12%
FVQ- 218
44.40 → 42.30
− 2.09 ± 0.34 ( − 6.1)
− 4.7%
25.42 → 24.85 ( − 1.9)
− 30%
IBQ- 218
33.57 → 32.12
− 1.45 ± 0.35 ( − 4.2)
− 4.3%
15.95 → 15.88 ( − 0.2)
− 19%
Appendix
Table 3: FD DINOv2 of the reconstructions , 10k images per tokenizer, RecaP 0 − NN on the same images; ( z ): the difference over its SE. rFID change: the registered run’s clean-fid rFID on the same tokenizer (50k images; TiTok 10k); Tab. 1 uses the authors’ Inception for SimVQ and the SEED-Voken models, so five rows differ from it. † Reported descriptively, outside the registered tests (decoded on its run’s GPU model). Bold: the largest fall in a relative-change column; underlined: the second largest.
COCO val2017 (5,000 images)
DIV2K (100 images)
tokenizer
Δ PSNR (dB)
of ImageNet’s
Δ LPIPS-A
rFID-5k NN → RecaP 0
FID ∞ ( z )
Δ PSNR (dB)
Δ LPIPS-A
LlamaGen VQ-16
+1.23
0.97
− 6.0%
8.22 → 6.90
− 32.5% ( − 6.4)
+1.12
− 2.9%
IBQ- 214
+1.12
0.96
− 1.7%
7.30 → 6.75
− 6.8% ( − 1.0)
+1.08
+3.3%
TiTok-S-128
+1.99
1.07
− 10.4%
9.31 → 8.88
+25.8% (+4.5)
+1.68
− 6.0%
GigaTok B-L-2D
+1.21
0.97
− 4.9%
6.16 → 5.57
− 36.1% ( − 4.5)
+1.15
− 3.4%
Appendix
Table 4: Reconstruction-only reassignment on COCO and DIV2K (pre-registered). We compare RecaP 0 ( λ=0 , as in Tab. 1 ) with NN on the same images and using the released tokenizer code. The column of ImageNet’s gives each COCO PSNR gain as a fraction of the corresponding ImageNet gain. Each rFID-5k difference exceeds 4.9 jackknife standard errors. For FID ∞ , we report the relative change of clean-fid’s value at N→∞ and the difference divided by its standard error ( z ). Bold and underlining mark the largest and second-largest improvements, including ties. rFID-5k is unranked.
tokens
finest
middle
PSNR
LPIPS-A
bits
NN
0.90
0.99
20.86
0.137
10.96
RecaP 0 ( λ=0 )
0.54
0.71
22.12
0.130
11.50
λ=0.003
0.54
0.72
22.12
0.129
11.22
RecaP ( λ=0.01 )
0.54
0.72
22.07
0.130
10.72
λ=0.03
0.56
0.74
21.82
0.134
9.91
λ=0.1
0.65
0.82
21.09
0.145
9.18
Appendix
Table 5: Sharpness of LlamaGen VQ-16’s reconstructions on 500 random validation images (post hoc; descriptive): the median energy of the finest scale (Laplacian) and of a middle band (difference of Gaussians), relative to the original image’s; mean PSNR, LPIPS-A and bits per token under the released GPT-B. RecaP 0 is Tab. 1 ’s run (with polish); the λ rows are the rate experiment’s (no polish).
objective
Δ PSNR ↑
LPIPS-A ↓
finest ↑
middle ↑
NN
n/a
0.138
0.93
0.97
RecaP 0 ’s objective (no polish)
+1.31
0.130
0.54
0.71
+ price per moved token, μ=0.1
+0.98
0.129
0.65
0.79
LPIPS weight 3 (not 1)
+0.86
0.128
0.63
0.77
+ local energy, γ=0.02
+1.07
0.126
0.74
0.80
+ local energy, γ=0.1
+0.83
0.125
0.87
0.85
Appendix
Table 6: Objectives against the smoothing on 200 LlamaGen validation images (pre-registered pilot; λ=0 , no polish): PSNR gain over NN, mean LPIPS-A, and the median finest-scale and middle-band energy relative to the original (other images than Main Tab. 5 , hence NN’s 0.93). Bold: the best search objective in a column; underlined: the second best (both where tied); NN is not ranked.
tokens
Δ PSNR ↑
LPIPS-A ↓
finest ↑
FD ↓
FD DINOv2 ↓
NN
n/a
0.138
0.92
4.32
108.9
RecaP 0
+1.27
0.131
0.54
3.07
106.2
+ energy, γ=0.02
+1.01
0.126
0.74
3.00
98.5
+ energy, γ=0.1
+0.79
0.125
0.89
3.04
96.2
Appendix
Table 7: The local energy term on 10k LlamaGen validation images (pre-registered; its rows: λ=0 , no polish; RecaP 0 : Tab. 1 ’s run, with polish): PSNR gain over NN, mean LPIPS-A, median finest-scale energy relative to the original, and the FD of clean-fid Inception features and FD DINOv2 against the originals of the same images; energy: the local energy term. Bold: the best search in a column; underlined: the second best; NN is not ranked.
Figure 3: Twelve random validation images (seed 0, from the 10k of the rate experiment; LlamaGen VQ-16). Each image: the original, NN, RecaP 0 ( λ=0 ) and RecaP ( λ=0.01 ). RecaP 0 gains 0.8–1.9 dB of PSNR over NN on these images.
Figure 4: Two validation images through the first six tokenizers of Tab. 1 (8170 and 2425, from Main Fig. 3 ): per image the original in the tokenizer’s own preprocessing, NN and RecaP 0 ( λ=0 , the runs of Tab. 1 ). Numbers: PSNR. SimVQ works at 128 px and is shown with its own pixels.
Figure 5: The other six tokenizers of Tab. 1 , as in Main Fig. 4 .
Figure 6: Where RecaP 0 changes the tokens (LlamaGen VQ-16; four of the random images of Main Fig. 3 ). Columns: the changed tokens over the image (shade: the rank of the chosen code among the token’s 16 nearest, a farther code from the polish shaded as the 16th; clear: NN’s code kept), NN, RecaP 0 , the change of the squared error (blue: RecaP 0 closer to the image; smoothed with a 2-pixel Gaussian) and the change of each token patch’s finest-scale energy, relative to the original patch’s (orange: smoother).
tokenizer
preprocessing
ℓ
codes, candidates
rFID
batch
s/image
LlamaGen VQ-16
ADM resize, centre crop 256
L2 + LPIPS
unit norm; 16 nearest
clean-fid
32
0.55
SimVQ- 210 / 218
resize, centre crop 128
L1 + LPIPS
projected codes; 16 nearest
authors’
64 / 32
0.13 / 0.12
Open-MAGVIT2-L
shorter side 256 (bilinear), centre crop
L1 + LPIPS
LFQ signs; 16 nearest
authors’
8
1.71
IBQ- 214 / 218
as Open-MAGVIT2
L1 + LPIPS
16 largest ⟨z,c⟩
authors’
8
1.98 / 2.05
TiTok-S-128 / SL-256
bicubic resize, centre crop 256
L2 + LPIPS
unit norm / Euclidean; 16 nearest
clean-fid
8
0.97 / 1.73
GigaTok B-L / + DINO
LlamaGen’s centre crop 256
L2 + LPIPS
unit norm; 16 nearest
clean-fid
8
2.12 / 2.48
Appendix
Table 8: Per-tokenizer settings of Tab. 1 (descriptive). LPIPS is LPIPS-VGG with weight 1. authors’ : their pytorch-fid Inception and code. Times are GPU seconds per image, including the NN pass and all metrics, on a GH200 (LlamaGen, SimVQ) or an RTX 4090 (the others; 8 of the 50 shards of FVQ and GigaTok B-L-2D on other GPUs).
GigaTok B-L / B-L + DINO / with its discriminator in ℓ , 50k each
RTX 4090
29.4 / 34.4 / 30.8
FVQ / GigaTok B-L-2D, 50k each
several
22.3 / 34.8
Cost and rate, LlamaGen: cost / rate group, 10k each
RTX 5090, A100
14.5 / 10.8
Appendix
Table 9: GPU time totalled from the job records (job hours for the cost experiment; descriptive). Not included: the other generator trainings, the generation evaluations, and the tokenizations with the GPT-L priors, λ=0.03 , 35 steps, λ=0.003 , L2 alone and the energy term.
arm
seed 0
seed 1
seed 2
IN-100
NN
12.18
12.09
11.88
RecaP 0
11.41
11.56
11.66
RecaP
10.81
10.81
11.08
RecaP own
11.20
11.61
11.80
IN-1k
NN
7.11 (2.5)
6.82 (2.0)
6.76 (2.5)
RecaP
5.93
5.85
5.53
Appendix
Table 11: Per-seed gFID-50k for Tab. 2 and RecaP own . GPT-B trains for 100 epochs unless marked. Each run uses the cfg selected in its 10k sweep (2.5 for IN-100 , 2.0 for IN-1k RecaP , and bracketed values for IN-1k NN). Held-out gFID uses validation images (5,000 for IN-100 , 50,000 for IN-1k ). For IN-1k NN seeds 0 and 2, the cfg-2.0 evaluations use the same checkpoints (post hoc). The pre-registered 300-epoch rows continue the same runs and evaluate held-out at cfg 2.0, using the companion evaluation for NN seed 0 (6.09 against training images).
IN-1k , GPT-B, epoch 300
NN
RecaP
p
gFID-50k (registered)
5.92 ± 0.40
5.21 ± 0.15
0.079
OpenAI’s evaluator, FID
5.89 ± 0.43
5.18 ± 0.15
0.093
second sampling seed
5.93 ± 0.45
5.17 ± 0.13
0.089
FID-10k, no guidance
31.68 ± 0.26
26.05 ± 2.31
0.050
held-out, cfg 2.0
6.03 ± 0.25
6.09 ± 0.27
0.80
FD DINOv2 , cfg 2.0 †
296.4 ± 4.5
268.1 ± 8.3
0.013
Appendix
Table 12: Table 3 at epoch 300 : the same IN-1k GPT-B runs continued to LlamaGen’s 300 epochs (pre-registered). Mean ± SD over three seeds per arm; p : Welch, two-sided, uncorrected; † post hoc. Bold: the better arm where p<0.05 . NN’s registered finals use cfg 2.5, 2.0 and 2.0, RecaP ’s cfg 2.0; the cfg-2.0 rows use a companion final for NN’s seed 0; the cfg-2.5 row regenerates every final except NN’s seed 0 at cfg 2.5. In gFID-50k, the ADM FID, the second sampling seed, FID-10k without guidance, and FD DINOv2 at cfg 2.0 and 2.5, every RecaP seed lies below every NN seed; with three seeds per arm only FD DINOv2 at cfg 2.0 and 2.5 reaches p<0.05 . Values from Main Tabs. 11 , 13 and 15 and this section.
Figure 7: Early IN-1k training. We plot each run’s best FID-10k over cfg 1.0–3.0. Lines are the means of seeds 0 and 1 and marks show individual seeds. Percentages give the relative FID reduction with RecaP tokens. The largest reduction in this sweep occurs at epoch 75. Main Figure 12 shows epochs 100–300 at cfg 2.0 with three seeds.
Figure 8: FID-10k over the registered cfg grid at epoch 100 : 10k samples per point (sampling seed 0) against the training reference; lines are means of three seeds, small marks single seeds; labels: RecaP ’s change from NN (descriptive). (a) IN-100 : NN, RecaP 0 and RecaP . (b) IN-1k : NN and RecaP . On IN-100 RecaP is below NN at every cfg ( −4 to −12% ), every seed below every NN seed; on IN-1k up to cfg 2.0 ( −13 to −19% , likewise), while at 2.5 and 3.0 the gap shrinks to −3.6% and −1.1% , inside the seeds’ spread. gFID-50k ( Tab. 2 ) is computed at each run’s best cfg of this grid.
run (cfg)
IS ↑
FID ↓
sFID ↓
Prec. ↑
Rec. ↑
CMMD ↓
epoch 100
NN seed 0 (2.5)
202.2
7.15
6.70
0.885
0.358
0.467
NN seed 1 (2.0)
163.4
6.76
5.93
0.850
0.424
0.533
NN seed 2 (2.5)
204.1
6.86
6.25
0.888
0.357
0.475
RecaP seed 0 (2.0)
178.9
5.91
6.36
0.848
0.433
0.530
RecaP seed 1 (2.0)
180.2
5.80
5.81
0.852
0.427
0.517
RecaP seed 2 (2.0)
178.5
5.49
5.76
0.843
0.447
0.539
Appendix
Table 13: The IN-1k finals under OpenAI’s ADM evaluator (FID, sFID, IS, precision, recall; reference VIRTUAL_imagenet256_labeled) and CMMD (CLIP ViT-L/14 at 336 px against ImageNet’s 50k validation images, computed in float64), each final regenerated with its checkpoint, cfg, labels and sampling seed (pre-registered). Bottom rows: the relative difference of the arms’ means; ∗ Welch p<0.05 ( p=0.002 ; every other p≥0.09 ). Registered finals only (the post hoc cfg-2.0 companions are left out); per-seed rows are not ranked.
generator
params
training
FID-50k ↓
ours (OpenAI’s evaluator in brackets)
GPT-B, NN tokens
111M
100 ep.
6.90 (6.92)
GPT-B, RecaP tokens
111M
100 ep.
5.77 (5.73)
GPT-B, NN tokens
111M
300 ep.
5.92 (5.89)
GPT-B, RecaP tokens
111M
300 ep.
5.21 (5.18)
GPT-L, NN tokens
343M
100 ep.
4.15
Appendix
Table 14: Class-conditional generation on ImageNet at 256 px (FID-50k, with guidance unless noted). Ours: GPT-B and GPT-L on LlamaGen VQ-16’s 16×16 tokens of two views per image (each run’s best cfg; three seeds for GPT-B, one for GPT-L), and the released LlamaGen models under our evaluator; clean-fid with class-balanced labels. Published: each paper’s own table (LlamaGen: its 16×16 , 256 px models; VAR: arXiv v2, whose v1 gives 3.60 and 1.97; RAE: 1.28 with random labels). Bold: the lowest FID; underlined: the second lowest (protocols differ, so the ranking is indicative).
Figure 9: Change in gFID-50k against NN tokens on IN-100 (three seeds per arm; values in Tab. 4 ; bar colours mark the reference, training or unseen images, not the token set). Without distillation, only RecaP (released prior, λ=0.01 ) keeps a gain on unseen images with p<0.05 (0.018, post hoc and unadjusted). Better reconstruction alone ( RecaP 0 ), a larger rate weight and own or cross-fitted priors gain in-sample or not at all.
arm (cfg)
FD DINOv2 ↓
held-out ↓
P / R
IN-100
NN (2.5)
542.0 ± 4.9
615.2
0.474 / 0.141
RecaP 0 (2.5)
564.0 ± 4.1
636.4
0.473 / 0.131
RecaP (2.5)
525.6 ± 4.2
598.6
0.477 / 0.126
RecaP +energy (2.5)
522.9 ± 7.5
596.1
0.479 / 0.131
IN-1k
NN (registered)
291.2 ± 24.3
301.2
0.630 / 0.413
NN (2.0)
327.7 ± 7.3
336.5
0.602 / 0.439
Appendix
Table 15: FD DINOv2 of the generation finals (50k samples each, regenerated; mean ± SD over three seeds) against the training images; held-out: the mean against the validation images; DINOv2 precision and recall ( k=3 , 10k samples). IN-1k ’s registered NN finals ran at cfg 2.5, 2.0 and 2.5; the cfg-2.0 row uses companion finals for seeds 0 and 2; the cfg-2.5 rows regenerate NN’s seed 1 and every RecaP final at cfg 2.5 (post hoc). Ep. 300: the same runs continued to epoch 300 (registered NN finals at cfg 2.5, 2.0 and 2.0; the cfg-2.0 row uses a companion final for seed 0, and the cfg-2.5 rows regenerate NN’s seeds 1 and 2 and every RecaP final at cfg 2.5, post hoc). Released: LlamaGen’s GPT-B. RecaP +energy: with the local energy term ( Main Sec. 3.1 ). Bold: the lowest value of a block; underlined: the second lowest (blocks of three or more ranked rows); the released model and P / R are not ranked.
Figure 10: Samples on IN-1k : the first 32 images of each 50k final at cfg 2.0. Each column shares one class label (above) and one sampling seed. Rows: the released LlamaGen GPT-B (300 epochs, ten crops; generated anew with the final’s labels and sampling seed), and GPT-B trained for 100 epochs on NN tokens (seed 0; its cfg-2.0 companion final, as the registered one ran at cfg 2.5) and on RecaP tokens (seed 0). Each image is downscaled from 256 to 128 px.
prior
NN
RecaP
difference
released GPT-B (search’s prior)
0.22
−0.03
−0.25
released GPT-L
0.50
0.39
−0.11
IN-100 GPT-B, NN tokens 1
0.49
0.42
−0.07
IN-100 GPT-B, RecaP tokens
0.61
0.49
−0.12
Appendix
Table 16: Surprise beyond the prior’s expectation , κ (bits per token), of IN-100 ’s 5,000 validation images’ tokens (pre-registered). The IN-100 GPT-Bs: seed 0 at epoch 25; 1 RecaP own ’s prior. 95% CIs within ±0.01 . The three-maps student’s prior is left out. Descriptive.
NN
RecaP , prior:
generator
GPT-B r
GPT-L r
GPT-L o
IN-100 : prior bits
n/a
11.01
10.73
10.99
GPT-B
12.05 ± 0.15
10.90 ± 0.16
11.25 ± 0.18
11.21 ± 0.08
IN-1k : prior bits
n/a
10.97
10.69
10.96
GPT-B
6.90 ± 0.19
5.77 ± 0.21
5.85 ± 0.05
–
GPT-L 1
4.15
4.13
3.95
–
Appendix
Table 17: gFID-50k of generators trained on tokens chosen under different priors (mean ± SD over three seeds; 1 one seed per arm). r: released by LlamaGen (300 epochs); o: ours, trained 100 epochs on IN-1k ’s NN tokens. GPT-L o was tested as a prior on IN-100 only: tokenizing IN-1k with it would take an estimated 950 RTX 4090 GPU-h, and the released priors already give the gain on IN-1k . n/a: NN tokens have no prior. Prior bits: per NN validation token; the NN-trained students reach 12.22 ( IN-100 , GPT-B), 11.07 ( IN-1k , GPT-B) and 10.96 ( IN-1k , GPT-L). Pre-registered; tests in the text. Bold: the best gFID in a row; underlined: the second best.
tokens
gFID-50k ↓
cfg
held-out ↓
bits
against NN/ RecaP (Holm)
NN
12.05 ± 0.15
2.5
16.57
12.22
–
RecaP ( λ=0.01 , 50 steps, two views)
10.90 ± 0.16
2.5
15.97
12.09
better / –
RecaP , λ=0.03
11.36 ± 0.05
2.5
16.55
11.35
– / worse
RecaP , λ=0.003
11.31 ± 0.11
2.5
16.24
12.47
better / worse
RecaP , 35 steps
11.17 ± 0.28
2.5
16.23
12.09
better / tie
L2 only, at RecaP ’s rate
15.13 ± 0.18
3.0
20.14
11.97
worse / worse
Appendix
Table 18: Ablations on IN-100 : GPT-B students (three seeds, mean ± SD) on token sets that change one setting of RecaP or of NN (one view, ten crops). RecaP on ten crops is also tested against NN on ten crops: better (Holm p=0.022 ). bits: validation bits per token at epoch 100 on the arm’s own tokens. Verdicts: Welch’s test with Holm’s correction within each pre-registered family; the one-view rows also compare the two one-view arms ( RecaP , one view, against NN, one view: −6.3% , Holm p=0.07 , a tie); NN, one view, against NN: Welch, no correction. λ=0.03 : Tab. 4 . Bold: the lowest gFID-50k and held-out gFID; underlined: the second lowest; bits are on each arm’s own tokens and are not ranked here, since across these settings (one view, ten crops, other objectives) they compare only within a group.
Figure 11: Cost and rate–distortion of the search on 10k ImageNet validation images, paired with NN. (a) Share of the 50-step setting’s PSNR gain against GPU time (one RTX 5090): annealing steps 5–50, 4 or 8 candidates (open markers), no polish. (b) PSNR gain against the change in bits per token under each tokenizer’s class-conditional generator (LlamaGen’s GPT-B, IBQ’s AR-B), over λ (labels on LlamaGen’s curve; IBQ’s points lie close to them, in the same order). (c) FID ∞ of the reconstructions over the same λ ; dashed: NN (LlamaGen 1.69, IBQ 0.98). IBQ’s FID ∞ lies lower throughout and, as LlamaGen’s, rises above NN’s only at λ=0.1 . Grey level and marker distinguish the tokenizers.
Figure 12: Generation quality and compute on IN-1k . FID-10k at cfg 2.0 against training images at epochs 100, 125, …, 300 (mean and range of three seeds). GPU hours include encoding two training views and the validation images (NN 11.4, RecaP 800.2; Main Tab. 10 ). We convert GPT-B training to RTX 4090 GPU hours at 1.52 per epoch, based on the four-GPU run (37–39 h per 100 epochs). (a) One generator per tokenization. (b) Per-generator cost when three generators share the tokens (post hoc). In gFID-50k at the best cfg, NN scores 6.90 ± 0.19 and 5.92 ± 0.40 at epochs 100 and 300, and RecaP scores 5.77 ± 0.21 and 5.21 ± 0.15.
Image tokenizers convert pixels into compact latent sequences for efficient generative modeling. Most approaches arrange latents on a downsampled two-dimensional grid, tying sequence length to image resolution. We compare two variable-length strategies: computationally efficient patch-derived tokens, which inherit explicit spatial organization, and more demanding register tokens, which have no predefined spatial layout. Our reconstruction results reveal that patch-derived tokens perform substantially better under extreme compression, whereas register tokens achieve slightly better reconstruction quality at intermediate budgets. At high token budgets, both approaches achieve similar reconstruction quality. For downstream generative tasks, register tokens outperform patch-derived tokens. Adding representation alignment with external pretrained visual encoders substantially improves the generative performance of patch-derived tokens, allowing them to match or outperform register tokens depending on the token budget. We further find that both approaches learn spatially localized representations. Patch-derived tokens largely retain their explicitly imposed spatial organization, while register tokens develop an implicit two-dimensional spatial structure despite having no predefined layout. Representation alignment reduces this spatial organizational constraint, enabling individual tokens to exert a stronger non-local influence.
Philipp Schenkel, Tobias Schürmann, Omer Sahin Tas
FZI Research Center for Information Technology · Karlsruhe Institute of Technology
We introduce QuadTok, a novel framework for visual tokenization and autoregressive image generation. Compared to traditional approaches using 2D grids or 1D token sequences, we propose a hierarchical quadtree structure, bridging the gap between 2D spatial binding and 1D sequence-level flexibility. The QuadTok tokenizer dynamically allocates representational capacity to visually intricate areas while leaving homogeneous regions at a coarse resolution. Compared with a fixed 256-token grid, our ImageNet-trained tokenizer saves approximately 10% of tokens on ImageNet and 9% when transferred zero-shot to the COCO dataset, while maintaining comparable reconstruction fidelity. Furthermore, the natural causality introduced by the tree structure seamlessly enables autoregressive image generation. Conditioned on a quadtree topology supplied before generation, our 947M GPT-style generative model achieves a 2.08 gFID on the ImageNet 256×256 benchmark. Additionally, leveraging the strong spatial correlation preserved by the quadtree structure, the QuadTok generator enables zero-shot spatially controlled image generation capabilities. Code: https://github.com/myc634/QuadTok.
Discrete image generators learn the distribution of tokens produced by an image tokenizer. These token representations should be easy for generators to model, not merely enable faithful image reconstruction. Yet these tokenizers are commonly trained to reconstruct pixels, which prioritizes low-level fidelity and may disrupt representation structure useful for generation. Motivated by feature-predictive self-supervised learning, we introduce feature-loss tokenization (FeaTok), which trains discrete tokens by reconstructing pretrained features rather than pixels. Ablations across SigLIP, SigLIP2, DINOv2, and DINOv3 show better generative performance with FeaTok. In class-conditional generation, FeaTok advances the quality-compute Pareto frontier, reducing gFDr6 at 256x256 by up to 29 percent over the strongest discrete baselines and outperforming the strongest unguided continuous baseline (RAEv2) with 38 times less sampling compute. FeaTok also achieves higher human-preference reward-model scores than prior art without reward-based training and surpasses continuous and discrete text-conditional baselines on three benchmarks with only 500 fine-tuning updates after pre-training.
Zhang Xiaofeng, Samuel Lavoie, Nicolas Beltran-Velez +6
Mila - Québec AI Institute · Université de Montréal · FAIR at Meta +4