{'fraction_non_alphanumeric': 0.028146616840263972, 'fraction_numerical': 0.005724735628528266, 'mean_word_length': 4.647956892680736, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Anatomy of Brexit Debate on Facebook

Nowadays users get informed and shape their opinion through social media. However, the disintermediated access to contents does not guarantee quality of information. Selective exposure and confirmation bias, indeed, have been shown to play a pivotal role in content consumption and information spreading. Users tend to select information adhering (and reinforcing) their worldview and to ignore dissenting information. This pattern elicits the formation of polarized groups -- i.e., echo chambers -- where the interaction with like-minded people might even reinforce polarization. In this work we address news consumption around Brexit in UK on Facebook. In particular, we perform a massive analysis on more than 1 Million users interacting with Brexit related posts from the main news providers between January and July 2016. We show that consumption patterns elicit the emergence of two distinct communities of news outlets. Furthermore, to better characterize inner group dynamics, we introduce a new technique which combines automatic topic extraction and sentiment analysis. We compare how the same topics are presented on posts and the related emotional response on comments finding significant differences in both echo chambers and that polarization influences the perception of topics. Our results provide important insights about the determinants of polarization and evolution of core narratives on online debating.

the mechanisms behind information diffusion for different kinds of contents [16].
More recently, several doubts about social influence on the Internet have been raised during Brexit -the British referendum to leave the European Unioncampaign, where both sides, Leave and Remain, battled it out on social media.
Indeed, a big effort has been dedicated to characterize the dynamics of the online Brexit debate, from applying filtering algorithms to study the shape of online data [17], through the investigation of the role of bots on the direction of discussions [18], to the study of the effects of the referendum result on financial markets [19].
In this paper we address the Brexit discussion on Facebook public pages referring to UK based official information sources listed in the European Media Monitor [20].
Firstly, we characterize the structural properties of the discussion by observing the spontaneous emergence of two well-separated communities; indeed, connections among pages are the direct result of users' activity, and we do not perform any categorization of contents a priori. Then, we explore the dynamics behind discussion: looking at users polarization towards the two communities and at their attention patterns, we find a sharply bimodal distribution, showing that users are divided into two main distinct groups and confine their attention on specific pages.
Finally, to better characterize inner group dynamics, we introduce a new technique which combines automatic topic extraction and sentiment analysis.
We compare how the same topics are presented on posts and the related comments, finding significant differences in both echo chamber and that polarization on the perception of topics. We first measure the distance between how a certain concept is presented on the posts and then the emotional response of users to such controversial topics. Our new metrics could be of great interest to identify the most crucial topics in online debates. Indeed, it is highly likely that the greater the emotional distance between the same concept in two echo chambers, the greater the polarization of users involved in the discussion. Therefore, such a distance may be a key marker to locate controversial topics and to understand the evolution of the core narratives within distinct echo chambers.

Ethics Statement.
The data collection process was carried out using the Facebook Graph API [21], which is publicly available. For the analysis (according to the specification settings of the API) we only used publicly available data (thus users with privacy restrictions are not included in the dataset). The pages from which we downloaded data are public Facebook entities and can be accessed by anyone.
Users' content contributing to such pages is also public unless users' privacy settings specify otherwise, and in that case it is not available to us.

Data collection.
The European Media Monitor (EMM) [20] provides a list of all news sources which includes, for each of them, the related country and region. We limited our collection to all pages whose legal head office (at least one of them) is located in the United Kingdom. For each page, we downloaded all the posts from January 1st to July 15th, 2016, as well as all the related likes and comments. The exact breakdown of data is provided in Tab. 2, while the complete set of downloaded pages is reported in Tab. 4 in the Appendix.

Preliminaries and Definitions.
In this section we provide a brief description of the main concepts and tools used in the analysis.

Bipartite Projection.
A bipartite graph is a triple We consider the bipartite network G = (P, U, E) where P is the set of Facebook pages concerned on Brexit topics (see Tab. 4 in the Appendix ) and U is the set of users active on pages belonging to P . An interaction with a given information posted by a page p ∈ P determines a link between a user u ∈ U and the page p, hence M p,u = 1 indicates that user u was active on page p. For our analysis we use the co-occurrence matrices C P = M M T and C U = M T M that count, respectively, the number of common neighbors between two vertices of P or U . As an example, C P p,q for p = q counts the number of users that were active on both pages p and q. C P can be interpreted as the weighted adjacency matrix of the co-occurrence graph G P with vertices on P . Each non-zero element C P p,q corresponds to an edge (p, q) among vertices p and q with weight C P pq .

Community Detection Algorithms.
Community detection algorithms serve to identify groups of nodes in a network. Most of the strategies relies on the modularity which quantifies the division of a network in separated clusters, high modularity corresponds to a dense connectivity between nodes in a community and sparse connections between modules. In this work we apply four different community detection algorithms: Fast Greedy (FG), that seeks for the maximum modularity score by considering all possible community structures in the network. It tries to optimize the modularity function in a greedy manner [22]. Walktrap (WT), that exploits the fact that a random walker tends to remain trapped in the denser parti.e., communities -of a graph. Hence WT uses short random walks to merge separate communities [23]. Multilevel (ML), that is based on a multi-level modularity optimization procedure [24]. Label Propagation (LP) [25], that is a nearly linear time algorithm that gives unique labels to vertices that are then updated according to majority voting in the neighboring vertices. Dense group of nodes reach consensus on a common label quickly. To compare the various community structures we use standard methods that compute the similarity between different clustering methods by considering how nodes are assigned by each community detection algorithm [26,27].
Backbone Detection Algorithm.
The disparity filter algorithm is a network reduction technique based on the local identification of the statistically relevant weight heterogeneities. This method is able to identify the backbone structure of a weighted network without destroying its multi-scale nature [28]. We make use of this algorithm to obtain the relevant connections that form our networks' backbones and produce clearer visualizations.

Results and Discussion
As a preliminary step, we divide all UK based pages in two groups: Brexit pages, that includes those pages engaged in the debate around the Brexit, and Non Brexit pages. Out of 81 pages, 38 posted at least one news story about the Brexit. Hence, we characterize the users behavior on Brexit pages and their related posts.

Communities and News Polarization
Online social media proved to facilitate the aggregation of individuals in communities of interest, also known as echo chambers [3], especially when restricting the interaction of users to conflicting information [2,5]. In the case of Brexit pages we focus of the emerging communities without considering the shared contents, but rather by accounting for the connections created by users activities.
Therefore, we start by analyzing the community structure of the Brexit pages graph. We consider the bipartite projection of the pages-users graph G p where nodes are Brexit pages and two pages are connected if at least one user liked a post from each of them. The weight of a link is determined by the number of users in common between the two pages.
In Fig. 1(a) we show the backbone structure of G p . Colors (resp., blue and red) represent the membership to one of the two communities (resp., C1 and C2) Taking into account the positive meaning of the like as a feedback to a post, we characterize how contents from the two communities detected in G p are consumed by Facebook users. We define the users polarization by likes (reps., comments) as where y is the number of likes (resp., comments) that user u left on posts of C2 and x the number of likes (resp., comments) left on posts of C1. Thus, a user u is said to be polarized towards C2 (resp., C1) if (u) = 1 (resp., −1). In Fig. 2 we report the Probability Density Function (PDF) of users polarization by likes  (left panel) and comments (right panel). We find that (u) is sharply bimodal in both cases, denoting that the majority of users may be divided into two main groups referring to the two communities of Fig. 1  Thus, we have shown that users form two well segregated communities. We now want to compare their activities on posts from Brexit pages. In Fig. 3(a) we  of the two communities, the distributions of their attention patterns are very similar, and even equal in the case of comments.

Emotional Dynamics Inside and Between Communities
Our analysis provides evidence of the existence of two well segregated echo chambers: users tend to focus on one narrative and to ignore the other. Such a pattern might be driven by the way in which contents are debated on pages, i.e., is such a way that matches their own users' preferences. To shade light on this aspect, we want to measure the distance among the sentiment of the users w.r.t. the same topic. Thus, we analyze how the subject of a post is presented to the users. To perform the analysis we make use of IBM Watson TM Alchemy-Language service API [29], that allows us to extract semantic meta-data from posts content. Such a procedure applies machine learning and natural language processing techniques aimed to analyze text by automatically extracting relevant entities, their semantic relationship as well as the emotional sentiment they express [30]. In particular, we extract the sentiment and the main concepts presented by each post of the dataset, whether it has a textual description or a link to an external document. The AlchemyAPI tools make use of the language pat- terns surrounding the input text looking for signals that denote the sentiment and exploring information based on the concepts behind such an input. Thus, a concept is a high-level conceptual association identified in the content provided as input to the service. Input content is auto-tagged against a concept graph, which formally represents the relationships between the concepts contained in the data on which it is based. is neutral, and 1 is positive. For each post (resp., user) we compute the average sentiment of its (resp., her) comments -i.e., the mean of the sentiment of all comments on the post (resp., made by the user). Then, for each concept, we consider the emotional distance between the average sentiment of the post and that of its users. Fig. 6 shows the emotional response of users to posts of C1 In this section we provide the list of all Facebook pages of news sources whose legal head office (at least one of them) is located in the United Kingdom.
Pages engaged in the debate around Brexit are denoted by Y (N, otherwise), followed by the community to which they belong (C1 or C2).  Membership: List of all Facebook pages of news sources whose legal head office (at least one of them) is located in the United Kingdom.
Pages engaged in the debate around Brexit are denoted by Y, followed by the community to which they belong.