Automated Spatio-Temporal Graph Contrastive Learning

Qianru Zhang, Chao Huang, Lianghao Xia, Zheng Wang, Zhonghang Li, Siu-Ming Yiu · DOI

Abstract

Region representation learning is a cornerstone of urban computing, enabling tasks ranging from crime prediction to traffic forecasting. However, real-world spatio-temporal data is often plagued by noise, incompleteness, and distribution heterogeneity. This paper introduces AutoST, an automated spatio-temporal graph contrastive learning framework designed to learn robust region embeddings. By integrating multi-view urban data (POI, mobility, and geography) and employing a learnable graph augmentation scheme, AutoST overcomes the limitations of traditional heuristic-based models. Experimental results across multiple downstream tasks in New York City and Chicago demonstrate that AutoST significantly outperforms state-of-the-art baselines, particularly in data-sparse regions.

Introduction

In the era of smart cities, transforming geographical regions into informative numerical vectors—region embeddings—is essential for effective urban planning and resource allocation. While Graph Neural Networks (GNNs) have shown promise in capturing spatial correlations, they face two primary obstacles:

  1. Data Quality: Urban datasets are frequently noisy or incomplete due to sensor failures or sparse mobility traces. Standard graph-based models often create "noisy" connections, such as linking a shopping mall to a quiet residential zone based solely on physical proximity.
  2. Spatio-Temporal Heterogeneity: Data density varies wildly across urban landscapes; downtown areas may be data-rich, while suburban "long-tail" regions suffer from extreme sparsity. Standard GNNs often struggle to generalize across these vastly different data densities.

Existing methods often rely on manually designed graph structures or random data augmentations (like edge dropping), which can inadvertently destroy critical structural information. AutoST addresses these issues by automating the contrastive learning process and leveraging multi-view regional dependencies.

Methodology

AutoST is built on three core pillars: a multi-view heterogeneous GNN, an automated contrastive view generator, and a dual-objective loss function.

Multi-View Heterogeneous GNN

To capture the multifaceted nature of urban regions, AutoST encodes three distinct relationship types:

  • POI-aware View: Captures functional similarities based on Point of Interest (POI) distributions (e.g., identifying commercial vs. residential zones).
  • Mobility-based View: Models the dynamic flow of people between regions using taxi or transit data.
  • Distance-based View: Accounts for physical proximity, ensuring that geographically adjacent regions share information.

Automated Contrastive View Generation

The defining innovation of AutoST is its move away from random augmentation. Instead, it utilizes a Variational Graph Auto-Encoder (VGAE) to generate "challenging" augmented views. By adding learnable Gaussian noise to the embeddings, the model creates synthetic views that force the encoder to distill the most robust and invariant features of the urban environment without destroying essential structural information.

Dual-Objective Optimization

The framework is optimized using two complementary loss functions:

  • InfoNCE: A standard contrastive loss that pulls representations of the same region from different views closer together in the embedding space.
  • Information Bottleneck (InfoBN): This objective reduces redundancy, ensuring the model focuses on the most predictive features while discarding noise.

Experimental Evaluation

The authors evaluated AutoST using comprehensive datasets from New York City (NYC) and Chicago (CHI), covering over 1.7 million taxi trips, hundreds of thousands of crime records, and tens of thousands of real estate transactions.

Performance Across Tasks

  • Crime Prediction: AutoST demonstrated a significant performance lead. In NYC, it achieved a Mean Absolute Error (MAE) of 2.1073, compared to 3.5971 for the best-performing baseline (MGFN).
  • Traffic Flow Forecasting: The model consistently outperformed baselines across various time horizons (15, 30, and 45 minutes) in both cities.
  • House Price Prediction: The embeddings successfully captured economic indicators, outperforming traditional network embedding methods like Node2vec and GCN.

Robustness to the "Long-Tail"

One of the most significant findings was AutoST's performance in data-sparse regions. While traditional GNNs struggle when mobility or crime data is sparse, the contrastive learning paradigm in AutoST acts as a powerful regularizer. This allows the model to maintain high accuracy even in suburban areas where observations are limited.

Discussion and Future Work

AutoST proves that learnable augmentation is superior to heuristic-based methods for spatio-temporal data. By allowing the model to "learn how to augment," it preserves the underlying semantics of the urban graph that random masking might destroy. Furthermore, the synergy between POI semantics and mobility patterns allows one data source to regularize the other, increasing overall robustness.

However, several avenues for future research remain:

  • Causality: Moving beyond correlation to identify the actual causal factors behind regional similarities using counterfactual learning.
  • Efficiency: Addressing the computational overhead associated with multiple GNN layers and variational auto-encoders.
  • Dynamic Evolution: Transitioning from static graph snapshots to models that capture the continuous evolution of urban structures over time.

Conclusion

AutoST represents a significant advancement in urban region representation learning. By automating the contrastive learning process and integrating multi-view data, it provides a robust solution to the persistent problems of data noise and heterogeneity in spatio-temporal mining. The code is publicly available to support further research in the field.

Summary updated

BibTeX
@inproceedings{zhang2023automated,
  author = {Qianru Zhang and Chao Huang and Lianghao Xia and Zheng Wang and Zhonghang Li and Siu-Ming Yiu},
  title = {{Automated Spatio-Temporal Graph Contrastive Learning}},
  booktitle = {The Web Conference},
  year = {2023},
  doi = {10.1145/3543507.3583304},
}
Figure