Manuscript Offprint
arXiv:2610.01721Anomaly Detection and Localization for the Pantograph-Catenary System
Francesco Vitale
DIETI
University of Naples Federico II
Naples, Italy
Hangli Ge
Interfaculty Initiative in
Information Studies
The University of Tokyo
Tokyo, Japan
Francesco Flammini
DIMAI
University of Florence
Florence, Italy
and IDSIA USI-SUPSI
University of Applied Sciences and Arts
of Southern Switzerland
Lugano, Switzerland
Abstract—Monitoring the Pantograph-Catenary System (PCS) provides insight into the health conditions of the pantograph and the railway infrastructure. Recent industrial solutions trace the pantograph's contact wire height and stagger (PCS height/stagger) using video monitoring through convolutional neural networks. However, these solutions do not account for the train route's geographic location. Therefore, in this paper we propose a novel framework for 1) localization of the PCS height/stagger by alignment with the nominal GPS coordinates of the reference route, and 2) collective anomaly detection to evaluate the health conditions of the PCS. We apply and assess the localization and detection performance of the methodology to a case-study based on a real-world industrial dataset provided by a railway transportation company, which includes the PCS height/stagger of several train journeys across Italian railway routes.
Index Terms—Pantograph-catenary system, artificial vision, collective anomaly detection, convolutional neural networks, deep learning, machine learning
I. INTRODUCTION
RAILWAY infrastructures are critical systems that demand high safety levels, which are achieved by intense verification and validation activities from design time to operation and maintenance [1]. These systems require condition monitoring to assess the health of onboard equipment and infrastructure over time [2]. To this aim, several monitoring solutions have been proposed for different systems and devices, including air conditioning and traction systems [3], [4], passenger demand prediction [5]. Modern solutions are increasingly based on machine learning applied to multimedia streams [6], mainly using convolutional neural networks [7] or graph neural networks [8]. In such a context, the work presented in this paper

Fig. 1. The Pantograph-Catenary System.
focuses on video monitoring the Pantograph-Catenary System (PCS), which is the system that connects the train's onboard equipment with the railways' overhead catenary for electricity supply through the pantograph's contact wire [9]. Fig. 1 shows the PCS and its main components, namely the catenary, contact wire and pantograph. The health conditions of the PCS can be assessed by checking the geometric properties of the contact wire, such as the height between the track and catenary and the stagger, i.e., the lateral displacement of the contact wire relative to the centerline of the track [9]. Anomalous pantograph's contact wire stagger and height (PCS height/stagger) may cause contact wire breakage, pantograph destruction, material damage, fire, and electric shock [10].
Because camera sensors are versatile and widely used for condition monitoring [2], extensive scientific literature addresses anomaly detection in railway infrastructure using onboard video monitoring, including the PCS. Zhang et al. [11] proposed an improved YOLO Convolutional Neural Network (CNN) to detect catenary defects, specifically discriminating between loosened and broken hanging strings. Focusing on the pantograph, Wei et al. [12] evaluated several CNNs for classifying wear states (e.g., over-abrasion, partial, and groove-shaped abrasion). Chen et al. [13] developed a dedicated CNN to monitor PCS height and stagger, verifying whether these metrics fall within safe operational zones.
Despite advances in video-based PCS monitoring, existing
This work was supported by the Swiss SERI under contracts no. 23.00321 (Academics4Rail) and 24.00528 (PhDs EU-Rail); those projects have been selected within the EU's Horizon Europe program under GAs no. 101121842 and 101175856. Views and opinions are those of the authors only and do not necessarily reflect those of the funding agencies, which cannot be held responsible for them.

Fig. 2. The proposed framework for anomaly detection and localization in the PCS height/stagger of train runs.
CNN-based solutions track height and stagger without accounting for the train’s geographical localization. To address this shortcoming, we set forth a framework for collective anomaly detection and localization of the PCS height/stagger with the nominal GPS coordinates of the reference route. We apply the methodology to an industrial case study that collects the PCS height/stagger of several train journeys across railway routes managed by an Italian company.
For standardization of the train runs, the raw telemetric data is spatially aligned onto a discretized master grid. First, a reference trajectory is extracted from the route's geometry to establish the baseline reference route GPS coordinates. This trajectory is then resampled using a fixed GPS coordinates interspacing of 22.0 meters — a distance specifically derived from the onboard GPS sampling rate of 1 Hz while the train travels at an average speed of 80 km/h. The raw input data undergoes preprocessing to impute missing values, filter out stationary measurement windows, and aggregate redundant geographic readings. Finally, spatial alignment is executed by constructing a Ball Tree data structure over the raw trajectory coordinates; utilizing the Haversine distance

