Skip to yearly menu bar Skip to main content

Affinity Workshop: Global South in AI

Transformer Based Kenyan Election Misinformation and Hatespeech monitoring

Ali Hussein · Klinsman Nang'ore Agam · Constance Muthuri


Abstract revised as required, with additional extended abstract pdf added.Kenyan presidential elections are a tense and problematic time. There are documented cases of voter-directed social media manipulation campaigns and incidents of post-election violence during election season. We build and test a dashboard to monitor the 2022 Kenyan election-related content on Twitter utilizing a BERT-derived pre-trained model for hate speech detection and an XLM-T pre-trained transformer for sentiment analysis, a balanced random forest is trained for detecting Twitter bots, and a pre-trained "bag of tricks" model for language identification. A “bag of tricks” is an optimized linear classifier that is comparable in accuracy to deep learning models while maintaining orders of magnitude more efficiently. These models can then be used to generate hourly and daily reports on hate speech, bot activity, and candidate sentiment on Twitter. Additionally, focus on implementing and deploying the dashboard efficiently with low resources is a primary focus. While deployment was not possible due to election time constraints and deployment costs. The open-source code of the dashboard is provided to allow for easy and cost-effective replication/adaption to closely related domains, with modifications implemented to allow for cost-effective deployment. It can be used to act as an early warning system for stakeholders and policymakers to take prompt action in the case of misinformation and hate speech propagation.

Chat is not available.