Introduction: The Latency Challenge in Time-Series Forecasting
Large-scale Transformer-based Foundation Models, such as Timer and TimesFM, have significantly advanced the state-of-the-art in time-series forecasting accuracy. However, these models suffer from a fundamental computational bottleneck: the necessity of autoregressive generation. To predict a sequence of future time steps, the model must perform sequential forward passes—one for each step—which is inherently slow and resource-intensive.
In production environments like real-time content recommendation, ad bidding, or CDN traffic optimization, latency budgets are extremely tight, often requiring responses within 10–50ms. A high-accuracy foundation model that takes seconds to generate a forecast is impractical for these "web-scale" scenarios. The challenge is to bridge the gap between the high accuracy of these massive models and the strict latency requirements of production systems without requiring expensive retraining or architectural changes.
The STRIDE Framework
To address this, we introduce STRIDE, a framework that adapts speculative decoding—a popular acceleration technique for Large Language Models—to the continuous domain of time-series forecasting. STRIDE is a "plug-and-play" accelerator that requires no changes to the underlying model architecture, making it easily applicable to existing foundation models.
The Draft-Verify Loop
The core of STRIDE is a two-stage inference process. First, a small, fast "draft" model (typically 1/8th the size of the target) autoregressively predicts a block of $\gamma$ future "patches" (groups of time steps). Second, the large "target" model performs a single batched forward pass to evaluate all $\gamma$ proposals simultaneously. This approach exploits the "local regularity" often found in time-series data, such as daily traffic cycles, where a tiny model can correctly guess the next few steps most of the time.
Continuous Acceptance and the Practical Variant
Unlike text generation, which deals with discrete tokens, time-series models typically output continuous distributions, such as multivariate Gaussians. STRIDE employs a new acceptance rule based on the likelihood ratios of these continuous densities.
A key engineering breakthrough in STRIDE is the "Practical Variant." Standard speculative decoding aims for mathematical losslessness through residual sampling, but calculating these residuals in high-dimensional continuous spaces is computationally expensive and can actually slow down inference. The Practical Variant simply falls back to the target model's prediction upon rejection. We prove theoretically that this introduces only a tiny, bounded bias while significantly boosting wall-clock speed.
Experimental Evaluation
The STRIDE framework was evaluated on standard forecasting benchmarks, including the Electricity Transformer Temperature (ETT) datasets, Electricity Consumption Load (ECL), and Weather data. These datasets represent the types of periodic, noisy, and multivariate data found in real-world web infrastructure.
Key Results
- Significant Speedups: STRIDE achieved measured wall-clock speedups of 1.1x to 2.2x across most benchmarks, with some configurations reaching up to 3x in throughput-intensive tasks.
- Accuracy Preservation: The Practical Variant maintained nearly identical Mean Squared Error (MSE) to the original target model. For example, on the ETTh1 dataset, the MSE only moved from 0.4746 (baseline) to 0.5014 while doubling the speed.
- Theoretical Alignment: Empirical results matched theoretical predictions within 15%, proving the framework is robust and predictable for production engineering.
Discussion and Future Work
While STRIDE offers substantial benefits, it faces limitations during sudden, rare events (e.g., a DDoS attack or a viral social media post) that cause the draft model's accuracy to plummet, temporarily negating speed gains. Future work will explore adaptive block sizes ($\gamma$) that dynamically adjust based on real-time confidence and more complex covariance structures to improve the draft model's acceptance rate without increasing computational overhead.
Summary updated