Spatio-Temporal Contrastive Self-Supervised Learning for POI-level Crowd Flow Inference

Songyu Ke, Ting Li, Li Song, Yanping Sun, Qintian Sun, Junbo Zhang, Yu ZhengarXiv 2023 · DOI

TL;DR

The paper introduces CSST, a contrastive self-supervised learning framework designed to infer accurate, point-of-interest (POI) level crowd flow from noisy and incomplete GPS data. By leveraging massive amounts of unlabeled data through a "swapped prediction" contrastive task, the model learns robust spatio-temporal representations that significantly outperform standard supervised models, especially when labeled ground-truth data is scarce.

What Problem Does This Paper Address?

Urban planners and businesses need to know exactly how many people are at specific locations (POIs) like malls, parks, or office buildings. However, obtaining this data is difficult due to three primary factors:

  1. Coarse Sensors: Cellular data is spatially "blurry," often covering a wide area rather than a specific building.
  2. Biased Reports: GPS data from apps is "thin"—only a fraction of people use specific apps, and those who do are not a representative sample.
  3. Label Scarcity: Obtaining "ground truth" (actual headcounts) requires expensive, manual, or multi-party data aggregation, leading to a massive "missing label" problem.
The challenge of POI-level crowd flow inference from coarse cellular and biased GPS data.

The authors tackle the POI-level crowd flow inference task: how can we use high-volume, low-quality data (noisy GPS reports) and static POI features (area, demographics) to estimate the true population flow?

Methods

The authors propose the Contrastive Self-learning framework for Spatio-Temporal data (CSST). The workflow consists of four main stages:

The CSST framework workflow: from data processing to fine-tuning.
  • Data Processing & Graph Construction: They build a spatial adjacency graph where POIs are nodes and edges represent geographical proximity. Each node is enriched with static attributes (area, transportation) and dynamic signals (noisy GPS reports).
  • Attribute-Based Data Augmentation: Unlike computer vision (where you might flip an image), augmenting spatio-temporal graphs is tricky. CSST samples "positive pairs" by finding POIs with similar inherent attributes (e.g., similar land area or similar GPS report volumes), assuming these should have similar flow patterns.
  • Spatio-Temporal Representation Network: The backbone uses a combination of MLPs to encode static features and a Message Passing Neural Network (MPNN) to capture spatial dependencies between neighboring POIs.
  • Swapped Prediction Contrastive Learning: Inspired by the SwAV algorithm, the model uses a "swapped prediction" mechanism. It maps representations to a set of "prototypes" (clusters) and tries to predict the cluster assignment of one view of a POI from the representation of another "similar" POI. This allows the model to learn from unlabeled data without needing massive batches or negative samples.
  • Fine-tuning: Finally, the pre-trained model is fine-tuned on a small set of high-quality labeled data to map the learned representations to actual flow values.

Datasets

The model was evaluated on two large-scale, real-world datasets from China:

  • Office Dataset: Includes 53,550 unlabeled office buildings and 1,068 labeled instances. Features include area, transportation access, and age/gender distributions.
  • Residential Dataset: Includes 237,180 unlabeled residential buildings and 966 labeled instances. It adds housing price information as a key feature for similarity.

Key Insights and Ideas

  • Similarity over Proximity: A key "aha" moment is that for crowd flow, POIs with similar physical attributes (like size and function) are often more "similar" than POIs that are simply close to each other. CSST uses these attributes to guide its self-supervision.
  • Overcoming the "Label Desert": In many urban computing tasks, labeled data accounts for less than 1% of the total. This paper demonstrates that the structure of the noisy data itself contains enough signal to pre-train a powerful feature extractor.
  • Task-Agnostic Backbones: The CSST framework is modular. The authors show it can enhance various backbone architectures (MLP, MSFNet, or STGNN), proving that the contrastive learning strategy is broadly applicable.

Key Results

The authors compared CSST against baselines like XGBoost, MLPs, and Multi-Source Fusion Networks (MSFNet).

  • Superiority in Data-Sparsity: When only 10% of labeled data was used, CSST outperformed the best supervised baseline (MSFNet) by 4.2% in Accuracy (ACC) on the Residential dataset and 3.2% on the Office dataset.
  • Error Reduction: In terms of Mean Absolute Percentage Error (MAPE), CSST showed a 3.8% improvement over supervised models in low-label scenarios.
  • Ablation Success: Removing the contrastive pre-training module led to a significant drop in performance, confirming that the self-supervised phase is doing the "heavy lifting."

Limitations and Future Work

  • Diminishing Returns: The performance gap between CSST and supervised baselines narrows as labeled training data increases. The pre-trained model is most advantageous when labels are rare.
  • Topology Imbalance: Graph-based methods sometimes struggled when labeled nodes were not well-distributed across the graph.
  • Future Directions: Extending this contrastive approach to spatio-temporal forecasting (predicting future flow) rather than just inference (estimating current flow).

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Residential buildingsCSSTACC0.580+0.04 vs baselineCrowd Flow Inference · training-proportion=10%
Source quote
L375: 0.427 │ 0.580
Office buildingsCSSTACC0.598+0.03 vs baselineCrowd Flow Inference · training-proportion=10%
Source quote
L420: 0.356 │ 0.598
Residential buildingsCSSTMAPE0.427-0.04 vs baselineCrowd Flow Inference · training-proportion=10%
Source quote
L375: 0.427 │ 0.580
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
Residential buildingsMSFNet baselineACC0.538Crowd Flow Inference · training-proportion=10%
Source quote
L368: 0.465 │ 0.538
Office buildingsMSFNet baselineACC0.566Crowd Flow Inference · training-proportion=10%
Source quote
L414: 0.365 │ 0.566
Residential buildingsMSFNet baselineMAPE0.465Crowd Flow Inference · training-proportion=10%
Source quote
L368: 0.465 │ 0.538
BibTeX
@misc{ke2023spatio,
  author = {Songyu Ke and Ting Li and Li Song and Yanping Sun and Qintian Sun and Junbo Zhang and Yu Zheng},
  title = {{Spatio-Temporal Contrastive Self-Supervised Learning for POI-level Crowd Flow Inference}},
  year = {2023},
  eprint = {2309.03239},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.03239},
}
Figure