Introduction
In spatio-temporal forecasting—critical for domains like traffic management, weather prediction, and neuroscience—model performance is typically evaluated using aggregate error metrics such as Mean Squared Error (MSE) or Mean Absolute Error (MAE). While these metrics provide a ranking of models, they function as "black boxes," failing to reveal whether a model has truly captured the underlying data dynamics or if it is systematically missing structural patterns.
Traditional statistical "whiteness tests" offer a path forward by checking if model residuals are purely random noise. However, these classical tests often fail when applied to modern deep learning scenarios characterized by missing data, sensor heterogeneity, and complex non-linear dependencies. This paper introduces AZ-analysis, a diagnostic framework that localizes residual correlations in space and time to pinpoint exactly where and when a model fails.
The AZ-Analysis Framework
The core of the proposed framework is a robust, graph-based approach to residual analysis. It operates by mapping model errors onto a multiplex spatio-temporal graph and applying sign-based statistics.
Multiplex Graph Representation and Sign-Based Statistics
Residuals are represented as nodes in a graph where edges define dependencies. Spatial edges connect neighboring sensors, while temporal edges connect the same sensor across consecutive time steps. To ensure robustness against varying data distributions and sensor heterogeneity, AZ-analysis utilizes the signs of the products of adjacent residuals rather than their raw magnitudes. This makes the test "asymptotically distribution-free," maintaining validity even with non-Gaussian noise or significant missing values.
The framework introduces a normalized correlation score, $c_\lambda$, which can be tuned via a parameter $\lambda$ to focus on spatial ($\lambda=1$) or temporal ($\lambda=0$) correlations. This allows for multi-level localization, answering whether model failures are global, sensor-specific, or interval-specific.
Experimental Evaluation
The authors validated AZ-analysis using synthetic residuals and two real-world benchmarks: MetrLA (traffic flow) and EngRAD (solar irradiance).
Sensitivity and Robustness
A key requirement for a diagnostic tool is sensitivity to subtle patterns. In synthetic tests, the AZ-test statistic ($C_\lambda$) demonstrated high confidence in identifying injected correlations across various graph sizes.
As shown in the figure above, the statistic effectively scales with the strength of the underlying correlation (Pearson correlation). Values exceeding 4.3 indicate statistical significance at $\alpha=10^{-5}$, providing a clear threshold for identifying model sub-optimality even in the presence of noise.
Key Insights from Real-World Data
The application of AZ-analysis to traffic and solar datasets yielded several critical insights:
- Correlation vs. Magnitude: High residual correlation often persists in regions where absolute error (MAE) is low. This indicates that a model can appear "accurate" while still being structurally deficient.
- Detecting Data Artifacts: In the MetrLA traffic dataset, the framework flagged high correlations during periods where missing data had been filled using simple imputation (e.g., last-observation-carried-forward). The models failed to capture this artificial "flatness," a failure caught immediately by AZ-analysis.
- The Dawn/Dusk Challenge: In solar forecasting, models exhibited high residual correlation during sunrise and sunset. Despite low absolute errors due to low light levels, the correlation revealed a failure to capture the specific physics of light transitions.
Conclusion and Future Work
AZ-analysis serves as a powerful diagnostic "compass," guiding researchers toward specific improvements in data preprocessing, graph construction, or model architecture. While it identifies where a model fails rather than how to fix it, its robustness to missing data and heterogeneity makes it uniquely suited for modern sensor networks. Future work may involve integrating these correlation scores directly into the training process as a regularization term to encourage the production of "whiter" residuals.
Summary updated