Skip to main content
QUICK REVIEW

[Paper Review] Detecting Transportation Mode Using Dense Smartphone GPS Trajectories and Transformer Models

Yujie Zhang, Othmane Echchabi|arXiv (Cornell University)|Feb 27, 2026
Human Mobility and Location-Based AnalysisSocial Sciences0 citations
TL;DR

Introduces SpeedTransformer, a Transformer-based model that uses only instantaneous speed from dense GPS trajectories to detect transport modes, showing strong cross-region transferability and real-world robustness.

ABSTRACT

Transportation mode detection is an important topic within GeoAI and transportation research. In this study, we introduce SpeedTransformer, a novel Transformer-based model that relies solely on speed inputs to infer transportation modes from dense smartphone GPS trajectories. In benchmark experiments, SpeedTransformer outperformed traditional deep learning models, such as the Long Short-Term Memory (LSTM) network. Moreover, the model demonstrated strong flexibility in transfer learning, achieving high accuracy across geographical regions after fine-tuning with small datasets. Finally, we deployed the model in a real-world experiment, where it consistently outperformed baseline models under complex built environments and high data uncertainty. These findings suggest that Transformer architectures, when combined with dense GPS trajectories, hold substantial potential for advancing transportation mode detection and broader mobility-related research.

Motivation & Objective

  • Motivate and address transport mode detection using dense GPS data from smartphones.
  • Develop a Transformer-based model that relies solely on speed inputs to infer modes.
  • Demonstrate cross-regional generalization via transfer learning with minimal labeled data.
  • Validate performance in real-world conditions with noisy, irregular GPS data.
  • Assess practical deployment potential in field experiments and built environments.

Proposed method

  • Represent each trajectory as a sequence of instantaneous speeds sampled densely.
  • Segment speeds into fixed-length windows (T=200) with stride 50 using a sliding window.
  • Embed speeds into 128-dimensional vectors and process with a 4-layer Transformer encoder (L=4).
  • Use Rotary Positional Embeddings (RoPE) on Q and K within multi-head attention to capture relative temporal dependencies.
  • Apply Grouped-Query Attention (GQA) with SwiGLU-FNN for efficient, expressive processing.
  • Aggregate final sequence with learned attention pooling and classify with a linear projection.
Figure 1: Transformer architecture
Figure 1: Transformer architecture

Experimental results

Research questions

  • RQ1Can a Transformer model achieve state-of-the-art transportation mode detection using only speed as input?
  • RQ2How well does the model transfer across regions with different transportation infrastructures and data collection conditions?
  • RQ3How does SpeedTransformer perform under real-world noisy GPS data compared to baselines?
  • RQ4What is the impact of cross-regional fine-tuning with small labeled datasets on performance?

Key findings

  • SpeedTransformer achieves 95.97% test accuracy on Geolife, outperforming Deep-ViT and LSTM-based baselines that used more features or complex preprocessing.
  • Across MOBIS (Swiss) and Geolife (Beijing) datasets, SpeedTransformer converges faster and yields higher per-class F1-scores than an LSTM-attention baseline.
  • In cross-regional transfer, MOBIS-pretrained SpeedTransformer fine-tuned on 100–200 Geolife trips reaches 80.53–86.13% accuracy, exceeding the LSTM baseline by >5 points.
  • In real-world field data, SpeedTransformer consistently outperforms LSTM-Attention across varying data subsets and device conditions, with best noted at 70% subset (91.72% accuracy).
  • Per-class analysis shows robustness overall, with some classes (e.g., bike/train) posing challenges in imbalanced real-world data.
Figure 2: Data Pre-Processing
Figure 2: Data Pre-Processing

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.