Mapping the Emotional Landscape of Voter Behavior: A Transformer-Based Sentiment Analysis of Reddit Discourse in the 2024 U.S. Presidential Election
Abstract
This study examines voter behavior in the context of the 2024 United States Presidential Election by analyzing Reddit user comments. Owing to the platform’s anonymity and community diversity, Reddit provides signals that reflect a wide range of socio-demographic perspectives on the electoral process. A dataset of 7,788 comments was collected through the Reddit API and the PRAW library, then preprocessed (cleaning, normalization, stopword removal, and labeling) for sentiment analysis. In the experimental stage, five transformer-based models (BERT, RoBERTa, DeBERTa, ALBERT, and GPT-2) were comparatively evaluated. Results show that DeBERTa achieved the highest accuracy and F1 scores, while GPT-2 performed relatively poorly in classification tasks. Statistical analyses revealed that 51.6% of Trump-related comments were positive, whereas comments on Harris displayed a more fragmented distribution. Neutral sentiments dominated the “Unknown” category. These findings indicate that Reddit sentiment signals reflect not only descriptive observations but also statistically robust evidence for electoral forecasting. Beyond methodological contributions, the study integrates emotional indicators into the rational-actor assumptions of public choice theory, demonstrating that voter behavior is shaped by both rational and emotional factors. In doing so, it provides an interdisciplinary framework that validates the applicability of artificial intelligence methods to political behavior analysis.
Keywords
Ethical Statement
References
- J. M. Buchanan and G. Tullock, The Calculus of Consent: Logical Foundations of Constitutional Democracy. Ann Arbor, MI, USA: Univ. Michigan Press, 1962.
- A. Downs, An Economic Theory of Democracy. New York, NY, USA: Harper & Row, 1957.
- A. Khan, H. Zhang, N. Boudjellal, A. Ahmad, and M. Khan, “Improving sentiment analysis in election-based conversations on Twitter with ElecBERT language model,” Comput., Mater. Continua, vol. 76, no. 3, pp. 3345–3361, 2023, doi: 10.32604/cmc.2023.041520. [Online]. Available: https://doi.org/10.32604/cmc.2023.041520
- I. Sabuncu and E. Şen, “Derin makine öğrenmesi metoduyla sosyal medya verilerine dayalı seçim sonucu tahmini,” Bus. Manage. Stud.: Int. J., vol. 9, no. 4, pp. 1582–1598, 2021, doi: 10.15295/bmij.v9i4.1957. [Online]. Available: https://doi.org/10.15295/bmij.v9i4.1957
- R. H. Ali et al., “A large-scale sentiment analysis of tweets pertaining to the 2020 US presidential election,” J. Big Data, vol. 9, no. 1, Art. no. 79, 2022, doi: 10.1186/s40537-022-00633-z. [Online]. Available: https://doi.org/10.1186/s40537-022-00633-z
- H. N. Chaudhry et al., “Sentiment analysis of before and after elections: Twitter data of U.S. election 2020,” Electronics, vol. 10, no. 17, Art. no. 2082, 2021, doi: 10.3390/electronics10172082. [Online]. Available: https://doi.org/10.3390/electronics10172082
- L. Belcastro et al., “Analyzing voter behavior on social media during the 2020 US presidential election campaign,” Soc. Netw. Anal. Min., vol. 12, Art. no. 83, 2022, doi: 10.1007/s13278-022-00913-9. [Online]. Available: https://doi.org/10.1007/s13278-022-00913-9
- A. Singh, A. Kumar, N. Dua, V. K. Mishra, D. Singh, and A. Agrawal, “Predicting election results using social media activitya case study: USA presidential election 2020,” in Proc. 7th Int. Conf. Adv. Comput. Commun. Syst. (ICACCS), 2021, pp. 314–319, doi: 10.1109/ICACCS51430.2021.9441835. [Online]. Available: https://doi.org/10.1109/ICACCS51430.2021.9441835
Details
Primary Language
English
Subjects
Computing Applications in Social Sciences and Education, Software Testing, Verification and Validation
Journal Section
Research Article
Publication Date
September 30, 2026
Submission Date
October 13, 2025
Acceptance Date
April 21, 2026
Published in Issue
Year 2026 Volume: 9 Number: 4