Intelligent Train Driving Assistance under Unexpected Temporary Speed Restrictions
A three-layer driving-assistance system that transfers offline dynamic-programming expertise into millisecond online decisions, protects every recommendation with an ATP safety envelope, and explains the model’s reasoning to the driver through SHAP-based decision cards.

The original diagram organizes the system into three interacting layers. The dispatch side issues a temporary speed restriction; the onboard decision layer receives the restriction and live train state, then runs the LightGBM policy, SHAP explanation, and ATP safety check; and the driver side receives the recommended action, predicted speed trajectory, braking reference, and explanation while retaining final control authority. Above this online loop, dynamic programming supplies the offline expert trajectories used to train the behavior-cloning policy.
Real-time replanning is difficult when speed restrictions appear unexpectedly.
Temporary speed restrictions can be introduced by severe weather, equipment failures, or other operational disruptions. When a train is only a few kilometres from the restricted section, the driving-assistance system must reconstruct a safe and efficient speed strategy quickly.
Classical global optimization such as dynamic programming can produce high-quality speed trajectories, but a new online solution may require minutes of computation. Purely data-driven alternatives can be fast, yet their black-box decisions are difficult to trust in a safety-critical railway environment.
Combine the global quality of offline optimization with the online speed of machine learning, while preserving an independent safety boundary and a human-readable explanation of each recommendation.
A layered architecture separates optimization, AI decision-making, safety protection, and human control.
Dynamic programming generated the expert behavior used for learning.
The benchmark environment used a 40 km high-speed railway line with continuous grades, station-area speed limits, multiple temporary restrictions, and CRH3 train parameters. The dynamic-programming state included position, speed, and the previous control action.
State and action discretization
- Position grid: 100 m
- Speed resolution: 0.5 km/h
- Six control actions: full traction, partial traction, cruise, coasting, weak braking, and service braking
- Hard transition constraints prevented non-smooth action jumps
Optimization objective
The stage cost balances traction energy, running-time deviation, and acceleration smoothness:
The train dynamics also account for Davis resistance, grade resistance, and speed-dependent adhesion.
Five categories of temporary-speed-restriction causes were crossed with seven starting positions and randomized environmental parameters. The resulting policy table was expanded into roughly ten million labelled samples with ten physical features.
On the 40 km benchmark line, the DP expert trajectory reduced cumulative traction energy by about 10% relative to a conventional constant-speed cruising strategy.
LightGBM reproduced the expert policy at online decision speed.
The behavior-cloning model takes a ten-dimensional physical state vector, including current position and speed, previous action, grade, speed-limit margin, distance to the next restriction, remaining distance, estimated remaining time, final-segment flag, and speed deviation.
After cleaning, the dataset contained approximately ten million valid labelled samples. It was split by scenario into an 80% training set and a 20% test set so that test scenarios remained unseen during training.
| Evaluation | Result | Interpretation |
|---|---|---|
| Six-action classification accuracy | 98.43% | High-fidelity imitation of DP expert actions |
| Single-step forward inference | 13 ms | Measured on a 14-core 2.6 GHz CPU |
| Relative computation speed | >1,000× | Compared with online dynamic programming |

The Chinese title reads “LightGBM Training Loss Curve.” The blue solid line is training loss and the red dashed line is validation loss, with boosting rounds on the horizontal axis. Both curves drop rapidly during the early rounds and then flatten while remaining closely aligned. In the report, this training process uses a scenario-stratified split of roughly 8 million training samples and 2 million unseen test samples; the resulting six-action classifier reports 98.43% test accuracy and 13 ms mean single-step inference.
The project selected LightGBM for fast inference, support for categorical features, and direct compatibility with tree-based SHAP explanations.
The AI recommendation never bypasses an independent ATP safety boundary.
Because behavior cloning remains a statistical learning method, the system introduces an independent Automatic Train Protection layer. The ATP module calculates an Emergency Brake Intervention (EBI) envelope: the highest speed from which the train can still brake safely to every downstream speed constraint.
The physical braking model also constrains traction and braking by a speed-dependent wheel–rail adhesion coefficient, ensuring that the safety envelope is based on achievable deceleration rather than an idealized value.

The plot compares three quantities along the 40 km route: the dashed red line is the fixed infrastructure speed limit, the solid red curve is the ATP Emergency Brake Intervention (EBI) envelope, and the green dotted line marks a five-kilometre-per-hour safety margin below the limit. The EBI curve begins falling before each downstream restriction because it represents the highest speed from which the train can still brake to the next required target speed under the physical deceleration model. It is therefore the independent hard safety boundary against which every AI recommendation is checked.
Across randomized simulation scenarios, the report records zero forced ATP interventions: the actual operating speed remained below the EBI envelope throughout the tested runs.

This monitoring view places the operational quantities on one speed-versus-position chart. The top status bar reports current speed, the active line limit, ATP status, train position, remaining time, and system state. In the chart, the restriction region is highlighted, the fixed limit and ATP envelope provide the safety context, and the actual trajectory is overlaid with alternative predicted branches. The emphasized prediction is the branch currently recommended by the decision layer, allowing the operator to see both the safety margin and the consequence of the selected action.
SHAP turns model attribution into a driver-readable decision card.
After LightGBM recommends an action, TreeExplainer computes local SHAP values for the current state. The system selects the three strongest feature contributions, determines whether each one pushes the decision positively or negatively, and maps the numerical attribution into natural-language operational reasons.

The left side translates the model output into driver-facing information: current speed and position, the recommended control action, and the kilometre marker at which braking should begin. The lower explanation card summarizes why that action was recommended, using the strongest SHAP-attributed state variables mapped into natural-language reasons. The chart on the right shows the predicted speed trajectory together with the speed restriction, braking-start marker, and restriction entrance. The interface is advisory rather than autonomous—the driver remains responsible for the final control action.
I contributed as a team member to the integrated train-driving assistance project.
The competition materials identify me as a project team member. This page therefore presents the DP, behavior-cloning, ATP, SHAP, and GUI pipeline as team-level research output rather than assigning undocumented components solely to me.
The portfolio description focuses on the components and quantitative results documented in the final technical report and competition application rather than presenting the project as an individual effort.
Project basis: final technical report and competition application for “智驭先锋——面向多变限速的基于行为克隆与可解释 AI 的列车智能驾驶辅助系统,” Tongji University, 2026. Original research figures are preserved on this page; English explanations are provided in the surrounding portfolio text.