TTG

Test-Time Generation

Zefan Cai1   Qinzhe Hu1   Yuchen Zhu2   Hao Tan3   Tianyuan Zhang4   Sai Bi3   Haoyi Qiu5   Yicong Hong3   Haozhe Zhao6   Jason Kuen3   Haoliang Wang3   Ruiyi Zhang7   Ryan A. Rossi3   Wanrong Zhu8   Molei Tao2   Wen Xiao9   Junjie Hu1   Jiuxiang Gu3

1University of Wisconsin–Madison   2Georgia Institute of Technology   3Adobe   4Massachusetts Institute of Technology   5University of California, Los Angeles   6University of Illinois at Urbana-Champaign   7Apple   8Meta   9Microsoft

Paper Code

TL;DR

A fixed-size online memory read by a deterministic mean readout and by TTG's fresh-noise generative readout
Readouts at matched fast-weight capacity. (left) Online writes form a fixed-size state h. (middle) The squared-loss optimum returns the conditional mean. (right) TTG samples with fresh noise and h held fixed. The curves smoothly illustrate the discrete binding conditional; the mode recovery shown is a multi-step regime, and at the Bayes optimum a one-step read (S=1) returns the mean.

From regression to generative recall

A fast-weight memory compresses the context into a fixed-size state h that is written online as tokens or views arrive. Existing designs such as LaCT read it by deterministic regression, whose squared-loss optimum is the conditional mean: when a query is compatible with several stored values, a point prediction can merge them even if the state still holds the alternatives. TTG keeps LaCT's memory architecture and chunked update operator and changes how the memory is read, not how large it is.

On a write, each observed value is corrupted with sampled noise and the chunk update trains the fast-weight MLP as a key-conditioned denoiser; the slow parameters stay fixed at test time. On a read, each query starts from fresh noise and follows a query-conditioned denoising trajectory with the state frozen. More readout steps add fast-MLP evaluations, not state. In language modeling each chunk reads only the preceding context before its own update, which keeps the model causal; in novel view synthesis the observed posed images update the scene state before target-camera queries read it.

TTG language-model and novel-view-synthesis interfaces, with noisy writes and frozen-state reads
Language-model (left) and novel-view-synthesis (right) interfaces. Blue paths write: they accumulate weighted denoising losses into the write loss of a chunk. Orange paths read with the state frozen: the prefix state before the language-model chunk update, or the updated scene state for target-camera queries. Write repeats r are omitted; training uses d read steps and evaluation uses S.

Language modeling

Per-token loss against mean RULER accuracy at 124M, 760M and 3B
Loss–retrieval trade-offs across model scales, one marker per model at each available size; pink stars are TTG. Horizontal axis: deep-context per-token loss, lower to the right; vertical axis: mean RULER accuracy. Curves interpolate the measurements within each family and shaded bands show the loss range at each size. Loss and retrieval rank the models differently. YOCO has results only at 124M and 760M.

Long-context language modeling, evaluated up to 32K. PTL is the per-token loss at positions 30K–32K of 32K-token Book-3 sequences, as stored by each run's evaluation; RULER is accuracy (%) over 13 tasks, averaged over 4K, 8K, 16K and 32K. TTG uses one write repeat and one trained readout step (r=d=1). Scale labels name model families; TTG's conditioning changes the total parameter count. Bold marks the best value in each column among the bounded-state models; the full-attention Transformer† and YOCO† keep a key–value cache that grows with context and are excluded from that comparison.

124M760M3B
ModelPTL ↓RULER ↑4K8K16K32KPTL ↓RULER ↑4K8K16K32KPTL ↓RULER ↑4K8K16K32K
Baselines
Transformer†3.086916.5223.8220.2413.108.932.597834.1641.7037.9533.3623.622.388151.8759.1055.7152.2040.48
YOCO†3.066115.1422.7017.9511.408.532.574926.3935.8128.1223.1718.45——————
Transformer-SWA3.124314.5026.9314.739.946.412.632522.2745.2322.6412.678.572.454430.7364.1129.4818.1111.22
Gated DeltaNet-SWA3.099412.3223.7812.938.304.262.607521.4840.4023.1213.668.762.390031.3161.7633.3018.5411.63
DeltaNet-SWA3.133611.6922.5211.237.635.362.608620.7743.4320.5611.797.282.397425.8151.6226.9215.049.66
KDA-SWA3.056012.1220.8612.988.366.282.570522.8143.4724.1714.658.962.362532.3164.7132.5318.7713.24
Mamba-2-SWA3.084512.9624.2113.938.325.372.586223.5448.4225.4912.607.652.379730.5461.4532.7117.5810.39
Fast-weight family
LaCT3.108812.3624.3414.096.974.062.572224.8846.6727.5515.859.452.446431.155.437.820.510.7
TTG (ours)3.098517.3828.3619.8013.507.842.563026.7643.9628.9919.2014.892.485534.959.138.325.716.3

TTG adds 5.02, 1.88 and 3.8 mean RULER points over LaCT at 124M, 760M and 3B, and 3.78, 5.44 and 5.6 points at 32K. TTG leads LaCT at every length at 124M and 3B; at 760M it leads at 8K–32K and trails at 4K (43.96 vs 46.67). At 124M it also exceeds full attention on mean RULER (17.38 vs 16.52). Loss does not follow retrieval: at 3B TTG has 0.039 higher PTL than LaCT, and KDA-SWA has the lowest bounded-state PTL at 124M and 3B. One readout step keeps the gain; on a checkpoint trained with one step, extra evaluation steps made PTL worse, not better.

