# LSTM and Bat-Based RUSBoost Approach for Electricity Theft Detection
## 1 Introduction  
Electricity theft is defined as the consumed amount of energy that is not billed by the consumers. This incurs major revenue losses for electric utility companies [1]. All over the world, electric utility companies lose $96 billion every year due to electricity theft [2]. This phenomenon affects all nations, whether rich or poor. For instance, Pakistan suffers 0.89 billion rupees of loss yearly due to non-technical losses (NTLs) [3] and in India, the electricity loss exceeds 4.8 billion rupees annually [4]. Electricity theft is also a threat to countries with strong economies; i.e., in the U.S., the loss due toelectricity theft is approximately $6 billion, and in the UK, it is up to \(\epsilon\)175 million per annum [5]. In addition, electricity theft causes a voltage imbalance and can affect power system operations by overloading the transformers [6]. Moreover, the rising electricity prices increase the burden on honest customers when the utility asks them also to pay for theft of energy. It also increases unemployment, the inflation rate and decreases revenue and energy efficiency, which has adverse effects on a country's economical state. NTL occurs as a result of meter modifications, meter tampering, direct hooking and unregistered connections [7]. The categorization of the NTL is shown in Figure 1. Meter tampering causes the meter either to stop functioning or to stop registering the amount of electricity consumed. In contrast, meter modification is done in the internal settings of a meter to alter its readings. In the direct hooking approach, the consumer taps into a power line from a point ahead of the energy meter, whereas in an unregistered connection, the utility has no record of consumers. Traditionally, electricity theft has been detected manually by on-field inspections. The inspection teams take meter readings and identify faulty meters for the efficient recovery of the NTL. However, this inspection is time-consuming and requires a separate cost for hiring the inspection teams. In addition, the state-based methods also required hardware installation in the distribution network to detect electricity thefts. With the transitioning of traditional grids into smart grids, smart meters have evolved and their data-driven techniques have contributed to effective energy management [8; 9; 10]. The data-driven techniques include machine learning and deep learning algorithms. These algorithms use the procedure of detecting abnormal electricity consumption patterns based on the study of the customers. The machine learning techniques used in the literature are discussed in Section 2. However, most of these approaches have several shortcomings, which are given below. * Most machine learning techniques require manual feature extraction; as a result, their performance is limited to low-dimensional data and they are not satisfactory for large time series data. * The problem of class imbalance is a serious concern in electricity theft detection (ETD). In the literature, very little attention has been paid to solving the class imbalance problem. * The existing machine learning algorithms--i.e., support vector machine (SVM) and logistic regression (LR)--are inefficient in ETD and have a high false positive rate (FPR). * The state-based solution requires specific hardware devices and has a high cost of installation. * In most cases, the available dataset has an enormous number of missing values and outliers, which may lead the to the overfitting of the classifier. * The hyper-parameters of the algorithms are not tuned for optimal classification. In this paper, we propose a model to address the problems of ETD; i.e., the class imbalanced problem, overfitting, the handling of bigger time series data and the parameter optimization of classifiers. The mapping of the problems addressed and the proposed solution is given in Table 1. The proposed model consists of long short term memory (LSTM) and bat-based random under sampling boosting (RUSBoost) techniques. This work is an extended version of our work in [11].