Determining the Presence of Political Parties in Social Circles

C Gysel, Bart Goethals, Maarten de RijkeAAAI 2021

Abstract

We derive the political climate of the social circles of Twitter users using a weakly-supervised approach. By applying random walks over a sub-sample of Twitter's social graph, we infer a distribution indicating the presence of eight Flemish political parties in users' social circles in the months before the 2014 elections. The graph structure is induced through a combination of connection and retweet features, combining information from over a million tweets and 14 million follower connections. We solely exploit the social graph structure and do not rely on tweet content. For validation, we compare the affiliation of politically active Twitter users with the most influential party in their network. On a validation set of around 700 politically active individuals, we achieve $F_1$ scores of 0.85 and greater. We asked the Twitter community to evaluate our classification performance; more than half of the 2,258 users who responded reported a score higher than 60 out of 100.

Introduction

Predicting political affiliation or electoral outcomes from social media is a notoriously "noisy" problem. Most existing approaches rely on Natural Language Processing (NLP) to analyze tweet content. However, NLP struggles with the brevity of tweets, sarcasm, and the evolving slang of political discourse. Furthermore, the Twitter population is heavily biased toward younger demographics, making broad electoral predictions difficult.

This research shifts the focus from content to context, leveraging the principle of homophily—the tendency for individuals to associate with others who share similar characteristics. By analyzing the structure of a user’s social circle (follows and retweets), we aim to infer political climate without analyzing tweet text.

Methodology

The problem is modeled as a node classification task on a directed, weighted social graph $G(V, E, W)$, where nodes represent users and edges represent interactions.

Graph Construction and Weighting

To prevent the "noise" of casual follows from drowning out strong signals, we implemented a custom activation function $f(x)$—a high-pass logistic filter followed by quadratic inflation. This silences weak connections while amplifying intense interactions.

Random Walks and Absorbing Markov Chains

The core algorithm treats official accounts of eight Flemish political parties as "absorbing states" in a Markov chain. Random walks are simulated starting from unknown users. The probability of a walk being absorbed by a specific party's account determines the user's predicted affiliation. This weakly-supervised approach uses official party accounts as initial labels, allowing influence to propagate through the network.

Experimental Setup

The study focused on the 2014 Flemish (Belgian) elections using:

  • The Graph: 1,249,091 tweets (~273k retweets) and 14,849,213 follower connections.
  • Target Users: 12,254 users following at least two of the eight political parties.
  • Ground Truth: A validation set of 780 Twitter users officially associated with the parties.
  • Crowdsourced Feedback: 2,258 users rated the accuracy of their predicted "political profile" on a scale of 0 to 100.

Results

The researchers conducted two main experiments to evaluate the model's performance. In Experiment A, using unit weights, the model achieved micro-averaged $F_1$ scores between 0.84 and 0.87. In Experiment B, weights were optimized using maximum likelihood estimation, leading to a significant performance jump.

Table 1: Performance metrics for the optimized model (Experiment B), showing high precision and recall for targeted users.

As shown in Table 1, the optimized model achieved an $F_1$ score of 0.9500 for targeted users ($V_{targeted}$). Even for "observed" users ($V_{observed}$) on the periphery, the model maintained high accuracy.

Community Validation

Beyond mathematical metrics, the study sought direct feedback from the Twitter community. Users were asked to rate how well the predicted profile matched their actual leanings.

Figure 1: Distribution of user-reported accuracy scores (0-100).

As illustrated in Figure 1, more than half of the 2,258 respondents gave the algorithm a score of 60/100 or higher. The distribution shows significant peaks at the extremes (0 and 100), suggesting that while most found it accurate, some users strongly disagreed—often due to the social sensitivity of being linked to extremist parties.

Discussion and Conclusion

The results demonstrate that social structure is a sufficient proxy for political affiliation. By optimizing interaction weights, the model captures indirect influence through third parties. However, limitations remain regarding data sparsity for peripheral users and the subjective nature of political identity. Future work will explore hybrid models combining link-based analysis with NLP features to capture a more nuanced picture of political discourse.

Summary updated

BibTeX
@inproceedings{gysel2021determining,
  author = {C Gysel and Bart Goethals and Maarten de Rijke},
  title = {{Determining the Presence of Political Parties in Social Circles}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/icwsm.v9i1.14650},
}
Figure