Pairwise Spatiotemporal Partial Trajectory Matching for Co-movement Analysis

Maria A. Cardei, Sabit Ahmed, Gretchen Chapman, Afsaneh DoryabarXiv 2024 · DOI

Introduction

Identifying "co-movement"—instances where individuals share geographic behaviors—is a critical task in social science and urban planning. While visually apparent in video data, detecting these patterns from raw GPS coordinates is complex. Traditional sequence models often fail to capture "partial matches," such as two people walking together for only a fraction of a day, and typically lack interpretability. This research introduces a framework that transforms tabular GPS data into color-coded trajectory images, leveraging computer vision techniques to identify co-movement with high accuracy and transparency.

Methodology: A Vision-Based Pipeline

The proposed framework treats trajectory matching as an image recognition problem, moving away from traditional "black-box" sequence models.

Figure 1: The complete pipeline from raw location data to co-movement classification using a Siamese Network.

The pipeline consists of several key stages:

  1. Image Layering and Visualization: GPS data is divided into discrete time windows (e.g., 30 or 60 minutes). Within each window, points are plotted and connected using a color gradient to represent time progression, effectively encoding temporal information into a 2D image.
  2. Filtering and Localization: Low-quality images are discarded, and Selective Search is used to define bounding boxes around movement patterns.
  3. Spatial Overlap Check: A preliminary filter checks for bounding box overlaps between pairs. If no overlap exists, the pair is immediately classified as "not co-walking," significantly reducing computational load.
  4. Siamese Neural Network Evaluation: Overlapping pairs are fed into a Siamese network (SigNet), originally designed for signature verification, to calculate a similarity score.

Key Insights: The Power of Slicing

A core innovation of this approach is the "slicing" of a full day's data into multiple layers. This allows the model to isolate specific periods of shared behavior, solving the partial matching problem.

Figure 2: Detail of the layering process, comparing a single 24-hour layer to multiple temporal segments.

By adjusting the granularity (e.g., 24 or 48 layers), researchers can balance detail and noise. The study found that 24 to 48 layers provided the optimal "sweet spot" for accuracy. Furthermore, converting data to images provides inherent interpretability; researchers can visually verify matches by observing overlapping paths on a map.

Results and Performance

The framework was evaluated using a dataset of 126 participants over five weeks. The image-based method significantly outperformed standard time-series benchmarks:

  • F1-Score: The proposed method achieved an F1-score of 0.73, compared to 0.58 for LSTM and 0.54 for GRU.
  • Efficiency vs. Accuracy: While the image-based approach is more computationally expensive (0.23s per image vs. 0.00008s for GRU), its superior accuracy and interpretability make it ideal for offline research applications.

Conclusion

By reimagining GPS trajectories as images, this framework provides a robust solution for co-movement analysis. Future work will focus on improving computational efficiency for real-time applications, enhancing privacy through data anonymization, and extending the model to identify broader behaviors such as carpooling or shared public transit commutes.

Summary updated

BibTeX
@misc{cardei2024pairwise,
  author = {Maria A. Cardei and Sabit Ahmed and Gretchen Chapman and Afsaneh Doryab},
  title = {{Pairwise Spatiotemporal Partial Trajectory Matching for Co-movement Analysis}},
  year = {2024},
  eprint = {2412.02879},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.02879},
}
Figure