SlowGuess/NAACL_2022_OCR huggingface dataset:
Valentin Hofmann\*, Xiaowen Dong†, Janet B. Pierrehumbert†*, Hinrich Schütze‡
$\dagger$ Department of Engineering Science, University of Oxford
†Center for Information and Language Processing, LMU Munich
The increasing polarization of online political discourse calls for computational tools that automatically detect and monitor ideological divides in social media. We introduce a minimally supervised method that leverages the network structure of online discussion forums, specifically Reddit, to detect polarized concepts. We model polarization along the dimensions of salience and framing, drawing upon insights from moral psychology. Our architecture combines graph neural networks with structured sparsity learning and results in representations for concepts and subreddits that capture temporal ideological dynamics such as right-wing and left-wing radicalization.
The polarization of online political discourse on platforms such as Twitter (Himelboim et al., 2013), Facebook (Bakshy et al., 2015), and Reddit (An et al., 2019) has received increasing attention in the computational social sciences recently, particularly in the context of Covid-19 (Green et al., 2020). In NLP, a growing body of work has discovered mechanisms by which polarization manifests itself linguistically (e.g., Demszky et al., 2019). However, the methods proposed so far rely on knowing in advance the political orientation of text, a requirement seldom met in social media.
In this paper, we propose SLAP4SLIP (Sparse LLanguage Properties for Social Link Prediction), a novel framework that fully dispenses with the need for labels and instead leverages the ubiquitous network structure of online discussion forums to detect polarized concepts, making it more scalable and lightweight than previous methods. For example, SLAP4SLIP finds that fascist and mainstream are among the most polarized concepts in Reddit in 2019 (Figure 1). We model the polarization of concepts along the dimensions of salience and framing. For framing, we take into account insights about the
(a) fascist (salience)
(b) mainstream (framing)
Figure 1: Examples of concepts polarized along the dimensions of salience (a) and framing (b) in Reddit in 2019. Each circle is a subreddit. The values for salience (a) are relative concept frequencies. References to fascism, reflected by higher relative frequencies of fascist, are typical for left-wing subreddits (blue region). The values for framing (b) are contextualized BERT embeddings projected into the moral sanctity/degradation subspace. The framing of mainstream as degenerate is pronounced in right-wing subreddits (magenta region). We can diagnose such patterns using SLAP4SLIP in a minimally supervised way.
moral foundations of ideology (Haidt and Joseph, 2004) and use contextualized BERT embeddings to construct subspaces that capture nuanced biases in the way concepts are discussed.
Contributions. We introduce SLAP4SLIP, a framework to detect polarized concepts without information about the political orientation of text. The specific model we propose for SLAP4SLIP combines graph neural networks with structured sparsity learning and identifies in a minimally supervised way (i) which concepts are the most polarized ones, (ii) whether the polarization is due to differences in salience or framing, and (iii) which moral foundations are involved (when framing is relevant). Drawing on English Reddit data, we evaluate the model intrinsically by conducting various experiments and extrinsically by using the found polarized concepts to predict the ideological leaning of US states. The model also learns subreddit embeddings that capture temporal dynamics. $^{1}$
We make our code available at https://github. com/valentinhofmann/slap4slip.
Findings of the Association for Computational Linguistics: NAACL 2022, pages 536 - 550
Key term	Explanation
Polarization	By polarization we mean the clustering (of nodes, embeddings, etc.) according to ideology. Like Garcia et al. (2015), we understand it as a non-binary property, i.e., there can be more than two poles. A concept polarized in salience could be a unigram whose relative frequency has two clusters corresponding to liberalism and conservatism.
Salience	We understand salience as the topical prominence with which issues are discussed, indicating that a substantial importance is (consciously or unconsciously) ascribed to them. Issues that are highly salient (e.g., for an online group) tend to be mentioned often, which is reflected by word frequency statistics.
Framing	We use framing to refer to the mechanism by which certain aspects of an issue are highlighted. If framing patterns are exploited repeatedly (e.g., in an online group), this is reflected by word cooccurrence statistics. Due to the importance of moral foundations for ideological thinking, this paper focuses on moral framing.
Table 1: Overview of our key technical terms. See main text for more details.
Our study is closely related to previous NLP work on polarization (An et al., 2018; Demszky et al., 2019; Shen and Rose, 2019; Roy and Goldwasser, 2020; Tyagi et al., 2020; Vorakitphan et al., 2020), but we try to avoid the need for explicit information about ideologies (e.g., manual labels) by leveraging the network structure of online discussion forums. Besides being more readily applicable in practice, this means our method is not restricted to a small number of opposing ideologies, making it theoretically more sound (Jackman, 2001). There is also work in the computational social sciences showing that the structure of various types of online social networks reflects polarization (Adamic and Glance, 2005; Garcia et al., 2015; Garimella et al., 2018), which has been explained as a result of homophily, i.e., nodes close to each other are likely to share similar views (McPherson et al., 2001). While these studies partition the network into a small number of ideological communities, our method does not require a discretization step. More broadly, our study is related to NLP work on ideology in general (Iyyer et al., 2014; Preotiuc-Pietro et al., 2017; Kulkarni et al., 2018).
Research in the political sciences has discovered salience and framing as two key dimensions along which the discussion of issues can vary ideologically. Salience refers to the amount of importance attached to an issue by individuals (Eulau, 1955; Miller et al., 2017). Mass media can impact salience, an effect called agenda setting (McCombs and Shaw, 1972). Framing refers to the mechanism by which certain aspects of an issue are highlighted (Entman, 1993; Druckman, 2001). Crucially, framing is different from sentiment: it reflects what considerations are perceived as important, not what stance is taken regarding these considerations (Nelson and Oxley, 1999). Both salience (with a focus
on agenda setting) and framing have been the subject of previous work in NLP (Tsur et al., 2015; Card et al., 2016; Field et al., 2018; Mendelsohn et al., 2021). Here, we use them to characterize differences between online groups.
Psychological research has shown that the fundamental divisions between different ideologies are rooted in their views of morality (Lakoff, 2008). In moral foundations theory (Haidt and Joseph, 2004; Graham et al., 2011), this has been formalized as variation along the moral foundations of care/harm, fairness/cheating, loyalty/betrayal, authority/subversion, and sanctity/degradation. Several studies have shown that moral foundations theory is a suitable basis for analyzing ideological framing (Johnson and Goldwasser, 2018; Mokhberian et al., 2020; He et al., 2021). We follow this approach, but as opposed to prior work we operate with contextualized embeddings that we project into moral embedding subspaces.
Methodologically, we draw on advances in deep learning with graph neural networks, specifically graph auto-encoders (Kipf and Welling, 2016, 2017). In NLP, such graph-based architectures are increasingly used to include information from social networks for downstream tasks (e.g., Mishra et al., 2019; Hofmann et al., 2021). Our work differs in that we combine deep learning on graphs with structured sparsity, a form of regularization similar to  $\ell_1$  regularization (Tibshirani, 1996) that sets entire groups of parameters to zero (Alvarez and Salzmann, 2016). Structured sparsity has been used in NLP before (Eisenstein et al., 2011; Murray and Chiang, 2015; Dodge et al., 2019), but not in connection with graph neural networks.
The precise definition of the key technical terms in this paper somewhat varies in the literature (e.g., Bramson et al., 2016). Table 1 therefore provides a short overview of how we use these terms.
3 SLAP4SLIP Framework
The key idea of this paper is to directly leverage the social network structure for determining polarized concepts. We introduce a novel framework called SLAP4SLIP (Sparse LLanguage Properties for Social Link Prediction) whose goal is to model the structure of social networks in a data-driven way that obviates the need for extensive human annotation or partitioning the network into communities. SLAP4SLIP is a general framework to detect the most salient types of linguistic variability in social networks and is in principle applicable in any scenario involving social networks with textual data attached to each node. In this paper, we show that for polarized online discussion forums, SLAP4SLIP can be used to find polarized concepts.
Let  $\mathcal{G} = (\mathcal{V},\mathcal{E})$  be a network consisting of a set of nodes  $\mathcal{V}$  representing social entities and a set of edges  $\mathcal{E}$  representing connections between the social entities. We denote with  $\mathbf{A}\in \mathbb{R}^{|\mathcal{V}|\times |\mathcal{V}|}$  the adjacency matrix of  $\mathcal{G}$ . Let  $\mathcal{C}$  be a set of word  $n$ -grams denoting concepts (e.g., political issues like gun control). Here, we confine ourselves to subreddits for  $\mathcal{V}$  and unigrams and bigrams for  $\mathcal{C}$ , but SLAP4SLIP is applicable in other scenarios (e.g., for networks of people or concepts extracted from text in a more complex manner). We define a function  $\psi_l:\mathcal{V}\times \mathcal{C}\to \mathbb{R}$  that assigns to each node  $v_{i}\in \mathcal{V}$  and concept  $c_{j}\in \mathcal{C}$  the value of a linguistic property  $l$  observed for  $c_{j}$  in  $v_{i}$ .  $\psi_{l}$  can be represented as a matrix in  $\mathbb{R}^{|\mathcal{V}|\times |\mathcal{C}|}$ ,
$$
\boldsymbol {\Psi} _ {l} = \left[ \begin{array}{c c c} \psi_ {l} (v _ {1}, c _ {1}) & \ldots & \psi_ {l} (v _ {1}, c _ {| \mathcal {C} |}) \\ \vdots & \ddots & \vdots \\ \psi_ {l} (v _ {| \mathcal {V} |}, c _ {1}) & \ldots & \psi_ {l} (v _ {| \mathcal {V} |}, c _ {| \mathcal {C} |}) \end{array} \right],
$$
where each column is a graph signal (Dong et al., 2020) over  $\mathcal{G}$  determined by  $c_{j}$  and  $\psi_{l}$ . For example, if we chose  $l$  to be the frequency count,  $\psi_{l}$  would indicate how often each concept occurred in the text attached to each node of the network.
The goal of SLAP4SLIP is to find the subset of concepts  $\mathcal{C}^* \subseteq \mathcal{C}$  that best meets the following two desiderata: (i) given a linguistic property  $l$ , the signals imposed on  $\mathcal{G}$  by  $\psi_l$  and the concepts in  $\mathcal{C}^*$  should allow for optimal predictions about the structure of  $\mathcal{G}$ , specifically  $\mathcal{E}$ ; (ii) the number of concepts in  $\mathcal{C}^*$  should be minimal. In practice,
(a)  $\psi_{l}$  for  $c_{1}$
Figure 2: Example for the prediction of graph structure from a linguistic property. The figures show  $\psi_l$  for concepts  $c_1$  and  $c_2$  on a toy graph, with  $l$  chosen to be the frequency count represented by node color (identical colors mean identical frequencies). The edges can be fully predicted from  $\psi_l$  for  $c_1$  but not  $c_2$ .
(b)  $\psi_l$  for  $c_2$
we treat this as a constrained optimization problem (Bertsekas, 1982), i.e., we use (i) as the objective and impose (ii) as a hard constraint on  $|\mathcal{C}^*|$ .
As an example, consider the network in Figure 2. The network consists of two connected components of four edges each, with no edges between the components.  $\mathcal{C}$  consists of the two concepts  $c_{1}$  and  $c_{2}$ . Taking the frequency count as linguistic property  $l$  and displaying it with the color of nodes,  $\psi_{l}$  results in the two signals shown in Figure 2. We can see that the signal of concept  $c_{1}$  alone allows for a perfect prediction of the network structure according to the decision rule
$$
\mathbf {A} _ {i j} = \left\{ \begin{array}{l l} 1 & \text {i f} \psi_ {l} (v _ {i}, c _ {1}) = \psi_ {l} (v _ {j}, c _ {1}) \\ 0 & \text {o t h e r w i s e .} \end{array} \right.
$$
Since  $c_2$  cannot achieve a perfect prediction,  $\mathcal{C}^* = \{c_1\}$  is the optimal solution. Notice the variance of  $\psi_l(v_i, c_j)$  is identical for both concepts and does not represent a good distinguishing factor. Notice also that the optimal solution is not necessarily unique: there might be another concept  $c_3$  with a similar frequency count distribution as  $c_1$  such that  $\mathcal{C}^* = \{c_3\}$  would also be an optimal solution.
We draw upon Reddit Politosphere (Hofmann et al., 2022), a pseudonymized dataset based on Reddit covering 605 political subreddits (e.g., politics) from 2008 to 2019. For each year, Reddit Politosphere contains (i) all comments made to the subreddits and (ii) an unweighted graph with the subreddits as nodes and edges computed by applying statistical backboning to the counts of users shared between subreddits. Subreddits that have disproportionately many users in common are likely to be ideologically similar (Kumar et al.,
4https://zenodo.org/record/5851729 (CC-BY 4.0 license)
2We define concepts as topics, issues, and public figures discussed in online groups.
3Desideratum (i) is conceptually similar to measures of opinion polarization on networks (Matakos et al., 2017).
2018). To ensure robust training, we only use years in which the graph has at least 100 nodes (2013 to 2019). See Appendix A.1 for summary statistics. The high modularity values indicate that the graphs are polarized (Kirkland, 2013).
We propose a neural architecture that uses information about concept-level salience and framing to predict links between subreddits while reducing the number of considered concepts as far as possible. Since the links reflect ideological similarity, this should result in a compact set of concepts that is maximally informative about ideology. The performance on link prediction makes it straightforward to compare the quality of different models.
Determining concepts. To obtain the concepts  $\mathcal{C}$ , we create for each year unigram and bigram vocabularies of political comments taken from Reddit Politosphere and non-political comments sampled in equal size from the default subreddits.5 To eliminate unigrams and bigrams typical of discussions but not relevant to salience and framing (e.g., dont think), we only consider unigrams and bigrams that appear more often within than outside of noun phrases as detected by a noun phrase chunker (Honnibal et al., 2020). Based on their frequencies within the political and non-political comments, we compute mutual information scores for all unigrams and bigrams and take the top 1,000 unigrams and bigrams for  $\mathcal{C}$ . This and all other steps are done separately for each year, i.e., we extract year-wise concepts and train year-wise models.
Modeling salience and framing. The first part of the architecture models  $\psi_l$ , i.e., it extracts linguistic information related to salience and framing from the subreddits and maps them to scalar representations. In the resulting matrix  $\Psi_l$ , each column is a signal on the entire graph defined by one concept, and each row is a vector for one subreddit defined by all concepts in  $\mathcal{C}$  (Section 3).
To model ideological salience, we measure the relative frequency of concepts
$$
s (v _ {i}, c _ {j}) = \frac {n (v _ {i} , c _ {j})}{\sum_ {k} n (v _ {i} , c _ {k})},
$$
where  $n(v_{i},c_{j})$  is the frequency count of concept  $c_{j}$  in subreddit  $v_{i}$ . Variations in the relative frequency of a concept that are strongly correlated with the
social network structure indicate that the concept is used with systematically higher frequency in certain regions of the social network, potentially caused by its elevated place within the ideologies of the subreddits in question.
To model ideologically-driven framing, we use BERT (base, uncased; Devlin et al., 2019) and obtain average contextualized embeddings  $\mathbf{e}(v_i, c_j)$  for each subreddit  $v_i$  and concept  $c_j$ . Furthermore, we use the Moral Foundations Dictionary (Frimer et al., 2017) and obtain for each moral foundation  $m_k$  (e.g., authority/subversion) average contextualized embeddings for the 10 highest-ranked words of both poles. Similar to Bolukbasi et al. (2016), we perform PCA on the 20 average contextualized embeddings for each  $m_k$  and use the first principal component as the subspace representation  $\mathbf{e}(m_k)$ . This allows us to project the subreddit-specific average contextualized concept embeddings  $\mathbf{e}(v_i, c_j)$  into the five moral subspaces,
$$
p _ {k} (v _ {i}, c _ {j}) = \cos (\mathbf {e} (v _ {i}, c _ {j}), \mathbf {e} (m _ {k})).
$$
$p_{k}(v_{i},c_{j})$  reflects how relevant the moral foundation  $m_{k}$  is for the contexts in which concept  $c_{j}$  occurs in subreddit  $v_{i}$  (see Appendix A.2 for further details and a systematic evaluation). The moral foundations are expected to be relevant for the framing of concepts to differing degrees. We therefore compute concept-specific weighted sums,
$$
f (v _ {i}, c _ {j}) = \sum_ {k} \pi_ {k} ^ {(c _ {j})} p _ {k} (v _ {i}, c _ {j}),
$$
where  $\sum_{k}\pi_{k}^{(c_{j})} = 1$  and  $\pi_k^{(c_j)}\geq 0$ .  $f(v_{i},c_{j})$  is an aggregate indicator of how important moral framing is for concept  $c_{j}$  in  $v_{i}$ . The parameters  $\pi_k^{(c_j)}$  are optimized during training.
Salience and framing can be of different importance for different concepts, i.e., there might be concepts with identical values of  $s(v_{i},c_{j})$  across all subreddits but maximally polarized values of  $f(v_{i},c_{j})$  (or vice versa). To capture this, we combine  $s(v_{i},c_{j})$  and  $f(v_{i},c_{j})$  in a weighted sum,
$$
o (v _ {i}, c _ {j}) = \alpha^ {(c _ {j})} s (v _ {i}, c _ {j}) + (1 - \alpha^ {(c _ {j})}) f (v _ {i}, c _ {j}),
$$
where  $0 \leq \alpha^{(c_j)} \leq 1$  is again a concept-specific parameter that is optimized during training.  $o(v_i, c_j)$  indicates the overall activation of concept  $c_j$  in  $v_i$  (i.e., both due to salience and framing). Two important points must be stressed. First,  $\pi_k^{(c_j)}$  and  $\alpha^{(c_j)}$
${}^{5}$  A set of topically diverse subreddits (e.g.,Fitness) users used to be subscribed to automatically. We remove news and worldnews since they also contain political content. We retrieve the default subreddits from the Pushshift Reddit Dataset (Baumgartner et al., 2020).
$^{6}$ https://osf.io/ezn37 (CC-BY 4.0 license)
are specific for concepts but identical for subreddits: e.g., if a concept  $c_{j}$  has  $\alpha^{(c_j)} = 1$ , this means that only information from  $s(v_i, c_j)$  is used for all subreddits. Second, values for  $o(v_i, c_j)$  are comparable across subreddits but not across concepts: since  $\pi_k^{(c_j)}$  and  $\alpha^{(c_j)}$  differ between concepts, differences in  $o(v_i, c_j)$  are not meaningful for different concepts (see Section 5 for examples). To get the final concept representation that is passed to subsequent parts of the model, we set  $\psi_l = o$ , i.e., each entry in  $\Psi_l$  contains the value of  $o(v_i, c_j)$  for subreddit  $v_i$  and concept  $c_j$ .
Graph neural network. To predict the links in  $\mathcal{G}$ , we use a graph neural network (Wu et al., 2021), specifically a graph auto-encoder (Kipf and Welling, 2016), which takes as input the matrix  $\Psi_{l}$  as well as  $\mathcal{G}$ 's adjacency matrix  $\mathbf{A}$ .
The encoder consists of a two-layer graph convolutional network (Kipf and Welling, 2017). In each layer, the subreddit representations  $\mathbf{H}^{(d)}$  are updated according to the propagation rule
$$
\mathbf {H} ^ {(d + 1)} = \sigma \left(\tilde {\mathbf {D}} ^ {- \frac {1}{2}} \tilde {\mathbf {A}} \tilde {\mathbf {D}} ^ {- \frac {1}{2}} \mathbf {H} ^ {(d)} \mathbf {W} ^ {(d)}\right),
$$
where  $\tilde{\mathbf{A}} = \mathbf{A} + \mathbf{I}$  is  $\mathcal{G}$ 's adjacency matrix with added self-loops,  $\tilde{\mathbf{D}}$  is the degree matrix of  $\tilde{\mathbf{A}}$ , and  $\mathbf{W}^{(d)}$  is the weight matrix of layer  $d$ .  $\sigma$  is the activation function, for which we use a rectified linear unit (Nair and Hinton, 2010) after the first and a linear activation (no non-linearity) after the second layer. We set  $\mathbf{H}^{(0)} = \boldsymbol{\Psi}_l$ . In our architecture,  $\mathbf{Z} = \mathbf{H}^{(2)}$  is the output of the encoder. Graph convolutions are mathematically equivalent to Laplacian smoothing (Li et al., 2018), which is an important property for our architecture: if a concept does not occur in a subreddit, it ensures that the subreddit receives a high-quality representation by drawing on the neighboring subreddits.
In the decoder, we compute the reconstructed adjacency matrix,  $\hat{\mathbf{A}}$ , according to
$$
\hat {\mathbf {A}} = \sigma \left(\mathbf {Z} \mathbf {Z} ^ {\top}\right),
$$
where we use the sigmoid for  $\sigma$ .  $\hat{\mathbf{A}}$  is then used to compute a prediction loss,  $\mathcal{L}^{(\mathrm{pred})}$ .
Structured sparsity. Following the SLAP4SLIP framework, we want to reduce the number of concepts in  $\mathcal{C}$ . In the described architecture, this amounts to reducing the number of columns in  $\Psi_{l}$ . We want to achieve this as part of training, using structured sparsity learning, specifically group
lasso regularization (Yuan and Lin, 2006), to set entire rows of the weight matrix  $\mathbf{W}^{(0)}$  to zero. Writing  $\mathbf{W}^{(0)} = [\mathbf{w}_1^{(0)},\dots ,\mathbf{w}_{|\mathcal{C}|}^{(0)}]^\top$  as a series of row vectors, we define the regularization penalty as
$$
\mathcal {L} ^ {(\mathrm {r e g})} = \sum_ {j = 1} ^ {| \mathcal {C} |} \| \mathbf {w} _ {j} ^ {(0)} \| _ {2}.
$$
This is a mixed  $\ell_1 / \ell_2$  regularization (the  $\ell_1$  norm of the row  $\ell_2$  norms) that leads to sparsity on the level of rows. When all entries in a row  $\mathbf{w}_j^{(0)}$  are zero, this has the effect of removing concept  $c_{j}$  from  $\mathcal{C}$ . We compute the final loss as
$$
\mathcal {L} ^ {\mathrm {(t o t a l)}} = \mathcal {L} ^ {\mathrm {(p r e d)}} + \lambda \mathcal {L} ^ {\mathrm {(r e g)}},
$$
where  $\lambda > 0$  is a hyperparameter controlling the intensity of the  $\ell_1 / \ell_2$  regularization.
Setup. For each year, we split  $\mathcal{E}$  into  $60\%$  train,  $20\%$  dev, and  $20\%$  test edges. We always use the train edges for the adjacency matrix  $\mathbf{A}$  that is passed to the model, i.e., only the to-be-predicted edges differ between train, dev, and test. For dev and test, we randomly sample non-edges  $(v_{i}, v_{j}) \notin \mathcal{E}$  as negative examples such that edges and non-edges are balanced in both sets (50% positive, 50% negative). For training, we sample non-edges in every epoch (i.e., the set of sampled non-edges changes in every epoch). During test, we rank all edges according to their predicted scores. See Appendix A.3 for hyperparameter details.
In this paper, we use sparsity as a hard constraint on the number of concepts with non-zero row weights in  $\mathbf{W}^{(0)}$ , i.e., we only consider models for which  $|\mathcal{C}| \leq \theta_{|\mathcal{C}|}$ , where  $\theta_{|\mathcal{C}|}$  is the sparsity threshold. We initially set  $\theta_{|\mathcal{C}|} = 150$  but later analyze its impact in greater detail.