AZ-whiteness test: a test for uncorrelated noise on spatio-temporal graphs

Daniele Zambon, Cesare Alippi

Introduction

In traditional time-series analysis, whiteness tests like the Ljung-Box test are essential for verifying if a model has successfully extracted all learnable information from data. When residuals are "white noise," the model is considered optimal. However, modern datasets—such as traffic sensor networks or smart grids—exhibit complex spatio-temporal dependencies that traditional tests fail to capture. These datasets are structured as graphs where nodes represent sensors and edges represent physical or logical proximity.

The AZ-test (named after Alippi and Zambon) is the first statistical whiteness test specifically designed for such data. It provides a formal framework to test for uncorrelated noise on dynamic, weighted, and multivariate graph signals, offering a critical diagnostic tool for spatio-temporal forecasting.

Methodology: The Multiplex Graph Approach

The core innovation of the AZ-test lies in its ability to handle spatial and temporal dimensions simultaneously. The authors construct a "multiplex graph" by stacking snapshots of the graph over time and adding temporal edges connecting a node to itself at the next time step.

Spatio-temporal graph signal and the multiplex structure used in the AZ-test.

As illustrated in the figure above, the framework considers:

  1. Spatial edges: Connections between nodes at the same time step $t$.
  2. Temporal edges: Connections between a node $v$ at time $t$ and itself at time $t+1$.
  3. The Statistic: The test counts the signs of products of adjacent observations. If signals are correlated, the product signs will be biased; if they are independent white noise, the weighted sum of these signs centers around zero.

A key advantage of the AZ-test is that it is distribution-free. It does not assume Gaussianity, and the test statistic asymptotically follows a standard normal distribution $\mathcal{N}(0, 1)$ as the number of edges or time steps grows. Additionally, a parameter $\lambda$ allows users to balance the weight of spatial versus temporal correlations.

Experimental Setup

The test was validated using both synthetic and real-world benchmarks:

  • Synthetic (GPVAR): A Graph Polynomial Vector Autoregressive dataset used to control spatial and temporal correlation levels precisely.
  • PemsBay & MetrLA: Real-world traffic datasets from the California Bay Area and Los Angeles highway systems, featuring hundreds of sensors.

Key Results and Insights

The AZ-test demonstrates high sensitivity to subtle dependencies that "blind" multivariate tests might miss. By leveraging the graph topology as a relational inductive bias, the test focuses on the most likely dependencies between neighbors.

Heatmaps showing the power of the AZ-test (rejection rate) across different correlation levels (corr), time steps (T), and signal dimensions (F).

The results indicate:

  • Sensitivity: The test consistently rejects the white noise hypothesis as correlation increases, even with varying signal dimensions ($F$) and sample sizes ($T$).
  • Model Diagnostics: When applied to state-of-the-art models like Graph WaveNet (GWNet) and DCRNN, the AZ-test revealed that their residuals often still contain learnable patterns, suggesting these models are not yet optimal.
  • Robustness: The test maintains a stable false-positive rate across various noise distributions (e.g., skewed or bimodal), confirming its theoretical properties.

Conclusion and Future Work

The AZ-test fills a significant gap in the evaluation of graph-based models. While it currently assumes node signals have a median of zero and requires a known graph topology, it provides a computationally efficient "stop signal" for model tuning. Future research may extend this framework to stochastic graphs or more complex edge statistics beyond simple sign changes.

Summary updated

Abstract

We present the first whiteness test for graphs, i.e., a whiteness test for multivariate time series associated with the nodes of a dynamic graph. The statistical test aims at finding serial dependencies among close-in-time observations, as well as spatial dependencies among neighboring observations given the underlying graph. The proposed test is a spatio-temporal extension of traditional tests from the system identification literature and finds applications in similar, yet more general, application scenarios involving graph signals. The AZ-test is versatile, allowing the underlying graph to be dynamic, changing in topology and set of nodes, and weighted, thus accounting for connections of different strength, as is the case in many application scenarios like transportation networks and sensor grids. The asymptotic distribution -- as the number of graph edges or temporal observations increases -- is known, and does not assume identically distributed data. We validate the practical value of the test on both synthetic and real-world problems, and show how the test can be employed to assess the quality of spatio-temporal forecasting models by analyzing the prediction residuals appended to the graphs stream.
BibTeX
@misc{zambon2022az,
  author = {Daniele Zambon and Cesare Alippi},
  title = {{AZ-whiteness test: a test for uncorrelated noise on spatio-temporal graphs}},
  year = {2022},
  eprint = {2204.11135},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.11135},
}

Loading related content...

Figure