Human mobility prediction with causal and spatial-constrained multi-task network

Zongyuan Huang, Shengyuan Xu, Menghan Wang, Hansi Wu, Yanyan Xu, Yaohui Jin

Introduction

Predicting human mobility—the ability to forecast an individual's next location based on their historical trajectory—is a fundamental task with wide-ranging applications in urban planning, epidemic modeling, and personalized location-based services. While traditional approaches have treated this as a sequence modeling problem, often employing Recurrent Neural Networks (RNNs) or Markov chains, these methods frequently struggle with the inherent sparsity of mobility data and fail to capture the underlying logic of human movement.

This research, published in EPJ Data Science, introduces a novel framework called the Causal and Spatial-constrained Long and Short-term Learner (CSLSL). By integrating causal reasoning with geographic constraints, the authors address the limitations of purely statistical sequence models, achieving state-of-the-art performance across multiple real-world datasets.

Methodology: The CSLSL Framework

The core innovation of CSLSL lies in its departure from treating location prediction as a simple next-token problem. Instead, it models the decision-making process through three primary pillars.

1. Causal Decision Logic

Human movement is rarely random; it is driven by intent. The authors propose a causal chain: Time $\rightarrow$ Activity $\rightarrow$ Location.

  • Time Branch: Predicts the timing of the next move.
  • Activity Branch: Uses location categories (e.g., "restaurant," "office") as a proxy for the intended activity.
  • Location Branch: Predicts the specific coordinates or grid cell.

By feeding the output of the time branch into the activity branch, and both into the location branch, the model mimics the human logic of "When do I go?", "What do I need to do?", and "Where is the best place for that activity?".

2. Long and Short-term Capturer (LSC)

Human behavior exhibits both periodic routines (e.g., daily commutes) and short-term dependencies (e.g., running errands in a specific neighborhood). CSLSL utilizes Gated Recurrent Units (GRUs) to capture these multi-scale temporal patterns, allowing the model to distinguish between habitual "returner" behavior and transient "explorer" movements.

3. Spatial-Constrained Loss Function

Standard deep learning models typically use Cross-Entropy loss, which penalizes all incorrect predictions equally. However, in geography, a prediction that is 500 meters from the ground truth is significantly better than one 50 kilometers away. CSLSL introduces a spatial-constrained loss that incorporates the physical distance between the predicted and actual locations. This serves as a powerful regularizer, forcing the model to respect the "First Law of Geography"—that near things are more related than distant things—and ensuring that the resulting spatial density of predictions aligns with real-world urban dynamics.

Experimental Evaluation

The authors evaluated CSLSL against several competitive baselines, including DeepMove, Flashback, and STAN, using three diverse check-in datasets:

  • NYC (Foursquare): High-density urban data with 139,000 records.
  • TKY (Tokyo, Foursquare): A large-scale dataset with 427,000 records.
  • Dallas (Gowalla): A dataset lacking activity categories, used to test the model's robustness under data constraints.

Key Findings

The results demonstrate that CSLSL significantly outperforms existing models across all metrics.

Accuracy and Performance

In terms of Recall@1, CSLSL showed average improvements of 27% in NYC, 37% in TKY, and 43% in Dallas. These gains suggest that the causal and spatial constraints provide a much-needed inductive bias that helps the model learn more effectively from sparse data.

Macro-Statistical Consistency

Beyond individual accuracy, the model excels at replicating collective behavior. The "displacement distribution"—the statistical distribution of trip distances—generated by CSLSL almost perfectly matches the ground truth. In contrast, standard LSTMs often over-predict short-distance trips and fail to capture the "long-tail" of occasional long-distance travel. Furthermore, the model accurately predicts "regional attractiveness," identifying which areas of a city will experience the highest foot traffic.

Predictability and Entropy

The study also explored the relationship between user behavior and model performance. A clear negative correlation was found between a user's "location entropy" (the diversity of their visited locations) and prediction accuracy. This confirms that while CSLSL is highly effective, the inherent unpredictability of "exploratory" users remains a challenge for mobility modeling.

Conclusion and Future Directions

The CSLSL framework demonstrates that incorporating domain-specific knowledge—specifically causal logic and geographic constraints—is more effective than relying on pure sequence modeling for human mobility. By treating movement as a multi-task problem driven by time and activity, the model achieves both higher individual accuracy and better macro-level consistency.

Future research will focus on applying this framework to denser datasets, such as mobile phone signaling data or GPS trajectories, which provide a more continuous and less biased view of human movement than sparse check-in data. Additionally, refining the definition of "activity" beyond simple location categories could further enhance the model's causal reasoning capabilities.

Source: Huang, Z., Xu, S., Wang, M. et al. Human mobility prediction with causal and spatial-constrained multi-task network. EPJ Data Sci. 13, 22 (2024). https://doi.org/10.1140/epjds/s13688-024-00460-7

Summary updated

BibTeX
@article{huang2024human,
  author = {Zongyuan Huang and Shengyuan Xu and Menghan Wang and Hansi Wu and Yanyan Xu and Yaohui Jin},
  title = {{Human mobility prediction with causal and spatial-constrained multi-task network}},
  journal = {EPJ Data Sci.},
  year = {2024},
  doi = {10.1140/epjds/s13688-024-00460-7},
}
Figure