Bot Detection and Credibility Score Analysis Using Random Forest and Network Analysis
摘要
Social media platforms have become breeding grounds for automated accounts, or bots, that manipulate content, amplify misinformation, and distort public discourse. The challenge lies in accurately detecting these bots, especially when they mimic human behavior to avoid detection. Machine learning techniques, such as Random Forest models, are effective tools for classifying accounts based on activity patterns and credibility scores. As bots evolve and become more sophisticated, traditional detection methods struggle to keep pace. Many existing solutions rely heavily on predefined rules, which fail to adapt to the complex and changing strategies bots use. Therefore, an adaptive, high-performance model that can detect bots and identify coordinated networks is crucial for maintaining the credibility of online platforms. In this study, a Random Forest classifier was developed to detect bot activity based on features such as account age, post count, activity level, and a credibility score (bot_score_english). The model was evaluated using a dataset of over 11,000 social media accounts. We employed feature scaling and cross-validation to ensure robustness. Additionally, network analysis was performed using graph theory to uncover coordinated bot networks. SHAP (SHapley Additive exPlanations) was used to interpret feature importance, and the model’s performance was evaluated through confusion matrices, ROC curves, and learning curves. The Random Forest model demonstrated exceptional performance, achieving a precision, recall, and F1-score of 1.00 for both bots and non-bots. The feature importance analysis revealed that the bot_score_english was the most influential feature in detecting bot-like behavior. The network analysis identified over 20,000 coordinated networks, although the largest consisted of a single node. The model’s accuracy was further validated by a learning curve, indicating that it performed well with relatively small amounts of training data. SHAP analysis provided detailed interpretability, ensuring transparency in the model’s decision-making process. The study’s results suggest that using a machine learning approach based on credibility scores and activity patterns can significantly enhance the detection of bots on social media. The implications for social media platforms are substantial, as this method could be integrated into real-time content moderation systems to combat misinformation and improve the quality of online discourse. Future research should focus on expanding the model’s feature set to detect more sophisticated bots and applying the detection system to real-time data streams.