Predicting the Probability of Cargo Theft for Individual Cases in Railway Transport

: In the heavy industry , the value of cargo transported by rail is very high. Due to high value, poor security and volume of rail transport, the theft cases are often. The main problem of securing rail transport is predicting the location of a high probability of risk. Because of this , t he aim of the presented research was to predict the highest probability of rail cargo theft for areas. It is important to prevent theft cases by better securing the railway lines. To solve that problem the authors ' model was developed. The model uses information about past transport cases for the learning process of Artificial Neural Networks (ANN) and Machine Learning (ML).The ANN predicted the probability for 94.7% of the cases of theft and the Machine Learning identified 100% of the cases. This method can be used to develop a support system for securing the rail infrastructure.


INTRODUCTION
Thefts from wagons expose railways to huge losses. Therefore, appropriate cargo security is of key importance for the entire transport chain [1][2][3]. The carrier is responsible for the cargo from the moment it is accepted for transport until its delivery to the recipient. Any damage must be paid for; it is often compensated for as part of the transport fee [4]. Stolen cargoes cause losses in excess of EUR 1.4 million annually in Poland [5].
The main products stolen in rail transport in Poland are coal and fuels. In the United Kingdom, one of the commodities stolen in transport is metal. The British government is tightening regulations which apply to scrapmetal dealers to prevent metal theft, control urban areas, industry, other offences and road accessibility [6]. In the United States of America, the government is working hard to protect the rail network against all forms of attack [7]. The regulations and the possibility of securing cargo are described inter alia by [8][9][10]. However, there are hardly any papers on how to predict theft in transport or use applicable systems. A method to predict the risk of theft in road transport similar to the one presented here was described in [11]. Rail carriers do not insure cargoes due to the gigantic costs of such insurance and the volumes of cargoes transported in a year.
The cargo transported by the rail could be secured by using closed wagons, and using door wiring, but it is a method just for slowing down the thief, and it never fully secures it. The better solution could use the padlock, but it will be problematic (the key or code should be transported to the final place, and the process of securing and opening the wagon will be complicated. So the technical security of wagons just slows down the thieves, and does not scare them away. Because of this, the better way is to use the drones as a solution to scare, take the pictures as evidence, and follow the theft. So that solution helps to avoid the theft or catch the thief. But with regards to the cost of that solution, it could not be used to monitor all transports. Because of that the method to identify the riskiest cases should be developed.
The aim of this research was to analyse the possibilities of using archive information about transport, transport theft, current transported type of cargo, value and to predict the possibility of theft. In the paper, the ANN and LM method and the correlation of the input data with the results were examined. To achieve the goals the analysis of archive theft cases was done. In the next chapter authors present the theft cases that occurred in Poland, and the importance of the problem.
The ANN and ML methods were considered in the research, because of the complexity of the problem, high uncertainty, variety of transport processes and a number of data. The literature study proves that ANN and ML method can be successfully used for similar cases. The ANN is a very powerful tool with a wide range of application, like: transportation [12][13][14], vehicle routing [15], railway [16], electricity [17], hazardous risk [18] etc. In a different area of research, but also with the complexity of the problem, variety or uncertainty, this method helps to achieve good results.

IMPORTANCE OF THE PROBLEM
According to the information provided by PKP Cargo, the highest number of thefts occurs in Silesia -about 65÷70% of the total figure for Poland. In 2014, PKP Cargo recorded 1637 incidents related to thefts on the tracks. The value of the stolen goods was estimated at EUR 1.5 million. The area of Silesia is of key importance for rail transport in Poland because 60 percent of domestic and 70 percent of export consignments are sent from there [19].
Thieves steal goods from wagons not only during longer stops of trains, e.g. on railway sidings. Often a short stop before a semaphore or even slower train speed is enough. They try to open wagons and snatch the cargo after the train departs. Cargoes are protected by the Railway Protection Guards (SOK).
The following measures are applied to make cargoes more difficult to steal: painting with lime, wiring of wagons, monitoring of wagons with drones.
To protect consignments against theft, PKP Cargo uses two types of drones reaching a speed of 60 km/h. The technique enables sending the image in real time to the headquarters of the Threat Prevention Team. PKP Cargo uses Phantom III and Eagle drones. Phantom III drones are equipped with a 4K camera. Their task is to perform patrol flights of PKP Cargo trains and thus to prevent train stoppages by thieves. There are many ways of stopping trains -tipping coal, damaging wagons or placing blocks on tracks. When a train stops, the drone records everything that is happening around. The task of Eagle drones is to patrol large areas from a high altitude, with two cameras. Thieves have something to fear because one camera provides very good quality images of faces even from several hundred meters. The other camera -a thermal imaging one -offers the possibility of night patrols. The operator is able to recognize a human figure from a distance of up to two kilometres.
With the use of drone-based surveillance, the number of theft cases decreased by 55%. After 10 months of using drones, the number of thefts in 2015 dropped to 1044, and the losses were estimated at EUR 0.75 million [19]. The share of PKP Cargo in the rail freight market in Poland is 44% [20].
According to a rail transport safety report produced by the Supreme Audit Office (NIK) in 2018, the number of offences and incidents decreased by approximately 33% [21].
Attacks on trains to steal cargo are usually scheduledthieves know when and what train will be carrying valuable commodities. Therefore, their actions are usually well planned. Thefts are frequent when trains stop (due to blockades on the tracks and during planned stopovers). In addition, thefts occur also while the train is in motion -in such a case, the cargo is tipped from the wagons onto the track. For example, in 2014, PKP Cargo S.A. recorded theft of over 8000 tonnes of cargo [22] which, in relation to the transported 109.59 million tonnes [23] accounted for 0.75% of all transported goods. Tab. 1 presents the volume of cargoes transported by rail in Poland in 2017 and 2018. The grey rows mark the most frequent thefts. An analysis of quarterly fluctuations for particular product groups in a year indicated that they do not exceed 2.95%, therefore in rail transport, seasonality can be considered marginal.
Other groups presented in Tab. 1, according to the NST classification (percentages according to transport work) included: • food, beverages and tobacco products -0.49% • textiles and clothing, leather and leather products -0.01% • wood, wood and cork products, straw, paper and paper products, printing products and recordings -1.06% • products made from other non-metallic raw materials -1.47% • machinery, electrical and electronic equipment -0.07% • transport equipment -0.55% • furniture, other finished goods -0.16% • secondary raw materials, municipal waste -1.58% • letters, parcels and courier parcels -less than 0.001% • empty packaging -0.75% • cargoes transported, other non-tradeable cargoes -less than 0.001% • mixed goods, excluding food -33% • unidentifiable goods -8.51% • other goods -0.62% Delays in deliveries are important from the viewpoint of efficient operation of the transport chain. Unfortunately, rail transport cannot be said to be highly punctual. According to the data provided by the Railway Transport Office (UTK), in 2018 the punctuality rate for freight deliveries was only 38% in domestic traffic and 28% in international traffic which, with an average delay time of 586 minutes in domestic traffic and 438 minutes in international traffic, is a major rail problem. In addition, due to the low speed of trains and numerous stops, there is an increased risk of cargo theft. Train delays are shown in Tab. 2.

METHODOLOGY
The industry meetings help to identify the problem of locating the riskiest areas to monitor them by the drones. Many company representatives said that it was not possible because of the costs to monitor each transport. And because of that, the main problem is to identify the places where the theft probability is the highest. Based on this, authors developed a method of predicting the theft probability with regards, inter alia, to the type of wagon, type of cargo, area, route, method of securing the wagon, organizing the transport process and more. There is a real demand for this research and theft prediction method.
To be able to predict when and where thefts of cargoes in rail transport may occur, an analytical model using artificial neural networks was proposed. The main factors affecting the occurrence of thefts were also identified. The input was based on statistical data presented in the UTK and PKP Cargo S.A. reports. The model which was developed could generate 10,000 transport cases. The data showed 0.73% theft cases which, in comparison with 0.75% of real cases, is a confirmation of the model's good representation of reality. The input data were compiled in the following way: • P1 -type of cargo. According to the data [3], thefts of coal concerned 65÷70% of all cases; normal distribution was used to generate the data with an interval of 1÷5: -Aggregates -marked 1 -Metals -marked 2 -Coal -marked 3 -Fuels -marked 4 -Other goods -marked 5 ( ) (2), based on data with the largest market share in 2017 [11], [17]: -Wagons of the normal type E -marked as 1, wagons of the special type F -marked as 2, number of used wagons type E and F: 58657 pcs -tank cars type Z -marked as 3, number of wagons operated: 7142 pieces -wagons with sliding roof type T -marked as 4, wagons with sliding walls S -marked as 5, a number of used wagons type T and S, approx.: 3253 pcs (1; 16) P Rz = • P7 -Distance (7), base on the UTK data [25] the average distance of freight transport was 228.5 km in 2017, therefore a normal distribution in the interval was used to generate data. 100÷600 km ( ) • P8 -Number of planned stops (8), the generated data was assumed in the range 1÷10, • P9 -Number of unplanned stops and delays (9), train delays were based on data from table 2 [24], the following delay intervals have been assumed: -up to 4 minutes 59 sec -marked as 1, -about 5 minutes -59 minutes 59 sec -marked as 2, -about 60 minutes -119 minutes 59 sec -marked as 3, -over 120 minutes -marked as 4, -arrival in accordance with the plan -marked as 5.

Data Preparation for the Artificial Neural Network
For every P1÷P9 parameter, the appropriate factor to determine theft probability was estimated. This was done using Eqs.  ; 2 250 0 7 for 6 1 0 6 for 6 2 6 0 5 for 3 6 6 0 05 for rest cases ; 2 6000 0 05 for 9 1 0 1 for 9 2 9 0 2 for 9 3 0 3 for 9 4 0 for rest cases Based on the W1÷W9 factors, the target value was calculated. To calibrate the model for reproducing real statistical data to the maximum, the additional factor C f was estimated. This factor was used to sort a number of risky cases by the highest risk probability. The C f factor was calculated using the above formulas (19,20).
For the model presented, the value 0,01065 for C f was determined.
For the ANN learning process, the following set of teaching data was compiled: • 70% of the collection -teaching data, • 15% of the collection -validation data, • 15% of the set -test data.
During data preparation, the following Matlab functions were used:  The authors decided to develop a new method to predict theft cases in rail transport in the supply chain. One of the good tools which can be used for this is the Artificial Neural Network (ANN) and Machine Learning (ML). In this chapter, the authors show their method to predict disruptions in road transport by using the Matlab ANN Toolbox and the Classification Learner in Matlab. This method consists of two steps: ANN/ML learning, Simulation of theft probability. Fig. 2 shows the method,which was developed to estimate the probability of the occurrence of the theft risk and its potential foundation. The Matlab R2015 software was used to model the Artificial Neural Networks and Machine Learning.
As a first step, it was necessary to create a database containing data such as transport parameters and cases of theft. The transport parameters may include the cargo type, type of wagons, train speed, method of securing the wagons, travel time at night, region, distance, number of planned stops and the time of stops and delays. Based on this information, the probability of transported cargo theft was determined. In the simulation, a feed-forward network was used. The research applied a different ANN structure. For Machine Learning, a different algorithm was used. Tab. 4 presents some of the analysed variants. In the transport, parameters such as cargo type (P1), type of wagons (P2), train speed (P3), method of securing the wagons (P4), travel time at night as percentage of total route time (P5), region (P6), distance (P7), number of planned stops (P8) and the time of stops and delays (P9) were used as the learning input data for ANN and ML. For the learning target, theft cases were applied and calculated using the formula (target). Every case of transport was represented as a vector. The examples of data used in the training are presented in Tab. 3. In Tab. 4 is presented basic statistical information for training dataset. The value in each column was described at the beginning of the Methodology chapter. In real data, theft occurs in just 0.75% of the total number of cases. Because the overall accuracy could be high and the identification of theft cases could be poor, in order to make sure that the method generates a good return, the accuracy for theft cases must be considered.
The analysed variants presented in Tab. 5 differ in their overall accuracy and the accuracy for theft cases. It could be seen that for No. 1 (Tab. 5) the ANN method with 3 hidden layers of 9 neurons each, the overall accuracy is very high (99.3%) but the theft accuracy is 0%. The best results were achieved by using a simple ANN with 9 neurons in two hidden layers and the Machine Learning by Boosted Trees. It gave a 100% accuracy for theft cases.  The selection of the Artificial Neural Network structure was based on the method of subsequent approximations. The artificial neural network which was created consists of one hidden layer of 9 neurons and one output layer.

( )
where: R -number of elements in input vector; S -number of neurons in layer; a -neuron output vector; IW -initial weights; LW -layer weights; p -vector of R input elements; f -sigmoid transfer function; b -bias value; y -output vector of ANN. The Levenberg-Marquardt backpropagation method was used as the learning algorithm. As an activation function, the tangensoidal function was used. The biggest neural network examined in the research gives the worst results. The network structure was selected on the basis of the mean square error (MSE) which was about 0.00051118 (Fig. 4).
The results achieved in the training, the validation and testing of neural network processes are presented in Fig. 5.
For Machine Learning, the Boosted Trees method was used. For its configuration, the RUS Boost ensemble method with 200 number of learners was used. Fig. 6 presents the ROC Curve for the ensemble method. Fig. 6 indicates that the Machine Learning method generates high quality results.

RESULTS
The methodology presented in the previous chapter was used to predict the theft probability for each rail cargo transport. The simulation used 10 000 sample transport cases characterized by the parameters as described (P1÷P9). In that sample, 75 theft cases occurred. The ANN predicted the probability for 94.7% of the cases of theft and the Machine Learning identified 100% of the cases. The method also predicted theft in cases where they do not occur in reality. That area is potentially risky and the railway infrastructure should be monitored there. That will reduce the number of theft cases. In the cases of cargo transport under analysis, it was always coal that was stolen from standard E type wagons. To predict thefts from other cargo types, the input data set must be bigger and they must represent more cases of theft.
With the absence of such information in the reports, such cases cannot be simulated.

Figure 8 Predicted theft cases by the number of stops and distance
The correlation of theft cases to the train speed and travel time at night is presented in Fig. 9. The average transport speed was about 21 km/h, with a minimum of 15 km/h and a maximum of 29 km/h. Most cases occurred at night -about 76% of the route was during the night. The average distance was 276.4 km. 25 thefts were done during scheduled stops, and 80% occurred at eight or more stops. 45 thefts happened during unscheduled stops longer than 120 minutes, 27 cases at stops between 60÷120 minutes, and 3 cases at stops between 5÷60 minutes.

CONCLUSIONS
Cargo thefts are never accidental. Thieves plan to steal cargo from rail wagons taking many factors into consideration beforehand. They steal coal and similar commodities, which are easy to sell in the black market. Also it is easy to drop that cargo down from stopped wagons and take it directly to pick-up vehicles or dump it from moving wagons on the trackway and load it later onto the vehicles. Thieves plan their actions to happen at night and in unsecured areas to reduce the risk of being detected by railway security guards. There is no chance to monitor all wagons and infrastructure during transport so railway security guards do it randomly. The presented method based on ANN predicted the probability for 94.7% of the cases of theft and the Machine Learning identified 100% of the cases. There is no similar method or system, so the presented approach and research are innovative.
The method also predicted theft in cases where they do not occur in reality. That area is potentially risky and the railway infrastructure should be monitored there. That will reduce the number of theft cases. The method presented here can be used to develop a system for identifying highrisk places, the transport and the time of potential thefts. This type of system is needed by rail cargo forwarders and railway carriers, the infrastructure managers and transport planners. The implementation of such a system will help schedule infrastructure patrols.
In future research, the presented method will be tested in a railway carrier company to improve the prediction method. And after confirmation of the high quality of the developed model, work will be started to raise funds for the development of the system based on the presented method.

List of Abbreviations
Z(x; n) -rounds the number x to n decimal digits Min(a1; a 2 ; ... a n ) -selects the smallest number from the string of numbers a 1 ; a 2 ; ... a n Max(a 1 ; a 2 ; ... a n ) -selects the largest number from the sequence of numbers a 1 ; a 2 ; ... a n R() -argument less function, gives a real random number with a uniform (rectangular) distribution from the interval <0; 1). The random number generator of the spreadsheet is used to receive it by MS Excel in regards to the algorithm Mersenne Twister (MT19937)) Rz(x 1 ; x 2 ) -function giving a random integer from the range <x 1 ; x 2 > F −1 (p; µ; σ) -inverse distribution of normal distribution, where: p -probability, µ -expected value, σ -standard deviation