A limit order book is the live list of buy and sell orders waiting at each price. One promising way to forecast it treats a window of the book as a small image, with price levels on one axis, time on the other, and order size as pixel intensity. A diffusion model, a generator that learns by gradually turning random noise into realistic samples, then "paints in" the future half of the image given the observed past half (Painting the market). Because the whole future block is produced at once, this avoids the step-by-step error build-up of autoregressive generators. Its drawback is cost: the model is a full-precision U-Net run for 50–100 denoising passes, which is far from the millisecond budgets of trading systems.
The standard fixes from image generation apply compression, meaning low-bit quantization or fewer, distilled steps, and then undo the resulting systematic errors with correction factors calibrated offline on a fixed dataset and a fixed sampler (TAC-Diffusion). Markets are the setting where offline calibration is most likely to break, because the data keep changing regime. Our central observation is that inpainting supplies a free, live calibration signal. The model also denoises the past region, where the true injected noise is known exactly. On every forecast, we can therefore measure how the compressed network's noise predictions are wrong on the observed history, fit a cheap correction, and apply it to the future region. The correction adapts to today's market, to whatever sampler and step count are in use, and to whatever compression was applied.
Core Claim
We claim that a per-forecast correction, fitted on the observed history region, recovers most of the fidelity lost when a 2D order-book diffusion model is compressed to an edge-scale latency budget. We further claim that it recovers the part that matters most in markets: tail events such as large spread jumps and queue depletions, and the sparse dynamics of large-tick stocks. Offline correction fails at exactly those points because the calibration data do not match the live regime.
Concretely, at denoising step $t$ and for each channel $c$ (price and size), let $\varepsilon$ be the noise we injected into the known history region and $\hat\varepsilon$ the compressed network's prediction there. We fit
$$(K_t^c, b_t^c) = \arg\min_{K,b} \sum_{i \in \text{history}} \left\| \varepsilon_i^c - (K\hat\varepsilon_i^c + b) \right\|^2 ,$$
where $K$ is a scale factor and $b$ a bias. We then use $K_t^c\hat\varepsilon^c + b_t^c$ in place of $\hat\varepsilon^c$ on the future region. This has the same form as TAC-Diffusion's input-bias and output-scaling corrections, but it is solved on the fly from the current window rather than stored per timestep from a calibration set. The extra computation is a few reductions per step, which is small next to one U-Net pass.
The claim could fail in a specific way: errors on the history region may not predict errors on the future region, which lies on the other side of the conditioning boundary and has different statistics. Measuring how well the correction transfers across that boundary is the first thing the program tests.
Research Program
The three directions play different roles. The spatial-temporal representation is the core object: the price-by-time image and the 2D convolutions of Painting the market. Edge constraints define the regime. Non-linear market dynamics supply the failure modes we care about: heavy tails, regime shifts, and large-tick sparsity.
We first rebuild the Painting-the-market model on LOBSTER data for GOOG (a small-tick, volatile stock) and INTC (a large-tick stock with sparse price changes), following the LOB-Bench protocol (LOB-Bench). We train it with random masks so that the network also predicts noise on history pixels, which the correction needs. Following DeepFolio's finding that batch normalization over-smooths order-book spikes (DeepFolio), we compare no normalization against group normalization. We treat this choice as a factor, because it changes the activation outliers that quantization has to handle.
We then build a grid of compressed variants. The first axis is weight and activation precision, from 8-bit down to 3-bit, using uniform post-training quantization, TAC-Diffusion's offline corrections, and TR-DQ's time-dependent rotations (TR-DQ). The second axis is step count, reduced by skip-step sampling as in LOBDIF and by step distillation in the style of SnapFusion. The third axis is network width, with full-precision students of smaller size. We add the live correction to each variant.
Before any improvement claim, we run a diagnostic study. Its purpose is to establish where compression error goes in market data: into the bulk statistics or into the tails. It also tests whether compression makes INTC's mode collapse worse, which no prior work has measured. Latency is measured per forecast block on a single CPU core and on a mobile-class ARM board. We use LOBDIF's reported 1.4–1.9 ms per event as the reference budget, recognizing that LOBDIF produces one event while we produce a multi-level block.
Baselines
The naive reference points come first. One is persistence, which repeats the last observed snapshot across the horizon. The other is the uncompressed full-precision Painting-the-market model at 50–100 steps, which is the quality ceiling. Every compressed variant is scored by how much of the gap between persistence and this ceiling it retains. Note that the file gives no reported Wasserstein numbers for Painting the market ("no reported result found on Lacuna for" its exact GOOG/INTC distances), so we reproduce it ourselves.
The strongest existing order-book generator in the file is LOBS5, an autoregressive state-space model. LOB-Bench reports a market-impact response error of $\Delta R = 2.45$ on GOOG for LOBS5, against 126 for RWKV-6 (LOB-Bench). It is the strongest competitor because it is cheap per step and already strong on market impact. We run the released LOB-Bench configuration on the same January 2023 GOOG and INTC data and measure its wall-clock latency on our hardware for the same horizon. Beating it means matching or improving $\Delta R$ and the distributional distances at equal or lower latency per forecast block.
The strongest compression competitor is TAC-Diffusion's offline correction. On images, it reports an FID of 9.55 versus 17.31 for Q-Diffusion on CIFAR-10 at 3-bit weights and 8-bit activations (TAC-Diffusion); no reported result exists for financial data. We also run a regime-stratified version, with correction factors calibrated separately for each volatility bucket and selected at inference by the history's realized volatility, because that is the most natural fix a reviewer would propose. TR-DQ runs at matched bit-widths. All compression methods get the same calibration pool (the training months) and the same hyperparameter search budget. Beating them means lower tail error on held-out months at equal bit-width and step count, with no degradation on bulk statistics.
Three ablations isolate the key ingredient. The first is stale-history correction, in which the correction is fitted on a window from a different day. This separates the live aspect from simply having a correction. The second compares bias-only against scale-plus-bias. The third varies the fraction of the image that is history, to measure how much known region the fit needs.
Why not just…?
Why not just shrink the full-precision network until it meets the latency budget? Order-book images are small, so a narrow U-Net at 16-bit precision may already be fast enough, which would make quantization unnecessary. This is a real threat to the quantization half of the story. We settle it with a latency–fidelity Pareto plot that places small full-precision students alongside quantized models. Because the live correction fixes any systematic noise-prediction error, not only quantization error, we also apply it to the small students. If small full-precision models dominate the Pareto plot, we report that. The claim then narrows to "live correction for compressed students."
Why not just calibrate offline per regime? Stratified TAC-style calibration may capture most of the benefit with no inference-time fitting. It fails if regimes inside the calibration pool do not match held-out regimes, or if a new sampler or step count is used. TAC-Diffusion's own limitation is that its factors are locked to one trajectory. The held-out-month evaluation and the step-count transfer test decide this. If stratified calibration ties with our method on both, the live mechanism adds nothing.
Why not just use an autoregressive model like LOBS5? It avoids iterative denoising. However, its cost grows with horizon length, and LOB-Bench documents drift as it unrolls. We compare at matched horizon and wall-clock time. If LOBS5 wins on latency at short horizons, we report the crossover horizon rather than hiding it.
Why not just take fewer sampling steps? Painting the market already cut steps from 1000 to 50–100 with little loss. Step reduction is one axis of our grid, and the correction is evaluated with and without it. This shows whether quantization or step count is the binding constraint on latency.
Proposed Experiments
The evaluation uses LOB-Bench's L1 and Wasserstein-1 distances on spread, order-book imbalance, and inter-arrival times, together with the market-impact error $\Delta R$ and the discriminator. We add two tail metrics: quantile distances at the 1st and 99th percentiles of mid-price changes, and the frequency of level-one queue depletions. For INTC we add a collapse measure: the fraction of generated futures with any price change, compared with the real fraction.
A downstream check follows LOB-Bench's augmentation test. A DeepFolio-style CNN-plus-GRU classifier is trained with and without synthetic blocks from each compressed model. For context, DeepFolio reports 79.22% F1 at $k=10$ on FI-2010. This test asks whether compression makes the known augmentation penalty worse.
Five checks are decisive. First, under static compression, tail metrics should degrade markedly more than bulk metrics; if they do not, the motivation weakens. Second, the fitted history-region correction should correlate with the oracle correction computed on the true future noise. We measure this directly, because it is the premise of the method. Third, at 4-bit and below, the live correction should close most of the tail-metric gap to full precision on held-out months, and it should beat regime-stratified offline calibration. Fourth, factors fitted at one step count should work at another, whereas TAC factors should need recalibration. Fifth, on INTC, the corrected compressed model should not collapse more than the full-precision model. We do not claim the correction cures collapse, only that it should not accelerate it.
A negative outcome on the second check would end the method cleanly. That result would itself be useful: it would show that inpainting boundaries break error transfer in market images.
References
- Painting the market: generative diffusion models for financial limit order book simulation and forecasting
- Timestep-Aware Correction for Quantized Diffusion Models
- LOB-Bench: Benchmarking Generative AI for Finance - an Application to Limit Order Book Data
- DeepFolio: Convolutional Neural Networks for Portfolios with Limit Order Book Data
- TR-DQ: Time-Rotation Diffusion Quantization
- Limit Order Book Event Stream Prediction with Diffusion Model
- SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds