Grounding force-directed network layouts with latent space models

Force-directed layout algorithms are ubiquitously used tools for network visualization. However, existing algorithms either lack clear interpretation, or they are based on techniques of dimensionality reduction which simply seek to preserve network-immanent topological features, such as geodesic distance. We propose an alternative layout algorithm. The forces of the algorithm are derived from latent space models, which assume that the probability of nodes forming a tie depends on their distance in an unobserved latent space. As opposed to previous approaches, this grounds the algorithm in a plausible interaction mechanism. The forces infer positions which maximise the likelihood of the given network under the latent space model. We implement these forces for unweighted, multi-tie, and weighted networks. We then showcase the algorithm by applying it to Facebook friendship, and Twitter follower and retweet networks; we also explore the possibility of visualizing data traditionally not seen as network data, such as survey data. Comparison to existing layout algorithms reveals that node groups are placed in similar configurations, while said algorithms show a stronger intra-cluster separation of nodes, as well as a tendency to separate clusters more strongly in multi-tie networks, such as Twitter retweet networks.


I. INTRODUCTION
This contribution aims to bring together two strands of research: Latent space approaches to network analysis and force-directed layout algorithms (FDLs).FDLs are used ubiquitously for network exploration, illustration, and analysis in a wide variety of disciplines [1][2][3][4][5][6][7][8][9][10].Nevertheless, it is still unclear how to precisely interpret node positions and corresponding patterns such as node clusters in force-directed layouts.Nor is it clear what constitutes an appropriate algorithm choice for different network data from the range of FDLs available-points also highlighted recently in [11] and [8].We argue and show that explicit interpretability can be provided by latent space approaches, which have the goal of embedding a network in an underlying social space, and where link probabilities are related to proximity in this space.
To this end, we first briefly sketch how FDLs became the predominant tool for graph drawing, their connection to modularity, and their shortcomings with respect to interpretability.
We also introduce latent space approaches to network analysis, and subsequently show how force terms of a new type of FDL can be derived from said latent space models, where the forces move nodes towards positions and parameters which maximise the likelihood for the network under the given model.We derive force equations for three types of networks: Unweighted networks, cumulative networks (such as the much-studied Twitter retweet networks), and weighted networks.We present an implementation of the FDL as well as a number of real-world networks spatialised with it.We also show that existing algorithms, specifically ForceAtlas2 [12], Fruchterman Reingold [13], and Yifan Hu [14], differ from the presented FDL.

