Computational Analysis of Political Texts
Bridging Research Efforts Across Communities
Goran Glavaš
Federico Nanni
Simone Paolo Ponzetto
Data and Web Science Group
University of Mannheim
Hi there!
Goran
Federico
Simone
https://poltexttutorial.wordpress.com/
Political Text
Political Text
From: https://twitter.com/realdonaldtrump/status/821772494864580614
Political Text
From: https://www.theguardian.com/politics/2018/jul/09/boris-johnson-his-path-to-resigning-as-foreign-secretary
Political Text
From: https://www.flickr.com/photos/statephotos/48079686137/
Political Text
From: https://www.bournemouthecho.co.uk/news/national/17504503.students-strike-over-politicians-inaction-on-climate-change/
Political Text
From: https://www.bournemouthecho.co.uk/news/national/17504503.students-strike-over-politicians-inaction-on-climate-change/
Political Text
From: https://www.bournemouthecho.co.uk/news/national/17504503.students-strike-over-politicians-inaction-on-climate-change/
Political Text
Modelling complex phenomena:
A Tale of Two Communities
Political Science
2003 Wordscores [Laver et al.]
2008 Wordfish [Slapin & Proksch]
2013 Text as Data [Grimmer & Stewart]
2016 The Manifesto Corpus [Merz et al.]
Programming language: R
Libraries: Quanteda, STM, austin, tm, koRpus, kerasR, coreNLP
Natural Language Processing
2005 EuroParl Corpus [Koehn]
2006 Get out the Vote [Thomas et al.]
2010 From Tweets to Polls [O'Connor et al.]
2014 Text scaling in ACL Anthology [Zirn]
Programming language: Python, Java
Libraries: CoreNLP, Spacy, NLTK, TensorFlow, Keras, Sci-Kit Learn
A Tale of Two Communities
Current issues in interdisciplinary collaborations [Wallach, 2016]
A Tale of Two Communities
Current issues in interdisciplinary collaborations [Wallach, 2016]
Overall goal: training new generations of computational social scientists
Towards a Collaborative Future
From: https://textasdata.github.io//
Towards a Collaborative Future
From: https://textasdata.github.io//
Towards a Collaborative Future
From: https://textasdata.github.io//
Towards a Collaborative Future
From: https://textasdata.github.io//
Towards a Collaborative Future
From: https://textasdata.github.io//
Towards a Collaborative Future
The goals of this tutorial:
Agenda
Texts
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Agenda
Texts
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Text as Data
Text as Data - Parliament Debates
General view of the European Parliament during a plenary session in Strasbourg, eastern France, Wednesday, March 13, 2019. (AP Photo)
Text as Data - EuroParl Corpus
EuroParl Corpus (first release 2001, most recent: 2012)
21 European languages (1996 -> 2011 or 2007->2011 depending on the country)
Corpus of tokenized sentences aligned across languages.
Used for:
Available at: https://www.statmt.org/europarl/
Text as Data - EuroParl Corpus
Learning phrase representations using RNN encoder-decoder for statistical machine translation [Cho et al., 2014]
KenLM: Faster and Smaller Language Model Queries [Heafield, 2011]
Normalized (pointwise) mutual information in collocation extraction [Bouma, 2009]
PPDB: The Paraphrase Database [Ganitkevitch, 2013]
Learning bilingual lexicons from monolingual corpora [Haghighi et al. 2008 ]
Text as Data - Linked EP
Plenary debates of the EP as Linked Open Data [Van Aggelen et al. 2016]
All plenary debates between 1999 and 2017 with links to GeoNames and DBpedia.
Available at : https://linkedpolitics.project.cwi.nl/web/html/home.html
Access to the data:
Text as Data - Linked EP
Plenary debates of the EP as Linked Open Data [Van Aggelen et al. 2016]
All plenary debates between 1999 and 2017 with links to GeoNames and DBpedia.
Available at : https://linkedpolitics.project.cwi.nl/web/html/home.html
Issues:
Text as Data - Scraping the EP website
http://www.europarl.europa.eu
Pros:
Cons:
Text as Data - Irish Dáil
Wordscores [Laver et al., 2003] initially tested on a confidence debate in October 1991.
Worshoal [Lauderdale & Herzog, 2016] tested as an example of a multiparty system.
Database of Parliamentary Speeches in Ireland, 1919–2013 [Herzog & Mikhaylov, 2017]
Text as Data - Irish Dáil
Wordscores [Laver et al., 2003] initially tested on a confidence debate in October 1991.
Worshoal [Lauderdale & Herzog, 2016] tested as an example of a multiparty system.
Database of Parliamentary Speeches in Ireland, 1919–2013 [Herzog & Mikhaylov, 2017]
Popular because:
Text as Data - UK Hansard
Hansard Corpus (1803 - 2005)
Hansard Online (1803 - 2019)
DiLiPad (1803 - 2014)
TheyWorkForYou (1918 - 2019)
From: https://www.youtube.com/watch?v=H4v7wddN-Wg
Text as Data - UK Hansard
Hansard Corpus (1803 - 2005)
Hansard Online (1803 - 2019)
DiLiPad (1803 - 2014)
TheyWorkForYou (1918 - 2019)
Popular because:
From: https://www.youtube.com/watch?v=H4v7wddN-Wg
Text as Data - UK Hansard
Hansard Corpus (1803 - 2005)
Hansard Online (1803 - 2019)
DiLiPad (1803 - 2014)
TheyWorkForYou (1918 - 2019)
Popular because:
From: https://www.youtube.com/watch?v=H4v7wddN-Wg
Text as Data - US Congress
ConVote Dataset (all House debates, 2005) [Thomas et al., 2006]
Popular for:
Text as Data - US Congress
ConVote Dataset (all House debates, 2005) [Thomas et al., 2006]
Popular for:
Congressional Record for the 43rd-114th Congresses (1873 - 2017) [Gentzkow et al., 2018], derived from scans from HeinOnline.
Text as Data - United Nations
The UN General Debate corpus [Baturo et al., 2016]
Over 7300 country statements from 1970–2014
All in English (official translations by the UN)
Text as Data - Other Parliaments
CLARIN Parliamentary Corpora
Text as Data - Other Parliaments
CLARIN Parliamentary Corpora
Issues:
Text as Data - Other Parliaments
CLARIN Parliamentary Corpora
ParlSpeech [Rauh et al., 2017] (3.9 million plenary speeches Czech Republic, Finland, Germany, the Netherlands, Spain, Sweden, and the United Kingdom)
Sentiment and position-taking analysis of parliamentary debates: A systematic literature review [Abercrombie & Batista-Navarro, 2019]
Text as Data - Manifestos
Text as Data - Manifestos
Since 1979, the Manifesto Project collects and codes electoral programs for all relevant political parties at democratic elections from 1945 or the first democratic election in over 50 countries.
Country experts (usually political scientists who are native language speakers) are hired to code the electoral programs. Coders first split the electoral programs into so-called “quasi-sentences”, each of which “contains exactly one statement or message”.
The coders allocate to every quasi-sentence a code, corresponding to one of 56 categories, which captures the most relevant policy issues and goals.
In order to do this, coders are taken through a training process.
Text as Data - Manifestos
In the past the coding of these documents was performed using printed copies of the electoral programs, annotating in the margins of the pages.
The first serious effort towards digitization was made by Paul Pennings and Hans Keman of the Comparative Electronic Manifestos Project (2006), who digitized 1144 electoral programs included in the Manifesto Corpus (2015 v.1).
The corpus [Merz et al., 2016] currently covers electoral programmes from more than 50 different countries in more than 35 languages. It contains more than 2300 machine-readable programmes. For more than 1.150 of these, unitising and codings are available as well. These are more than 1,000,000 coded quasi-sentences.
https://manifesto-project.wzb.eu/
Text as Data - Manifestos
A gold standard or a “no-alternative” scenario? [Budge & Pennings, 2007; Benoit et al., 2012; Mikhaylov et al., 2012; Gemenis, 2013]
Text as Data - Manifestos
A gold standard or a “no-alternative” scenario? [Budge & Pennings, 2007; Benoit et al., 2012; Mikhaylov et al., 2012; Gemenis, 2013]
1) Theoretical framework of the coding scheme
Salience theory of party competition: policy differences between parties are assumed to consist of contrasting emphasis placed in different policy areas
Text as Data - Manifestos
A gold standard or a “no-alternative” scenario? [Budge & Pennings, 2007; Benoit et al., 2012; Mikhaylov et al., 2012; Gemenis, 2013]
1) Theoretical framework of the coding scheme
2) Document selection
Text as Data - Manifestos
A gold standard or a “no-alternative” scenario? [Budge & Pennings, 2007; Benoit et al., 2012; Mikhaylov et al., 2012; Gemenis, 2013]
1) Theoretical framework of the coding scheme
2) Document selection
3) Coding reliability
Text as Data - Manifestos
A gold standard or a “no-alternative” scenario? [Budge & Pennings, 2007; Benoit et al., 2012; Mikhaylov et al., 2012; Gemenis, 2013]
1) Theoretical framework of the coding scheme
2) Document selection
3) Coding reliability
4) Scaling
Text as Data - Agendas
Text as Data - Agendas
The Comparative Agendas Project (CAP) assembles and codes information on the policy processes of governments from around the world. Focus on the policy used, proposed or discussed.
Initially developed in the US in the early 1990s. Aggregator of many different projects, analysing different types of documents (news, laws, etc.) using a single, universal and consistent coding scheme. CAP monitors policy processes by tracking the actions that governments take in response to the challenges they face.
https://www.comparativeagendas.net/
Text as Data - Agendas
The CAP Codebook:
Text as Data - Campaign Speeches / Debates
Text as Data - Campaign Speeches / Debates
The American Presidency Project has transcripts of:
https://www.presidency.ucsb.edu
Text as Data - Campaign Speeches / Debates
Other resources:
2) Transcript in news media (newspapers, fact-checking websites)
Text as Data - Press Releases
Text as Data - Press Releases
AUTNES Content Analysis of Party Press Releases (OTS) 2013 [Müller et al., 2017]
Text as Data - Leaders
Text as Data - Leaders
The American Presidency Project has transcripts of:
https://www.presidency.ucsb.edu
Text as Data - Leaders
The American Presidency Project has transcripts of:
EUSpeech: a New Dataset of EU Elite Speeches [Schumacher et al., 2016]
Text as Data - Leaders
The Global Populism Database is the most up-to-date, comprehensive and reliable repository of populist discourse in the world. It was commissioned by the Guardian and built by Team Populism, a global network of scholars dedicated to the scientific study of the causes and consequences of populism.
Issues:
Text as Data - Legislative Corpora
Text as Data - Legislative Corpora
Sunlight Foundation SUNLIGHT US CONGRESS API
EurLex
Text as Data - Social Media
Text as Data - Social Media
Politician’s opinions:
Voters’ opinions:
Agenda
Text
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Text as Data
Text as Data - Examples
Exploring the political agenda of the European Parliament using a dynamic topic modeling approach [Greene & Cross, 2017]
Text as Data - Examples
Exploring the political agenda of the European Parliament using a dynamic topic modeling approach [Greene & Cross, 2017]
A Bayesian hierarchical topic model for political texts: Measuring expressed agendas in Senate press releases [Grimmer, 2010]
Text as Data - Examples
Exploring the political agenda of the European Parliament using a dynamic topic modeling approach [Greene & Cross, 2017]
A Bayesian hierarchical topic model for political texts: Measuring expressed agendas in Senate press releases [Grimmer, 2010]
How to analyze political attention with minimal assumptions and costs [Quinn et al., 2010]
Text as Data - Examples
Measuring group differences in high-dimensional choices: Method and application to Congressional speech [Gentzkow et al., 2016]
Text as Data - Examples
Measuring group differences in high-dimensional choices: Method and application to Congressional speech [Gentzkow et al., 2016]
Position taking in European Parliament speeches [Proksch & Slapin, 2010]
Text as Data - Examples
Measuring group differences in high-dimensional choices: Method and application to Congressional speech [Gentzkow et al., 2016]
Position taking in European Parliament speeches [Proksch & Slapin, 2010]
Testing the Etch-a-Sketch Hypothesis: Measuring Ideological Signaling via Candidates’ Use of Key Phrases [Gross et al., 2013]
Text as Data
[Grimmer & Stewart, 2013]
Text as Data
[Grimmer & Stewart, 2013]
Text as Data
[Grimmer & Stewart, 2013]
RQ1:
What is it about?
(the topic, the issue)
RQ2:
How does it compare with others?
(the position)
Agenda
Text
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Topic Detection
[Quinn et al., 2010]
Topic Detection
[Quinn et al., 2010]
Different Objectives
Finding the needle in the haystack or characterizing the haystack? [Hopkins & King, 2010]
Selection of Speakers? [Proksch & Slapin, 2012; Schwarz et al., 2017]
In political systems that foster an individual relationship between MPs and their voters, party leaders are more likely to accept speeches that deviate from the party line.
In contexts where these relations are mediated by the party, and party unity matters, the party leadership is likely to prohibit expression of dissent on the parliamentary floor.
Take Away: the speakers do not always represent the position of the entire party.
Topic Detection
Supervised
Unsupervised
Topic Detection
Supervised
Unsupervised
Supervised Approaches
Dictionaries
[Burden & Sanberg, 2003]
Supervised Approaches
Dictionaries
Support Vector Machines in Political Science
Supervised Approaches
Dictionaries
Support Vector Machines in Political Science
Disadvantages
Classification of Manifesto Quasi-Sentences
Classifying topics and detecting topic shifts in political manifestos [Zirn et al., 2016]
Classification of Manifesto Quasi-Sentences
Proportional Classification Revisited: Automatic Content Analysis of Political Manifestos Using Active Learning [Wiedemann, 2019]
Classification of Manifesto Quasi-Sentences
Hierarchical Structured Model for Fine-to-coarse Manifesto Text Analysis [Subramanian et al., 2018]
Topic Detection
[Quinn et al., 2010]
Topic Detection
[Quinn et al., 2010]
Topic Detection
Supervised
Unsupervised
Topic Detection
Supervised
Unsupervised
Unsupervised Approaches
Unsupervised Approaches
Available implementations [Benoit et al., 2018]
Unsupervised Approaches
Available implementations [Benoit et al., 2018]
Advantages of LDA Topic Models [Quinn et al., 2010; Grimmer & Stewart, 2013]
Unsupervised Approaches
Available implementations [Benoit et al., 2018]
Advantages of LDA Topic Models [Quinn et al., 2010; Grimmer & Stewart, 2013]
Issues with Interpretation [Lauscher et al., 2016]
Unsupervised Approaches
Available implementations [Benoit et al., 2018]
Advantages of LDA Topic Models [Quinn et al., 2010; Grimmer & Stewart, 2013]
Issues with Interpretation [Lauscher et al., 2016]
Issues with Evaluation [Chang et al., 2009; Wallach et al., 2009; Newman et al., 2010]
Papers on Unsupervised Topic Detection
Structural Topic Models for Open-Ended Survey Responses [Roberts et al., 2014]
Papers on Unsupervised Topic Detection
Validating Cross-Perspective Topic Modeling for Extracting Political Parties’ Positions from Parliamentary Proceedings [van der Zwaan et al., 2016]
Papers on Unsupervised Topic Detection
Tea Party in the House: A Hierarchical Ideal Point Topic Model and Its Application to Republican Legislators in the 112th Congress [Nguyen et al., 2015]
Our Experience on Political Topic Analysis
Our Experience on Political Topic Analysis
Unsupervised Text Segmentation of Manifestos [Glavaš et al. *SEM 2016]
Supervised Classification of Manifestos QS [Zirn et al., PolText 2016]
Domain Transfer (manifestos -> campaign speeches) [Nanni et al., PolText 2016]
Cross-lingual Classification of Manifestos QS [Glavaš et al., NLP+CSS 2017]
Key-Concept Clustering of Manifestos QS [Menini et al., EMNLP 2017]
Semantifying the UK Hansard [Nanni et al., ParlaCLARIN 2018 & JCDL 2019]
Interested in Computational Political Science?
We are hiring, get in touch!
{federico,goran,simone}@informatik.uni-mannheim.de
Unsupervised Text Segmentation [Glavas et al. *SEM 2016]
We employ word embeddings and a measure of semantic relatedness of short texts to construct a relatedness graph of the text.
Unsupervised Text Segmentation [Glavas et al. *SEM 2016]
We employ word embeddings and a measure of semantic relatedness of short texts to construct a relatedness graph of the text.
https://bitbucket.org/gg42554/graphseg/
Unsupervised Text Segmentation [Glavas et al. *SEM 2016]
We employ word embeddings and a measure of semantic relatedness of short texts to construct a relatedness graph of the text.
https://bitbucket.org/gg42554/graphseg/
Supervised Classification [Zirn et al., PolText 2016]
We developed a 7 classes coarse-grained classifier using macro-areas from the Manifesto Project.
Supervised Classification [Zirn et al., PolText 2016]
Features:
Linear Support Vector Machine
Supervised Classification [Zirn et al., PolText 2016]
Domain Transfer [Nanni et al., PolText 2016]
We collected all US campaign speeches for the 2008, 2012 and 2016 presidential elections.
Gold Standard: around 1k annotated sentences.
Domain Transfer [Nanni et al., PolText 2016]
We collected all US campaign speeches for the 2008, 2012 and 2016 presidential elections.
Gold Standard: around 1k annotated sentences.
Key-Concept Clustering [Menini et al., EMNLP 2017]
Key-Concept Clustering [Menini et al., EMNLP 2017]
https://dh.fbk.eu/technologies/kd
https://github.com/dhfbk/keyphrase_clustering
Key-Concept Clustering [Menini et al., EMNLP 2017]
Key-Concept Clustering [Menini et al., EMNLP 2017]
We extracted 87 topics from six U.S. Manifestos (2004, 2008 2012), which produced 350 pairs of statements, showing:
Agenda
Text
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Positioning
Political scientists need to infer policy positions from text.
Positioning
Political scientists need to infer policy positions from text.
The position could be determined:
Many tasks (loosely) correspond to a type of positioning
Positioning
Political scientists need to infer policy positions from text.
The position could be determined:
A notable difference NLP and Pol-Sci research: the former considers the specific target of expressed positions, while the latter generally analyses aggregated speeches/corpora.
Topic-based Positioning
Positioning: NLP vs. PolSci
A notable difference in positioning studies/tasks of two communities:
NLP research focused on the target of the expressed position/stance/sentiment
PolSci research focused on aggregate positional profiling of political actors
[Laver et al., 2003; Proksch & Slapin, 2010; Shwarz et al., 2017; Kim et al, 2018]
Positioning: Ideological classification
The line of work that aims to assign one or more ideological labels (classes) to actors
Challenges:
The famous “Etch-a-Sketch” example:
“Well, I think you hit a reset button for the fall campaign. Everything changes. It’s almost like an Etch-A-Sketch. You can kind of shake it up and restart all of over again.”
-Eric Fehrnstrom, Spokesman for Presidential Candidate Mitt Romney
Ideological shifts: Etch-A-Sketch
Positioning: Ideological classification
The line of work that aims to assign one or more ideological labels (classes) to actors
[Gross et al., 2013; Sim et al., 2013] “Ideological Proportions in Political Speeches”
[Iyyer et al., 2014] “Political Ideology Detection Using Recursive Neural Networks”
[Volkova et al., 2014; Kulkarni et al., 2018]
Generative Ideology Detection [Sim et al., EMNLP 13]
Data: Ideology Book Corpus [Gross et al., 2013]
Image taken from [Gross et al., 2013]
Generative Ideology Detection [Sim et al., EMNLP 13]
2-step approach:
[Andrew & Gao, 2007]
Generative Ideology Detection [Sim et al., EMNLP 13]
2-step approach:
2. Cue-lag ideological proportions (central contribution)
Example from [Sim et al., 2013]
Generative Ideology Detection [Sim et al., EMNLP 13]
2-step approach:
2. Cue-lag ideological proportions (central contribution)
CLIP Model: A type of a HMM
Generative Ideology Detection [Sim et al., EMNLP 13]
2-step approach:
2. Cue-lag ideological proportions (central contribution)
CLIP Model: A type of a HMM
Ψs,w: probability of state s (e.g., CENTER) emitting the cue w (e.g., communist)
Generative Ideology Detection [Sim et al., EMNLP 13]
Evaluation:
1. Gold-standard ideological proportions difficult (impossible?) to obtain
Discriminative ideology detection [Iyyer et al., ACL 14]
Common NLP story:
[Iyyer et al., 2014] “Political Ideology Detection Using Recursive Neural Networks”
Discriminative ideology detection [Iyyer et al., ACL 14]
Assumption of semantic compositionality of ideological positions/labels:
Image from [Iyyer et al., 2014]
Discriminative ideology detection [Iyyer et al., ACL 14]
Recursive neural network model:
or pre-trained): xa, xb, xd
Non-linearity applied on embedding
projections: global params WL, WR
Image from [Iyyer et al., 2014]
Discriminative ideology detection [Iyyer et al., ACL 14]
Evaluation:
phrases and sentences
Image from [Iyyer et al., 2014]
Discriminative ideology detection [Iyyer et al., ACL 14]
Label probabilities over node depths Sentence-level bias detection accuracy
Ideological classification: non-textual signal
While text is very informative, it is often not the only type of signal that can be exploited to (more accurately) predict ideological positions
Common setup: there are links (associations) between the actors/items for which we make ideological predictions
[Volkova et al., 2014; Barbera 2015]
[Kulkarni et al., 2018]
Ideological classification: non-textual signal
Common setup: there are links (associations) between the actors/items for which we make ideological predictions
[Kulkarni et al., 2018] Predicting ideological orientation of news
Predicting ideological orientation of news [Kulkarni et al., EMNLP 18]
Source: [Kulkarni et al., 2018]
Predicting ideological orientation of news [Kulkarni et al., EMNLP 18]
Top-10 rankings of different ideological news sources
Ideology or (actually) party classification?
Classifiers are often sensible to expressions of attack and defence, opposition and government, not ideology. This is especially true in context of strong party discipline. [Hirst et al., 2014; Søyland & Lapponi, 2017]
Positioning: Legislation
The overarching task is predicting the position of an actor with respect to particular piece of legislation in (parliamentary) voting
Traditional approach (not using text as data): ideal point model [Clinton et al., 2004]
Positioning: Legislation
The overarching task is predicting the position of an actor with respect to particular piece of legislation in (parliamentary) voting
Traditional approach (not using text as data): ideal point model [Clinton et al., 2004]
( and - -- position and noise of Yea vote)
( and - -- position and noise of Nay vote)
Positioning: Legislation
The overarching task is predicting the position of an actor with respect to particular piece of legislation in (parliamentary) voting
Traditional approach (not using text as data): ideal point model [Clinton et al., 2004]
Positioning: Legislation
The overarching task is predicting the position of an actor with respect to particular piece of legislation in (parliamentary) voting
Traditional approach (not using text as data): ideal point model [Clinton et al., 2004]
Positioning: Legislation
The overarching task is predicting the position of an actor with respect to particular piece of legislation in (parliamentary) voting
Traditional approach (not using text as data): ideal point model [Clinton et al., 2004]
Predicting Legislative Roll Calls from Text
Text-based extension of the ideal point model (IPM) [Clinton et al., 2004]
Fundamental limitation of IPM as a predictive model:
Connect the votes of the legislator with the text of the bill [Gerrish & Blei, 2011]
Ideal Point Topic Model (Gerrish & Blei, ICML 11)
Ideal Point Topic Model: Effectively combines the IPM and topic modeling
Simplified view of IPM (LR with random effects)
Ideal point of the legislator u (latent)
Vote of the legislator u for bill d (obs.)
Bill position (polarity) bd
Bill difficulty (popularity) ad
Ideal Point Topic Model (Gerrish & Blei, ICML 11)
Ideal Point Topic Model: More complex variant of the supervised LDA [Blei & McAuliffe, 2008]
Votes, Bill Text, and...
Ideal Point Model [Clinton et al., 2004]
Ideal Point Topic Model [Gerrish & Blei, 2011]
What additional data could improve roll call predictions?
Positioning and Legislation: (Dis)Agreement
[Thomas et al., 2006] “Get out the vote: Determining support or opposition from Congressional floor-debate transcripts”
Legislative positioning via (dis)agreement [Thomas et al., 2006]
A debate is given as a sequence of speeches: s1, s2, …, sn
Approach:
Predicting roll calls with embeddings
Discriminative models for predicting roll call votes
[Kraft et al., ACL 16]
Ideal points vs. ideal vectors
IPM/IPTM vs. Ideal vectors
Image from [Gerrish & Blei, 2011] Image from [Kraft et al., 2016]
1-dimensional positions 2D (PCA proj. of 10-dim. vectors)
Ideal vectors
Source: [Kraft et al., ACL 16]
Predicting roll calls with embeddings
Discriminative models for predicting roll call votes
[Kornilova et al., ACL 18]
Party Matters
Accuracy results show that
provide a better bill representation
Source: [Kornilova et al., ACL 18]
Are Votes Reliable Labels? [Abercombie & Navarro, 2018; 2019]
“Rebel speeches” are only a small minority, so in general you can pair text and votes, but be aware that these are not gold labels.
Positioning: Topics
Topic-based positioning refers to a broad body of work in which a stance or position of the political actor is to be determined for one or more topics
Concrete task definitions depend on several factors:
Pipeline approach: first topic detection, then per-topic positioning
[Menini et al., 2016; Nanni et al., 2016; Menini et al., 2017]
Joint approach: joint detection of (multiple) topics and positions
[Lin et al., 2008; Fang et al., 2012; Trabelsi et al., 2014; Thonet et al., 2016]
Topical positioning: pipelined approaches
Unlike the joint models, which induce the topics and positions/viewpoints jointly, “pipeline approaches” determine positions or (dis)agreements for known topics
Topics are either pre-defined [Nanni et al., 2016] or induced in a pre-processing step [Menini et al, 2016, 2017]
[Nanni et al., 2016] Topic-Based Analysis of Political Position in US Electoral Campaigns
Topical positioning: pipelined approaches
[Menini et al., EMNLP 17] Topic-Based (Dis)Agreement in US Electoral Manifestos
Pipeline:
For each domain, unsupervised topic induction (but not with topic models!):
2. Key concept extraction, rule-based [Moretti et al., 2015]
3. Key concept clustering (a cluster is a topic)
4. For each topic (cluster of keywords) t
5. Couple sentences from t of Democratic Manifestos with Republican t sentences 6. Annotate topical agreement/disagreement and train a supervised classifier
Topical positioning: pipeline [Menini et al., EMNLP 17]
Jointly detecting topics and positions
The so-called Topic Models for Viewpoint Extraction:
Joint Topic and Perspective Model (JTPM) [Lin et al., 2008]
Joint Topic Viewpoint Model (JTVM) [Trabelsi et al., 2014]
Viewpoint and Opinion Discovery Unification Model (VODUM) [Thonet et al., 2016]
Joint Topic and Perspective Model [Lin et al., 2008]
Joint Topic and Perspective Model [Lin et al., 2008]
Limitations of JTPM
Joint Topic and Perspective Model [Lin et al., 2008]
Red: Israeli authors
Blue: Palestinian authors
Red: Democratic authors
Blue: Republican authors
Images from [Lin et al., 2008]
Joint Topic Viewpoint Model [Trabelsi et al., 2014]
Extension of LDA to incorporate viewpoints
One can compare the positions by:
Joint Topic Viewpoint Model [Trabelsi et al., 2014]
Generative story
Agenda
Text
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Political Text Scaling
Arguably the most prominent task in text-as-data PolSci community
Task definition: Given a set of political actors and for each of them an aggregated collection of (political) text they produce, predict (numerically) their (typically relative) positions on a 1-dimensional scale
Political Text Scaling
Task definition: Given a set of political actors and for each of them an aggregated collection of (political) text, predict (numerically) their (typically relative) positions on a 1-dimensional scale (i.e., a regression task)
“substantive content of a “left-right” dimension varies significantly across different contexts, to such an extent that “it may be impossible for any single scale to measure this dimension in a manner that can be used for reliable or meaningful cross-national comparison” [Benoit & Laver, 2006]
Same Politician or Not?
“It is unbearable, when refugees homes are attacked, when people try to make radical speeches. All those who come to us have the right to be treated correctly, to have a proper asylum procedure. That's our rule of law and we are proud of it.”
”Sometimes I feel ashamed, when I see how the question of refugees is being discussed in our countries, when just 30,000 or 40,000 refugees are arriving in a country of 82 million while here you have 120,000 refugees in a town of 100,000 inhabitants, and when i see how they are being taken care of, I have to take my hat off to them.”
Same Politician or Not?
“It is unbearable, when refugees homes are attacked, when people try to make radical speeches. All those who come to us have the right to be treated correctly, to have a proper asylum procedure. That's our rule of law and we are proud of it.”
”Sometimes I feel ashamed, when I see how the question of refugees is being discussed in our countries, when just 30,000 or 40,000 refugees are arriving in a country of 82 million while here you have 120,000 refugees in a town of 100,000 inhabitants, and when i see how they are being taken care of, I have to take my hat off to them.”
Same Politician or Not?
“It is unbearable, when refugees homes are attacked, when people try to make radical speeches. All those who come to us have the right to be treated correctly, to have a proper asylum procedure. That's our rule of law and we are proud of it.”
”Sometimes I feel ashamed, when I see how the question of refugees is being discussed in our countries, when just 30,000 or 40,000 refugees are arriving in a country of 82 million while here you have 120,000 refugees in a town of 100,000 inhabitants, and when i see how they are being taken care of, I have to take my hat off to them.”
Scaling Methods
Term-based scaling
2. Wordfish [Slapin & Proksch, 2008; Proksch & Slapin, 2010]
Scaling Methods
Semantic scaling
3. SemScale [Glavaš et al., 2017; Nanni et al., 2019]
4. Party2Vec [Rheault & Cochrane, 2019]
Wordscores [Laver et al., 2003]
Image from [Laver et al., 2003]
Wordscores [Laver et al., 2003]
Generate wordscores from reference texts
Wordscores [Laver et al., 2003]
Computing the scores of unlabeled texts
Wordscores [Laver et al., 2003]
Computing the scores of unlabeled texts
Wordscores [Laver et al., 2003]
Source: Laver et al. 2003
Wordscores [Laver et al., 2003]
Shortcomings of Wordscores:
Wordfish [Slapin & Proksch, 2008]
Aims to remedy for the shortcomings of Wordscores
Model: A “Poisson naive Bayes”
Wordfish [Slapin & Proksch, 2008]
Model: A “Poisson naive Bayes”
Wordfish [Slapin & Proksch, 2008]
Model: A “Poisson naive Bayes”
Parameter estimation
Wordfish [Slapin & Proksch, 2008]
Model: A “Poisson naive Bayes”
Parameter estimation
2. Iterative estimation (EM-like algorithm)
Wordfish [Slapin & Proksch, 2008]
Model: A “Poisson naive Bayes”
Parameter estimation
2. Iterative estimation (EM-like algorithm)
b. Fix party parameters (αi and ωi) and estimate word scores (ψj and βj), by
maximizing log-likelihood over all documents, for each word j
Wordfish: alternative optimization
Model: A “Poisson naive Bayes”
It is unclear why Proksch & Slapin propose such this two-step EM like optimization
Wordfish [Slapin & Proksch, 2008]
Scale ends (parties most to the end of scale), 5th leg of the EP
Key question: what does the scale capture?
Wordfish [Slapin & Proksch, 2008]
Source: Slapin & Proksch, 2008
Wordfish [Slapin & Proksch, 2008]
Wordfish results (positions) seem stable across languages
Wordfish [Slapin & Proksch, 2008]
Wordfish implementations:
R implementation (Slapin & Proksch)
http://www.wordfish.org/uploads/1/2/9/8/12985397/wordfish_1.3.r
R implementation (Will Love)
https://conjugateprior.github.io/austin/reference/wordfish.html
Python implementation (Goran Glavaš)
https://github.com/codogogo/topfish/blob/master/wordfish.py
Semantic scaling
Term-based scaling methods like Wordscores and Wordfish:
The need to go beyond surface forms:
“bad hombres…”
“terrible guys…”
same position
SemScale [Glavaš et al., 2017]
First scaling method to use semantic text representation
Approach:
SemScale [Glavaš et al., 2017]
Two different unsupervised measures of semantic textual similarity
Alignment similarity
Aggregation similarity
SemScale [Glavaš et al., 2017]
Pairwise similarities induce a weighted fully-connected graph
Assumption: two most dissimilar texts (pivots) represent position extremes: −1 and 1
Inducing scores for other nodes
SemScale [Glavaš et al., 2017]
Graph-based label propagation
Let L = W - D be the unnormalized Laplacian of the graph
Political Text Scaling: Evaluation
Scaling algorithms produce scores in a single dimension
Example: Wordfish for scaling EU parties from EP speeches [Proksch & Slapin, 2010]
Political Text Scaling: Evaluation
Scaling algorithms produce scores in a single dimension
Gold position scores for the dimension of interest?
Political Text Scaling: Evaluation
Task definition: Scaling texts for two different political dimensions: (i) left-to-right ideological position; (ii) position on European integration
Evaluation metrics:
Baselines:
Political Text Scaling: Evaluation
“Errors”:
Correlation of produced positions with
Chapel Hill left-right ideology scores
Correlation of produced positions with
Chapel Hill EU integration positions
SemScale: Demo, Tool and Appendix
http://tools.dws.informatik.uni-mannheim.de/semScale
SemScale: Demo, Tool and Appendix
https://github.com/umanlp/SemScale
https://federiconanni.com/semantic-scaling/
Topical Scaling
IF we want to interpret the positions as relating to a certain dimension or topic, we need to filter out the content irrelevant to that dimension
TopFish [Nanni et al., 2016]
All topics
External relations
Welfare & Quality of Life
Party2Vec [Rheault & Cochrane, 2019]
Simple extension of the Skip-Gram model [Mikolov et al., 2013]
Party2Vec [Rheault & Cochrane, 2019]
Simple extension of the Skip-Gram model [Mikolov et al., 2013]
Image from [Rheault & Cochrane, 19]:
2D PCA projection of party vectors
Agenda
Text
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Multilinguality
Political analysts compare actors from different countries
Crossing the language chasm
Old paradigm:
New paradigm:
Crossing the Language Chasm
Crossing the Language Chasm
2. Multilingual KBs
Crossing the Language Chasm
3. Multilingual / Cross-lingual
representations of meaning
[Lample & Conneau, ‘19; Devlin et al., 2019]
Image from [Luong et al., 2015]
CLWE: post-hoc alignment
Monolingual embeddings independently constructed
Post-hoc aligning monolingual spaces
X is distributional space of L1, Y of L2
Image from [Conneau et al., 2018]
CLWE: PolSci applications
Cross-lingual word embeddings (CLWEs) allow for
Cross-lingual text scaling with SemScale [Glavaš et al., 2017a]
Cross-lingual topic classification of manifestos [Glavaš et al., 2017b]
Cross-lingual manifesto topic classification [Glavaš et al., 2017b]
Simple classification model:
Manifesto top-level topics: 7 labels
Two models
https://github.com/codogogo/topfish
Conclusion
Text
RQs
Tasks
Topic Detection
Positioning
Scaling
Multilinguality / CL Transfer
Conclusion
Computational analysis of political text: a vibrant interdisciplinary research area
Despite interdisciplinary nature of the work
Different lines of work on similar and closely related tasks
Bridging efforts between communities paramount for more interdisciplinary work
Thanks!
Goran
Federico
Simone
Interested in Computational Political Science?
We are hiring, get in touch!
{federico,goran,simone}@informatik.uni-mannheim.de
3 Days Text Scaling Hackathon (Dec. 2017)
3 Days Text Scaling Hackathon (Dec. 2017)
Supported by Villa Vigoni, the German-Italian Centre for European Excellence and by DFG.
23 young researchers from political science, computational social science and NLP.
3 Days Text Scaling Hackathon (Dec. 2017)
Participants from:
Mannheim, Bruno Kessler Found., Unitelma, Sheffield, Duisburg-Essen, GESIS, Scuola Normale Superiore, EUI, Scuola Superiore Sant’Anna, Bocconi, Liepzig, Zagreb, LSE, Alan Turing Institute, Edinburgh, CEU, Toronto.
Joint Work With:
Goran Glavas
Simone Paolo Ponzetto
Sara Tonelli
Nicolò Conti
What is a Hackathon?
A coding-intensive collaborative workshop.
What is a Hackathon?
Why?
A coding-intensive collaborative workshop.
To boost collaboration across disciplines.
What is a Hackathon?
Why?
Shared-Task?
A coding-intensive collaborative workshop.
To boost collaboration across disciplines.
Participants were divided in 5 groups and had to work together towards a specific goal.
European-Integration Scaling
The task: develop a method for scaling text on the EU integration dimension. We provide participants with:
European-Integration Scaling
The task: develop a method for scaling text on the EU integration dimension. We provide participants with:
European-Integration Scaling
The task: develop a method for scaling text on the EU integration dimension. We provide participants with:
European-Integration Scaling
The task: develop a method for scaling text on the EU integration dimension. We provide participants with:
European-Integration Scaling
The output: party positions for 6th legislation regarding European integration (between 0: strongly against and 1: strongly in favour).
European-Integration Scaling
The output: party positions for 6th legislation regarding European integration (between 0: strongly against and 1: strongly in favour).
All data available at: https://federiconanni.com/hack-vigoni/
What Participants Could Not Do
How Did It Go?
How Did It Go?
How Did It Go?
How Did It Go?
Core Components of All Approaches
Results
Results
Results