Dissent and rebellion in the House of Commons: a social network analysis of Brexit-related divisions in the 57th Parliament

The British party system is known for its discipline and cohesion, but it remains wedged on one issue: European integration. We offer a methodology using social network analysis that considers the individual interactions of MPs in the voting process. Using public Parliamentary records, we scraped votes of individual MPs in the 57th parliament (June 2017 to April 2019), computed pairwise similarity scores and calculated rebellion metrics based on eigenvector centralities. Comparing the networks of Brexit- and non-Brexit divisions, our methodology was able to detect a significant difference in eurosceptic behaviour for the former, and using a rebellion metric we predicted how MPs would vote in a forthcoming Brexit deal with over 90% accuracy.

in favour of an issue versus those who are not. And while it is widely used in quantitative work, the metric has a few limitations, primarily, it is a simplistic measure that does not consider more than two voting options (whereas the British parliament could vote either ' Aye ' , 'No' or abstain); second, it is an aggregate measure reported at the party level and does not measure individual cohesion in relation to a group; and (thus) third, the metric is not directly sensitive to shifts in pairwise interactions amongst members of parliament (MPs) over a voting period. But voting is a social phenomenon and it is worth considering that an MP's voting record may change over time during the course of a legislature, whether in relation to another MP, or more widely, in relation to a group. Similarly, other empirical analyses on party cohesion and rebellion (Searing 1978;Collie 1984;Pattie et al. 1998;Russell 2014;Raymond and Worth 2017;Surridge 2018) also cite differences at an aggregate level.
We aim to address these limitations by using social network analysis. This paper seeks to investigate whether methods in social network analysis can help detect the continuing 'eurosceptic' behaviour of the Parliament in the Brexit era. We particularly analyse the voting patterns of Members of the 57th Parliament on Brexit-related matters to identify cohesion and/or rebellion. We define rebellion among pairs of MPs as one of two forms: first, as a cross-party alliance, where an MP defies his/her own party whip and votes in coherence with another MP from a different party; and second, as a within-party conflict, where two MPs belong to the same party but vote differently.
The primary contribution of this methodology is to inform voting cohesion (or dissent) at the individual level rather than report them in aggregate at the party-or group-level. Second, this analysis on individual choice is advantageous in that it can help anticipate voting patterns by MPs as they unfold, compared to a ex-post retrospective analysis using historical accounts.

Data
Using data from Hansard, the official central repository of all UK Parliamentary records, we begin the analysis with a dataset of divisions in the House of Commons for only the 57th Parliament, which is the legislature immediately following the Brexit referendum. Our analysis period is from 21st June 2017, when the new Parliament started, until 10th April 2019, when the European Council granted another extension to the Article 50 period followed by Theresa May's resignation, including a total of 414 divisions (A division is a vote of either "Aye (Yes)" or "No" on a Parliamentary issue 1 ). Hansard provides comprehensive and verbatim information on Parliament debates, divisions, petitions, and statements, for both the House of Commons and the House of Lords. The digitalised database of division voting started in March 2016, and is made available for download through the data.parliament.uk website. Committee divisions, which tackle particular areas of interest, were excluded from the analysis.
Hansard collects data for each division in a CSV file, tagged with a unique ID, a unique URL which contains detailed information (such as the voting record), and the title of the division. We identify the 414 that belong to the 57th Parliament, and manually classified each division to a Brexit or non-Brexit group for the analysis. For instance, any division that mentions the words: EU exit, EU withdrawal, Brexit, and other related keywords in their title were tagged as Brexit divisions. Out of the 414, there were 192 divisions labeled as Brexit and 222 non-Brexit. Then, to gather the names of every MPs who voted "Aye" or "No" on each of the 414 divisions, we built a web crawler that would loop across the unique URLs for each of the 414 divisions, each page containing a JSON file with information on each MP's vote.
MPs either belong to a political party or are Independent. The breakdown of 650 MPs by political party are: 317 Conservative, 254 Labour, 35 SNP or the Scottish National Party, 11 Liberal Democrats, 10 DUP or Democratic Unionist Party (of Northern Ireland), 7 Sinn Féin, 4 Plaid Cymru (or the Party of Wales), 1 Green Party, and 11 Independent. Out of the 650, two from the Conservative and two from the Labour party do not vote as the Speaker and 3 Deputy Speakers of the House, while the 7 Sinn Féin are absentionists and do not take their seats in the House of Commons; hence there are 639 voting MPs. Because Hansard only records the MPs who voted "Ayes" or "Noes, " MPs that were missing from either were presumed to not have voted on the division. This is the main dataset for the analysis.
We also label each MP by left-wing or right-wing, depending on their political party affiliation. Traditionally, the two largest parties, Labour and Conservative, are on the left and the right, respectively. The DUP, which entered into a coalition with the Conservative Party in 2017, is also on the Right-wing; while the other Opposition parties are on the Left-wing. (The Liberal Democrats, which at times are aligned with the Conservative party, were classified as left-wing for this analysis because of their Remain stance on Brexit.) Meanwhile, for each of the 11 Independent MPs who, by definition is not affiliated, we labelled their ideology by their prior political affiliation: one Independent MP was formerly Conservative, while 8 were formerly Labour, and one was a former Liberal Democrat. One Independent candidate (Lady Hermon) was classified as Left-wing, primarily because of her refusal to support the right-leaning Conservative Party (BBC 2010) to which her former party-the Ulster Unionist Party (UUP)-is associated with. The political party breakdown of the 639 voting MPs is provided in Table 1.