II. LATENT SPACES AND FDLS: AN INTERSECTION
Initially, network visualisation algorithms1 had been conceived to facilitate graph reading -they were supposed to make small networks readable in the sense that paths and nodes in the network were clearly accessible, that the edges had similar lengths and that the network was drawn as symmetric as possible [15].Progress in network science and the sudden availability of very large network data sets at the end of the millennium -for which a comprehension of individual node positions and paths was illusory -shifted focus: Now, networks needed to be drawn so that community structure and topological features were mediated in the layout.FDLs (partly having been developed already before this complex turn, notably in [13,15]) turned out to be useful and efficient tools for this task.The algorithms have in common that all nodes repel each other (the repulsive force is usually proportional to a power of of the distance between nodes, i.e.F r ∝ d r ), while connected nodes are additionally drawn together by their edges (F a ∝ d a , a > r).
Noack, in a seminal work [16], connected FDLs to modularity, one of the most central measures of clustering in networks in use today.Roughly speaking, modularity Q compares the proportion of links connecting nodes within a group of nodes with the proportion expected if the edges in the network were randomly rewired [17].Community detection algorithms, such as the Louvain algorithm [18], aim to find partitions of a network that maximise this value.Noack showed that, under certain constraints, modularity can be transformed into an expression that equals the energy function of force-directed layouts.Constraints for the equivalence are (i) that nodes can only be placed either at the same position (then, they belong to the same cluster) or at distance 1 from each other (if not in the same cluster).
(ii) that FDLs operate in a space of (at least) k − 1 dimensions, where k is the number of modularity clusters (usually, FDLs embed networks in a two-dimensional space).
(iii) that the exponents of attractive and repulsive force should be non-negative.(Obviously, if the repulsive force has a negative exponent, placement of nodes at the same position would be impossible.)For FDLs, this means that if they fulfill (ii) and (iii), energy-minimal states of force-directed layouts are relaxations of modularity maximization: They make community structure in networks visible without constraint (i) of having to sort nodes into different, fixed partitions with distance 0 or 1 from each other.They can assign continuous positions in space.Or, phrased the other way round: Modularity is then a special case of the energy function of FDLs.
However, Noack's finding is diluted by the fact that network visualisations with FDLs are commonly restricted to two (or at most three) dimensions; and moreover, most FDLs in use today employ a negative exponent for the repulsive force.Noack also gave qualitative observations of which algorithms, even if they do not exactly fulfill the constraints above, tend to produce results that resemble modularity clusterings.Exponents in the forces should be characterized by a ≥ 0 and the closer to 0, the better, r ≤ 0, and a − r ≈ 1. 2   The connection to modularity -which, notably, had not been intended in the design of the algorithms -helped give additional credibility to FDLs.All in all, this led to the widespread adoption of FDLs for network visualisation: They were not only used for illustrative purposes [1, 3,5], but also to explore and analyse network data [2,[7][8][9][10].It is, however, unclear what information FDLs add to modularity clustering by placing the nodes in a continuous space.
It has been stressed that while they have been widely used, a thorough assessment of what exactly is entailed by the produced layouts has not been provided yet [12]. 3And on the question of what it means that two nodes are placed close to each other by a certain FDL, answers have remained somewhat tentative: "While in spatialized networks closer nodes tend to be more directly or indirectly associated, no strict correlation should be assumed between the geometric distance and the mathematical distance" [8, p. 4] (technically, a geometric distance is of course also a mathematical distance.With the expression 'mathematical distance', the authors apparently refer to a kind of graph-theoretic distance, e.g. the shortest path between two nodes).Moreover, many different types of FDLs have been developed, several of which at least approximately subsume modularity clustering. 4But which one of them constitutes an appropriate choice for a certain data set at hand? 5   FDLs are often implemented in easily accessible tools such as Gephi [22].Not all researchers using the tool might possess the methodological training to assess the mechanics behind them.But the problems sketched above give an additional explanation for the fact 2 ForceAtlas2 (a = 1, r = −1) is in that sense more closely related to modularity than FruchtermanReingold (a = 2, r = −1) or Yifan Hu (which uses similar forces to FruchtermanReingold, but with a multilevel algorithm).
3 [11] departs into a somewhat different direction than the work presented here by proposing certain interventions which help interpret what is visible in FDLs that are already in use today; but both approaches try to tackle the shortcomings of FDLs that are sketched above. 4We note here that modularity clustering is not without significant weaknesses, such as its resolution limit [19] or strong degeneracies of high-scoring solutions [20]. 5Certain quality measures to compare network layouts have been proposed, such as the normalized atedge length [21] corresponding to the total geometric length of the edges of a network divided by the graph density and the total geometric distance between nodes.But these do not give meaning to the produced layout beyond network-immanent topological features.
that the limits or benefits of a chosen FDL are usually not discussed and "tools such as Gephi [are often treated as] as black boxes" [23].FDLs lack grounding, for example through an underlying model generating the forces, with which the distances between nodes could be given a rigorous interpretation, and forces could be chosen that are suitable to the network data one wants to analyse.We propose to base a new type of FDL on latent space models of network analysis, with which network layouts can be interpreted explicitly.
Latent space approaches to (social) network analysis have been developed to infer social or political positions of actors in an underlying latent space from their interactions.They represent a class of models based on the assumption that the probability that two actors establish a relation depends on their positions in an unobserved social space [24,25].The social space can be constituted by a continuous space, such as an Euclidean space, or a discrete latent space, where each node is in one of several latent classes [26], such as the well-studied stochastic blockmodel [27].In the physics literature, models of this type were introduced under the name of spatially embedded random networks [28].There, the Waxman model [29] and random geometric graphs [30,31] were recognized as specific examples.
Recently, latent space models have been employed in the estimation of continuous onedimensional ideological positions from social media data [32][33][34], specifically from Twitter follower networks.The works covered large quantities of users and showed good agreement with e.g.party registration records in the United States [32].The estimation of positions in the latent space was achieved with correspondence analysis in [32], while in [33], a Bayesian method was used where the posterior density of the parameters was explored via Markov Chain Monte Carlo methods.This is where the present work intersects: We attempt to take an alternative route in order to arrive at a specific form of force equations for FDLs.We obtain the forces on the basis of latent space models.The positions of the nodes in an assumed latent space influence the probability of ties between them -the closer their positions, the more probable it is that they form a tie.We derive an FDL as a maximum likelihood estimator of such a model.This approach clarifies the underlying assumptions of our layout algorithm and makes the resulting layout interpretable.We derive three different forces for three different types of networks, specifically adapted to the task of embedding them in a political space: unweighted, cumulative, and weighted networks.Moreover, alternative interaction models can in principle be used to develop force-directed layouts in a completely analogous way.
For this, the present work can serve as a blueprint.
If one wants to take network layouts seriously, an approach highlighting the underlying assumptions of a layout and guiding its interpretation is necessary.While some might claim that the visualisation of a network only serves illustrative purposes, their wide-spread use, not only for exploration and illustration, but also visual analysis of networks [2,5,[7][8][9] underscores the necessity of this enterprise: Exploration and interpretation are, in practice, guided by force-directed layouts for many researchers from a variety of disciplines.

III. FROM LATENT SPACE MODELS TO FORCE EQUATIONS
In this section, we show how force terms in a force-directed layout algorithm can be derived from latent space models of node interactions.Central to this procedure is the assumption that nodes tend to form ties to others that are close to them in a latent social space.The closer two nodes, the higher the probability that one forms a tie to the other.
Since none of the positions (as well as none of the additional parameters of the statistical model which will be introduced in the corresponding subsections) are directly observed, the statistical problem posed here is their inference.Given the underlying model, one can determine the likelihood function L(G) for any observed network.The positions and parameters are then inferred via maximum likelihood estimation.In our approach, this is done by treating the negative log-likelihood as a potential energy.The minima of this potential energy are the local maximisers of the likelihood.Its derivatives with respect to the positions and parameters of the nodes can be considered as forces that move the nodes towards positions that maximise the likelihood.
We will cover three different types of directed networks: Unweighted networks, such as the follower networks covered by Barberá and colleagues [32,33], cumulative networks (which include Twitter retweet networks), and weighted networks.Undirected networks are implicitly included as a special case where a ij = a ji and each node only has one additional parameter α.We will present the derivation of the forces for the unweighted case in detail.
The complete derivations for the other two cases are given in Appendices A and B.

A. Unweighted networks
Consider an unweighted graph G = (V, E) with nodes i ∈ V and edges (i, j) ∈ E. The graph can be described by an adjacency matrix A = {a ij |a ij = 1 if (i, j) ∈ E}.Now let us assume that the nodes are represented by vectors x i ∈ R n and d ij = d(x i , x j ) denotes the Euclidean distance between x i and x j .For the probability of a tie between two nodes, we choose (see [24]) . ( The probability is dependent on the squared Euclidean distance between the two node positions.That the probability is dependent on the squared distance is also assumed in [33], while in [24,32], the linear distance is used.α and β are additional parameters that also influence the probability of a tie.α i can be interpreted as an activity parameter related to the out degree of node i: The higher α i , the higher the probability of a tie from i to others.β j influences the probability of ties to j and influences the in degree of node j.The parameters allow nodes that occupy the same position in space to have different degrees -as an example, there might be people with roughly the same political position as, say, a state leader, but it is generally unreasonable to expect that these users have the same amount of followers on social media.On the other hand, some users might simply be more active than others, hence forming more ties, while sharing a political position.
The model introduced here has already been well-established in the literature [24,32,33].
However, alternative models can be posited that might be more fitting for certain network types.In that case, the derivation lined out below can be carried out analogously.
For a given graph G, the likelihood function L(G) can be written as the product of the probability of an edge if there exists an edge between two nodes, and the probability of there not being an edge if not: The logarithm of the likelihood is given by If we consider the negative log-likelihood as a potential energy, the minima of this potential are the local maximisers of the likelihood.Its (negative, once again) derivatives with respect to the positions x i of the nodes can be considered as forces that move the nodes towards positions that maximise the likelihood.For a concrete node i , an attractive force is generated by node j if i establishes a tie to j : If j also establishes a tie to i , the same attractive force is applied again.On the other hand, a rejecting force is always present for each possible tie:6 Another repulsive force on i appears for this node pair for the potential tie from j to i .
The derivative of Eq. (3) with respect to α i and β i gives us the forces on the parameters of node i , such that and The sum over all forces on the single parameters yields the difference between the actual and the expected in/out degree.In the equilibrium state, where this sum yields 0, the observed in/out degree of nodes equals the one expected under the model of Eq. (1):

B. Cumulative networks
Force equations can also be derived for networks which are constituted by a number of binary signals between nodes -for example, when users of an online platform create several posts, each of which can be taken up by others (e.g. through liking or sharing the respective post).A much-studied case are Twitter retweet networks, which are frequently employed to investigate opinion groups on the platform [3,5].
We consider, for each action k initiated by a node j (e.g. a tweet), an unweighted graph , where an edge means that i has formed a tie to j upon action k.The graph for each k can be described by an adjacency This constitutes an m-star graph with m = |E k j |.Analogously to the unweighted case, we assume the probability of establishing a single tie upon action k from user i to user j with where where each action k of j has its own parameter β jk which affects the in degree of j.
The log-likelihood for the cumulative network can be written as Here, in addition to user pairs, we sum over all actions k.The derivation of forces for this case is largely analogous to the unweighted case and can be found in Appendix A, along with the concrete force equations.

C. Weighted networks
So far, we have assumed a binary signal between node pairs -e.g.whether an individual follows another one or not, or whether someone shares certain content of another individual or not.Extending the model to the non-binary case can be achieved by exchanging the ordinary logit model (Eq.( 1)) with an ordered logit or proportional adds model.
There, a response variable has levels 0, 1, ..., n (e.g.: people rate their relationships to others on a scale from 0 to 6, or similar).We consider the general case of weighted networks with finite weights that can be transformed into natural numbers (with 0), i.e. an adjacency matrix A = {a ij = k|k ∈ N 0 }.The probability of the variable being greater than or equal to a certain level k is given by [35,36]: where k = 0, 1, ..., n.
The probability of a ij equal to a certain k is given by The likelihood L(G) is given by and the log-likelihood by ). ( 15) The force equations derived from the log-likelihood (for the case of a three-point scale) can be found in Appendix B. Potential applications of a visualisation with these forces are manifold.In smaller data sets, a non-binary signal between nodes, e.g.rating of the relationships between individuals of a social group, might be given between all node pairs.But often, there might be cases for which a subset of individuals (say, politicians, public figures, etc.) or items (e.g. the importance of political goals, technologies, etc.) are rated by others.Then, only the rating individuals receive an α, while the rated just have a βparameter.The interpretation of the parameters α and β might need adjustment: They now rather refer to the tendency of individuals to give/receive rather high/low ratings.

IV. IMPLEMENTATION AND VALIDATION
The force-directed layout algorithm was implemented in JavaScript, building upon the d3-force library [37].There, force equations are simulated using a velocity Verlet integrator [38,39].A ready-to-use implementation, which we call Leipzig Layout, is available under https://github.com/pournaki/leipzig-layout. 7It builds upon the force-graph library [40] to interactively display the graph and the evolution of node positions in the simulation of forces.Note that, at the current state, this layout tool works reasonably fast for networks below 10,000 links.
Validation for the unweighted case was performed by testing the agreement with the expected distance of a stochastic block model (SBM) of two blocks with varying p out and p in = 0.5.In the above model, the expected distance can be computed by placing the nodes of each block on the same point in space, and then choosing the distance d between the two blocks so that p out = 1 1+exp(−d 2 ) (α and β are set to 0 so that the expected degree for all nodes in one block is the same).With this underlying latent space, one can draw a network according to the given probabilities and let the layout algorithm infer the latent space again.
Averaged over 5 runs and for 100 nodes per block, we observe that the inferred distance of the centers of mass of the blocks are nearly identical to the expected one (Fig. 1 A), and the log-likelihood of the inferreds latent space surpasses the one of the actually drawn one in all cases (Fig. 1 B).
Moreover, we compare the log-likelihood of the inferred latent space with the one of the actually drawn network from a Gaussian distribution of two groups of nodes with a σ of 1/12 and a distance of 5/6 between the groups with varying node number, averaged over three runs.In all cases, the log-likelihood of the inferred latent space is higher than the ground truth (Fig. 1 C).Still, similarity to the ground truth distances between nodes was high throughout, which we assessed with a Mantel test [41].Pearson correlation between distance matrices can be inspected in Fig. 1  nearly identical to the expected one throughout, but the log-likelihood of the inferred latent space surpasses the ground truth in all cases (B).The difference between inferred log-likelihood and the log-likelihood of the ground truth for a Gaussian distribution of two groups of nodes (σ = 1/12, d = 5/6, averaged over 3 runs) is given in C. In all cases, the log-likelihood of the inferred latent space surpasses the ground truth (i.e.them difference in log-likelihood is positive).Still, similarity between ground truth and inferred distances between nodes is high (increasing with number of nodes), as is visible in the average Pearson correlation between distance matrices (D).
of particular universities with quite rich metadata (e.g.gender, year, residence, or major).
We analyse friendship networks -undirected networks where a tie between users represents that both have agreed to connect with each other as 'friends' on the platform.We spatialise the friendship network of Haverford University in Fig. 2 A and B (links have been omitted for better accessibility).On the left, it is visible that students are spatially layered according to their year by the layout algorithm.The first-year students are visually separated from the others.The layout becomes denser for students who have been at the university for a longer time.The layers are ordered chronologically.It seems that if students form cross-year ties, they tend to connect to others from adjacent cohorts.The local assortativity distribution with respect to residence of the students of Haverford has been analysed in detail in [43].
There, it was found that first-year students tend to form ties to other students from their dorms, while students from higher years show less of a tendency to mix only with others they share residence with.This behavioral pattern can also be discerned in the spatialisation (Fig.

B):
For the first-year students, the students sharing a dorm tend to be placed rather close to each other, while for students from higher years, this is not the case.As a complement, we spatialise the network for the university with the highest overall assortativity with respect to dormitory in the data set: Caltech.There, the students' year does not influence Facebook friendship to a large extent; rather, students' friendships are more strongly guided by their residence [44].This is reproduced by Leipzig Layout: Fig. 2 D shows that students that share residence are visibly placed close to each other.On the other hand, students are less strongly grouped according to their university year (C).
b. German parliament: Twitter follower network While [32,33] aim for the estimation of one-dimensional ideological positions of politicians (and their followers), the FDL proposed here embeds nodes in a two-dimensional space.We spatialise the Twitter follower network of all members of the German parliament that have an active Twitter account in Fig. whose year is unknown).First-year students are visually separated from the others, while the layout becomes denser if students have been at university for a longer time.In B, it is also visible that first-year students show a higher tendency to mix with others they share residency with (dark grey: dorm unknown).For Caltech, the network out of the Facebook100 data set with the highest assortativity with respect to residence, nodes are visibly placed according to dorm membership (D, dark grey: year/dorm unknown), and less so with respect to year (C).
mirrors the amount of cross-party ties, as well as the users' activity on Twitter: The further out on an axis between the innermost and outermost party member users are placed (outliers excluded), the smaller their share of ties to other parties (Fig. 3 C).The central and densely packed placement of the Greens can be explained by the fact that they tend to use Twitter quite homogeneously (see Appendix E) in the sense that there are no users which are inactive or lack followers: Each of them (except one) has an in/out degree of at least 50.Moreover, the party members are followed and follow all other parties (except for the AfD) in a wellbalanced fashion.α and β are generally correlated with out and in degree of the nodes (again, see Appendix E).They exhibit a very pronounced linear correlation for the Greens.
This layout also illustrates the difference between ForceAtlas2 (see (B) in Fig. 3) and the layout algorithm at hand here: ForceAtlas2 incorporates a rejecting force between node pairs proportional to d −1 ij , which leads to a stronger separation of nodes within clusters.Hence, while the overall arrangement of parties is similar to Leipzig Layout, parties themselves are more strongly spaced out.A comparison to spatialisations with the algorithms Yifan Hu and FruchtermanReingold can also be found in Appendix E.
Moreover, we observe that several minima are inferred by both Leipzig Layout and the other FDLs -depending on the initial positions of the nodes.While the existence of different local minima is a general problem of FDLs, one can simply select the outcome with the highest likelihood with the present approach -a further advantage of an FDL grounded in an underlying model.A different, but less likely local minimum inferred with Leipzig Layout is also presented in Appendix E. The more likely minimum, which is displayed in Fig. 3, is also the politically more plausible one: In Appendix E, SPD is placed closer to FDP than CDU/CSU, while the latter two parties have more commonalities (especially when it comes to economic policy).Clear division between parties, as well as a stronger division between the right-wing party AfD and the other parties is visible.All parties except the Greens are arranged on a one-dimensional axis.This is explained by a difference in cross-party ties between politicians of the same party: The further out a member on the party-internal axis, the fewer cross-party ties to and from them have been established (except for the AfD, which does not receive many ties from other parties no matter where the users are placed) (C, colored according to parties, linear fits included).ForceAtlas2, in comparison, has a stronger separation of nodes within party clusters due to its rejecting force being proportional to d −1 (B).speaking out, and accused Rowling of having spread disinformation about trans children.
That she was voicing rather specific criticism which aimed towards certain signatories of the letter is mirrored in her position close to the margin of the inferred space.Legum and Herndon are placed closer to the center: Legum noted in a relatively nuanced critique that the signees of the letter are not silenced in any way, while Herndon published several ironical tweets about the letter.Interestingly, the division of clusters visible in the layout is not as pronounced as in the spatialisation of the network with ForceAtlas2 and Yifan Hu (see Fig. 11 in Appendix E), a finding that calls for further systematic investigation.d.Survey data With the weighted layout, not only generic network data can be spatialised, but also surveys: There, evaluated items as well as respondents are nodes, and forces only exist between items and individuals.
In Fig. 5, we visualize a survey where respondents were asked about their attitude towards six different energy-generating technologies [46].The responses represent the initial attitudes of respondents with respect to the technologies before being confronted with several pro and counter arguments.Responses were initially given on a nine-point scale, which was aggregated to a three-point scale for visualisation.Gas and coal power stations, onshore and offshore wind stations, biomass power stations, and open-space photovoltaics (which we refer to as solar in Fig. 5).
The distribution of respondents over the inferred space, given by a density plot (the lighter the color, the more respondents lie in a region of the layout), shows that the vast majority of respondents is located between gas and onshore, solar and offshore energy-generating technologies, while coal is placed far away from most respondents.
Several density peaks exist which correspond to respondents with similar response profiles: One between gas and biomass, one placed rather centrally between gas, offshore, solar, onshore and biomass, two between biomass and solar/onshore, and one at the margin of the space, but closest to offshore and solar/onshore technologies.Even more interesting is the arrangement of technologies themselves, since it shows that collectively, response profiles of individuals create two orthogonal axes along which technologies are placed: One axis is visible from renewables towards technologies relying on fossil sources of energy (gas and coal).
On the other hand, renewable sources of energy are distributed along an perpendicular axis.
Onshore and solar occupy central positions there, while offshore and biomass are located opposite of each other.The respondents' distribution and the arrangement of technolgies are in line with the average ratings and rating correlations between individuals (see Appendix F).
Average ratings for coal are reported to be significantly lower than for any other technology in [46], gas receives a neutral rating, renewable technologies (offshore, onshore, solar, biomass) are rated positively on average.Biomass receives the lowest average rating of the renewables, which is reflected in the distribution of respondents.Biomass has, among the renewables, the weakest correlations with the other renewables.On the other hand, ratings are not negatively correlated with coal or gas.This is mirrored by its placement in Fig. 5.

