What a Decomposed Forecast Gives Away

Many forecasting systems now show users not just a prediction but its parts: a smooth trend curve, a repeating seasonal curve, and a leftover residual. Decomposed models are built this way, including N-BEATS, IB-Forecast and PDTrans, and the parts are presented as a pure gain for interpretability. Security research on explainable AI points the other way. On tabular models, explanations let an attacker copy a decision tree in a few hundred queries, and let an auditor recover a linear model's weights in one. This proposal asks how much extra a forecasting API leaks when it discloses its decomposition. It also asks whether the decomposition can be disclosed truthfully, but at a coarser resolution, so that users keep most of the explanation while attackers lose most of the advantage.

The central hypothesis is that leakage depends on how input-invariant a disclosed component is. A component that barely changes from one query to the next is a learned global periodic profile, or a fixed seasonal shape. Disclosing it amounts to publishing a slice of the model's parameters, so an attacker collects it almost for free. Components that depend strongly on the input leak roughly like extra output values. If this holds, the defense should target the invariant part, not the whole explanation.

Core Claim

Consider an attacker who queries a forecasting service and trains a copy, called a surrogate. We claim that component disclosure substantially reduces the number of queries the surrogate needs to reach a given agreement with the victim, beyond what the aggregate forecast alone provides. We further claim that this reduction is carried mostly by the input-invariant components. A defense we call resolution-limited disclosure follows from this. The service reports only the projection of the seasonal component onto its top-$k$ harmonics and folds the remainder into the residual:

$$\tilde{s} = P_k s, \qquad \tilde{r} = r + (I - P_k)s,$$

Here $s$ is the model's true seasonal output, $r$ its true residual, and $P_k$ the projection onto the $k$ largest-amplitude Fourier frequencies of $s$. The disclosed parts still sum exactly to the true forecast, and each part is a true coarsening of the internal one. This means the defense narrows what is revealed without lying. It follows the strategy of Models That Are Interpretable But Not Transparent, which shrinks how many training records a rule explanation covers while keeping zero false positives. We move that idea from rule sets to spectral components.

Position Relative to Prior Work

Two recent papers join decomposition and explanation, and both treat the explanation as cooperative. IB-Forecast subtracts a learned periodic profile $Q$ and forecasts from a sparse, faithful mask over the remaining deviations. It never asks what disclosing $Q$ gives an attacker, and $Q$ is the clearest example of an input-invariant component. IMFACT builds counterfactual explanations for time-series classifiers by swapping frequency modes obtained from empirical mode decomposition. It evaluates validity and speed only. We study forecasters rather than classifiers, and we measure extraction rather than explanation quality.

The security evidence that motivates us comes from tabular and linear settings. From Counterfactuals to Trees extracts a depth-9 COMPAS tree in an average of 153 queries using counterfactuals. XAudit recovers linear weights from a single counterfactual query. Exploring Counterfactual Explanations Through the Lens of Adversarial Examples shows counterfactual and adversarial perturbations correlate above 0.90. That result is why we also measure whether leaked components help craft transferable attacks.

These papers also constrain our claims. Their guarantees depend on axis-parallel geometry, so we make no claim of exact extraction for neural forecasters and measure fidelity empirically instead. XRand randomizes feature rankings with local differential privacy and cut backdoor success on EMBER from 77.8% to 10.2% at $\epsilon=1$. It is the natural noise-based defense to compare against. The architectures that supply our victims are N-BEATS, with polynomial trend and Fourier seasonal stacks, PDTrans, with latent trend/seasonal decoding, and IB-Forecast.

Research Program

We build victims on shared data and give each one a disclosure interface.

N-BEATS-I discloses its trend and seasonal stack outputs. These are input-dependent, but they come from a fixed, low-dimensional basis. IB-Forecast discloses $Q$ and its patch masks, and $Q$ is fully invariant. PDTrans discloses its decoded trend and seasonal curves.

For every disclosed component we compute an invariance score. It is one minus the ratio of across-query variance to total energy, averaged over test windows. This places each component on a continuum from "parameter" to "output."

Attackers query using windows drawn either from a held-out public slice of the same dataset or from a different dataset. They train surrogates with component-matching losses. The surrogates include the victim's own architecture and mismatched ones such as SCINet and Informer.

