Forking Sequences

Willa Potosnak, Malcolm Wolff, Boris N. Oreshkin, Mengfei Cao, Michael W. Mahoney, Dmitry Efimov, Kin G. Olivares

TL;DR

While standard neural forecasting models slice time series into independent windows, forking-sequences encodes the entire series once and decodes forecasts across all intermediate forecast creation dates (FCDs) simultaneously. This simple structural change stabilizes gradient updates, unlocks computationally free temporal ensembling, and slashes cross-validation inference complexity from $O(T^2)$ to $O(T)$, yielding massive gains in both forecast stability and accuracy.

What Problem Does This Paper Address?

In operational forecasting (e.g., supply chain, finance, and cloud resource management), forecast accuracy is only half the battle. Just as vital is forecast stability: if next week’s projected demand swings wildly between Tuesday's run and Wednesday's run, planning breaks down and stakeholders lose trust.

Despite this, most neural forecasting architectures rely on window-sampling, cutting historical series into independent context windows. This approach:

  1. Treats consecutive forecast dates in isolation, discarding shared temporal structure.
  2. Suffers from high stochastic gradient variance during training.
  3. Scales poorly during temporal cross-validation, redundantly re-encoding overlapping historical context ($O(T^2)$ complexity).

Methods

The authors formalize forking-sequences—a technique historically used in proprietary models (like MQCNN, MQT, and SPADE) that mirrors next-token prediction in language modeling:

  • Joint Encoding & Parallel Decoding: Instead of feeding independent slices to an encoder, the entire sequence is passed through an encoder once to generate hidden states $h_{[t][h]}$. Decoders then branch ("fork") out at every historical time step $t$ to predict future horizons in parallel.
  • Multi-Horizon Loss Aggregation: Rather than optimizing over randomly sampled isolated horizons, the training objective computes quantile losses across all valid FCDs simultaneously. The authors prove that under mild temporal correlation ($M$-dependence), the gradient estimator's variance shrinks at a rate of $O(1/|T|)$, directly accelerating optimization convergence.
  • Zero-Cost Temporal Ensembling: During inference, overlapping forecasts generated across consecutive FCDs for the same target date $\tau$ are averaged ($y_{\tau,\eta}^{(q)} = \frac{1}{|\mathcal{H}|}\sum y_{t,h}^{(q)}$). Because representations are already computed, ensembling introduces negligible overhead while shrinking forecast variance at rate $O(1/|\mathcal{H}|)$.

Datasets

The authors evaluated models across 16 large-scale benchmark datasets encompassing over 100,000 time series across hourly, daily, weekly, monthly, quarterly, and yearly frequencies:

  • M1 Competition (Monthly, Quarterly, Yearly)
  • M3 Competition (Monthly, Quarterly, Yearly, Other)
  • M4 Competition (Hourly, Daily, Weekly, Monthly, Quarterly, Yearly)
  • Tourism Competition (Monthly, Quarterly, Yearly)

No new datasets were introduced; instead, existing benchmarks were split to enable robust temporal cross-validation evaluation.

Key Insights and Ideas

  • The NLP Parallel: In NLP, nobody trains a Transformer on isolated slices of text; models compute predictions for all tokens across the sequence in a single forward pass. Forking-sequences translates this natural autoregressive efficiency to multi-horizon time series forecasting.
  • Variance Reduction Without Inflating Batch Size: Achieving low-variance gradients in standard window sampling requires drastically increasing batch size ($O(B \cdot T)$ compute). Forking-sequences achieves equivalent variance reduction at $O(T)$ cost by reusing intermediate sequential computations.
  • Stability vs. Accuracy Tradeoff: Temporal ensembling dramatically curbs erratic forecast updates (measured by Symmetric Quantile Percentage Change, sQPC) with minimal to positive impact on distributional accuracy (sCRPS).

Key Results

  • Forecast Revision Stability (sQPC): Across datasets, forking-sequences with ensembling reduced revision volatility compared to standard window sampling by:
  • 37.9% for LSTM
  • 31.3% for CNN
  • 28.8% for MLP and RNN
  • 8.8% for dilated Transformers (which already suffer less from information bottlenecks).
  • Forecast Accuracy (sCRPS & MAE): Forking-sequences reduced sCRPS by up to 43.2% for LSTMs, 19.2% for CNNs, 16.9% for RNNs, 14.3% for MLPs, and 1.8% for Transformers, outperforming standard statistical baselines (AutoARIMA, ETS).
  • Inference Complexity: For convolutional and recurrent architectures, temporal cross-validation dropped from quadratic $O(T^2)$ to linear $O(T)$ runtime.

Limitations and Future Work

  • Hyperparameter Tuning: The study used fixed, minimal hyperparameters without exhaustive tuning; more nuanced sampling schemes or learning rate schedules might help window-sampling close part of the performance gap.
  • Sampling Heuristics: Current window-sampling baselines sampled randomly (excluding padded regions); evaluating structured or curriculum-based window selection remains future work.
  • Ecosystem Adoption: The authors note that mainstream open-source forecasting libraries (e.g., GluonTS, PyTorchForecasting, Darts, NeuralForecast) heavily promote window-sampling, making library integration the primary hurdle to wider adoption.

Summary updated

BibTeX
@inproceedings{potosnak2025forking,
  author = {Willa Potosnak and Malcolm Wolff and Boris N. Oreshkin and Mengfei Cao and Michael W. Mahoney and Dmitry Efimov and Kin G. Olivares},
  title = {{Forking Sequences}},
  booktitle = {ScaleOPT @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=tQ9VyGbGyp},
}
Figure