We present ConflLlama, demonstrating how efficient fine-tuning of large language models can advance automated classification tasks in political science research. While classification of political events has traditionally relied on manual coding or rigid rule-based systems, modern language models offer the potential for more nuanced, context-aware analysis. However, deploying these models requires overcoming significant technical and resource barriers. We demonstrate how to adapt open-source language models to specialized political science tasks, using conflict event classification as our proof of concept. Through quantization and efficient fine-tuning techniques, we show state-of-the-art performance while minimizing computational requirements. Our approach achieves a macro-averaged AUC of 0.791 and a weighted F1-score of 0.753, representing a 37.6% improvement over the base model, with accuracy gains of up to 1463% in challenging classifications. We offer a roadmap for political scientists to adapt these methods to their own research domains, democratizing access to advanced NLP capabilities across the discipline. This work bridges the gap between cutting-edge AI developments and practical political science research needs, enabling broader adoption of these powerful analytical tools.
COVID-19 has reinvigorated the policy debate for a universal healthcare system, attracting much attention on social media. In this paper, we study the online discourse of Medicare-For-All before and after COVID-19 by examining the Twitter feeds of two opposing health advocacy groups—Physicians for a National Health Program (PNHP) and Partnership for America’s Healthcare Future (P4AHCF). Our empirical results show a sharp contrast between the two interest groups’ communication strategies. PNHP showed a consistent narrative before and after the onset of COVID-19 on 11 March 2020, marked by personalized stories, references to diverse demographic groups, and a growing number of Medicare-For-All tweets. In contrast, P4AHCF showed more scientific terminology and data-centric tweets and had an inconsistent narrative with a sudden surge in positive sentiments and a complete silence on Medicare-For-All right after 11 March. The difference in communication strategies is consequential. PNHP has higher engagement with Twitter users and is more adaptive to a pandemic narrative than P4AHCF. We discuss how distinctive social media strategies can be explained by the groups’ different audiences and resources. The findings add to our understanding of healthcare advocacy campaigns on social media and the implication of a pandemic for health policy reform.
An interface to 'ConfliBERT', a pretrained language model for analyzing text about conflict and political violence (Hu et al. (2022) ). Provides functions for named entity recognition, binary and multilabel classification, and question answering, plus tools to fine-tune custom classifiers, compare several base model architectures, and run an interactive active-learning loop for efficiently labeling new data. Models are downloaded from 'Hugging Face' and run through the 'transformers' library for 'Python' via the 'reticulate' package.
How does regime type shape a state's intervention in its information environment? We argue that democracies and non-democracies differ not only in the quantity but, more importantly, in the institutional channel of content removal. To that end, we develop a political agency model and show that a democratic government would refrain from direct executive takedown and instead delegate to the court. This is because electoral accountability disciplines politicians' behavior by providing incentives for reputation-building. We test our hypotheses using data from Google transparency reports. Exploiting quasi-experimental variation in the timing of constitutionally scheduled elections, we provide supporting evidence that compared to non-democracies, takedown requests from democratic governments decline significantly as elections approach. This reputational discipline effect is not observed in authoritarian regimes or other types of requests.
Conflict scholars have used rule-based approaches to extract information about political violence from news reports and texts. Recent Natural Language Processing developments move beyond rigid rule-based approaches. We review our recent ConfliBERT language model (Hu et al. 2022) to process political and violence related texts. The model can be used to extract actor and action classifications from texts about political conflict. When fine-tuned, results show that ConfliBERT has superior performance in accuracy, precision and recall over other large language models (LLM) like Google's Gemma 2 (9B), Meta's Llama 3.1 (7B), and Alibaba's Qwen 2.5 (14B) within its relevant domains. It is also hundreds of times faster than these more generalist LLMs. These results are illustrated using texts from the BBC, re3d, and the Global Terrorism Dataset (GTD).