VI. DISCUSSION
While FDLs are frequently employed for network visualisation across a variety of scientific disciplines, they lack theoretical grounding which allows to interpret their outcomes rigorously.We have presented a path towards interpretable FDLs based on latent space models.We have derived force equations for Leipzig Layout, a FDL that serves as a maximum likelihood estimator of said models.We have posited three variants of the FDL, which are applicable to unweighted, cumulative, and weighted networks, respectively.Exemplary spatialisations of several real-world networks show that important properties of the networks (assessed through different network measures) are reflected by node placement.Moreover, commonalities with, but also differences to existing FDLs have been pointed out: The latter tend to exhibit a stronger separation of nodes within tightly connected clusters, and, for the cumulative case, also between each other.
The new type of FDL presented here makes the assumptions it is based on -the underlying latent space model -explicit, and hence constitutes an attempt to put FDLs on a more rigorous scientific basis.Latent space models are well-established in the estimation of ideological positions on the basis of (social) networks.In most cases, the ideology estimates have been carried out on a one-dimensional axis.Leipzig Layout infers a two-dimensional latent space.
The model chosen here can, if found necessary for certain network types, be replaced by alternative interaction models.For this purpose, the derivation of forces above can serve as a blueprint.The present approach might also be used to motivate parameter choices for existing FDLs, such as ForceAtlas2: The degree of influence of edge weights there, for example, can be arbitrarily chosen.But the choice could be guided by agreement with the weighted case of the algorithm implemented here.
The spatialisation of survey data presented above points beyond traditional usage of FDLs, an avenue which should be explored further.We note here that recent work in machine learning also used force-directed layouts that were derived as gradients of an objective function: Stochastic neighbor embedding (SNE) [47] and in the sequel t-SNE [48] and UMAP [49] used this technique to embed a graph in a lower dimensional space.In these cases, the objective function was not the likelihood of a statistical model but the KL-divergence between two probability distributions.
Limitations remain: The convergence of FDLs to local minima is a problem that cannot be solved by the present approach.The follower network presented in Fig. 3, for instance, possesses several equilibria for which the parties were allocated in different order, both for Leipzig Layout as well as the three algorithms it was compared with.Nevertheless, the underlying model of Leipzig Layout allows a comparison of the log-likelihood of several equilibria, out of which the most likely can then be chosen.Moreover, the role of dimensionality for the outcomes of latent space inference in general has not been studied systematically [26].For network visualisation, an extension to a three-dimensional latent space would be of interest in comparison to the two-dimensional case studied here.
[1] L. A. Adamic and N. Glance, in Proceedings of the 3rd international workshop on Link discovery (2005), pp.36-43.and The first part of the force on the position of node i exerted by node j is given by ∂ x i log(p(a i j = 0)) = 2(x i − x j ) e C 1 (1 + e C 1 ) 2 − (1 + e C 1 ) = 2(x i − x j ) 1 1 + e C 1 (B7) if a i j = 0.If a i j = 1, the force is given by Or, if a i j = 2, (B9) For the second part of the force on i , caused by a j i , one simply needs to take the appropriate term out of the three above and switch i and j for α and β.
The force on α caused by j is given by (B12) Now, there is no second force part -this is the only contribution by the pair i and j .The force on β i is given by the analogous term where i and j are, again, switched for α and β, and the level of a j i is considered.
The forces on c 1 and c 2 by the pair are given by

