Deep probabilistic forecasting models, such as DeepAR, are increasingly deployed in critical systems like financial trading and power grid management. Unlike deterministic models that predict a single future value, these models output a sequence of probability distributions (e.g., a Gaussian), representing the range of possible future values and accounting for uncertainty.
While adversarial attacks—small, intentional input perturbations designed to fool a model—are well-studied in image classification, they are rarely explored in probabilistic forecasting. This paper introduces the first framework for generating adversarial attacks against deep probabilistic autoregressive models, demonstrating that even uncertainty-aware models are highly vulnerable to tiny, targeted perturbations.
The Challenge of Attacking Probabilistic Models
The primary hurdle in attacking probabilistic models is a mathematical "brick wall." To find an adversarial perturbation, one typically computes the gradient of the model's output with respect to its input. However, in probabilistic forecasting, the output is often an expectation calculated via Monte-Carlo (MC) sampling. Standard backpropagation cannot flow through these random samples, making it incredibly difficult to find the optimal way to tweak the input to cause a specific misprediction.
Overcoming the Non-Differentiable Barrier
The authors propose a white-box attack framework that treats the attack as an optimization problem: find the smallest possible change to the input ($\delta$) that shifts a specific statistic of the output distribution (like the mean or a financial "buy" signal) toward a target ($t$).
To bypass the non-differentiable nature of MC sampling, they compared two gradient estimation techniques:
- Score-Function Estimator (REINFORCE): A classic reinforcement learning technique that estimates gradients by inverting the integral of the expectation.
- Reparametrization Estimator: A "trick" that separates randomness from the model parameters. By expressing the random sample as a deterministic function of the model's parameters and an external noise variable (e.g., $y = \mu + \eta \cdot \sigma$), the gradient can flow directly through the model.
Key Insights and Results
The researchers evaluated their attacks on two high-stakes domains: the S&P 500 Index (predicting buy/sell signals and trading strategy returns) and the UCI Electricity Dataset (forcing the model to under-estimate future power needs).
Reparametrization is King
The reparametrization estimator significantly outperformed the score-function estimator. Because it has much lower variance, it finds more effective adversarial examples with fewer samples.
As shown above, at a tolerance level of $\epsilon = 0.1$, the reparametrization attack succeeded in 16% more cases than the score-function approach.
The "Invisible" Financial Attack
One might assume that because these models account for uncertainty, they would be harder to trick. The paper proves otherwise. In the stock market case, the authors found that a perturbation as small as 1.6% on a single price point (or 0.16% across 100 points) was enough to flip a "buy" signal to a "sell" signal. These attacks successfully reversed the returns of "long-short" portfolios, allowing an attacker to manipulate inputs to make a high-performing portfolio appear to be a losing one.
Temporal Cascades in Energy Grids
For the electricity dataset, the goal was to force the model to significantly under-estimate future power needs. With a perturbation norm of 1.0, the attack caused an under-estimation of at least 20% for 70% of the tested samples.
Interestingly, these adversarial samples often look normal for the first few hours but then cause the model to "diverge" into a massive under-estimation (as seen in the red lines above). In a real-world scenario, this delayed temporal cascade could lead to severe power grid instability if the forecasts are used for automated load balancing.
Limitations and Future Work
While highly effective, the attack framework has limitations:
- Likelihood Constraints: The reparametrization trick works best for "location-scale" distributions (like Gaussian or Laplace). Mixture Density Networks, which use multiple "bumps" in a distribution, are much harder to reparametrize because their inverse cumulative density functions lack a simple closed form.
- Real-time Constraints: Running these attacks across thousands of sequences in a production environment currently takes significant time, potentially limiting their use in high-frequency trading scenarios.
Ultimately, this paper highlights a critical vulnerability in probabilistic forecasting. Future work must explore adversarial training—incorporating these targeted perturbations into the training loop—to build more resilient forecasting models for critical infrastructure.
Summary updated