[KongchangAI]
· 2 min read· 1,392 words

StochLOB: Heavy-Tailed Score Matching Improves the Robustness of Order Book Trend Prediction

StochLOB: Heavy-Tailed Score Matching Improves the Robustness of Order Book Trend Prediction

StochLOB replaces Brownian Gaussian corruption with jump and truncated stable noise, improving the tail robustness of order book prediction.

StochLOB addresses the deficiency of Gaussian noise assumptions in diffusion models for limit order book prediction by introducing compound Poisson jump-Lévy noise and truncated α-stable noise during training to approximate the heavy-tailed, bursty, and jump characteristics of order flow. Its key design is that corruption occurs only during training, while inference maintains a deterministic predictor without reverse diffusion sampling, leaving deployment complexity unchanged. The radial factor of the score objective can be interpreted as posterior expected corruption precision, weighting large residuals by latent corruption scale to enhance tolerance of extreme events. Holdout tests on Coinbase LOB data show competitive performance on regular intervals and improved tail stress diagnostic metrics. The A-share transfer study is exploratory, and generalization ability awaits independent verification.

When Diffusion Models Meet Real Markets: The Limits of Brownian Noise

Score matching and diffusion models have shone brightly in generative modeling, with their classic setup using Gaussian noise driven by Brownian motion to progressively corrupt data. However, when this "light-tailed" assumption is applied to financial Limit Order Book (LOB) scenarios, problems emerge. Order flow itself exhibits heavy-tailed, bursty, and jump characteristics—limit orders and cancellations often appear in clusters, and prices occasionally undergo discrete jumps, all of which contradict the smooth, continuous, and fast-tail-decaying nature of Gaussian noise.

In other words, using a light-tailed forward stochastic differential equation (SDE) to describe the order book's corruption process is itself a distorted abstraction. The work StochLOB from rss starts precisely from this contradiction, proposing a "training-only" score matching framework: it changes the corruption law of forward diffusion, but the predictor at deployment remains deterministic.

rss source: StochLOB paper page

Score Matching and Diffusion Models: The core idea of score matching is to learn the gradient field of the log-density of the data distribution (\nabla_x \log p(x)), the so-called "score." Diffusion models, on the other hand, gradually inject noise into data through a forward process (typically Gaussian noise driven by Brownian motion), transforming the data distribution into an easy-to-sample prior distribution (such as standard Gaussian), and then train a neural network to learn the reverse denoising process. Classic DDPM, Score-Based Generative Models, etc., all belong to this framework. Their theoretical guarantees largely depend on the favorable properties of Gaussian noise: continuous paths, analytically solvable forward distributions, and fast tail decay. Once the data itself has heavy-tailed or jump characteristics, these assumptions no longer hold, and the model must learn the data distribution "with a wrong corruption process," leading to modeling bias for extreme samples.

Limit Order Book (LOB): The limit order book is the core data structure of an exchange's matching system, recording the prices and quantities of all outstanding buy (bid) and sell (ask) orders at a given moment. Order flow includes three types of events: limit orders, market executions, and cancellations, whose arrival processes exhibit obvious clustering and heavy-tailedness: large orders often appear in batches, cancellations erupt in concentration during volatile markets, and prices occasionally jump. The statistical characteristics of LOB are therefore incompatible with Gaussian assumptions, making it a natural testing ground for the robustness of generative models.

Two Non-Gaussian Noises: Jump and Truncated Stable Distributions

The core modification of StochLOB lies in the noise injection method. It no longer uses only Brownian Gaussian noise, but introduces two alternatives inspired by non-Gaussian SDEs:

Compound Poisson Variance Mixture (jump-Lévy noise). By constructing a jump structure through a compound Poisson process, finite jumps appear in training samples, close to real events such as sudden large orders and instant cancellations in order flow.

Truncated α-stable noise (positive-stable Gaussian scale mixture). The α-stable distribution naturally has heavy-tailed characteristics; the authors truncate it to control numerical stability, thereby injecting heavy-tailed residuals during training.

The key engineering value of these two corruption mechanisms is that they only act during training, and no reverse-time diffusion sampling is needed at inference. This means the model's deployment complexity and latency are unaffected, and the predictor remains deterministic.

Lévy Processes and α-Stable Distributions: A Lévy process is a type of stochastic process with independent stationary increments, of which Brownian motion is a special case. Unlike Brownian motion, Lévy processes allow jumps; the compound Poisson process is the simplest jump-type Lévy process—random-sized jumps occur at random times. The α-stable distribution is the limiting distribution of the generalized central limit theorem, with tails decaying according to a power law; its variance (and even mean when α<2) may not exist, thus capable of characterizing phenomena with frequent extreme events. When α=2, it degenerates to a Gaussian distribution; when α<2, the tails become significantly heavier. Since the α-stable distribution has infinite variance, directly using it for neural network training leads to gradient explosion, so in practice truncated versions are often used, i.e., truncating the tails beyond a certain threshold or switching to a light-tailed distribution, balancing heavy-tailed modeling and numerical stability.

