# An Evolutionary Computation Approach for Twitter Bot Detection
###### Abstract  
Bot accounts are automated software programs that act as legitimate human profiles on social networks. Identifying these kinds of accounts is a challenging problem due to the high variety and heterogeneity that bot accounts exhibit. In this work, we use genetic algorithms and genetic programming to discover _interpretable_ classification models for Twitter bot detection with competitive qualitative performance, high scalability, and good generalization capabilities. Specifically, we use a genetic programming method with a set of primitives that involves simple mathematical operators. This enables us to discover a human-readable detection algorithm that exhibits a detection accuracy close to the top state-of-the-art methods on the _TwiBot-20_ dataset while providing predictions that can be interpreted, and whose uncertainty can be easily measured. To the best of our knowledge, this work is the first attempt at adopting evolutionary computation techniques for detecting bot profiles on social media platforms. machine learning; explainable AI; cybersecurity; supervised learning; binary classification; evolutionary computation; genetic algorithms; genetic programming; bot detection; Twitter +
Footnote †: journal: Medical  
that can generalize among different types of bot accounts while effectively detecting most of them. In this paper, we focus our research efforts on detecting bot accounts that are active on Twitter. In particular, we propose a novel approach for Twitter bot detection that leverages evolutionary computation strategies such as genetic algorithms and genetic programming. We show that genetic programming can be employed to learn a model in the form of a formula that can achieve competitive detection accuracy while being arguably more interpretable than other machine learning (ML) models available in the literature, which are based on complex, often black-box, architectures. Moreover, we leverage genetic algorithms to learn the weights of a neural network with no hidden layers and a single output perceptron in an evolutionary fashion. We evaluate our model using the _TwiBot-20_ dataset that was created as a reference benchmark dataset for this specific task by [PERSON] et al. [6], and we show that our classification models can achieve qualitative performance close to the top state-of-the-art methods. Furthermore, our classification models can provide predictions that can be interpreted and whose uncertainty can be easily measured by inspecting the models themselves and checking the components that contribute the most to detection. In this way, we provide a valid alternative to black-box models, which can achieve slightly higher detection accuracy at the cost of learning extremely complex models whose predictions cannot be justified. The main contributions we make through this work can be summarized as follows:  
1. describing and analyzing the main features that can be associated with user accounts on Twitter to understand the types of property that may help to discriminate between human profiles and bot profiles;
2. proposing a novel approach based on genetic algorithms and genetic programming to detect bot profiles on Twitter, and presenting two classification models that exhibit good qualitative performance and generalization capabilities, while ensuring interpretability of predictions;
3. providing a way to compute how much our models are confident with a given prediction. Thus, in this work we try to give an answer to the following research questions:  
* **RQ1**: is it possible to obtain interpretable models with good generalization capabilities for Twitter bot detection? * **RQ2**: _can we trust predictions of ML models based on Twitter bot detection?_  
The paper is structured as follows. Section 2 describes what are some related works and their limitations. Section 3 presents the choice of the dataset, a brief analysis of the data, and the preprocessing steps taken.