Cosine similarity
We start with a 639 × 414 matrix. On the rows are each of the 639 voting MPs, and on the columns are each of the 414 divisions. The elements of the matrix are: +1, if the member voted "Aye" on the division, −1 if the member voted "No", and 0 if the MP did not vote. We then sub-divided the matrix into the Brexit and the non-Brexit divisions. As mentioned earlier, these were classified manually according to the mention of EU exit, withdrawal, or related words in their division title. Splitting the big matrix results in two smaller matrices with sizes 639 × 192 containing the Brexit divisions, and 639 × 222 containing the non-Brexit divisions.
Using the cosine similarity formula, which projects a pair of vectors in multidimensional space, we transform the original matrix to a square matrix with dimension 639 × 639, to project the similarity among each vector pair of MPs, controlling for the differences in the number of non-zero elements in the vectors: where a i and b i are votes of a pair of MPs a and b in division i; Each vector pair (i.e., pair of MPs) generated from the matrices in Eq. (1) will contain elements ranging from between −1 (full dissimilarity between the voting pair) and +1 (full similarity). A value of 0 means no correlation.
Note that the cosine similarity formula considers varying vector densities, which means that the voting similarity score is weighted by the frequency of the votes cast. Thus, the differences in frequencies may represent MPs who abstain or do not vote on certain divisions.

Party and ideology similarities
The cosine similarity matrices in Eq. (1) only establishes the voting coherence or voting polarity, but does not indicate anything on the party similarities between pairs of MPs. Hence, we define a reference party similarity matrix and compare the cosine similarity matrices to it.
Consider a 639 × 639 matrix with entries of +1, if the MP pair belongs to the same political party; or −1, if the MP pair does not belong to the same party. Note that there are 8 parties (excluding Sinn Féin) in the analysis: Conservative, Labour, Liberal Democrats, DUP, SNP, Plaid Cymru, Green Party, and Independent; though this matrix is also prepared for a two-ideology case (Left-wing and Right-wing). The party similarity matrix is identical for the Brexit and the non-Brexit case. (1) and n = 192, Brexit 222, non-Brexit

Party and ideology-adjusted voting similarities
Finally, we compare the cosine similarity matrix with the party similarity matrices by subtracting the latter from the former for both Brexit and non-Brexit divisions. The elements of either matrix have a range of values from −2 to +2, centred on zero. These values indicate the magnitude by which the voting similarity between a pair of MPs is explained by their party. For instance, a value that is equal to zero means that the voting similarity between MPs is fully matched to what is expected from their party affiliations. As values move further away from zero, this means that the party affiliations have less power in explaining the voting similarity/dissimilarity among pairs of MPs. The same methodology and interpretation is applied to the 2-ideology case.
Thus, the non-zero values in the matrix imply varying deviations from voting patterns expected by the party affiliations. Values that are near-zero, for instance, mean that voting (dis)similarity is-for the most part-explained by the party (dis)similarity. But of interest to this study are the cases where the MPs' voting (dis)similarity is not explained by their party affiliations, or the values that deviate the farthest away from zero, towards the end of the range [−2, +2]. Values close to −2 is an indication of a within-party conflict, or a pair of MPs that voted dissimilarly despite belonging to the same party, while values close to +2 is an indication of a cross-party alliance, or a pair of MPs that voted cohesively despite belonging to different parties.

Network representation
Finally, the result is a square matrix with a zero main diagonal and symmetric entries, which is equivalent to the adjacency matrix of an undirected graph. The row and column labels (which are the names of the MPs) are the nodes of the network, while the elements of the matrix are the edges-they refer to the party-adjusted voting similarity or dissimilarity of each pair of nodes (or pair of MPs).
One can then visualise the adjacency matrix into a network, where each node represents an MP, and the elements of the adjacency matrix suggests the relationship between node pairs: strong negative values indicate polar opposites (or within-party conflict), while strong positive values mean cohesion (or cross-party alliance). Using a force-directed layout (Jacomy et al. 2014), pairs of MPs that correspond to a high negative score (within-party conflict) in the adjacency matrix are pulled further apart in the network space, while pairs of MPs with a high positive score (cross-party alliance) are expected to be pushed closer together. The Additional file 1 provides more details.