Novel view synthesis

Next-view PSNR on GSO and DL3DV as input views accumulate
Next-view PSNR as input views accumulate, on (a) GSO and (b) DL3DV. At position k, the first k sampled views predict view k+1, so the target changes along the curve. Pink stars are TTG (r=d=1). The number at the right end of each curve is the 24th view predicted from 23 inputs, not the mean over all positions used in the table below.

An LVSM-style model with an 8-layer, width-512 backbone writes the observed posed views into the scene memory and generates target-view features from it. Object-level models train on Objaverse and are tested on all 1,019 GSO objects; scene-level models train and test on DL3DV-10K, with 140 test scenes. TTG reaches 24.93 dB on GSO and 16.59 dB on DL3DV, 0.94 dB and 0.45 dB above LaCT, and it also beats DeltaNet and Gated DeltaNet on both sets. The growing-cache Transformer† stays higher, at 25.36 and 17.41 dB. PSNR is an L2 measure and cannot by itself show whether a readout avoids averaging; the retrieval and two-value tests are sharper.

ModelGSO PSNR ↑DL3DV PSNR ↑
Transformer†25.3617.41
DeltaNet23.9515.83
Gated DeltaNet24.3316.05
LaCT23.9916.14
TTG (ours)24.9316.59

PSNR in dB, averaged over all test scenes and all 23 next-view positions, with one generated sample. Bold marks the best bounded-state value in each column; † growing-cache reference. TTG, DeltaNet and Gated DeltaNet share seed-0 view sequences; the archived LaCT and Transformer results use seed 9595, so those comparisons are not paired by view sampling.

Selected reconstructions

Ground truth, deterministic reference and TTG reconstructions of a ladybug and a cactus from GSO
Full-set GSO reconstruction after writing all 24 views. Rows show ground truth (GT), the deterministic reference (Ref) and TTG; columns take every other view index. The ladybug and the cactus are selected high-gain examples of markings and multi-part geometry, not benchmark averages; their gains of +3.75 and +3.43 dB average all 24 targets, including observed views.

Can one query recover two stored values?

A controlled probe writes two values per key into the same gated-MLP fast-weight memory, so N keys hold 2N bindings; the values lie on the unit sphere with separation 1.732. Coverage is the fraction of keys for which 32 reads include a sample strictly closer than half the separation to each stored value. TTG reaches 65.9% at N=4 with S=4 readout steps and 34.4% at N=16 with S=8.

Two-value coverage against readout depth for 4 and 16 keys
Two-value recall against readout depth. Blue and orange show TTG with N=4 and N=16 keys (2N bindings). Coverage is the percentage of keys for which 32 reads recover both stored values. The dashed line marks zero coverage for the deterministic controls and for TTG at N=64.

The deterministic controls are LaCT, LaCT with four times the fast weights at matched slow-parameter count, and a matched-noise control that keeps TTG's loss, conditioning, widths and denoising loop but replaces the noise with a learned constant. All three have zero two-value coverage by construction, and at N=64 the larger LaCT only moves its output closer to the two-value mean. Freezing the readout noise on trained TTG weights also removes the coverage, while a one-value-per-key control succeeds in both families. The controls show that stochastic reads reach both values; they do not isolate denoising training as the only cause.

Coverage needs only one hit near each value among 32 draws, so it can rise without better average samples: at N=16 it goes from 0 to 34.4% while the mixture NLL barely moves (70.8 to 69.9). At N=64 every arm has zero coverage, and at S=4 TTG's mixture NLL is about 3.5× LaCT's: at the highest tested load, generative reading does not overcome write-side interference.

What the results establish

TTG changes how a fixed-size fast-weight memory is read, not its size. In the reported settings it improves mean RULER over LaCT from 124M to 3B and next-view PSNR over the tested fast-weight baselines, and the two-value probe links competing-value recovery to stochastic reading at low and moderate load. The language-model gain holds with one readout step, so it may come from the learned denoising readout rather than extra iterations; that result does not show recovery of multiple values, and loss and retrieval rank the models differently.

Extra noisy writes and readout steps cost compute and do not help uniformly: r=d=1 is a low-cost default, not a universal optimum, and the depth sweep suggests evaluation depth should match training depth. The LaCT and Transformer comparisons in novel view synthesis are not paired by view sampling; identical NVS reruns differ by a median 0.035 dB and at most 0.165 dB, a spread rather than a confidence interval. At the highest probe load, write-side interference limits every readout.

Citation

@misc{cai2026testtimegeneration,
  title={Test-Time Generation},
  author={Zefan Cai and Qinzhe Hu and Yuchen Zhu and Hao Tan and Tianyuan Zhang and Sai Bi and Haoyi Qiu and Yicong Hong and Haozhe Zhao and Jason Kuen and Haoliang Wang and Ruiyi Zhang and Ryan A. Rossi and Wanrong Zhu and Molei Tao and Wen Xiao and Junjie Hu and Jiuxiang Gu},
  year={2026},
  url={https://zefan-cai.github.io/TTG.github.io/},
}