Skip to main content
QUICK REVIEW

[Paper Review] Spatio-Temporal Graph Contrastive Learning

Xu Liu, Yuxuan Liang|arXiv (Cornell University)|Aug 26, 2021
Human Mobility and Location-Based AnalysisSocial Sciences27 references7 citations
TL;DR

This paper proposes STGCL, a novel spatio-temporal graph contrastive learning framework that enhances deep learning models for STG forecasting by integrating a forecasting loss with an auxiliary contrastive loss. It introduces four domain-specific data augmentations and a rule-based negative filtering strategy, achieving consistent performance gains across multiple datasets and models without requiring pretraining.

ABSTRACT

Deep learning models are modern tools for spatio-temporal graph (STG) forecasting. Despite their effectiveness, they require large-scale datasets to achieve better performance and are vulnerable to noise perturbation. To alleviate these limitations, an intuitive idea is to use the popular data augmentation and contrastive learning techniques. However, existing graph contrastive learning methods cannot be directly applied to STG forecasting due to three reasons. First, we empirically discover that the forecasting task is unable to benefit from the pretrained representations derived from contrastive learning. Second, data augmentations that are used for defeating noise are less explored for STG data. Third, the semantic similarity of samples has been overlooked. In this paper, we propose a Spatio-Temporal Graph Contrastive Learning framework (STGCL) to tackle these issues. Specifically, we improve the performance by integrating the forecasting loss with an auxiliary contrastive loss rather than using a pretrained paradigm. We elaborate on four types of data augmentations, which disturb data in terms of graph structure, time domain, and frequency domain. We also extend the classic contrastive loss through a rule-based strategy that filters out the most semantically similar negatives. Our framework is evaluated across three real-world datasets and four state-of-the-art models. The consistent improvements demonstrate that STGCL can be used as an off-the-shelf plug-in for existing deep models.

Motivation & Objective

  • Address the limitations of existing graph contrastive learning methods in spatio-temporal graph (STG) forecasting, where pretrained representations fail to improve downstream performance.
  • Overcome the lack of effective data augmentation strategies tailored for STG data, especially for noise robustness and structural preservation.
  • Incorporate semantic similarity into contrastive learning by filtering out the most semantically similar negative samples to improve representation quality.
  • Develop a plug-and-play framework that enhances existing deep STG models without requiring pretraining or architectural changes.

Proposed method

  • Integrate a forecasting loss with an auxiliary contrastive loss during training, avoiding the need for a separate pretraining phase.
  • Design four types of data augmentations: graph structure perturbation, temporal shifting, frequency-domain masking, and feature noise injection.
  • Propose a rule-based negative filtering mechanism that excludes the most semantically similar negative samples to improve contrastive learning signal quality.
  • Apply the contrastive loss on both spatial and temporal graph structures to preserve local and global dependencies in the data.
  • Train the model end-to-end using a joint optimization of forecasting and contrastive objectives.
  • Ensure compatibility with existing STG models by making STGCL a modular, off-the-shelf component.

Experimental results

Research questions

  • RQ1Can contrastive learning improve STG forecasting performance when integrated directly into the training process rather than used in a pretraining paradigm?
  • RQ2How do different types of data augmentations—especially those targeting graph structure, time, and frequency domains—affect representation learning in STG forecasting?
  • RQ3Does filtering out the most semantically similar negatives improve the quality of contrastive representations in STG data?
  • RQ4To what extent can STGCL be generalized across diverse datasets and existing deep learning models in STG forecasting?

Key findings

  • STGCL consistently improves performance across four state-of-the-art STG forecasting models on three real-world datasets, demonstrating its generalization capability.
  • The integration of contrastive learning with the forecasting loss leads to significant performance gains without requiring pretraining.
  • The proposed rule-based negative filtering strategy enhances representation quality by reducing the risk of collapsing similar samples into the same embedding space.
  • The four domain-specific data augmentations—graph, temporal, frequency, and feature noise—contribute to improved robustness and generalization under noisy conditions.
  • The framework achieves consistent improvements across different datasets, indicating strong transferability and practical utility as a plug-in module.
  • Empirical results show that the forecasting task does not benefit from representations learned via standard contrastive learning, justifying the need for joint optimization in STGCL.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.