Fig. 3. The PCS height/stagger monitored from a train run and standardized against a reference route.
metric, the algorithm snaps the raw GPS readings to their nearest discrete corresponding points on the nominal grid, guaranteeing uniform spatial alignment across all retained journeys. Fig. 3 shows the PCS height/stagger of a train run standardized against a reference route managed by an Italian railway company. Notably, the standardization process could not find any PCS height/stagger values aligned with the route start.
Following spatial standardization, the standardized train runs covering the continuous route undergo segmentation. Governed by a specific slicing parameter L (which we set to 4), the overall trajectory is partitioned into discrete geographical blocks, organizing the telemetry into distinct grouped subsets ranging from segment 1 slices down to segment n slices (where n is equal to 4). To prepare for robust anomaly detector training, these segment slices are further divided into disjoint training, validation, and test sets. Because empirical defect data is inherently scarce, synthetic anomalies are injected exclusively into the test slices over fixed structural windows of N = 30 sequential points. These faults mathematically simulate two distinct infrastructure failures: a cantilever shift, which introduces a constant lateral offset to the stagger profile, and an auto-tensioning device failure, which simulates wire sag by subtracting a smooth sinusoidal penalty from the vertical height profile. Specifically, let N denote the defined defect length (where N = 30), I represent the injected intensity magnitude, and start be the randomly initialized starting index of the anomaly. The localized mathematical transformations over the defect window are formally defined as follows. For the cantilever shift, the original stagger sequence
is perturbed by a uniform scalar addition:
In our case, we set this scalar addition to . For the auto-tensioning device failure, the vertical height sequence is modified by subtracting a half-period sine wave to generate a smooth, localized sag curvature:
In this formulation, the term linearly normalizes the discrete steps of the defect window to the interval . Multiplying by maps the sequence to radians. This bounds the penalty within a single half-sine period, ensuring that the simulated sag begins and ends precisely at zero amplitude for a seamless geometric transition into and out of the healthy wire profile.
To perform anomaly detection on the segmented telemetry, the framework employs an LSTM-Autoencoder (LSTM-AE) architecture, uniquely designed to capture the spatial-sequential dependencies of the railway infrastructure. Because normal catenary geometry varies greatly depending on the geographical location, a distinct, localized LSTM-AE model is trained exclusively from scratch for every single defined route segment (zone) across each dataset permutation. The architecture is explicitly configured as a bidirectional LSTM network, allowing it to process the sequence of spatial coordinates both forwards and backwards, capturing the physical context on both sides of a given measurement point. Specifically, the model parameters are set as follows:
-
Input Features: 2 (Height and Stagger).
-
Sequence Length: 10 sequential measurement points.
-
Hidden Dimension: 8, expanding to a bidirectional bottleneck of .
-
Layers: 3 stacked LSTM layers in both the encoder and decoder, utilizing a dropout rate of 0.2 to prevent overfitting on the healthy baseline data.
During the anomaly detector training phase, the model is fed exclusively healthy, non-anomalous data from the train set over 500 epochs using the Adam optimizer (learning rate ) and a batch size of 32, minimizing the MSE loss. Once trained, the model reconstructs input sequences. Because it has only learned the local, healthy baseline geometry of that specific zone, it will struggle to reconstruct the injected defects present in the test set, yielding a high reconstruction error. The threshold for classifying an anomaly is dynamically established using the 99th percentile of the MSE from the separate Validation set. Any reconstructed sequence in the Test set with an MSE exceeding this localized threshold is flagged as an anomaly. The framework then exhaustively tracks standard classification metrics (AUC, F1-Score, Precision, Recall, and Confusion Matrix values) for every individual segment to aggregate the overall collective detection performance.
The localized LSTM-AE architecture demonstrates robust collective anomaly detection capabilities, though performance variations exist across different geographical segments. As detailed in Table I, the model achieves good discrimination in Zone 1 and Zone 3, recording Area Under the Curve (AUC) scores of 0.968 and 0.967, respectively. Across all evaluated zones, the framework maintains high precision (> 0.820), highlighting its capacity to effectively minimize false positive alarms ( ). However, sensitivity fluctuates depending on the segment's underlying topological baseline; Zone 2 experiences a notable reduction in recall (0.644), resulting in a higher incidence of false negatives (FN = 53). Overall, the results validate that training discrete, location-specific autoencoders successfully isolates structural catenary defects while accommodating the route's natural geometric variance.
TABLE I RESULTS OF THE ANOMALY DETECTOR WITH L = 4.
| Zone | AUC | F1 | Precision | Recall | TP | TN | FP | FN |
|---|---|---|---|---|---|---|---|---|
| Zone 0 | 0.898 | 0.791 | 0.953 | 0.675 | 102 | 658 | 5 | 49 |
| Zone 1 | 0.968 | 0.921 | 0.946 | 0.897 | 140 | 650 | 8 | 16 |
| Zone 2 | 0.868 | 0.722 | 0.821 | 0.644 | 96 | 644 | 21 | 53 |
| Zone 3 | 0.967 | 0.871 | 0.954 | 0.801 | 125 | 656 | 6 | 31 |
III. CONCLUSIONS
In this paper, we proposed a novel framework for anomaly detection and localization within the PCS. While existing data-driven monitoring solutions effectively evaluate contact wire geometry, they fundamentally lack spatial awareness, often evaluating telemetry in a geographic vacuum. To address this critical blind spot, our approach successfully integrates spatial context by standardizing raw GPS and telemetric data onto a discretised geographical grid. By partitioning the continuous railway route into discrete segments, we established localized geometric baselines that accurately reflect the natural, healthy variations of the infrastructure at specific geographic coordinates.
Our experimental validation, leveraging real-world data from an Italian railway track, demonstrates the efficacy of localized LSTM-AE in isolating structural defects. By evaluating the framework against synthetically injected anomalies, the localized models exhibited robust collective anomaly detection capabilities, achieving high AUC and precision scores across various route segments. This suggests that training discrete, location-specific models minimizes false positive alarms caused by natural topological variance.
Ultimately, this spatially aware framework provides a highly practical tool for railway predictive maintenance, enabling operators to not only detect PCS degradation but to pinpoint its exact physical location. The proposed approach aligns with recent efforts to enhance the resilience and operational safety of railway systems through intelligent data-driven methodologies , . Future research will focus on expanding the framework to process telemetry in real-time via edge computing, evaluating its robustness against a wider empirical dataset of naturally occurring faults, and exploring advanced spatial-temporal architectures, such as Graph Neural Networks, to further optimize segment boundary transitions.
REFERENCES
[1] A. Cimatti, R. Corvino, A. Lazzaro, I. Narasamdya, T. Rizzo, M. Roveri, A. Sanseviero, and A. Tchaltsev, “Formal verification and validation of ertms industrial railway train spacing system,” in Computer Aided Verification. Berlin, Heidelberg: Springer Berlin Heidelberg, 2012, pp. 378–393.
[2] S. Chen, G. T. Frøseth, S. Derosa, A. Lau, and A. Rönnnquist, “Railway catenary condition monitoring: A systematic mapping of recent research,” Sensors, vol. 24, no. 3, 2024.
[3] A. Gálvez, A. Diez-Olivan, D. Seneviratne, and D. Galar, “Fault detection and rul estimation for railway hvac systems using a hybrid model-based approach,” Sustainability, vol. 13, no. 12, 2021.
[4] Y. Wang, X. Du, Z. Lu, Q. Duan, and J. Wu, “Improved lstm-based time-series anomaly detection in rail transit operation environments,” IEEE Transactions on Industrial Informatics, vol. 18, pp. 9027–9036, 2022.
[5] H. Ge, T. Michikata, and N. Koshizuka, “K-neighboring on multi-weighted graphs for passenger count prediction on railway networks,” Journal of Information Processing, vol. 32, pp. 575–585, 2024.
[6] L. D. Donato, F. Flammini, S. Marrone, C. Mazzariello, R. Nardone, C. Sansone, and V. Vittorini, “A survey on audio-video based defect detection through deep learning in railway maintenance,” IEEE Access, vol. 10, pp. 65376–65400, 2022.
[7] M. J. Pappaterra, M. L. Pappaterra, and F. Flammini, “A study on the application of convolutional neural networks for the maintenance of railway tracks,” Discover Artificial Intelligence, vol. 4, no. 1, p. 30, 2024.
[8] G. Hangli, L. Lin, R. Jiang, T. Michikata, and N. Koshizuka, “Multi-weighted graphs learning for passenger count prediction on railway network,” in 2022 IEEE 46th Annual Computers, Software, and Applications Conference (COMPSAC). IEEE, 2022, pp. 374–382.
[9] B. Blanco, I. Errandonea, S. Beltrán, S. Arrizabalaga, and U. Alvarado, "Panhead accelerations-based methodology for monitoring the stagger in overhead contact line systems," Mechanism and Machine Theory, vol. 171, p. 104742, 2022.
[10] S. Rusu-Anghel and A. Ene, “Influence of typical faults over the dynamic behavior of pantograph-catenary contact force in electric rail transport,” in IOP Conference Series: Materials Science and Engineering, vol. 200, no. 1. IOP Publishing, 2017, p. 012056.
[11] S. Zhang, Y. Chang, S. Wang, Y. Li, and T. Gu, “An improved lightweight yolov5 algorithm for detecting railway catenary hanging string,” IEEE Access, vol. 11, pp. 114061–114070, 2023.
[12] X. Wei, S. Jiang, Y. Li, C. Li, L. Jia, and Y. Li, “Defect detection of pantograph slide based on deep learning and image processing technology,” IEEE Transactions on Intelligent Transportation Systems, vol. 21, pp. 947–958, 2020.
[13] R. Chen, Y. Lin, and T. Jin, “High-speed railway pantograph-catenary anomaly detection method based on depth vision neural network,” IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1–10, 2022.
[14] H. Ge, X. Yang, Z. Fan, F. Flammini, and N. Koshizuka, “Simulation of emergency evacuation in large scale metropolitan railway systems for urban resilience,” in 2025 IEEE International Conference on Systems, Man, and Cybernetics (SMC). IEEE, 2025, pp. 1334–1339.
[15] H. Ge, X. Yang, J. Chen, F. Flammini, and N. Koshizuka, “A traffic evacuation model for enhancing resilience during railway disruption,” in 2025 20th European Dependable Computing Conference Companion Proceedings (EDCC-C). IEEE, 2025, pp. 84–89.