Test-Time Generation
Abstract
Existing test-time training methods typically cast key-value binding as deterministic regression over fast weights, requiring the model to predict the entire key-conditioned target in a single step. This one-shot formulation collapses multi-valued bindings to conditional means, forces shared value geometry and instance-specific variation into the same finite recurrent state, and becomes brittle when nearby keys must retrieve distant values. We instead endow fast-weight programming with latent stochasticity and reformulate key-value binding as conditional generation. Instantiated with rectified flow, TTG lets many bindings share early transport velocity before late-stage key-conditioned disambiguation, increasing effective memory capacity by reusing value-space structure rather than storing a separate endpoint map for every binding. The flow posterior further adds a value-space denoising-SNR term to the usual key-space similarity margin, yielding a stronger retrieval signal when candidate values are separated even if their keys are close. Although we instantiate this idea with rectified flow, the framework is compatible with multiple generative objectives, including flow matching, equivalent matching, and energy-based learning. Rectified-flow training provides dense supervision along the generation trajectory, yielding a better-conditioned objective and flexible test-time compute scaling through variable-step integration. Experiments in long-context language modeling and novel view synthesis show that TTG outperforms Lact and various linear-attention baselines, demonstrating strong in-context retrieval ability.