---
title: 'SPADE-S: Forecasting & Sequence Modeling'
url: https://www.emergentmind.com/topics/spade-s
type: topic
---

# SPADE-S: Forecasting & Sequence Modeling

Searching arXiv for SPADE-S and closely related entries to ground the article in the current literature.
SPADE-S is an overloaded designation in the arXiv literature. In forecasting, it denotes **“Split Peak Attention Decomposition – Sparsity‐Robust”**, a deep quantile forecaster designed to correct the systematic under-performance of existing multi-horizon models on low-magnitude and sparse time series [2507.21155]. In long-sequence modeling, **SPADE-S** denotes the **softmax-window local-attention instantiation** of **SPADE**, the **State sPace AugmenteD TransformEr**, in which a single bottom-layer state-space model is combined with efficient local attention in the remaining layers [2212.08136]. This dual usage is important because the two systems address different problem classes, employ different architectures, and report different evaluation protocols.

## 1. Nomenclature and scope

The name **SPADE-S** is used in at least two distinct senses.

| Usage | Expansion | Domain |
|---|---|---|
| SPADE-S | Split Peak Attention Decomposition – Sparsity‐Robust | Demand forecasting |
| SPADE-S | Softmax-window local-attention instantiation of SPADE | Long-sequence modeling |

In the forecasting paper, SPADE-S is introduced as **“a robust forecasting architecture that significantly reduces magnitude- and sparsity-based systematic biases and improves overall prediction accuracy”** on large retail demand datasets [2507.21155]. In the long-sequence paper, SPADE-S refers to the “small” or windowed variant of SPADE used in Long Range Arena, language modeling, and encoder–decoder pre-training experiments [2212.08136].

This suggests that SPADE-S should not be treated as a single canonical model family across machine learning. A related misconception is to conflate SPADE-S with **SPADES**, the **“Stellar PArameters DEtermination Software”** for spectroscopic stellar-parameter inference [1111.0474], or with **SPADE** in spectroscopic photoacoustic denoising [2412.12068]. Those systems share only partial acronymic overlap.

## 2. SPADE-S as a sparsity-robust forecaster

In the forecasting literature, SPADE-S is formulated for a multi-horizon quantile forecasting task with forecast creation dates $t \in [T] = \{1,\dots,T\}$, series indices $i \in \mathbb{I}$, and forecast horizons $h=(\ell,s)\in\mathcal{H}$, where $|\mathcal{H}|\approx240$ in multi-week retail use-cases [2507.21155]. The observed inputs comprise past covariates $x_t^{(p)}\in\mathbb{R}^{d_p}$, known future covariates $x_{t,\mathcal{H}_1}^{(f)}\in\mathbb{R}^{d_f\times|\mathcal{H}_1|}$ for span-1 horizons, and static features $x^{(s)}\in\mathbb{R}^{d_s}$, while the target demand is $y_{t,h}\in\mathbb{R}_+$.

The model learns a hypothesis $f_\theta$ that estimates, for each quantile $q\in Q=\{0.5,0.9\}$, the conditional distribution
$$
P(y_{t,\mathcal{H}} \mid x_{1:t}^{(p)}, x_{1:t,\mathcal{H}_1}^{(f)}, x^{(s)}).
$$
It outputs $\hat y_{t,h}^{(q)} \approx F^{-1}_{t,\ell,s}(q)$, thereby directly targeting quantile forecasts rather than point estimates [2507.21155].

The architectural core is a **SparsityMask** routing module. Given a batch of series, the module routes each series to one of two arms based on its **52-week trailing sum**: the **“Non-Sparse” arm** sends a series with nonzero demand in past 52 weeks or a new product to a **Main Encoder → Quantile Heads**, whereas the **“Sparse” arm** sends a series with zero sum and “not new” status to a **SparseQuantileNetwork** [2507.21155]. A series $i$ is marked sparse if
$$
\sum_{t'=t-52}^{t} y_{i,t'} = 0
$$
and is signaled as “not new.”

