# An Evolutionary Computation Approach for Twitter Bot Detection
## 4 Proposed Approach
### Model Description  
At the end of the evolutionary process, we discover the formula \(\mathcal{M}\) that represents the best classification model learned using GP. Given a vector \(\mathbf{x}\in\mathbb{R}^{17}\) that contains the features of a Twitter user profile, classification is performed by applying \(\mathcal{M}\) to \(\mathbf{x}\). Once the resulting value of this formula is calculated, the classification is performed by inspecting the sign. The higher the absolute value of the result, the more confident the prediction is.  
Tables 3 and 4 show that \(\mathcal{M}\) is made up of different components, where each component is a function of a subset of features of \(\mathbf{x}\). Our formula \(\mathcal{M}\) is simply a weighted sum of the components described in this table, and the classification is performed by inspecting the sign of the result of this weighted sum. In particular, each of the components associated with the human category is weighted 1, and each of the components associated with the  
bot category is weighted \(-1\). With this formulation, we are able to write Equation (14) as follows:  
\[h_{\text{GP}}^{\mathcal{M}}(\mathbf{x})=\texttt{int}(C_{\text{human}}(\mathbf{x} )\leq C_{\text{bot}}(\mathbf{x})) \tag{17}\]  
where  
\[C_{\text{human}}(\mathbf{x})=C_{1}(\mathbf{x})+C_{2}(\mathbf{x})+C_{3}(\mathbf{ x}) \tag{18}\]  
and  
\[C_{\text{bot}}(\mathbf{x})=C_{4}(\mathbf{x})+C_{5}(\mathbf{x})+C_{6}(\mathbf{ x}) \tag{19}\]  
In this way, we can clearly describe the left component of Equation (17) as the score for human profiles, while the right component is the score for bot profiles, and thus the predicted label is the one that corresponds to the highest of the scores. Similar to what we have done in Section 4.3, we define \(\mathbf{z}\in\mathbb{R}^{2}\) as the vector that contains the score for humans and the score for bots. We can leverage Equation (12) to check how much the classification model is confident when predicting the category of a given user profile \(u\). If we compare Table 3 with Table 2, we will observe that, except for the length of the screen name, all the features selected by GP are consistent with the weights learned by GA. In particular, the features reputation, listed growth rate, and followers growth rate, have the highest weight for human profiles in the GA model and are also the main features represented in \(C_{\text{human}}\). Analogously, the features frequency of retweets, frequency of URLs, and the raw word count standard deviation have the highest weight for bot profiles in the GA model and are also the main features represented in \(C_{\text{bot}}\). Moreover, a high mentioned users raw count standard deviation favors human profiles both in GP and in the GA model, since bot accounts probably tend to always mention a target user profile (e.g., a politician for bots that promote political campaigns). On the other hand, an high frequency of hashtags favors bot profiles both in GP and in the GA model, since many bot accounts intensively use hashtags to improve the visibility of published content on Twitter. In summary, the different components of the formula allow us to clearly understand the characteristics that contribute the most when making a prediction, and the confidence score enables us to check how confident the model is in the prediction of a given Twitter account. Moreover, this model is highly interpretable since it consists of simple arithmetical operations applied to a subset of the input features that allow checking how the scores in \(\mathbf{z}\) are calculated.