Source-linked AI summary

Inferring transportation modes from GPS trajectories using a convolutional neural network

Sina Dabiri, Kevin Heaslip

arXiv:1804.02386v1cs.LGstat.ML

TL;DR

Transportation-mode inference needs scalable GPS-based alternatives to costly, incomplete surveys, while hand-crafted features can be vulnerable to traffic and environmental conditions. The paper structures raw GPS trajectories into four kinematic channels for an integrated CNN, achieving 84.8% accuracy with an ensemble of its best configuration and outperforming several prior frameworks.

  • Problem

    Transportation-mode inference traditionally relies on costly, incomplete surveys or hand-crafted GPS features vulnerable to traffic and environmental conditions.

  • Method

    The paper uses an integrated CNN that predicts five modes from raw GPS trajectories structured as speed, acceleration, jerk, and bearing-rate channels after preprocessing.

  • Results

    84.8% accuracy was achieved by an ensemble of the best CNN configuration, which outperformed several compared frameworks.

  • Takeaways & Limitations

    The study demonstrates that CNN architectures can infer transportation modes from only raw GPS trajectories using machine-learned representations.

Abstract

from arXiv · show

Identifying the distribution of users' transportation modes is an essential part of travel demand analysis and transportation planning. With the advent of ubiquitous GPS-enabled devices (e.g., a smartphone), a cost-effective approach for inferring commuters' mobility mode(s) is to leverage their GPS trajectories. A majority of studies have proposed mode inference models based on hand-crafted features and traditional machine learning algorithms. However, manual features engender some major drawbacks including vulnerability to traffic and environmental conditions as well as possessing human's bias in creating efficient features. One way to overcome these issues is by utilizing Convolutional Neural Network (CNN) schemes that are capable of automatically driving high-level features from the raw input. Accordingly, in this paper, we take advantage of CNN architectures so as to predict travel modes based on only raw GPS trajectories, where the modes are labeled as walk, bike, bus, driving, and train. Our key contribution is designing the layout of the CNN's input layer in such a way that not only is adaptable with the CNN schemes but represents fundamental motion characteristics of a moving object including speed, acceleration, jerk, and bearing rate. Furthermore, we ameliorate the quality of GPS logs through several data preprocessing steps. Using the clean input layer, a variety of CNN configurations are evaluated to achieve the best CNN architecture. The highest accuracy of 84.8% has been achieved through the ensemble of the best CNN configuration. In this research, we contrast our methodology with traditional machine learning algorithms as well as the seminal and most related studies to demonstrate the superiority of our framework.

1. Introduction

Travel mode choice matters for transportation analysis, but conventional survey methods are costly and incomplete. The paper therefore develops a CNN that learns from raw GPS trajectories structured around motion characteristics.

  • Motivation: GPS trajectories offer a cost-effective alternative to household surveys and phone interviews for collecting travel data.Surveys are time-consuming, expensive, and often produce low response rates and incomplete information.
  • Research gap: Hand-crafted GPS features can be vulnerable to traffic and environmental conditions, limiting their ability to distinguish transportation modes.For example, congested-car speeds may resemble bicycle or walking speeds.
  • Research gap: Deep learning can transform raw data into high-level representations learned by machines rather than manually formulated by humans.These learned features ultimately support class-score computation.
  • Contribution: The proposed CNN predicts walk, bike, bus, driving, and train from raw GPS trajectories using four channels: speed, acceleration, jerk, and bearing rate.The input layout is designed to fit CNN architectures while representing fundamental motion characteristics.
  • Study design: The study evaluates preprocessing, CNN-layer settings, alternative configurations, and comparisons with classical algorithms and prior research.Evaluation uses the GeoLife trajectory dataset and is described across the paper’s framework and results sections.

2. Literature review

Prior transportation-mode inference commonly uses GPS-derived hand-crafted features with traditional classifiers, while newer studies combine engineered and deep features. This paper instead integrates feature learning and classification in a CNN using kinematic inputs.

  • Existing approaches: Transportation-mode inference has used rule-based, fuzzy-logic, tree, Bayesian, multilayer-perceptron, and support-vector-machine methods across several data sources.The reviewed sources include GPS, accelerometers, and GSM data.
  • Existing approaches: GPS-only methods are practical when access to multiple sensor sources is unavailable, motivating this paper’s focus on raw GPS data.The literature review therefore concentrates on GPS-based mode distinction.
  • Existing approaches: Seminal GPS inference work segmented trips by transportation mode, extracted velocity- and acceleration-based features, and classified labeled segments.Its workflow exemplifies the hand-crafted-feature paradigm.
  • Deep-learning extensions: Recent studies combined hand-crafted GPS features with deep features from fully connected networks, trajectory images, sparse autoencoders, or CNNs.These approaches transformed trajectories or point-level features before final classification.
  • Proposed approach: This paper proposes an integrated CNN that receives an informative kinematic input layer and performs feature learning and classification together.It also compares prediction quality with broadly used traditional supervised-learning algorithms.

