Introduction
Managing urban transit systems during unexpected train delays is a critical challenge for emergency management. When a delay occurs, passengers must decide whether to wait for the service to resume or abandon their journey in favor of alternative transport like buses or ride-hailing services. Predicting these choices is essential for optimizing station crowd control and resource allocation. However, traditional machine learning (ML) approaches struggle with this task due to the inherent sparsity of delay event data and the complex, heterogeneous nature of human decision-making.
The DelayPTC-LLM Framework
To address these challenges, researchers introduced DelayPTC-LLM, a framework that utilizes Large Language Models (LLMs) to forecast passenger behavior. Unlike standard ML models that require vast amounts of balanced data, LLMs leverage pre-trained "common sense" and semantic understanding to interpret rare emergency scenarios.
The framework operates through a five-step pipeline designed to transform raw transit logs into actionable behavioral predictions.
1. Data Profiling and Regular Passenger Screening
The process begins with the analysis of Automated Fare Collection (AFC) data. By pre-processing swipe records and analyzing travel statistics, the system identifies "regular passengers"—those with consistent spatial and temporal travel patterns. This focus ensures that the model predicts behavior for commuters whose routines are disrupted, rather than occasional travelers with unpredictable motives.
2. Affected Passenger Identification
Using a spatio-temporal overlap approach, the framework identifies passengers who were present within the affected area during a specific delay event. By tracing their travel chains, the system determines which "regular passengers" were directly impacted by the service disruption.
3. Feature Engineering and Dataset Construction
Five primary features are extracted for each affected passenger: delay type, delay duration, trip duration, journey status (whether the trip had already commenced), and an urgency level derived from the variance in their historical inbound times. These features are then compiled into a structured dataset comparing normal-day records with delay-day records.
4. Prompt Engineering and LLM Prediction
The core innovation of DelayPTC-LLM lies in its use of Chain-of-Thought (CoT) prompting. Instead of feeding raw numerical data into a classifier, the framework constructs narrative prompts that describe the passenger's situation. The LLM (specifically GPT-4) is prompted to "think" through the scenario in three stages:
- Variable Understanding: Interpreting the impact of delay type and urgency.
- Reasoning Development: Weighing the pros and cons of waiting versus abandoning.
- Result Interpretation: Making the final prediction.
Experimental Setup and Results
The framework was validated using real-world data from the Shenzhen Metro, involving AFC records from August to September 2019 and logs from 14 distinct delay events (e.g., vehicle faults, signaling issues).
The performance of DelayPTC-LLM was compared against traditional baselines such as Random Forest (RF) and LightGBM (LGBM). Key findings include:
- Higher Accuracy: DelayPTC-LLM achieved an accuracy of 0.83, outperforming both vanilla GPT-4 (0.53) and RF (0.79).
- Superior Recall for Minority Classes: Traditional ML models often suffered from the "imbalance" problem, frequently guessing that all passengers would wait. While LightGBM had high overall accuracy, its recall for the "abandonment" choice was nearly zero (0.02). In contrast, DelayPTC-LLM maintained a balanced recall of 0.50, effectively identifying passengers likely to leave the station.
- Semantic Advantage: By treating delay causes (e.g., "Signal Fault") as text rather than categorical codes, the LLM utilized its semantic knowledge to better gauge passenger frustration and patience levels.
Discussion and Future Directions
DelayPTC-LLM demonstrates that LLMs can serve as "small-sample specialists" for long-tail events where traditional data-driven models fail. However, several considerations remain for real-world deployment:
- Operational Latency: The computational cost and time required for LLM inference may hinder real-time application in high-pressure emergency centers.
- Privacy and Transparency: The use of individual travel patterns necessitates strict data governance and anonymization. Furthermore, while CoT improves explainability, the "black box" nature of LLMs requires ongoing monitoring to prevent logical hallucinations.
Future research aims to integrate multimodal data, such as real-time social media sentiment and weather conditions, to further enhance the precision of behavioral forecasts.
Summary updated