Eigenvector centrality
To investigate the cohesion and divergence between MPs we will first use visualization of the network representation of the votes cast by them. However, to have a more systematic and reproducible approach, beyond visual inspection, we continue by identifying the outliers through calculating the eigenvector centrality of the MPs within the network. Eigenvector centrality has been used in different scenarios to quantify power and overall strength of a node in a signed network (Bonacich 2007;Tang et al. 2016), and it is particularly suitable here as it quantifies "the degree to which status is transmitted from one vertex to another and it also permits the assessment of power in negatively connected" (Cook et al. 1983;Bonacich 2007). On the other hand, eigenvector centrality has a tendency of being very localised (Martin et al. 2014), i.e., exagerating the centrality of very few nodes, however, this would not be a limitation here as we are using eigenvector centrality to detect the outliers rather than to rank all the nodes. There are several propositions for calculation of centrality in a signed networks. Some consider the sign of the connections in the calculation directly and some split the network into positive and negative sub-networks and calculate the centrality separately. We take the latter approach and calculate the eigenvector centrality of each node once only considering positive edges, and then only negative edges where the weights are replaced with the absolute values. The final centrality score of each MP is the sum of the two centrality scores.

Party and ideology-adjusted voting similarity matrices
In Fig. 1, we show a histogram of the links of the matrices from the party-adjusted voting similarity matrix. For both the 8-party case and the 2-idealogy case, the Kolmogorov-Smirnov (KS) test confirms that the two distributions (Brexit vs. non-Brexit) are different with an alpha of < 0.001.
The two types of dissent are presented in the histogram as follows. Values that are greater than or equal to 1 are cross-party alliances, or two MPs that belong to different parties but voted cohesively. On the other extreme, values that are less than or equal to −1 signal within-party conflicts, or two MPs that belong to the same party but voted opposite. There are two things that can be inferred from Fig. 1: first, there are comparatively higher levels of cross-party alliances than within-party conflicts; second, and more importantly, it can be observed that there is a larger frequency of within-party conflicts on Brexit-related divisions compared to non-Brexit, which is consistent with the literature on party rebellion particularly on issues of European integration.

Network projection: 8-party case
We visualise the extreme values, i.e. ≥ 1 (cross-party alliances) and ≤ −1 (within-party conflicts) in Fig. 2. It can be observed that for the top graph, which represents the The non-Brexit graph suggests strong party discipline within each of the two main parties, Conservative and Labour. Conservative nodes tend to cluster together, while Labour nodes (and other parties in opposition) are in the other cluster. This means that for non-Brexit divisions, MPs vote largely within their party lines, and very rarely do they rebel and cross to the other cluster. One can also infer the cross-party alliances from the graph. For instance, the DUP and the Conservative are clustered together, which verifies their voting coalition. Meanwhile, the Labour, Plaid Cymru, Green, and SNP, are on the other cluster, which suggests a united opposition when voting in Parliament on non-Brexit divisions; and Liberal Democrats split between the two camps. This is a stark contrast to the Brexit divisions, the bottom graph of Fig. 2. There is evidently greater cross-cluster interaction, which is an indication that party lines are blurred. The rose-coloured edges suggest within-party conflict. This means that there are a number of MPs that rebel from the cluster discipline and are pulled apart. For example, some nodes representing Labour MPs have moved within the cluster space of the Conservative party, which indicates that these MPs have voted more cohesively with the Conservative rhetoric, and thus expressing strong repulsion to MPs from their own party. Also, cross-party alliances may occur among pairs of ideologically polarised MPs; These results are however largely influenced by the number of political parties in the analysis. Mainly, the cross-party alliances occur almost exclusively within the ideological cluster, and does not necessarily signify rebellion. In order to distinguish the true rebellions from the effect of ideological cohesion from multiple parties, we re-label the party similarity matrix to indicate ideological affiliation (Left-or Right-wing) rather than the original 8-political party classification. The analysis based on the 2-ideology case is also backed by recent studies that find ideology as a determinant of Brexit support (Vasilopoulou 2016; Surridge 2018).

Network projection: 2-ideology case
Recall that in the right-side chart in Fig. 1 we show the histogram of a two-ideology case, where we re-labelled the Conservatives, the DUP, and one independent MP as rightwing; while the rest of the MPs were classified as left-wing. Re-labelling each MP by ideology rather than by political party gives a clearer and more striking result. In both the histogram in Fig. 1 and the network visualisation in Fig. 3, it appears that the crossideology alliances and within-ideology conflicts in the non-Brexit case completely disappear when re-labelling the MPs by left or right ideology. The absence of edges in the top graph of the non-Brexit case suggests full cohesion within each left-wing and right-wing cluster, respectively. In contrast, the bottom graph depicting the Brexit case continues to show strong cross-cluster interactions, suggesting instances of rebellion on both crossideology alliances and within-ideology conflicts.

