From Dogwhistles to Bullhorns: Unveiling Coded Rhetoric with Language Models (2023)

Abstract: Dogwhistles are coded expressions that simultaneously convey one meaning to a broad audience and a second, often hateful or provocative, meaning to a narrow in-group; they are deployed to evade both political repercussions and algorithmic content moderation. For example, the word “cosmopolitan” in a sentence such as “we need to end the cosmopolitan experiment” can mean “worldly” to many but also secretly mean “Jewish” to a select few. We present the first large-scale computational investigation of dogwhistles. We develop a typology of dogwhistles, curate the largest-to-date glossary of over 300 dogwhistles with rich contextual information and examples, and analyze their usage in historical U.S. politicians’ speeches. We then assess whether a large language model (GPT-3) can identify dogwhistles and their meanings, and find that GPT-3’s performance varies widely across types of dogwhistles and targeted groups. Finally, we show that harmful content containing dogwhistles avoids toxicity detection, highlighting online risks presented by such coded language. This work sheds light on the theoretical and applied importance of dogwhistles in both NLP and computational social science, and provides resources to facilitate future research in modeling dogwhistles and mitigating their online harms.

## introduction the cosmopolitan elite look down on the common affections that once bound this nation together: things like place and national feeling and religious faith. . . the cosmopolitan agenda has driven both left and right. . . it's time we ended the cosmopolitan experiment and recovered the promise of the republic. figure 1 : schematic of how dogwhistles work, based on @xcite with the example of cosmopolitan. first, a speaker simultaneously communicates the dogwhistle message and their persona (identity). the in-group recovers both the message content and speaker persona, enabling them to arrive at the coded meaning (e.g. jewish). the out-group only recognizes the message's content and thus interprets it literally. this literal meaning also provides the speaker with plausible deniability; if confronted, the speaker can claim that they solely intended the literal meaning. we have got this tailspin of culture, in our inner cities in particular, of men not working and just generations of men not even thinking about working or learning to value the culture of work. ## case study: racial dogwhistles in historical u.s. congressional speeches we showcase the usefulness of our glossary, with a diachronic case study of racial dogwhistles in politicians' speeches from the u.s. congressional record @xcite to analyze the frequency of speeches containing racist dogwhistles from 1920-2020. for this case study, we simply identify glossary terms based on regular expressions and do not distinguish between covert and literal meanings of the same expressions. we also measure how ideologies of speakers using dogwhistles changed over time using @xcite , a scaling procedure that places politicians on a two dimensional map based on roll call voting records, such that ideologically similar politicians are located near each other @xcite . we consider the first dimension of dw-nominate, which corresponds to a liberal-conservative axis. 2 as shown in figure 3 , dogwhistle use began to increase during the civil rights era, following the 1954 brown vs. board of education supreme court decision mandating racial integration of public schools. this aligns with qualitative accounts of the republican southern strategy: because explicit racism was no longer acceptable, politicians turned to dogwhistles to make the same appeals implicitly, particularly aiming to gain the support of white voters in the southern united states @xcite . their frequency continued to increase from the 1970s through the 1990s, paralleling haney-lópez (2014)'s account of dogwhistles during the nixon, reagan, bush sr., and clinton presidencies. since the 1990s, the frequency of racial dogwhistles has fluctuated but remained high. like haney-lópez (2014), we qualitatively observe that the dogwhistles invoked post-9/11 have shifted towards being more islamophobic and anti-latinx rather than exclusively anti-black. we caution that this case study and figure 3 do not make novel claims; rather, our goal is to show that even a naive application of our glossary illustrates qualitatively well-established historical patterns in u.s. politics. figure 4 shows how the average ideologies of speakers who use particular dogwhistles (property rights, thug, welfare reform, hardworking americans, and willie horton) have shifted over time, and reveals interesting insights into the evolution and lifecycle of dogwhistles. most racial dogwhistles in the u.s. congressional speeches have become increasingly associated with more conservative speakers over time. however, the inflection point when speaker ideologies shift varies across dogwhistles, suggesting that they emerged as dogwhistles at different points. for example, property rights became increasingly associated with more conservative speakers since the 1960s, while the average ideology of speakers using welfare reform @xcite did not change until the 1990s. willie horton presents an interesting example. in his 1988 presidential campaign, george bush ran a television advertisement featuring willie horton, a black man convicted of rape and murder while on prison furlough @xcite . the ad was so powerful among white voters that it propelled bush to victory, but shortly afterwards was explicitly called out as racist @xcite . we see this pattern in figure 4 : in 1988, willie horton was associated with extremely conservative speakers, but quickly became more liberal, and willie horton no longer functioned as a successful dogwhistle. ## recognition of dogwhistles in gpt-3 we conduct two experiments to assess if a large language model, gpt-3 @xcite , can recognize dogwhistles. first, we interrogate whether gpt-3 is able to identify covert meanings of dogwhistles from our glossary, an ability that would be instrumental in understanding the breadth of online bigotry. second, we measure gpt-3's ability to surface dogwhistles, motivated by the fact that dogwhistles are often intentionally obscured from researchers which makes it impossible to ensure that a manual search is complete or comprehensive. since gpt-3 is trained on large portions of internet data, it may be able to reveal a more comprehensive and diverse set of dogwhistles than manual efforts. finally, we present a small manual analysis of in-context dogwhistle recognition using our glossary examples and gpt-4 as a proof of concept for future work. ## dogwhistles and toxicity detection beyond evaluating language models' ability to recognize dogwhistles, we seek to understand how dogwhistles affect the decisions that nlp systems make, and how this has downstream implications for content moderation and online safety. we begin to address this with a study of how dogwhistles are handled by a widely-deployed toxic language detection system, google/jigsaw's perspective api. 4 perspective api scores a text between 0 and 1 for a range of attributes (e.g. toxicity, identity attack, profanity), representing the estimated probability that a reader would perceive the text to contain that attribute. perspective api's models are multilingual bert-based models distilled into singlelanguage convolutional neural networks for faster inference, and are trained on annotated data from online forums. we refer readers to the perspective api model cards for more details. ## discussion & conclusion we lay the groundwork for nlp and computational social science research on dogwhistles by developing a new taxonomy and glossary with rich contextual information and examples. we demonstrate our glossary's utility in a case study of historical u.s. congressional speeches, where our quantitative analysis aligns closely with historical accounts. we further use our glossary to show that gpt-3 has some, but limited, ability to retrieve dogwhistles and recognize their covert meanings. finally, we verify that dogwhistles readily evade perspec-tiveapi's toxicity detection. we now turn to several implications of this work, highlighting potential future directions across disciplines. dogwhistles and toxic language dogwhistles are closely related to other forms of subtle biases studied in nlp, such as implicit hate speech and symbols @xcite @xcite @xcite @xcite @xcite @xcite , microaggressions @xcite , dehumanization (mendelsohn et al., 2020), propaganda @xcite , condescension (pérez-almendros et al., 2020), and stereotypes @xcite @xcite . however, dogwhistles are distinct from toxic language in several important ways. first, although often implicitly abusive, they are not exclusively hateful; for example, wonder-working power covertly signals the speaker's evangelical christian identity @xcite . second, dogwhistles are characterized by dual meanings, wherein different sub-audiences interpret the exact same message differently @xcite . third, dogwhistles' true meanings are intentionally hidden from the out-group @xcite . nevertheless, because dogwhistles are often deployed specifically to avoid hate speech detection and other content moderation tools, nlp researchers should consider how dogwhistles highlight a vulnerability in extant language technologies, which ultimately puts people's safety and well-being at risk. we show that hateful speech using dogwhistles evades toxicity detection, and is one way that nlp systems (unintentionally) perpetuate harms against marginalized groups. this finding is not surprising, as prior work shows that toxicity detection often fails on subtle language @xcite , but underscores the need for toxicity and hate speech detection models to be able to flag hateful dogwhistles. one potential approach to improve such models could be to train them to recognize dogwhistles in naturallyoccurring in-group contexts (starting with modeling contextual factors; @xcite . more broadly, content moderation pipelines should take context into account and consider mechanisms to identify when a dogwhistle has potentially negative consequences. beyond toxicity detection, future work ought to consider the impact of dogwhistles in a broader range of nlp tasks, such as bias mitigation or story generation. how do llms know about dogwhistles? our findings regarding gpt-3's ability to surface and identify dogwhistles' covert meanings are probably driven by the contents of the training data. gpt-3's training data likely includes right-wing extremist content, as has been shown with its predecessor gpt-2 (gehman et al., 2020), which may result in high performance for dogwhistles from these in-groups. or perhaps the model is simply memorizing articles or social media posts that explicitly call out certain expressions as dogwhistles. future work could evaluate if large language models can learn dogwhistles' covert meanings from incontext usage alone by experimentally controlling for whether or not these terms are explicitly exposed as dogwhistles in the training data. moreover, we find that gpt-3's performance varies widely across target groups. transphobic dogwhistles are notably difficult for gpt-3 to surface and identify. perhaps this is because the model is trained on fewer data from transphobic communities compared to other in-groups considered in this work. furthermore, transphobic dogwhistles may be less frequent in the training data because many have emerged relatively recently. another reason may be formatting: transphobic dogwhistles are often emoji-based and appear in social media screen names and profile bios rather than in posts themselves. we hope that future work will investigate the links between language models' knowledge of dogwhistles and training data.