Spatial-Temporal Graph Learning with Adversarial Contrastive Adaptation

Qianru Zhang, Chao Huang, Lianghao Xia, Zheng Wang, Siu Ming Yiu, Ruihua Han

Introduction

Spatial-temporal graph learning has become the standard for modeling structured urban data, powering critical applications like crime forecasting and traffic flow prediction. In these models, cities are typically represented as graphs where regions act as nodes and their relationships—such as proximity or traffic flow—serve as edges. However, real-world spatial-temporal data is notoriously messy. Sensors fail, mobility traces are sparse, and geographical adjacency does not always equate to functional similarity (e.g., a quiet park next to a busy factory behaves very differently than its neighbor).

Consequently, most existing models are brittle. They rely heavily on manually constructed region graphs that are often riddled with noise or missing connections. When the underlying graph is of low quality, the resulting region embeddings are poor, leading to inaccurate predictions. To address this, researchers introduce a novel framework—Spatial-Temporal Adversarial Graph contrastive learning (STAG, also referred to in the literature as GraphST)—designed to autonomously refine these graphs and learn robust features even from suboptimal input data.

Methodology

The STAG framework is built upon four main technical pillars designed to handle the inherent noise and incompleteness of urban data:

  1. Multi-View Graph Construction: Rather than relying on a single spatial map, the model constructs three distinct "views" of the city: a Point-of-Interest (POI) View based on regional semantics (e.g., commercial vs. residential hubs), a Mobility View based on human movement (taxi and bike trips), and a Geographic View based on physical distance.
  2. Variational Adaptive Augmentation: Utilizing a Variational Graph Autoencoder (VGAE), the model learns to corrupt and reconstruct the graph. Instead of applying random noise, this learnable process helps the model automatically distill which structural dependencies are most critical across the city.
  3. Adversarial Contrasting with Hard Samples: This is the core innovation of the framework. The model employs a min-max optimization strategy—specifically a Projected Gradient Descent attack—to identify "hard" positive and negative samples. By forcing the model to distinguish between highly similar regions that are functionally different (hard negatives) or dissimilar-looking regions that serve the same function (hard positives), it develops sharper discrimination abilities.
  4. Cross-View Contrastive Learning: Finally, a self-discrimination scheme aligns the POI, Mobility, and Geographic views. This ensures the final region embedding captures a holistic representation of the area rather than just a single, isolated aspect.

Datasets and Evaluation

The framework was rigorously evaluated using extensive real-world datasets from two major cities:

  • Chicago: Comprising 234 regions, over 386,000 taxi trips, 321,000 crime records, 130 POI categories, and 44,000 house price records.
  • New York City (NYC): Comprising 180 regions, over 1.4 million taxi/bike trips, 108,000 crime records, 50 POI categories, and 22,000 house price records.

Key Results and Insights

STAG is designed as a pre-training framework, meaning its high-quality region embeddings can be plugged into various downstream models (like ST-GCN for traffic or ST-SHN for crime) to boost performance. The framework consistently outperformed state-of-the-art baselines, including MGFN, MVURE, and GraphCL, across several major tasks:

  • Crime Forecasting: On the NYC dataset, the model achieved a Mean Absolute Error (MAE) of 2.1060, a substantial improvement over the next best baseline (MGFN at 3.5971).
  • Traffic Prediction: It demonstrated superior performance in predicting taxi and bike flows, particularly in "unpopular" spatial areas where data is typically too sparse for standard models to process effectively.
  • House Price Prediction: Even with noisy multi-view data, the framework's embeddings enabled a simple Lasso regression to predict house prices more accurately than complex, end-to-end spatial models.
  • Efficiency: Despite the addition of adversarial training, the model maintains a competitive computational complexity of $O(N \times L \times d)$, making it highly viable for city-scale applications.

Limitations and Future Directions

While the framework demonstrates robust results, a few areas remain open for future exploration:

  • Initial Graph Dependency: The model refines existing graphs but still requires the initial construction of POI and Mobility views. If the starting data is extremely sparse (e.g., a city lacking digital mobility traces), the initial graph may be too weak to effectively optimize.
  • Hyperparameter Sensitivity: Ablation studies indicate that performance is sensitive to the number of Graph Neural Network (GNN) layers and embedding dimensionality. Finding the optimal configuration for a new city may require significant tuning.
  • Dynamic Graphs: The current iteration focuses on learning static region representations. Future work could extend this to dynamic contrastive learning, where region relationships evolve in real-time as urban environments change.

Summary updated

BibTeX
@inproceedings{zhang2023spatial,
  author = {Qianru Zhang and Chao Huang and Lianghao Xia and Zheng Wang and Siu Ming Yiu and Ruihua Han},
  title = {{Spatial-Temporal Graph Learning with Adversarial Contrastive Adaptation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Vs86ySjsLD},
}
Figure