Eigenvector centrality
In Table 2, we list the summary statistics for the eigenvector centrality measure. The low mean and median centrality scores indicate that MPs generally adhere to their expected party rhetoric and as mentioned above eigenvector centrality tends to be localised around only a few nodes. Meanwhile, the top 10 rebels, identified below and listed with their party affiliations and expected ideology, have eigenvector centrality scores of >0.9.
Comparing the results of the eigenvector centrality metric with our 2-ideology network visualisation, we are able to correctly infer the top 9 of the 10 rebels. The visualisation is provided in Fig. 4 below. Recall that in one case which we referred to in our Data section, we classified Lady Hermon (ranked number 1 rebel by eigenvector centrality) as a Left-wing Independent because of her refusal to affiliate with her former party, the Right-leaning Ulster Unionist Party. The centrality score rightfully detected her as a rebel in spite of her network position of being in the Left-wing. Thus the results of the centrality measure can accurately quantify and identify dissenters regardless of arbitrary labeling (false positives), particularly in the case of Independent MPs' ideologies in the network visualisation. Table 2 Top 10 rebels based on eigenvector centrality. Asterisks (*) indicate that the MP was also identified by the network visualisation Lady Hermon (**) was not identified a rebel by visual inspection, but was labelled an Independent rebel in our "Data and Methods" section  Table 2, and checked whether they rebelled against their party in voting for Boris Johnson's Brexit deal timetable. The vote tallies by MP are taken from the BBC (2019) and Hansard, and the comparative table is presented in Table 3 below.
Of the ten MPs in list on Table 3, nine had cast a vote and eight of them rebelled against their party or ideological expectation in Table 2. In the Additional file 1 we also provided an expanded version of this list, where we used the eigenvector centralities of all 639 MPs in order to calculate the overall accuracy score of our model. The accuracy score is defined by the number of correct predictions (true positives + true negatives) divided by total predictions, and the accuracy score of our model is 94%.
In anticipating voting patterns as they unfold, these results provide further indication that the centrality metric and the findings from the network visualisation are valid.

Conclusion
The study of dissent and rebellion is not a new concept, but through social network analysis we aim to bring new perspectives. We contribute this alternative methodology of using pairwise interactions between MPs as an enhancement to the current cohesion metrics which are aggregated and binary in nature. After all, the voting process is a social phenomenon, and our understanding of Parliamentary rebellion goes beyond knowing whether dissent levels are high or if cohesion levels within parties are low. Especially in today's localism-focused politics, what adds value is our understanding of the dynamics behind every MP's vote, and anticipating voting patterns as they unfold. When faced with uncertainty, learning that there are splits and factions in the party system is 'stating the obvious' as it is already after-the-fact and it contributes very little information in the action plan to move forward. But understanding the interactions of individuals on a granularised (division) level can provide an ample road map to overcome real-time challenges in the legislative process. We can count a few limitations in our approach. First, it is by no means causal. While we can identify the rebels by visual inspection of their voting behaviour or by computing their rebellion scores, whether or not the MP will actually leave his/her party remains to be seen. As a preliminary step, we used the validation section as a prelude to the causality discussion, but it is recommended that the social network analysis is supplemented by other quantitative approaches that specialise in causal inference. Second, by taking a granular approach, one may overlook the benefits of using a simpler and uncomplicated measure of party cohesion. For instance, traditional aggregated approaches may be easier to interpret as it is computationally convenient and most information is condensed to a single number (e.g. a party cohesion score), whereas in producing the network, or a rebellion score for each MP may entail calculations and matrix transformations that may be difficult to disentangle. In this analysis we tried to bridge this complexity gap by producing visual representations of the network, but the process of generating it may not necessarily be straightforward.
Our analysis suggests that European integration continues to linger until the present, and that euroscepticism still casts a long shadow in the House of Commons. Our immediate experience does not give us much credence, as transition governments following a period of fragmentation are likely to be fundamentally weak. But on the other hand, given today's empirical methods, we no longer are limited to using historical accounts to benchmark the future. The record-keeping of the UK Parliament is one of the most modern, and comprehensive systems available for legislative data. Contemporary computational methods such as social network analysis may not be typically used in the political sciences, but the methodology lends a fresh take in understanding social phenomenon particularly in voting behaviour. The methodological framework suggested here can be used in future replication of the same analysis on the data from the forthcoming sessions of the Parliament in a continuous manner and the results of such analysis can inform the politicians, political analysts, and most importantly the citizens.
Additional file 1. Includes a list of abbreviations, links to the Hansards, more details on network visualization, and methods for accuracy score calculation.