3.1. Preparing the input samples and applying data processing

The preprocessing pipeline converts raw GPS tracks into clean, fixed-size segments and computes motion features for CNN input. Each sample uses speed, acceleration, jerk, and bearing rate to characterize movement.

  • Segmentation: GPS tracks are divided into trips by time gaps and into single-mode segments by changes in transportation mode.CNN samples must then be standardized to a common size.
  • Segmentation: Segments are subdivided or zero-padded so every CNN sample contains the same number of GPS points.Motion characteristics are computed from latitude, longitude, and timestamp tuples.
  • Motion features: Speed, acceleration/deceleration, and jerk are computed from geographical distance and time differences between consecutive GPS points.Vincenty’s formula is used for the geographical distance.
  • Motion features: Bearing rate is the absolute difference between bearings of consecutive points, capturing differences in heading changes across transportation modes.Cars and buses generally follow streets, whereas walking and biking can change direction more frequently.
  • Data cleaning: Invalid timestamps, unrealistic speeds or accelerations, and other inaccurate GPS points are removed during preprocessing.The filters use transport-mode-specific maximum thresholds for speed and acceleration.
  • Data cleaning: Savitzky-Golay smoothing reduces random trajectory errors while preserving the original signal shape and pattern.The filter fits a polynomial within an odd-sized centered window.
  • CNN input preparation: Clean segment features are stacked into independent four-channel samples containing speed, acceleration/deceleration, jerk, and bearing rate.These samples are prepared for CNN processing.

3.2. CNN architecture

The CNN processes GPS segments as four-channel input volumes and learns local patterns through convolutional operations. Its architecture is assembled from standard CNN layer types with controlled spatial dimensions.

  • CNN structure: CNNs exploit local connectivity by linking neurons to receptive fields rather than fully connecting every adjacent-layer node.This reduces the number of weights compared with a traditional multilayer perceptron.
  • CNN structure: The architecture uses input, convolutional, pooling, fully connected, and dropout layers to transform input volumes into outputs.Each layer applies its own operation within the sequential CNN architecture.
  • Input representation: Each GPS segment forms an input volume with shape (1 × M × 4), where M is the segment length and the four channels encode motion features.The channels are speed, acceleration, jerk, and bearing rate.
  • Convolution: Convolutional filters scan receptive fields across the input to produce two-dimensional feature maps.The same filter is applied across the input volume.
  • Convolution: Convolutional output shape depends on filter depth, stride, and zero-padding, with stride set to 1 and padding preserving spatial dimensions.The number of filters is tuned across CNN configurations.

3.2.3. Activation layer

The activation layer introduces nonlinearity after convolution by applying ReLU to the convolved neurons. ReLU replaces negative feature-map values with zero.

  • 3.2.3. Activation layer: ReLU applies f(x) = max(0, x) to convolved neurons in every convolutional layer.Here, x denotes the convolved neurons.

3.2.4. Pooling layer

Pooling reduces feature-map dimensionality through spatial downsampling, lowering computation and helping control overfitting. The architecture then uses fully connected layers for feature extraction and final classification, with dropout and augmentation addressing overfitting.

  • 3.2.4. Pooling layer: Pooling decreases feature-map dimensionality through spatial downsampling to reduce computation and control overfitting.The stated pooling objective also includes achieving spatial and scale invariance.
  • 3.2.4. Pooling layer: Max pooling partitions each depth slice into non-overlapping vectors and retains the maximum value from each vector.The max-pooling filter size determines the length of these vectors.
  • 3.2.4. Pooling layer: Fully connected layers extract high-level features before the final fully connected layer performs classification with softmax activation.Each fully connected neuron connects to all neurons in the previous layer.
  • 3.2.4. Pooling layer: Dropout is used to address CNN overfitting caused by many weights and complicated input-output relationships.The passage identifies dropout as a practical and widely used regularization approach.
  • 3.2.4. Pooling layer: Fixed-length segmentation augments the sample count by more than four times compared with previous studies.The augmentation strategy responds to the lack of a massive labeled GPS dataset.
  • 3.2.4. Pooling layer: Bootstrap aggregating averages softmax class probabilities from independently trained CNN base learners.The base learners train on randomly selected instances with replacement.

3.2.7. CNN configurations

