Skip to main content
QUICK REVIEW

[Paper Review] Rethinking travel behavior modeling representations through embeddings

Francisco C. Pereira|arXiv (Cornell University)|Aug 31, 2019
Human Mobility and Location-Based AnalysisSocial Sciences7 references10 citations
TL;DR

This paper introduces travel behavior embeddings—a data-driven, neural network-based method to represent categorical travel behavior variables (e.g., mode, trip purpose, education) in a continuous, low-dimensional latent space. Unlike traditional dummy or PCA encoding, embeddings capture nuanced semantic relationships and improve model performance by up to 60% in log-likelihood on out-of-sample tests, while preserving interpretability and enabling transfer learning across datasets.

ABSTRACT

This paper introduces the concept of travel behavior embeddings, a method for re-representing discrete variables that are typically used in travel demand modeling, such as mode, trip purpose, education level, family type or occupation. This re-representation process essentially maps those variables into a latent space called the \emph{embedding space}. The benefit of this is that such spaces allow for richer nuances than the typical transformations used in categorical variables (e.g. dummy encoding, contrasted encoding, principal components analysis). While the usage of latent variable representations is not new per se in travel demand modeling, the idea presented here brings several innovations: it is an entirely data driven algorithm; it is informative and consistent, since the latent space can be visualized and interpreted based on distances between different categories; it preserves interpretability of coefficients, despite being based on Neural Network principles; and it is transferrable, in that embeddings learned from one dataset can be reused for other ones, as long as travel behavior keeps consistent between the datasets. The idea is strongly inspired on natural language processing techniques, namely the word2vec algorithm. Such algorithm is behind recent developments such as in automatic translation or next word prediction. Our method is demonstrated using a model choice model, and shows improvements of up to 60\% with respect to initial likelihood, and up to 20% with respect to likelihood of the corresponding traditional model (i.e. using dummy variables) in out-of-sample evaluation. We provide a new Python package, called PyTre (PYthon TRavel Embeddings), that others can straightforwardly use to replicate our results or improve their own models. Our experiments are themselves based on an open dataset (swissmetro).

Motivation & Objective

  • To address the limitations of traditional categorical variable encoding (e.g., dummy variables, PCA) in travel demand modeling, which often enforce orthogonality and fail to capture semantic relationships.
  • To develop a data-driven, interpretable, and transferable representation method for categorical variables such as mode, trip purpose, and education level in travel behavior modeling.
  • To demonstrate that embeddings derived from neural networks can outperform standard encoding techniques in predictive performance while maintaining coefficient interpretability.
  • To enable cross-dataset compatibility by reusing embeddings trained on one dataset for another, provided travel behavior patterns remain consistent.
  • To provide a reusable open-source framework (PyTre) to facilitate adoption and community development in travel behavior modeling.

Proposed method

  • Adapt the word2vec principle from NLP to travel behavior modeling, training neural networks to learn dense vector representations (embeddings) of categorical variables.
  • Use a supervised learning setup where the model predicts a target variable (e.g., mode choice) based on embedded categorical inputs, with embeddings trained end-to-end via backpropagation.
  • Represent each category (e.g., 'student', 'employed') as a dense vector in a learned latent space, where semantic similarity is reflected by vector proximity.
  • Train the embedding layer using a cross-entropy loss function, with the final layer being a softmax classifier for the choice model.
  • Apply regularization and early stopping to prevent overfitting, and use a validation set to select the best-performing model run due to the method’s stochastic nature.
  • Enable transfer learning by reusing pre-trained embeddings from one dataset on another, assuming consistent behavioral patterns across datasets.

Experimental results

Research questions

  • RQ1Can neural network-based embeddings improve the predictive performance of travel demand models compared to traditional dummy variable encoding?
  • RQ2To what extent can embeddings capture meaningful semantic relationships between categorical variables (e.g., 'student' and 'employed' being more similar than 'student' and 'retired')?
  • RQ3Can embeddings be transferred across datasets, enabling reuse of learned representations without retraining from scratch?
  • RQ4How does the interpretability of model coefficients compare between embedding-based models and traditional dummy variable models?
  • RQ5What impact does dataset size and category distribution have on the stability and performance of embedding-based models?

Key findings

  • Embedding-based models improved out-of-sample log-likelihood by up to 60% compared to the initial model, significantly outperforming traditional dummy variable encoding.
  • The method achieved up to 20% higher likelihood than the corresponding traditional model using dummy variables in out-of-sample evaluation.
  • The stochastic nature of training led to performance variation across runs, with test log-likelihood ranging from -1365.0 to -1466.0 across 300 runs, necessitating careful model selection via validation sets.
  • Embeddings preserved interpretability, allowing coefficients to be meaningfully analyzed despite their neural network foundation.
  • The method demonstrated transferability: embeddings trained on one dataset could be reused on another if behavioral consistency was maintained.
  • The proposed PyTre Python package enables easy replication and extension of results, supporting community-driven development of shared embedding resources.

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.