completed Jan 2023 - May 2024

iBAT: Robust Bus Dwell Time Predictive Machine Learning Model by Handling Real Concept Drift

#Machine Learning #Concept Drift #Incremental Learning #Intelligent Transportation #Bus Dwell Time Prediction #Time Series
iBAT: Robust Bus Dwell Time Predictive Machine Learning Model by Handling Real Concept Drift

Overview

Precise and reliable forecasting of dwell time at each bus stop benefits both passengers and operators, particularly in the urban and rural areas of developing countries such as Sri Lanka, where buses are the dominant mode of public transport and traffic is heterogeneous with little lane discipline. Existing bus dwell time (BDT) models are trained on historical data, yet traffic conditions, passenger behaviour, weather, road management and sudden events change in unpredictable sudden, gradual or transitional ways. This phenomenon, known as concept drift, steadily degrades the accuracy of deployed predictive models.

This project proposes a robust strategy for handling real concept drift in BDT prediction. An XGBoost-based dwell time model is updated through incremental learning under an active strategy, in which the Drift Detection Method (DDM) monitors batches of incoming data and triggers model updates only when drift is detected. To overcome data losses, insufficient data and uncertain triggering in streaming GPS data, a novel Hybrid Batch Processing (HBP) technique forms batches using both a minimum time interval and a minimum data count. The approach is evaluated on raw GPS data from the heterogeneous Kandy–Digana bus route (route 654), and is released as the open-source iBAT framework together with the gps2gtfs preprocessing package.

Motivation & Objectives

The performance of bus arrival and dwell time prediction systems declines over time due to concept drift caused by weather changes, traffic variations, accidents and other evolving factors. The goal of this research was to improve the robustness of BDT prediction by detecting drift in real time and quickly adapting the model to new concepts. The work was organised around the following objectives:

Concept Drift Detection – To survey, identify and develop a comprehensive suite of concept drift detection algorithms tailored to bus dwell time data.

Incremental Learning – To identify a robust set of incremental learning algorithms that address the real-time challenges of dwell time prediction.

Evaluation Framework – To establish suitable evaluation metrics and build a framework for assessing incremental learning algorithms together with different batch processing and drift handling strategies.

Optimal Strategy – To identify the combination of batch processing technique and drift handling strategy that minimises mean absolute error (MAE) relative to the base model.

Impact & Results

Performance

Experiments used 14,128 trips over 14 bus stops on route 654 (Kandy–Digana), collected from October 2021 to February 2022 and July to October 2022, with a pronounced drift appearing after the 2022 fuel crisis and curfew in Sri Lanka. Incorporating concept drift handling alone reduced the base model's MAE from 26.17 s to 22.08 s (a 15.63% improvement). The proposed active strategy with DDM, incremental learning and hybrid batch processing achieved an MAE of 21.63 s and RMSE of 37.59 s with a mean average processing time (MAPT) of 59.25 ms. This corresponds to a 17.35% improvement in MAE and 3.48% in RMSE over the XGBoost base model without drift handling, and outperforms the baseline concept drift handling strategy by 2.04% in MAE, 1.22% in RMSE and 55.28% in MAPT.

Key Contributions

Hybrid Batch Processing with Active Drift Handling

A batch formation technique that combines time-based and count-based triggers, paired with DDM drift detection and incremental XGBoost updates, yielding accurate predictions with less frequent model updates.

iBAT Framework

An open-source Python framework for real-time bus dwell time prediction that integrates incremental learning algorithms with configurable batch processing and concept drift handling strategies, shipped with route 654 datasets.

gps2gtfs Package

A Python package published on PyPI that preprocesses raw public transit GPS data and converts it into GTFS format, extracting trips, stops, arrival and departure times, dwell times and running times.

Real-world Impact

The work shows that a model can remain robust and accurate in the presence of real concept drift while adapting to dynamic traffic conditions, which is especially valuable for public transit in developing countries with heterogeneous traffic. Its active strategy reduces memory and computation by updating only when drift occurs, supporting deployment on edge devices. A paper describing the findings was submitted to the 27th IEEE International Conference on Intelligent Transportation Systems, and future work targets automatic hyperparameter determination that adapts to ever-changing traffic conditions.

Gallery

Team Aspires with Prof. Uthayasanker Thayasivam at CSE Careers Day, University of Moratuwa

Team Aspires with Prof. Uthayasanker Thayasivam at CSE Careers Day, University of Moratuwa

Project poster: Handling Concept Drift in Bus Arrival Time Prediction

Project poster: Handling Concept Drift in Bus Arrival Time Prediction

Project Team

Kesavi Aravinthan

Kesavi Aravinthan

Undergraduate Researcher

Undergraduate in Computer Science and Engineering with interests in machine learning, natural language processing and data science, contributing to concept drift handling for dwell time prediction.

Gopinath Shanmugavadivel

Gopinath Shanmugavadivel

Undergraduate Researcher

Undergraduate with interests in software engineering, cloud computing, machine learning and networking, contributing to the robust dwell time prediction framework.

Kajanan Selvanesan

Kajanan Selvanesan

Undergraduate Researcher

Specialises in machine learning and data science, contributing to the incremental learning pipeline and the open-source iBAT and gps2gtfs tooling.