For non-sparse series, the model begins by **peak-filtering the history** $\widetilde x_{1:t}^{(p)}$ to isolate high-frequency “off-peak” dynamics as in SPADE [38], and then applies $G$ parallel dilated causal convolutional heads:
$$
e_{t,g}^{(p)} = \mathrm{Conv}^{(g)}(\widetilde x_{1:t}^{(p)}; W^{(g)}), \qquad g=1\dots G
$$
$$
e_t^{(p)} = \mathrm{Linear}([e_{t,1}^{(p)}, \dots, e_{t,G}^{(p)}]).
$$
Each $\mathrm{Conv}^{(g)}$ is a stack of dilated causal convolutions with kernel size $k=3$ and dilation doubling each layer; $G\lesssim6$ balances representation diversity with compute [2507.21155]. The resulting embedding is combined with future and static covariates via residual blocks and passed to separate quantile-prediction heads for each $h\in\mathcal{H}$ and $q\in\{0.5,0.9\}$.

The **SparseQuantileNetwork** is introduced to avoid **distributional collapse of CNNs on zero-inflated inputs**. It fits a simple parametric distribution, specifically an exponential distribution whose scale grows linearly with predicted intensity:
$$
s_t = \mathrm{PatchMLP}(x_{1:t}^{(p)})
$$
$$
\theta_t = \mathrm{MLP}(s_t) \Rightarrow \mathrm{scale} = h(\mathrm{span},\theta_t) \coloneqq \mathrm{span}\cdot \zeta \cdot \theta_t
$$
$$
\hat y_{t,\ell,s}^{(q)} = F^{-1}_{\mathrm{Exp}}(q;\mathrm{scale}) = -\mathrm{scale}\cdot \ln(1-q).
$$
The paper states that this **guarantees no collapse of the $q$th quantile even if the history is all zeros, and ensure $\hat y^{(0.5)}=0$** [2507.21155].

## 3. Loss, magnitude bias, and training methodology

SPADE-S is trained by minimizing the multi-quantile numerator of the **Weighted Quantile Loss (WQL)** and is evaluated with WQL:
$$
\mathrm{QL}_q(y,\hat y) \coloneqq q\cdot(y-\hat y)_+ + (1-q)\cdot(\hat y-y)_+
$$
$$
\mathrm{WQL}(\hat y; q) =
\frac{\sum_{i,t,h} \mathrm{QL}_q(y_{i,t,h}, \hat y_{i,t,h}^{(q)})}
{\sum_{i,t,h} y_{i,t,h}}.
$$
Because $\mathrm{QL}_q(y,\hat y)=y\cdot f_q(r)$ with $r=(\hat y-y)/y$ and $f_q(r)=|q-1_{r<0}|\cdot|r|$, the paper argues that **series of larger $y$ carry proportionally more weight**. It further states that a formal proposition shows that any loss of the form $\ell(y,\hat y)=g(y)f(r)$ with strictly increasing $g$ results in a **“magnitude bias” favoring high-volume series** [2507.21155].

To address this, SPADE-S combines architecture with a specialized sampling scheme. Training uses SGD with **Adam**, learning rate $10^{-3}$, batch size $32\text{K}$, and early stopping on validation WQL. Series $i$ are sampled with probability proportional to
$$
w_i = \max\bigl(\sum_{t'} y_{i,t'}, Q_{0.8}\bigr),
$$
where $Q_{0.8}$ is the **80th percentile of the per-series sum**. The paper describes this as **“importance sampling with uniform floor”** and states that it ensures low-magnitude series receive at least weight $Q_{0.8}$, preventing their dropout from batches [2507.21155].

The evaluation protocol uses three large retail forecasting tasks. **D1** has $|\mathbb{I}|\approx700$ million series, $|\mathcal{H}|\approx240$, 260 weeks of training, and a 52-week backtest; **63.7 % have zero demand in past 52 weeks**. **D2** has $|\mathbb{I}|\approx100$ million series, up to 10-week horizons, 260 training weeks, and a 52-week backtest; **90 % are zero in trailing window**. **D3** has $|\mathbb{I}|\approx3$ million series, $|\mathcal{H}|=285$ daily lead/span pairs over 91 days, 730 training days, and a 365-day backtest; **only 9.6 % zero** [2507.21155]. Series are bucketed into six velocity categories: **Super‐Fast (>10 000 units), Fast (365–10 000), Medium (52–365), Slow (2–52), Super-Slow (0–2), and Zero**.