FIG. 1 :
FIG.1: Expected distance of an SBM (two blocks, 100 nodes each) with varying p out compared to the distance between the center of mass of the clusters in the proposed layout algorithm, averaged over 5 runs (A).Not only is the inferred distance by the force-directed layout algorithm

FIG. 2 :
FIG. 2: Friendship network of students of Haverford University (top) and California Institute of Technology (bottom), colored by year (left) and residence (right).The spatialisation of the former layers students by year (A, chronologically ordered from top to bottom, with first-year students colored pink, second-year students colored green, etc.; dark grey nodes correspond to students c. Retweet network: Harper's letter In July 2020, Harper's magazine published an open letter signed by 153 public figures defending free speech which they saw endangered by 'forces of illiberalism.'Not only Donald Trump was denounced as contributing to illiberalism, but also some groups who advancing "racial and political justice," who had "intensified a new set of moral attitudes and political commitments that tend to weaken our norms of open debate and toleration of differences in favor of ideological conformity" [45].On Twitter, the letter was controversially discussed subsequently (see also https://blog.twitterexplorer.org/post/harpers_letter/).The layout of the retweet network reproduces a division between

FIG. 3 :
FIG. 3: Leipzig Layout of the follower network of all German deputies that have a Twitter account (A).Members are colored according to their party and node size corresponds to overall node degree.

FIG. 4 :
FIG.4: Retweet network of Twitter debate about a letter on free speech published by Harper's magazine (node size proportional to in degree).A two-camp division is visible, where the left pole includes the magazine as well as prominent signees, while the right pole contains critics.

FIG. 5 :
FIG.5: visualisation of a survey on six different energy-generating technologies.The distribution of respondents is plotted as a density in the background (the lighter, the denser they are distributed in an area).Respondents are distributed close to gas, renewable energy-generating technologies, and between them.Two technological axes are visible: One from coal and gas to the renewables, and one among technologies using renewable sources of energy, with onshore and solar occupying central positions, while offshore and biomass are located opposite of each other.

∂ c 1 FIG. 6 :FIG. 7 :
FIG. 6: Bundestag follower network, comparison of Leipzig Layout (top left), ForceAtlas2 (top right), Yifan Hu (lower left), and Fruchterman Reingold (lower right).Overall placement of parties is similar, but Leipzig layout, which allows closer placement of nodes, arranges all parties (except the Greens) along a one-dimensional axis.