The analysis has three steps:

  1. Measure the query–fidelity curve under several conditions: aggregate-only disclosure, full decomposition, invariant components only, and input-dependent components only.
  2. Regress the queries saved on invariance scores across components and datasets.
  3. Sweep the resolution $k$ of the defense, tracing a curve that trades explanation utility against security.

Baselines

The naive reference is aggregate-only disclosure, where the API returns the forecast vector and nothing else. The attacker is a surrogate of the same architecture, distilled on those outputs. This is also the strongest existing attack, because each query already returns a whole multi-step horizon. It is ordinary black-box distillation.

No reported result on extracting forecasting models was found on Lacuna, so we must establish this baseline's numbers ourselves. For context on victim quality, PDTrans reports a median quantile loss ($\rho_{0.5}$) of 0.058 on Electricity PDTrans. The closest extraction figure, 153 queries for a tabular tree, is not comparable.

Fairness rules apply to every attacker:

  • All attackers share the same query windows and query budgets (100 to 10,000 windows).
  • Each gets the same surrogate architecture and a fixed hyperparameter search of 20 trials.
  • Each attacker uses the same optimizer steps.

A component-aware attacker "beats" distillation if it reaches the target fidelity with at least 3× fewer queries. The target fidelity is surrogate–victim MSE on held-out windows at or below 10% of the victim's own test MSE.

Two ablations isolate the key ingredient, input invariance:

  • Invariant-only disclosure: the API reveals only $Q$ or the constant seasonal shape.
  • Input-dependent-only disclosure: the API reveals only the per-query deviation or residual component.

The defense has three competitors on the same utility–security plane: no disclosure, an XRand-style randomized disclosure, and independent Gaussian noise on the components. The noise is calibrated so all methods show equal user-facing component error. The defense wins if, at matched user utility, it forces a larger query count than every competitor.

Why not just…?

Why not just distill from the forecasts, since a 720-step output already leaks a lot? This is the real threat. Decomposition may add little on top of a dense output vector. The aggregate-only baseline tests exactly this. If queries saved stay below 3× on every dataset, the headline claim fails, and we would report that forecasting APIs are already maximally exposed. We still expect a gap for invariant components, because the sum trend + season does not identify the split. An attacker given only the sum must learn an unidentifiable decomposition, whereas a disclosed $Q$ hands it over directly.

Why not just add noise to the disclosed components? Independent per-query noise averages away across queries. This matters most for an invariant component, which the attacker sees thousands of times. We predict noise-based defenses lose protection as roughly the square root of the query count, from averaging. Noise also breaks the exact-sum faithfulness that users rely on. The matched-utility comparison will show whether this matters in practice.

Why not just stop disclosing components? That gives up the interpretability these models were built for. It is the endpoint $k=0$ of our sweep, so the question becomes whether intermediate $k$ keeps most of the utility while recovering most of the security. We measure utility in two ways. The first is recovery of planted drivers on IB-Forecast's synthetic benchmark with known causal pulses and trends. The second is agreement of the disclosed trend's direction with the true trend's direction.

Proposed Experiments

Victims are trained on ETTh1, ETTm1, Electricity, Traffic, Weather and Exchange-Rate, plus M4-Hourly for N-BEATS. We use the public SCINet and CoST loaders and splits (cure-lab/SCINet, salesforce/CoST). We report fidelity, queries-to-fidelity, and adversarial transfer. Adversarial transfer means the increase in victim forecast error caused by small input perturbations crafted on the surrogate.

Three outcomes would be decisive:

  1. Concentration in invariant components. Queries saved should be concentrated in high-invariance components. The IB-Forecast $Q$ condition should approach aggregate-only performance at a small fraction of the queries.
  2. Exchange-Rate as a natural control. Exchange-Rate behaves like a random walk, and PDTrans already finds decomposition helps little there. It should show little leakage gain, because its seasonal components carry little energy.
  3. The defense curve. The resolution-limited curve should dominate noise and randomized disclosure at matched utility.

If the first check fails, so that leakage is unrelated to invariance, the defense loses its rationale. The study then becomes a plain measurement of leakage.