To interpret bias, the paper decomposes quantile loss into **UnderBias** and **OverBias**:
$$
\mathrm{UnderBias}_q = \sum_{\hat y<y} (y-\hat y)\cdot|q-1_{\hat y<y}|
$$
$$
\mathrm{OverBias}_q = \sum_{\hat y>y} (\hat y-y)\cdot|q-1_{\hat y<y}|.
$$

## 4. Empirical results and ablations in forecasting

The forecasting paper reports percent changes in WQL of SPADE-S relative to baselines, with **SPADE [38]** used for D1 and D2 and **MQTransformer** for D3 [2507.21155]. Negative values indicate improvement.

| Category | D1 | D2 | D3 |
|---|---:|---:|---:|
| All, P50 | –0.92 % | –0.77 % | –1.95 % |
| All, P90 | –2.21 % | –6.58 % | –4.28 % |
| Zero, P50 | –4.37 % | +0.40 % | –0.45 % |
| Zero, P90 | –10.05 % | +0.20 % | +0.27 % |

The paper’s stated highlights are that **on D1’s zero-demand series, P90 QL drops by 10.05 %, P50 by 4.37 %**; that **on D2’s “Fast” series, P90 improves by 14.80 %**; and that **across all datasets, tail forecasts (P90) improve by up to 15 %, and overall by 2.21 % (D1), 6.58 % (D2), 4.28 % (D3)** [2507.21155]. A plausible implication is that the combination of routing, sparse-arm modeling, and sampling is most consequential in the low-velocity and tail-forecast regimes emphasized by the paper.

Appendix C.1 reports an ablation on D1 comparing variants of SPADE with **adjusted sampling cutoff quantile (V10)**, **rule-based sparse override (V11)**, **Mixture-of-Experts without sparse arm (V13)**, **learned P90 layer via truncated normal or exponential (V15–V18)**, and **full SPADE-S (V19)**. The paper states that **the full SPADE-S (V19) consistently achieves the best P50 and P90 across all velocity strata** [2507.21155]. It further reports that inserting the exponential-based SparseQuantileNetwork **reduces P90 bias on zero series from +72 % (V9) to –35 % (V19)**, while the multi-head encoder **reduces variance on “Super Fast” forecasts by another 1 %**.

The comparison to prior universal forecasters is framed in terms of **systematic under-bias on low-velocity series when trained on skewed data**, attributed to **magnitude bias in loss and representational collapse on zeros**. The cited baselines are **MQCNN**, **MQTransformer**, and **SPADE** [2507.21155]. The paper attributes SPADE-S’s gains to **architectural diversity (multi-head conv)**, **sparse-arm routing**, and **importance sampling**.

## 5. SPADE-S as the softmax-window SPADE variant for long sequences

In the long-sequence literature, SPADE denotes **State sPace AugmenteD TransformEr**, and SPADE-S denotes the **Softmax-window local-attention instantiation** presented in **“Efficient Long Sequence Modeling via State Space Augmented Transformer”** [2212.08136]. The overall design is hierarchical: the very bottom layer is replaced by a **Single-layer State-Space Model (SSM) “global” block**, and the remaining layers use **efficient windowed self-attention**. The paper’s stated intuition is that the SSM injects a **strong, data-independent global bias** into the representation, after which narrow-window attention suffices to capture fine-grained local patterns.

A single SPADE block is defined for inputs $\mathbf{X}\in\mathbb{R}^{L\times d}$ as
$$
\begin{aligned}
&\mathbf{X}_{\rm local}  = \mathrm{WindowAttn}\bigl(\mathrm{LN}(\mathbf{X})\bigr), &&
\mathbf{X}_{\rm global}=\mathrm{SSM}\bigl(\mathrm{LN}(\mathbf{X})\bigr),\\
&\mathbf{X}_a =\mathbf{W}\bigl[\mathrm{LN}(\mathbf{X}_{\rm local}),\,\mathrm{LN}(\mathbf{X}_{\rm global})\bigr]+ \mathbf{X}, &&
\mathbf{Y}=\mathrm{FFN}\bigl(\mathrm{LN}(\mathbf{X}_a)\bigr) + \mathbf{X}_a.
\end{aligned}
$$
Here $\mathrm{LN}$ is LayerNorm, $\mathbf{W}$ is a learned $d\times2d$ fusion matrix, and $\mathrm{FFN}$ is the usual two-layer MLP [2212.08136].

