Beyond 9-to-5: A Generative Model for Augmenting Mobility Data of Underrepresented Shift Workers

Haoxuan Ma, Xishun Liao, Yifan Liu, Chris Stanford, Jiaqi MaarXiv 2025 · DOI

Introduction

Urban mobility modeling is a cornerstone of city planning, yet it frequently suffers from a pervasive "9-to-5" bias. Traditional transportation planning relies heavily on Household Travel Surveys (HTS), which systematically undersample shift workers in sectors like healthcare, manufacturing, and services. These workers exhibit mobility patterns fundamentally different from the standard commuter: they travel during off-peak hours, cross midnight boundaries during single shifts, and engage in fewer discretionary trips.

While GPS data provides a high-resolution alternative to surveys, it is often fragmented due to signal loss or device inconsistencies. Existing activity-based models (ABMs) struggle to bridge these gaps, especially when activities span across two calendar days. This paper introduces a transformer-based generative framework designed to reconstruct fragmented GPS trajectories into behaviorally valid activity diaries, specifically capturing the unique "midnight-crossing" patterns of the 20% of the workforce often ignored by traditional surveys.

Methodology

The core of the proposed framework is a Transformer-based encoder-decoder architecture specifically optimized for activity sequence generation. Unlike traditional models that treat time as a linear progression, this architecture is designed to handle the cyclical and transition-heavy nature of shift work.

The Transformer-based architecture uses period-aware temporal embeddings and a multi-head output layer to predict the type, start time, and end time of the next activity.

Several technical innovations drive the model's performance:

  • Period-Aware Temporal Embeddings: The model uses a specialized embedding layer that fuses activity types with temporal context. A period function $p(t)$ explicitly categorizes transitions into "evening_start," "overnight," and "morning," helping the model learn the specific rhythms of shift work.
  • Transition-Aware Loss Function: To avoid over-simplifying patterns, a custom loss component ($\mathcal{L}_{trans}$) rewards the correct prediction of activity changes within a tolerance window, ensuring the model captures the "switch" between activities accurately.
  • Progressive Masking: Training involves a masking schedule with increasing ratios of missing data, forcing the model to learn how to infer missing activities from increasingly sparse observations.
  • Autoregressive Generation: During inference, the model generates activity patterns one time slot at a time, conditioned on the previous day’s encoded representation to ensure temporal coherence across the midnight boundary.

Data and Results

The study utilized six months of GPS trajectory data from Los Angeles County, semantically enriched via Large Language Model (LLM) annotated Point of Interest (POI) datasets. A subset of 208,350 pairwise activity sequences was identified for shift workers, defined as those working between 18:00–22:00, spanning midnight, or working sustained hours between 22:00–06:00.

The model demonstrated high distributional accuracy, achieving an Average Jensen-Shannon Divergence (JSD) of < 0.02 across all evaluation metrics. It significantly outperformed LSTM-based baselines, particularly in capturing activity start times (JSD 0.0171 vs. 0.0653) and end times (JSD 0.0073 vs. 0.0752).

Comparison of activity start time distributions between real-world GPS data and model generation, showing the successful capture of bimodal peaks.

Key insights from the evaluation include:

  • The Representation Gap: GPS data revealed a striking disparity in work start times. HTS data captures only 7.3% of early morning (0-6 AM) work starts, while GPS data reveals the true figure is closer to 18.5%.
  • Continuous Behavioral Flow: By treating paired consecutive days as the input unit, the model successfully handles the transition from 11:59 PM to 12:00 AM as a continuous behavioral flow rather than a data break.
  • Bimodal Capture: As shown in the start time distribution, the model successfully reproduced the distinctive bimodal peaks of shift workers (early morning and late evening), which are almost entirely missing from traditional survey-based models.

Conclusion

This generative framework serves as a vital data augmentation tool for urban planners. By addressing the systemic undersampling of shift workers, it enables the generation of synthetic but realistic datasets that represent the 24/7 needs of a city. While limitations remain regarding demographic barriers in GPS data and rule-based activity labeling, this work moves toward a more equitable foundation model for urban mobility. Future directions include incorporating seasonal variations and weather context to further refine behavioral predictions.

Summary updated

BibTeX
@misc{ma2025beyond,
  author = {Haoxuan Ma and Xishun Liao and Yifan Liu and Chris Stanford and Jiaqi Ma},
  title = {{Beyond 9-to-5: A Generative Model for Augmenting Mobility Data of Underrepresented Shift Workers}},
  year = {2025},
  eprint = {2507.19510},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.19510},
}
Figure