Introduction
In political science, a legislator’s "ideal point"—their position in a multi-dimensional ideological space—is traditionally calculated using roll-call votes. However, voting records are often a coarse metric. A Republican senator might vote in line with a Republican president 90% of the time to advance a shared policy agenda, yet remain a vocal critic of that president’s rhetoric or character. This "masking" effect limits the ability of researchers to capture nuanced political attitudes.
Researchers at Duke University have addressed this challenge by developing a joint embedding model that estimates specific political preferences by analyzing both the frequency and sentiment of legislators' tweets. By modeling how members of Congress react to Donald Trump’s social media output, the system captures intra-party dissent and strategic communication that traditional voting records often fail to reveal.
Methodology
The proposed model jointly predicts two outcomes: tweet frequency (how often a legislator tweets about Trump) and tweet sentiment (the tone of those tweets).
Technical Components
- Legislator Embeddings: Each legislator is represented by a vector ($v_i$) and a bias term ($b_i$) in a latent political space.
- Trump Embeddings: The model constructs daily embeddings ($\tau_t$) for Donald Trump based on his own tweets using a Simple Word-Embedding Model (SWEM) with max-pooling to extract salient features.
- Interaction Modeling: Legislator behavior is modeled as a reaction to Trump. The probability of tweeting and the predicted sentiment are functions of the interaction (weighted inner product) between the legislator's vector and Trump’s daily vector.
- Joint Loss Function: The model minimizes a weighted combination of Negative Log-Likelihoods for a Negative Binomial count model (for frequency) and an ordinal Cumulative Link Model (for sentiment).
Data and Validation
The study utilized 29,696 tweets from 451 members of the U.S. House and Senate (Nov 2016 – Feb 2018), sourced via TweetCongress. Trump's daily context was provided by the Trump Twitter Archive. To validate the results, the learned embeddings were compared against DW-NOMINATE scores (traditional ideology measures) and Fivethirtyeight’s "Trump Score" (percentage of time voting with the president).
Key Results and Insights
The joint model achieved a mean-absolute-error (MAE) of 0.127 on sentiment prediction and an overall accuracy of 89.3%.
Emergent Party Separation
Even without explicit party labels during training, the learned embeddings naturally clustered Democrats and Republicans into distinct groups. This validates that Twitter behavior strongly reflects partisan identity.
Capturing Intra-Party Dissent
A significant finding was the model's ability to distinguish between "Trump loyalists" and "Trump critics" within the Republican party. While traditional voting records (DW-NOMINATE) show high alignment among Republicans, the tweet-based embeddings provide much higher variance.
As shown in the validation plots, the model successfully identified a cluster of Republican senators (such as Jeff Flake and John McCain) who maintained high legislative voting alignment with Trump but occupied a distinct space in the tweet-based embeddings due to their vocal public criticism. This demonstrates that frequency and sentiment together capture the intensity of a preference that voting records miss.
Conclusion and Future Work
This research demonstrates that social media provides a "strategic communication" channel where legislators express more specific, domain-dependent preferences. While the current model treats attitudes as static, future iterations could allow embeddings to evolve over time to capture shifting political alliances and expand to other policy domains like healthcare or immigration.
Summary updated