An Unexpected Gain of the Score Objective: The Radial Factor as Posterior Precision

The score objective proposed by StochLOB has an intriguing interpretation. Its radial factor (h_t(r)) can be understood as "posterior expected corruption precision"—that is, when the model encounters a large residual, it weights according to "the latent corruption scale most likely to produce that residual," rather than penalizing uniformly.

This mechanism makes the model more tolerant of outliers while not completely ignoring them. For order book prediction, this is especially important: extreme events in the market (such as flash crashes, sudden liquidity drops) are often the most informative samples, but loss functions under traditional Gaussian assumptions treat them as noise and over-penalize them. StochLOB's score objective provides a weighting logic more aligned with market statistical characteristics.

Posterior Expected Corruption Precision: In diffusion models, the forward process is usually written as (x_t = \sqrt{\bar{\alpha}_t} x_0 + \sqrt{1-\bar{\alpha}_t} \epsilon), where (\bar{\alpha}_t) controls the degree of signal retention, and (1-\bar{\alpha}_t) can be regarded as corruption strength or noise variance. When the noise distribution is non-Gaussian, given an observed residual (r = x_t - \sqrt{\bar{\alpha}_t} x_0), the corresponding latent corruption scale (t) is no longer a deterministic value but a posterior distribution. The radial factor (h_t(r)) is precisely the weighted expectation of "effective corruption precision" under this posterior distribution. Intuitively, when the residual is large, the model infers that it more likely comes from a latent state with higher corruption (stronger noise), thereby reducing the penalty weight for that sample; conversely, a small residual corresponds to a low-corruption state. This adaptive weighting makes the loss function robust to outliers while preserving their information, consistent with the intuition in financial data that "extreme events are signals."

Empirical Performance: Robust in Normal Markets, Better Under Tail Stress

The authors conducted a chronological holdout test on Coinbase LOB data. Results show that the proposed variants remain competitive on uncorrupted BTC and altcoin test intervals, without sacrificing regular performance due to modifying the noise model.

More noteworthy is the improvement in several "realized tail window" stress diagnostic metrics. This indicates that the model is more reliable under extreme market windows—for risk control and live trading, improved tail robustness is often more valuable than improved average accuracy.

In addition, the paper conducted an exploratory Feishu A-share transfer study, examining whether probabilistic outputs remain usable under trading cost and trading rule constraints. This part is characterized by the authors as "exploratory," but it touches a real pain point: good performance on academic datasets does not mean it remains usable in real markets with price limits, T+1, commissions, and other constraints.

The Distance from Research to Deployment

StochLOB provides a clear idea: rather than doing complex diffusion sampling at inference, it is better to shape the model during training with a corruption process closer to real market statistical characteristics. This "heavy training, light inference" design is friendly to engineering deployment.

The code and configuration files are open-sourced on GitHub (repository name Penny). Readers interested in order book prediction, high-frequency trading signals, and more broadly heavy-tailed modeling of financial time series can further verify.

However, it should also be noted that the A-share transfer part of the paper is still exploratory, with limited samples and data coverage; the statistical characteristics of order flow vary greatly across exchanges and asset classes, and the generalization ability of StochLOB's two noise schemes still awaits more independent reproductions.

One-line Summary

StochLOB replaces Brownian Gaussian corruption with jump and truncated stable noise, improving the tail robustness of order book prediction.

Paragraph Summary

StochLOB addresses the deficiency of Gaussian noise assumptions in diffusion models for limit order book prediction by introducing compound Poisson jump-Lévy noise and truncated α-stable noise during training to approximate the heavy-tailed, bursty, and jump characteristics of order flow. Its key design is that corruption occurs only during training, while inference maintains a deterministic predictor without reverse diffusion sampling, leaving deployment complexity unchanged. The radial factor of the score objective can be interpreted as posterior expected corruption precision, weighting large residuals by latent corruption scale to enhance tolerance of extreme events. Holdout tests on Coinbase LOB data show competitive performance on regular intervals and improved tail stress diagnostic metrics. The A-share transfer study is exploratory, and generalization ability awaits independent verification.

#StochLOB#score matching#limit order book#diffusion models#heavy-tailed noise#Lévy process#α-stable distribution#financial time series#order flow prediction#tail robustness
Share:

Related articles