The SSM layer uses the **S4 instantiation** of a linear state-space model:
$$
\dot x(t)=A\,x(t)+B\,u(t), \qquad y(t)=C\,x(t)+D\,u(t),
$$
which is discretized by the bilinear method to yield
$$
\overline A=(I-\tfrac{\Delta}{2}A)^{-1}(I+\tfrac{\Delta}{2}A),\quad
\overline B=(I-\tfrac{\Delta}{2}A)^{-1}\Delta B,\quad
\overline C=C,\quad
\overline D=D,
$$
and recurrence equations
$$
x_k=\overline A\,x_{k-1}+\overline B\,u_k,\qquad
y_k=\overline C\,x_k+\overline D\,u_k.
$$
Unrolled, this is equivalent to a 1-D convolution
$$
y=\overline K*u,\qquad
\overline K=
[\overline C\,\overline B,\;\overline C\,\overline A\,\overline B,\;\ldots,\;\overline C\,\overline A^{L-1}\,\overline B]\in\mathbb{R}^{L}.
$$

For the **SPADE-S experiments on Long Range Arena**, the reported configuration is: embedding dimension $d=128$, feed-forward inner dimension $4d=512$, total depth **4 layers (1 global + 3 local)**, **4 attention heads** in each local layer, **SSM state dimension $d_s=64$**, and **windowed self-attention with window size $w=128$** for all but Path-X, where $w=1024$ [2212.08136]. An alternate SPADE-S variant uses **chunk-based gating (MEGA-chunk)** with chunk size 128, and 4096 on Path-X. The same paper also embeds SPADE-S in a **16-layer decoder** for large causal language modeling and places SSM modules at **layer-1 of encoder and decoder** in an encoder–decoder pre-training setup.

## 6. Empirical behavior in long-sequence modeling and relation to adjacent names

For Long Range Arena, the reported average accuracies are **80.48%** for **Vanilla S4**, **86.19%** for **SPADE-S (softmax-window)**, and **87.40%** for **SPADE-S (MEGA-chunk)** [2212.08136]. For WikiText-103 causal language modeling, the reported test perplexities are **18.8** for full Transformer, **19.7** for window-only, **23.2** for S4, **20.9** for FLASH-chunk, **19.8** for MEGA-chunk, **18.5** for **SPADE-S (softmax-window)**, **19.5** for **SPADE-S (MEGA-chunk)**, and **19.9** for **SPADE-S (FLASH-chunk)**. On GLUE, the reported dev-set average scores are **85.1** for published **T5\_base**, **85.4** for **SPADE\_base**, and **86.8** for **SPADE\_base++**. For summarization, **SPADE\_base++** reports **ROUGE-2 = 21.65** on arXiv, **20.40** on CNN/DailyMail, **19.03** on MediaSum, and **19.63** on MultiNews [2212.08136].

The paper concludes that, across **extremely long classification**, **large-context language modeling**, and downstream **NLU** and **NLG**, SPADE-S improves over pure local or pure SSM baselines [2212.08136]. This suggests that, in this line of work, SPADE-S is best understood not as a sparsity-aware forecaster but as a specific efficient-transformer recipe built around **one global SSM + many local windows**.

A common source of confusion is the broader **SPADE / SPADES** namespace. **“SPADES: a Stellar PArameters DEtermination Software”** is a fully automatic, Java-based package for stellar-parameter estimation by direct profile fitting of selected spectral lines [1111.0474]. **“SPADE: Spectroscopic Photoacoustic Denoising using an Analytical and Data-free Enhancement Framework”** is a denoising framework for spectroscopic photoacoustic imaging that combines Spectral Domain Data Re-assembly, BM3D, and Zero-Shot Noise2Noise [2412.12068]. Neither is the same system as either forecasting SPADE-S or sequence-modeling SPADE-S.

Within current arXiv usage, therefore, **SPADE-S** denotes either a **sparsity-robust foundational forecaster** for heterogeneous retail demand series [2507.21155] or a **softmax-window state-space augmented transformer variant** for efficient long-sequence modeling [2212.08136]. The correct interpretation depends entirely on domain context, task definition, and accompanying notation.

Source: https://www.emergentmind.com/topics/spade-s