Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Jane Street Tech Blog 8 min read Research hardMaster

Can you use autoregressive diffusion to generate market data?

Autoregressive diffusion over event-level US equities market data (trades and BBO updates) runs into trouble because market data is neither fully continuous nor fully discrete: timing and price distributions have sharp point masses. A causal transformer encoder feeds a categorical event-kind head and a diffusion head. DDPM with a cosine schedule diverged, with 88-95% of samples beyond 8 standard deviations, while rectified flow matching worked out of the box. Splitting discontinuities into a 20-class categorical head and an "atom smoothing" technique both improved TV divergence and discriminator realism, though the model is not yet a realistic generator.

Assumes: diffusion modelsflow matchingtransformer encodersorder book basics

Related posts

  • The Annotated Diffusion Model

    Hugging Face hardMaster

    Denoising Diffusion Probabilistic Models (Ho et al., 2020) work by pairing a fixed forward process that gradually adds Gaussian noise to an image under a variance schedule with a learned reverse process that denoises step by step from pure noise. A closed-form property lets x_t be sampled directly from x_0, and a reparametrization of the mean turns training into a simple MSE loss on predicting the added noise at a randomly sampled timestep. The walkthrough derives this objective and then implements the model step by step in PyTorch: a U-Net with residual connections, sinusoidal timestep embeddings and weight-standardized ResNet blocks with group normalization, following Phil Wang's implementation.

  • VQ-Diffusion

    Hugging Face hardMaster

    VQ-Diffusion is a conditional latent diffusion model whose noising and denoising run over a discrete VQ-VAE codebook rather than Gaussian noise. Each token can stay, be uniformly resampled, or become permanently masked, and a CLIP-conditioned encoder-decoder transformer predicts the full distribution of un-noised latents in one pass. Compared with autoregressive image transformers, it avoids raster-order directional bias and error accumulation, and its inference cost scales with diffusion steps rather than latent pixels, roughly a 10x big-O gain on 32x32 ITHQ latents and up to 15x faster in practice. The model can be run in a few lines with the Diffusers VQDiffusionPipeline.

  • Stable Diffusion with 🧨 Diffusers

    Hugging Face mediumAdept

    Stable Diffusion is a latent diffusion model that denoises compressed 64×64 latents rather than pixels, combining a VAE, a text-conditioned U-Net with cross-attention, and a frozen CLIP text encoder. The Diffusers walkthrough covers running it in a few lines with StableDiffusionPipeline, including fp16 loading for GPUs under 10GB, seeded generators for determinism, and tuning num_inference_steps (50 recommended) and guidance_scale (7–8.5). It explains why the 8× VAE compression (3×512×512 to 4×64×64) makes generation feasible on 16GB GPUs. It then shows how to build a custom inference pipeline by loading components individually and swapping in schedulers such as K-LMS.

  • Introducing Waypoint-1: Real-time interactive video diffusion from Overworld

    Hugging Face hardMaster

    Waypoint-1 is an open-weights real-time interactive video diffusion world model, a frame-causal rectified flow transformer trained on 10,000 hours of game footage paired with keyboard/mouse inputs and text captions, conditioning every frame on user controls. It is pre-trained with diffusion forcing and post-trained with self forcing via DMD to reduce error accumulation in long autoregressive rollouts and enable few-step, one-pass-CFG denoising. The accompanying WorldEngine Python inference library runs the 2.3B Small model at 30 FPS (4 steps) or 60 FPS (2 steps) on an RTX 5090, using AdaLN feature caching, a static rolling KV cache with Flex Attention, fused QKV matmuls and torch.compile.

  • How Diffusion Controller unifies and simplifies AI image generation

    Google Research hardMaster

    Diffusion Controller reframes diffusion denoising as a continuous control problem, unifying inference-time guidance and fine-tuning methods such as LoRA, reward-weighted regression and policy gradients under one framework. A lightweight trainable side network attached to a frozen backbone adds small corrections to the base model's score using the intermediate reverse mean, so it also works with gray-box, access-restricted models. On a Stable Diffusion v1.4 backbone across SFT, reward-weighted loss and PPO regimes, the gray-box controller beat LoRA on HPS-v2 win rates while touching fewer layers. The white-box variants reached about a 90% win rate over the baseline, and a single inference-time guidance-strength parameter dials alignment up or down.

The quest for software engineering knowledge.

Look:
Layout: