Structured Time Series Prediction without Structural Prior

Darko Drakulic, Jean-Marc AndreoliarXiv 2022

Abstract Time series prediction is a widespread and well studied problem with applications in many domains (medical, geoscience, network analysis, finance, econometry etc.). In the case of multivariate time series, the key to good performances is to properly capture the dependencies between the variates. Often, these variates are structured, i.e. they are localised in an abstract space, usually representing an aspect of the physical world, and prediction amounts to a form of diffusion of the information across that space over time. Several neural network models of diffusion have been proposed in the literature. However, most of the existing proposals rely on some a priori knowledge on the structure of the space, usually in the form of a graph weighing the pairwise diffusion capacity of its points. We argue that this piece of information can often be dispensed with, since data already contains the diffusion capacity information, and in a more reliable form than that obtained from the usually largely hand-crafted graphs. We propose instead a fully data-driven model which does not rely on such a graph, nor any other prior structural information. We conduct a first set of experiments to measure the impact on performance of a structural prior, as used in baseline models, and show that, except at very low data levels, it remains negligible, and beyond a threshold, it may even become detrimental. We then investigate, through a second set of experiments, the capacity of our model in two respects: treatment of missing data and domain adaptation.

Introduction

Predicting multivariate time series—such as traffic flow, air quality, or financial indicators—requires modeling complex dependencies across both time and space. Current state-of-the-art models typically rely on "structural priors," which are external pieces of information (usually graphs) that define the relationships between variables. For instance, a traffic forecasting model might use a physical road network map to determine which sensors are "close."

However, this reliance on hand-crafted priors introduces significant limitations. First, physical proximity does not always equal functional dependency; two sensors on opposite sides of a highway barrier may be physically close but independent in terms of traffic flow. Second, these priors can be rigid, potentially hindering a model's ability to learn more nuanced patterns as data availability increases. Finally, requiring a domain-specific graph makes it difficult to adapt models to new environments.

The Attention Diffusion Network (ADN)

To address these issues, we introduce the Attention Diffusion Network (ADN), a fully data-driven architecture based on the Transformer. ADN eliminates the need for an external graph by learning the "diffusion capacity" between variables directly from the time series data itself.

High-level overview of the ADN model architecture, illustrating the encoder-decoder flow for time series prediction.

Axial Attention Mechanism

A primary challenge in applying Transformers to spatio-temporal data is the quadratic scaling of self-attention. For $N$ locations and $T$ time steps, standard attention requires $O((NT)^2)$ memory and computation, which is prohibitive for large sensor networks. ADN employs Axial Attention, which decomposes the problem into alternating temporal and spatial attention steps.

Detailed view of the Encoder Layer (ENC-LAYER), highlighting the axial attention mechanism that separates temporal (T) and spatial (N) processing.

As shown in the ENC-LAYER diagram, the model first applies Multi-Head Attention (MHA) across the temporal dimension for each location, followed by MHA across the spatial dimension for each time step. This reduces complexity to $O(N^2 + T^2)$, allowing the model to scale to much larger datasets without the memory explosion associated with joint spatio-temporal attention.

Experimental Evaluation

We evaluated ADN on three standard traffic benchmarks: PEMS-BAY (325 sensors), METR-LA (207 sensors), and the larger PEMS07 (883 sensors). ADN achieved state-of-the-art performance, matching or exceeding complex graph-based models like Graph WaveNet and STGAT.

  • PEMS-BAY: ADN reached a Mean Absolute Error (MAE) of 1.90 for a 1-hour horizon.
  • PEMS07: It achieved an MAE of 21.62, significantly outperforming the previous best of 22.07 (STFGNN).

Key Insights

  • The "Prior" as a Crutch: Our experiments reveal that structural priors are only beneficial when training data is extremely scarce (below 5-10%). Once the training set reaches approximately 30% of its full size, the data-driven approach of ADN begins to outperform graph-based baselines, suggesting that hand-crafted graphs can become a bottleneck.
  • Functional vs. Physical Distance: ADN learns spatial clusters that reflect actual functional road segments, avoiding the "false shortcuts" often present in distance-based graphs (e.g., sensors separated by a highway divider).
  • Robustness and Adaptation: ADN demonstrates remarkable resilience to missing data, maintaining competitive performance even when 95% of training locations are removed. Furthermore, its lack of reliance on a fixed graph enables rapid "few-shot" domain adaptation; with only two days of data from a new city, ADN can be fine-tuned to outperform established models that utilize full structural priors.

Conclusion

The Attention Diffusion Network demonstrates that structural priors are not a prerequisite for high-performance multivariate time series prediction. By learning dependencies directly from data through axial attention, ADN provides a more accurate, flexible, and scalable solution for forecasting in complex, structured environments.

Summary updated

BibTeX
@misc{drakulic2022structured,
  author = {Darko Drakulic and Jean-Marc Andreoli},
  title = {{Structured Time Series Prediction without Structural Prior}},
  year = {2022},
  eprint = {2202.03539},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.03539},
}
Figure