  In this work we propose a novel self-attention mechanism model to address
electricity theft detection on an imbalanced realistic dataset that presents a
daily electricity consumption provided by State Grid Corporation of China. Our
key contribution is the introduction of a multi-head self-attention mechanism
concatenated with dilated convolutions and unified by a convolution of kernel
size $1$. Moreover, we introduce a binary input channel (Binary Mask) to
identify the position of the missing values, allowing the network to learn how
to deal with these values. Our model achieves an AUC of $0.926$ which is an
improvement in more than $17\%$ with respect to previous baseline work. The
code is available on GitHub at
https://github.com/neuralmind-ai/electricity-theft-detection-with-self-attention.
