Corresponding Author: Shubham Gupta
Railway compressor systems are essential to the pneumatic functions that keep metro operations safe and uninterrupted, yet unexpected degradation of these systems remains a persistent source of service disruption and unplanned maintenance costs. This study proposes an Explainable Temporal Data Analytics (ETDA) framework for early failure prediction and anomaly detection in railway compressor systems, using the publicly available MetroPT-3 dataset, which contains 15,169,480 one-second observations from 15 analogue and digital sensors of a metro Air Production Unit collected between February and August 2020. Rather than treating sensor readings as independent samples, the proposed framework transforms instantaneous measurements into rolling temporal features (mean, standard deviation, rate of change, range, and cross-sensor correlation), derives a persistence-aware anomaly score, and estimates multi-horizon failure risk, coupled with Shapley-based feature attribution to explain which behavioural changes drive the estimated risk. Chronological validation is used throughout to avoid temporal leakage. The framework was evaluated against five conventional classifiers and detected all four documented air-leak failures, with a mean anomaly lead time of 6.8 hours. The framework achieved a 91.4% F1-score and a PR-AUC of 0.903 in the practically useful 6-hour warning horizon, surpassing the best conventional framework (CatBoost, 88.3% F1-score) by 3.1 percentage points. The improvements of temporal features, anomaly persistence and the composite risk-integration layer were statistically significant (Wilcoxon signed-ranked test, p < 0.05) when using ablation analysis. Explainability analysis revealed that the most significant features to affect the failure risk prediction are related to rolling features of the motor-current and pressure, which align with the physical behaviour of the compressor. The results provided here demonstrate the potential of combining temporal analytics, persistent anomaly detection, and explainable early-warning estimation to provide a more informative, actionable, and helpful basis for railway maintenance decision-making rather than approaches based on instantaneous sensor measurements.