The study evaluates varied CNN architectures by changing layer structure, depth, and convolutional filter counts. It uses an efficient manual search rather than exhaustive hyperparameter optimization, with fixed architectural settings and standard training choices.

  • 3.2.7. CNN configurations: CNN configurations vary by layer number, layer order, network depth, and filters per convolutional layer.The configurations are designed to identify the network that best fits the application.
  • 3.2.7. CNN configurations: The architecture search uses an efficient manual procedure instead of an exhaustive, computationally expensive hyperparameter search.The manual search is inspired by a cited CNN study.
  • 3.2.7. CNN configurations: All convolutional layers use (1 × 3) filters and max-pooling layers use (1 × 2) filters.These filter sizes are held constant across the listed CNN configurations.
  • 3.2.7. CNN configurations: The final fully connected layer contains 5 neurons, matching the number of transportation classes.Earlier fully connected layers contain one-fourth as many neurons as their preceding flattened layer.
  • 3.2.7. CNN configurations: Training minimizes categorical cross-entropy using the Adam optimizer with batch size 64.Adam updates model parameters during backpropagation.

4. Data description and creation of GPS segments

The methodology is validated on GeoLife GPS trajectories from 69 users and focuses on five ground transportation classes. Tracks are split into trips using a twenty-minute gap threshold and then converted into fixed-size segments of 200 GPS points.

  • 4. Data description and creation of GPS segments: 69 users’ GeoLife GPS trajectories provide the validation data for the proposed methodology.The study considers only ground transportation modes from the labeled dataset.
  • 4. Data description and creation of GPS segments: The final transportation classes are walk, bike, bus, driving, and train.Taxi and car are assigned to driving, while reported rail-based modes are assigned to train.
  • 4. Data description and creation of GPS segments: Trips are split when consecutive GPS points are separated by more than twenty minutes.The twenty-minute interval is used as the trip-segmentation threshold.
  • 4. Data description and creation of GPS segments: Trips are converted into fixed-size segments containing M = 200 GPS points.The value 200 is the median number of GPS points across all trips and is also used for unseen tracks.
  • 4. Data description and creation of GPS segments: Table 2 organizes the dataset by transportation mode, reporting sample counts, maximum speed, and maximum acceleration.These mode-specific quantities are used in the data description.

5. Result and discussion

The experiments identify and refine a best CNN configuration, then evaluate it against classical machine-learning methods and prior GeoLife studies. The ensemble of model G achieves strong transportation-mode inference performance, with comparisons favoring the proposed framework.

  • Identifying the optimal CNN configuration: Increasing convolutional depth from 2 layers in model A to 6 in model C improves accuracy by nearly 2%.The authors also increase filter counts with depth to capture more abstract features before classification.
  • Identifying the optimal CNN configuration: 69% test accuracy in model F is substantially below model E’s 77% after adding many dropout layers.The authors attribute the decrease to excessive simplification and high bias, motivating a more balanced dropout arrangement.
  • Identifying the optimal CNN configuration: 82.3% is the highest test accuracy reported for model G during epoch optimization, while test accuracy levels off around 81–82% after about 30 epochs.Training accuracy continues rising and peaks at almost 96%, whereas early stopping uses the test-score plateau.
  • Comparison with classical machine learning algorithms: All precision and recall values for the ensemble of model G exceed 67%, with recall ranging from 67.4% for driving to 95.7% for walking.The paper relates performance differences to the number of available segments and mode-specific characteristics.
  • Comparison with classical machine learning algorithms: The CNN is compared with KNN, RBF-based SVM, decision tree, random forest, and multilayer perceptron models using the same trajectory segments.The classical models use manually designed GPS features, while hyperparameters are tuned through grid search and 5-fold cross-validation.
  • Comparison with previous studies: 84.8% highest accuracy is achieved by the ensemble of the best CNN configuration, model G.The paper reports this ensemble as its best CNN performance.

6. Conclusion

The paper infers transportation modes from raw GPS trajectories using a CNN with a four-channel kinematic input representation and preprocessing pipeline. It evaluates CNN architectures and improves the selected configuration through training adjustments and early stopping.

  • The CNN infers transportation modes using only raw GPS trajectories.
  • The input layer uses four channels representing speed, acceleration/deceleration, jerk, and bearing rate.
  • Data preprocessing removes anomalous GPS logs and random errors before CNN training.
  • Dividing long segments into fixed-length samples increased the number of samples more than four times and enhanced model accuracy.
  • The study tests multiple CNN layer patterns, increases training epochs for the optimal configuration, and uses early stopping to avoid overfitting.

Data Reference

The cited data reference is the GeoLife GPS Trajectory Dataset, identified as version 1.3 and attributed to Zheng and colleagues.

  • The referenced dataset is the GeoLife GPS Trajectory Dataset.
  • The dataset reference credits Zheng, Fu, Xie, Ma, and Li.
  • The cited dataset is version 1.3 from the Microsoft Repository.
Loading 1804.02386v1…