Skip to content

mkhalil91/Multi-task-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Multi-Task Learning for Travel Behaviour Prediction

Language Framework Notebook Domain Paper

Code for the paper: "How effective are discrete-continuous multi-task learning compared to single-output models? Insights from travel mode and departure time analysis" — published in Expert Systems with Applications (2025).


🔍 Overview

This repository implements and benchmarks Multi-Task Learning (MTL) models that simultaneously predict:

  • 🚗 Travel mode choice (discrete output — e.g., car, transit, walking, cycling)
  • 🕐 Departure time (continuous output — e.g., hour of departure)

The core idea: these two decisions are made jointly by travellers, so training a shared model that leverages their correlation outperforms two independent single-output models.

Key result: MTL increased travel-demand prediction speed by 40% and improved forecasting accuracy by 20% over single-output baselines.


🏗️ Model Architecture

Input Features (socio-demographics, trip attributes, land use)
        │
   ┌────┴─────┐
   │  Shared   │   ← Shared representation layers (captures joint patterns)
   │  Layers   │
   └────┬─────┘
        │
  ┌─────┴──────┐
  │            │
Mode Head   Departure Head
(Softmax)   (Linear / Beta)
  │            │
Mode       Departure
Prediction   Time

✨ Features

  • Discrete-continuous MTL — Handles one categorical and one continuous output simultaneously
  • Multiple architectures tested — Hard parameter sharing, soft parameter sharing, task-weighted loss

📦 Requirements

pip install tensorflow pandas numpy scikit-learn shap matplotlib seaborn jupyter

🚀 Usage

git clone https://github.com/mkhalil91/Multi-task-Learning.git
cd Multi-task-Learning
jupyter notebook

Open MTL_Travel_Behaviour.ipynb and follow the step-by-step pipeline:

  1. Data preparation — Encoding, normalisation, train/test split
  2. Baseline models — Single-output MNL, RF, XGBoost
  3. MTL models — Hard sharing, soft sharing, and weighted variants
  4. Evaluation — Accuracy (mode), MAE/RMSE (departure time), training time

📚 Citation

If you use this code in your research, please cite:

@article{khalil2025multitask,
  title={How effective are discrete-continuous multi-task learning compared to single-output models? 
         Insights from travel mode and departure time analysis},
  author={Khalil, Mohamad and Fatmi, Mahmudur Rahman},
  journal={Expert Systems with Applications},
  volume={274},
  pages={127002},
  year={2025},
  publisher={Elsevier}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors