Latent Space Models for Dynamic Networks

Dynamic networks are used in a variety of fields to represent the structure and evolution of the relationships between entities. We present a model which embeds longitudinal network data as trajectories in a latent Euclidean space. A Markov chain Monte Carlo algorithm is proposed to estimate the model parameters and latent positions of the actors in the network. The model yields meaningful visualization of dynamic networks, giving the researcher insight into the evolution and the structure, both local and global, of the network. The model handles directed or undirected edges, easily handles missing edges, and lends itself well to predicting future edges. Further, a novel approach is given to detect and visualize an attracting influence between actors using only the edge information. We use the case-control likelihood approximation to speed up the estimation algorithm, modifying it slightly to account for missing data. We apply the latent space model to data collected from a Dutch classroom, and a cosponsorship network collected on members of the U.S. House of Representatives, illustrating the usefulness of the model by making insights into the networks.



There are no comments yet.


page 22


Latent Space Models for Dynamic Networks with Weighted Edges

Longitudinal binary relational data can be better understood by implemen...

Modeling the social media relationships of Irish politicians using a generalized latent space stochastic blockmodel

Dáil Éireann is the principal chamber of the Irish parliament. The 31st ...

Latent Space Approaches to Community Detection in Dynamic Networks

Embedding dyadic data into a latent space has long been a popular approa...

Continuous Latent Position Models for Instantaneous Interactions

We create a framework to analyse the timing and frequency of instantaneo...

Inference for the stochastic block model with unknown number of blocks and non-conjugate edge models

The stochastic block model (SBM) is a popular model for capturing commun...

A Dynamic Edge Exchangeable Model for Sparse Temporal Networks

We propose a dynamic edge exchangeable network model that can capture sp...

Latent Space Modeling of Multidimensional Networks with Application to the Exchange of Votes in Eurovision Song Contest

The Eurovision Song Contest is a popular TV singing competition held ann...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Network analysis, and in particular dynamic network analysis, is a ubiquitous area of study, used by scientists in many distinct fields (Vivar and Banks 2011). Often studied are dynamic social networks, which come in a wide variety of forms (see the Special Issues on Network Dynamics in Social Networks, January 2010 and July 2012). In this paper we consider data that come in the form of a set of actors and a sequence of sets of edges, each edge set having been measured at one of multiple time points. Analyzing dynamic social networks is key to seeing how friendships form or dissolve, how politicians form loyalties or break ranks with their parties, how co-authorship patterns develop and change over time, etc. Dynamic networks are also analyzed in epidemiological contexts (Bansal et al. 2010), in analyzing terrorist networks (Carley 2006), and much more.

There exist numerous methods of modeling network data within a statistical framework (for a survey on statistical network models, see Goldenberg et al. 2010). Some of these models are intended for static networks but have generative processes which can be thought of as dynamic, in the sense of building up the graph over a series of time points. Examples of this notion can be found in the rewiring of “small-world” networks (Watts and Strogatz 1998), the subsequent addition of edges in an Erdös-Rényi random graph model (Durrett 2007), or the addition of actors and edges in a duplication-attachment model (Kumar et al. 2000). Other methods were developed for static networks and were then extended for the dynamic case. One of the most well known methods of analyzing static networks is the exponential random graph model (ERGM) developed by Frank and Strauss (1986), and much attention is still being given to this class of models (see, e.g., Robins et al. 2007; Bollobás et al. 2007). This was extended to analyzing networks observed over discrete time intervals by Hanneke et al. (2010) in the introduction of the temporal ERGM, or TERGM. Using continuous time Markov processes, Snijders (1996) began a series of works corresponding to what is known as stochastic actor-oriented models. Both of these last two approaches focus on the use of common network structures or user-defined objective functions. The last commonly used approach to modeling networks that we will mention is the latent space model. Latent space approaches aim to embed network information into some (usually low dimensional) latent space. Benefits of using such an approach is that both local and global structures are modeled, transitivity is inherently incorporated in the model, meaningful visualizations are obtained, and the output is easily interpreted, lending itself to much qualitative inference. While the bulk of the literature on latent space models is concerned with static networks, in this paper we will use this approach to model longitudinal network data.

The ideas behind latent space models have long been in use. For example, Nakao and Romney (1993) used multidimensional scaling to visualize and analyze the latent positions of the actors in Newcomb’s fraternity data (Newcomb 1956). Two formal latent space models were introduced for static networks by Hoff et al. (2002)

, one of which placed the latent actor positions within a Euclidean space, the other placed the latent locations on a unit hypersphere while giving each actor an activity level. This latter model was intended to allow for a lack of reciprocity in directed networks. Estimation was performed using Markov chain Monte Carlo (MCMC), hence giving the full posterior of parameters and latent positions.

Handcock et al. (2007) expanded the Euclidean model of Hoff et al. (2002) by allowing the latent space positions to follow a mixture of normals, hence allowing clustering to occur simultaneously with embedding in a Euclidean space. Krivitsky et al. (2009)

expanded on this work by allowing asymmetrical edge probabilities.

Schweinberger and Snijders (2003) used a similar approach as Hoff et al. (2002) but used an ultrametric space rather than a Euclidean or hypersphere space to perform model-based clustering. Further work was done in Hoff (2005), where the author extended previous notions of ANOVA models of networks by including as interaction effects the hypersphere latent positions from Hoff et al. (2002).

A limited number of works has considered the temporal aspect of networks while implementing a latent space approach. Robinson and Priebe (2012) presented a method of discovering change points in network behavior via using a -dimensional simplex latent space. Foulds et al. (2011) developed a non-parametric infinite feature model, where the features are latent. The work most related to our proposed approach is that of Sarkar and Moore (2005), which extended the Euclidean latent space model of Hoff et al. (2002) to dynamic networks, though only undirected networks can be analyzed with this method. They developed a generalized multidimensional scaling (GMDS) to find the initial latent actor positions across discrete time points. The authors then furthered this by using a conjugate-gradient method of optimizing an objective function. While this is a speedy algorithm and hence can be used for larger data sets, the estimation is an ad hoc method which makes limited use of the available data.

In this paper, we propose a model which embeds dynamic directed, or undirected, network data into a latent Euclidean space, allowing each actor to have a temporal trajectory in this latent space. Estimation of the model parameters and latent actor positions occur within a Bayesian framework using MCMC. By using our approach, the user can observe much more easily how the network evolves over time, gain insight into global and local structures, handle missing data, make future predictions, and can detect the attracting influence one actor has on another actor’s friendships (a concept we call edge attraction, which will be discussed later). To improve the speed of the MCMC algorithm for large networks, we describe an approximation method which reduces the computational cost.

The remainder of the paper is organized as follows: Section 2 describes the proposed model for dynamic networks. Section 3 outlines the Bayesian estimation of the model parameters and latent actor positions, as well as addressing the issue of scalability. Section 4 details how to handle missing data. Section 5 describes how to obtain network predictions. Section 6 gives a method for detecting and visualizing edge attraction. Section 7 shows simulation results. Section 8 presents the results from analyzing data collected from a Dutch classroom as well as from analyzing cosponsorship data collected on members of the U.S. House of Representatives. Section 9 provides a brief discussion.

2 Dynamic Latent Space Model

We assume that data come in the form of , where is the set of all actors, and is the set of edges at time . For simplicity let . For the majority of the paper it will also be assumed that consists of directed edges. The general idea of the latent space approach is that this time series of graphs can be represented as a state space model, with a latent state variable representing the actors as positions in a low dimensional Euclidean space. The closer two actors are in this latent Euclidean space, the more likely they are to form an edge. This low dimensional space can be thought of as a characteristic space where the distance between actors represents how similar they are (Hoff et al. 2002), or as a social space where the distance between two actors corresponds to the strength of the relationship between the two.

The notation to be used throughout the rest of the paper is as follows: is the number of actors. For a latent space , is the

dimensional vector of the

actor’s latent position at time , and is the matrix whose row is . is the adjacency matrix of the observed network at time , and if there is an edge from actor to actor at time and 0 otherwise.

The latent actor positions are modeled by a Markov process with the initial distribution


and transition equation


for , where is the identity matrix,

denotes the normal probability density function with mean

and covariance matrix evaluated at , and is a vector of parameters which will be defined shortly.

The observed networks at different time points are conditionally independent given the latent positions. This dependence structure is illustrated in Figure 1. Further, it is assumed that for any two (distinct) pairs and , and are independent conditioning on . In formulating the observation equation of our model, we desire two main properties: first, the probability of an edge from actor to actor at time should increase as the distance between their latent positions decreases; second, the probability of an edge should depend on both who is sending and who is receiving the link, and we should further be able to determine the importance of each in edge formation; i.e., whether the identity of the sender or the identity of the receiver is more important in edge formation. To this end, we use the formulation




and and are the model parameters. Here ; similar notation will be used throughout the rest of the paper. and are global parameters which reflect the importance of popularity and social activity respectively. The ’s are positive actor specific parameters that represent each actor’s social reach and is reflective of the tendency to form and receive edges. Within the latent space, there is also the geometrical interpretation of forming a radius around the actor, as we will see later. For model identifiability, the ’s are constrained so that . This parameterization emulates both the distance and projection models of Hoff et al. (2002) for static networks, given as and respectively, by utilizing the visually appealing and intuitive Euclidean space for the latent positions while incorporating the individual actors’ “sociability,” or social reach, while also accounting for both activity and popularity.

Figure 1: Illustration of the dependence structure for the latent space model. is the observed graph, is the unobserved latent actor positions, and is the vector of model parameters.

Krivitsky et al. (2009) built onto Hoff et al.’s model by including additive random individual effects. Here our parameterization links the actors’ individual effects to the latent space, in the sense that the social reach dampens or augments the effect of the distance between the two actors, rather than having the individual actor effects be constant additive effects; thus these two parameterizations are in fact different, rather than being subsets of each other. In some sense their model is more flexible in that an actor has both an indegree effect and an outdegree effect. Our model can be trivially extended to account for this by simply allowing to be replaced by two sets of parameters and . We applied this more complex model on the two real data sets presented in Section 8 with no improvement in model fit. Hence our focus remains on the simpler model, given in (4).

In the following discussion we make the (reasonable) assumption that both and (the other possible case, discussed in the Supplementary Material, is where either and or and ). The interpretation of the radii that comes naturally from (4) is that marks the radius within the latent social space of the actor’s social reach. This is evident in that if the distance between two actors are within each other’s radii, i.e., , then the probability of an edge is greater than ; if they are outside each other’s radii, i.e., , then the probability of an edge is less than ; and if the distance between the two actors equals both radii, i.e., , then the probability of an edge equals . These scenarios are illustrated in Figure 2. Thus a larger radius implies an increasing propensity to send and receive ties. This fact is further illustrated in Figure 2, where the probability is shown in a contour plot, allowing and to vary, with distance , and .

Concerning the global parameters and , if () then we can conclude that the probability of an edge from actor to actor (from actor to actor ) is determined more by the radius of than by the radius of . This is also illustrated in Figure 2, where it is apparent that the probability of an edge from to increases much faster when we fix a value of and allow to increase than vice versa. Thus if then the edges of the network are determined more by the popularity of the actors than by their activity, i.e., the identity of the receiver of the edge is more important than the identity of the sender, and if the edges of the network are determined more by the activity of the actors than by their popularity, i.e., the identity of the sender is more important than the identity of the receiver.

Figure 2: (a) Illustration of how to interpret social reach parameters in the case that ; the probability of an edge from to is less than 1/2, from to is greater than 1/2, and from to is equal to 1/2. (b) Contour plot of , where , and . The point is marked with a dot.

3 Estimation

3.1 Posterior Sampling

We adopt a Bayesian approach, and hence we wish to make inferences based on , where . We implement a Metropolis-Hastings (MH) within Gibbs MCMC scheme as suggested by Geweke and Tanizaki (2001) to sample from the posterior, thus giving point estimates and uncertainties. We set the priors on the parameters as follows: assume that , , , and , where

is the inverse gamma distribution. The inverse gamma priors were chosen to be conjugate, and the Dirichlet prior is a natural selection for such constrained parameters.

The number of MCMC iterations required to reach convergence can be greatly reduced by appropriate initial values of the latent positions and model parameters. We give a discussion and suggest initialization strategies in the Supplementary Material.

To sample via Metropolis-Hastings within Gibbs algorithm, we draw from the full conditional distributions iteratively. These conditional distributions are either known in closed form or up to a normalizing constant and are given in the Supplementary Material. The posterior sampling algorithm is


Set the initial values of (e.g., to those described in the Supplementary Material).


For and for , draw via MH using a normal random walk proposal.


Draw from its full conditional inverse gamma distribution.


Draw from its full conditional inverse gamma distribution.


Draw via MH using a normal random walk proposal.


Draw via MH using a normal random walk proposal.


Draw via MH using a Dirichlet proposal.

Repeat steps 1-6.

Due to the constraint on the radii (), it is necessary to, within the MH step, accept or reject all

values simultaneously; hence it is important to keep the movements small, i.e., keep the means at the current values and the variance of the proposal small. Therefore the proposal used to draw the new values

is another Dirichlet distribution with parameters , where the ’s are the current values and is some large constant.

One last note is that the posterior will be invariant to rotations, reflections, and translations of the latent positions. Hence any inference must take into account the non-uniqueness of the estimates. Similar to the approach described in Hoff et al. (2002), we perform a Procrustes transformation to reorient the sampled trajectories. We set an reference trajectory matrix , and after drawing new for all and , we construct from these new draws the new trajectory matrix . In practice we used the initial latent positions to construct . The Procrustes transformation on using as the target matrix finds , where is some rotation of ; see, e.g., Borg (2005). By performing the Procrustes transformation on the trajectory matrix, we obtain a single rotation matrix with which we use to set , where the superscript denotes the stored values for the iteration; that is, we set . By so doing we are preserving the distances between any actors at any time points, i.e., for any actors and and any time points and .

3.2 Scalability

Scalability is an issue for latent space models for network data. For static networks, this issue has been addressed through using variational Bayes (Salter–Townshend and Murphy 2012) and also by using case-control principles from epidemiology (Raftery et al. 2012). This latter method reduced the computational cost (for static networks) of computing the log likelihood from to .

The general strategy of the case-control log likelihood approximation is to write the log likelihood as two summations. Assuming that the network becomes sparser as gets larger, the computational cost of the first of the two summations is linear with respect to , and the cost of the second is quadratic. The second summation is then replaced by a Monte Carlo estimate obtained from a subsequence of the actors, thus making the overall cost of computing the log likelihood linear in .

This method as described by Raftery et al. (2012), however, cannot be directly extended to longitudinal network data containing missing edge values which is often the case, especially in social networks. This is because all the links need to be known a priori. By modifying how the log likelihood is decomposed into two summations, we can apply this same method without knowing all beforehand. The details on this approximation are given in the Supplementary Material.

4 Missing Data

Missing data in social networks is not uncommon, and can come in various forms, such as boundary specification, non-response, and censoring by vertex degree (Kossinets 2006). Here we specifically focus on non-responses, i.e., missing edge values. For static networks there have been a number of methods proposed (see, e.g., Robins et al. 2004; Huisman 2009). For dynamic networks, Huisman and Steglich (2008) compared several methods to handle missing edges in the context of a stochastic actor oriented model. Handcock and Gile (2010) developed a theoretical framework for networks in which only a subset of the dyads are observed; we use this framework in our discussion and refer the reader to Handcock and Gile’s paper for more details.

Let denote the sampling pattern; that is, is the set of matrices where equals 1 if the dyad is observed and equals 0 otherwise. Letting and denote the collection of observed edges and missing edges respectively, the complete data is , and the incomplete (observed) data is . The unobserved edges are considered missing completely at random (MCAR) if , where is some set of parameters corresponding to the sampling pattern. If, however, , then the unobserved edges are considered missing at random (MAR). The case where the pattern of unobserved edges depends on the unobserved edges themselves (called non-ignorable missing data) is a difficult scenario which is beyond the scope of this paper; thus we will continue the discussion assuming that the missing edges are either MCAR or MAR.

Rubin (1976) discussed weak conditions for which it is possible to ignore the process that causes missing data. In our context, we are interested in the posterior distribution ; hence if the sampling pattern is ignorable, we may make inference based on the posterior distribution , i.e., , and are independent of given . There are two sufficient conditions that must be satisfied in order for the sampling pattern to be ignorable (Rubin 1976). First, the sampling pattern parameters are a priori independent with the data , latent positions and model parameters , i.e., . Second, the space of is a product space, i.e., if , and then . If these two conditions are met and the missing edges are either MCAR or MAR, we have

Handling the missing data is easy when using the MH within Gibbs sampling scheme of Section 3. Using the observed data and the current values for the missing data, the full conditionals for and are unchanged. The full conditional of is, for any , determined by where is given in (4). That is, including the missing data in the MH within Gibbs sampling amounts to an additional draw for each missing

from a Bernoulli distribution with probability determined by (


5 Prediction

Predicting future links is an important and interesting problem. Applications include recommender systems, terrorist networks, protein interaction networks, prediction of friendship networks, and more (Wang et al. 2007; Kashima and Abe 2006; Hopcroft et al. 2011; Liben-Nowell and Kleinberg 2007).

When considering prediction in the latent space context, it is of interest to predict for time both the edges of the adjacency matrix and the latent space positions . It is simple to find point estimates of the latter since


where the superscript indicates the draw from the posterior. Hence . It is assumed that an appropriate burn-in period for the chain has been accounted for.

A simple way to compute a point estimate of the probability of an edge between and at time , , would be to plug in along with the posterior means of the parameters into the observation equation (4). We can, however, do a little better by not conditioning on the posterior means of the model parameters, hence eliminating some unnecessary uncertainty. We aim, then, to find . Since conditional on we still assume that the ’s are independent, we need only find . This can be estimated as follows:

First, we approximate the joint distribution.


Next the marginal distribution of is found as in (5) and approximated by Thus the conditional distribution of is estimated as a weighted average:



and is defined in (3) and (4).

This method outperforms the simpler plug in method mentioned earlier, as is shown in the Supplementary Material. The intuition as to why this is so is that we are using fewer estimated parameters to make predictions, hence introducing less uncertainty into the prediction estimates.

6 Edge Attraction

Social influence is a well defined concept in the literature, which Anagnostopoulos et al. (2008) defined as “the phenomenon that the actions of a user can induce his/her friends to behave in a similar way.” Many authors attempt to use social influence to track the propagation of ideas or behaviors through a network (e.g., Kempe et al. (2003), Leskovec et al. (2006)). Tang et al. (2009) described a method of determining which actors will influence which other actors on a variety of topics. Goyal et al. (2010) proposed a method of labeling each edge by an influence probability, assuming undirected binary edges. These works all require data outside of the network, such as, as phrased by Goyal et al., an “action log.” Here we consider a novel type of influence, called edge attraction, defined to be the attracting influence one actor has on another actor’s friendships; e.g., in a social network this is how one person draws another person into their own social circle. Hence our new type of influence is how one actor affects the edges of another actor.

We assume that the way in which one actor can affect another actor’s movements in the network is manifested in an increased tendency for the influenced actor to move in the direction of the influencing actor in the social space. To detect the tendency for an actor to move through the social space in the direction of another actor

, the transition equation for the latent actor positions is extended by considering a new parameter to describe the edge attraction between two actors. We will then carefully define this parameter, implement an appropriate prior, and then look at posterior probabilities that will help the user determine whether or not there is edge attraction. We will show that this can be done by using the same MCMC output as when the transition equation was assumed to be a random walk. Throughout the next two sections we consider looking at the actors pairwise, i.e., we look at whether or not a specific actor

is influenced by another actor .

6.1 Detection of Edge Attraction

Consider an extension of the transition equation (2) such that where . In the following, assume that . Let equal the angle , where atan2 is the common variation of the arctangent function which preserves the angle’s quadrant, taking a vector rather than a ratio as its argument. Let be the rotation matrix associated with . We then let be of the form


where is some unknown parameter taking non-negative values. No edge attraction is equivalent to the case where , and if there does exist some edge attraction then this will be reflected in some . Figure 3 gives an illustration of this type of edge attraction. The idea here is that actor will aim towards wherever actor is within the latent characteristic space. If we let the prior on the parameters be independent, i.e., , then the posterior samples obtained from Section 3.1 can be equivalently viewed as having come from . This is important because, as will be seen later, we can use these same draws to make inference regarding the edge attraction existing between actors and . Also note that under the extended transition equation, the Markov property still holds for the latent positions, i.e., (see the Supplementary Material).

Figure 3: The extension of the transition equation to allow for actor ’s influence on actor . Actor is more likely to move toward actor . The circle around represents a von Mises distribution for the angle component of ’s polar coordinates, where dark values indicate high probability regions and light values indicate low probability regions.

The prior distribution of is chosen to be a mixture of a point mass on 0 and a continuous component over the positive reals:


where is some proper continuous density on . Here

will be assumed for convenience to be the exponential distribution with mean

. Then the posterior density is


For notation, let and let . Then is the point mass posterior probability that

. If our prior probability

and we find that the posterior probability is less than 1/2 then this implies the data is pulling the posterior probability towards the conclusion that actor is influenced by actor .

Since , we have that


where . So if we can find then we can compute . To this end, we have the following proposition whose proof is given in the Supplementary Material:

Proposition 6.1.

For as defined above,



is the standard normal cumulative distribution function, and

is the standard normal density.

The expectation in (12) is taken with respect to the posterior , and hence we can use the posterior draws already obtained from Section 3.1 to utilize the following approximation:


Combining (11) with (13) we are able to compute the posterior probability .

The quantity in Proposition 6.1 is interesting in that is the scalar projection of onto the unit vector whose direction is determined by . Intuition tells us that if these scalar projections are consistently large then actor is influencing the way actor moves through the social space; the posterior probabilities reflect this intuition in that large scalar projections lead to small values of .

One last note of practical value is that for edge attraction to exist in a meaningful way, we must require that the influencing actor has during at least one observation period brought the influenced actor within his social circle. This becomes easy to evaluate by means of the social reaches by requiring that for edge attraction to exist between and , .

6.2 Visualizing the Edge Attraction

Suppose there is evidence from the posterior that . Then, as mentioned earlier, . We can visualize and further interpret this influence by considering the polar coordinates of , and . The following proposition, whose proof is given in the Supplementary Material, gives the distribution of .

Proposition 6.2.

Let and

be independent random variables such that

and , and let and be the polar coordinates of . Then


Using this proposition, we see that the polar coordinates of follow


In other words, we can think of the transition from to as a two step process, where the distance to move is determined first, and then the angle is chosen. To aid the visualization of the edge attraction we focus on the von Mises distribution that determines this angle. Hence we are visualizing the extent of the edge attraction from on by looking at the propensity of actor to aim towards actor . The circle around in Figure 3 represents such a von Mises distribution (with mean rather than 0), where dark values indicate high probability regions and light values indicate low probability regions. Note that if then . That is, any angle with respect to actor is as likely as any other angle and hence actor does not tend to angle towards actor more than any other direction in the latent social space.

We can use the posterior mean latent positions to estimate these von Mises distributions, thus obtaining a good visualization of the edge attraction. First get , the estimate of , by averaging over time the scalar projection of onto . Then we can further estimate the concentration parameters (the concentration parameter in (15) being ) by multiplying this by . One can then plot these estimated von Mises distributions wrapped around the actors being influenced, such as Figure 7. This type of plot may become overcrowded when there are multiple influencing actors; in such a case, for each of, say, influencing actors, one could average these concentration parameters over time to obtain one concentration parameter for a summary von Mises distribution. These von Mises distributions can then be plotted to get an overview of the various influences on the influenced actor. An example of this type of plot can be seen in the Supplementary Material.

7 Simulations

Twenty data sets were simulated, each with the number of actors and the number of time points . For each of the twenty simulations we set and , and randomly drew the radii from a Dirichlet distribution. For ten of the twenty simulations, twenty-five actors were randomly selected to be influenced, each of which was accompanied by another randomly selected actor to do the influencing; there was no edge attraction incorporated in the remaining ten simulations. Details on how the data were simulated, along with extra simulation results beyond those given below, can be found in the Supplementary Material.

The results from the simulations were compared in several ways: First, for each simulation the posterior means of and were computed as well as the correlation between the posterior means of and the truth for each of the 20 simulations. The mean (sd) over all 20 simulations of was 0.9172 (0.06207) and for was 2.045 (0.1438). The mean (sd) correlation between and was 0.9298 (0.06402). We see then that the posterior means did quite well at estimating the true values of (1), (2) and the radii.

Second, the area under the ROC curve (AUC) was computed. This was accomplished by plugging in the posterior means of the model parameters and the latent positions into the observation equations (3) and (4), and then comparing these with the simulated data . Hence this can be considered as a measure of how well the model fits the data. For each simulation, the directed graphs were also converted to undirected graphs by letting in order that we might apply the method of Sarkar and Moore (2005). The AUC values for both undirected and directed networks were then computed using the estimates from Sarkar and Moore’s method. We similarly computed the AUC values for the directed network using our method, and, again using those same estimates, computed the AUC values for the undirected network by using . These results are given in Figure 4(a). We see that all our values are extremely high, implying that the model fits the data quite well, and also we see that our method uniformly outperformed that of Sarkar and Moore on both the directed and undirected networks.

Third, the pairwise distances from the estimated latent positions were compared to the pairwise distances from the true latent positions. That is, for each triple we can look at , giving us such ratios for each simulation. Figure 4(b) gives, for each of the twenty simulations, a smoothed curve of the distribution of these ratios. Notice that all these distributions are narrow and centered around 1, implying that the latent positions from the posterior means are close to the truth.

For those ten cases where edge attraction was part of the simulation, we computed the sensitivity of detecting edge attraction on those actors which were in truth influenced, and in all 20 simulations we computed the specificity of not detecting influence on those actors which were in truth not influenced. The mean (sd) sensitivity and specificity for the ten simulations with edge attraction were 0.952 (0.0316) and 0.832 (0.129). The mean (sd) specificity for the ten simulations without edge attraction was 0.868 (0.116). We see from this that the Bayesian estimation does a very good job at detecting edge attraction without giving many false positives when no such influence exists.

The Supplementary Material provides a discussion on sensible priors for all model parameters except . It is important then to determine the sensitivity of the MCMC algorithm to the values of and . To this end we reran the above simulations where the shape and scale parameters of

were drawn from a uniform distribution ranging from 3 to 15 for the shape parameter and from 0.01 to 2 for the scale parameter. The AUC for rerunning these 20 simulations in this fashion yielded very high AUC values, ranging from 0.9407 to 0.9858, averaging 0.9621. Thus it appears that the estimation is quite robust to the hyperparameters for the prior of


In addition to the simulations described above, five larger data sets were simulated where and . Estimation was performed both using and not using the approximations outlined in Section 3.2 and in the Supplementary Material, letting , and the AUC was computed to evaluate model fit. Simulations were analyzed on a UNIX machine with a 2.40 GHz processor. The mean (sd) time to perform the MCMC analysis with 50,000 iterations using the approximation was, in minutes, 716 (24), and to perform the MCMC with 50,000 iterations not using the approximation was, in minutes, 2281 (20). Hence by using the approximations there was a mean (sd) decrease in computational time of 68.6% (0.835). The mean (sd) AUC using the approximation was 0.9618 (0.0048), and not using the approximation was 0.9679 (0.0109). Thus by using the approximations of Section 3.2 there is a drastic decrease in computational time with very little loss in model fit.

(a) AUC
(b) Distances
Figure 4: Results for 20 simulations. (a) AUC using Sarkar and Moore’s method (horizontal axis) and our method (vertical axis) on both undirected (triangles) and directed (asterisks) networks; (b) Distribution of pairwise distance ratios, comparing estimated latent positions with true latent positions.

8 Real Data Analysis

8.1 Dutch Classroom Data

Knecht (2008)

conducted a longitudinal study in which students aged 11 to 13 years in a Dutch class were surveyed over four time points, yielding four asymmetric adjacency matrices where the

entry denotes whether student claims student as a friend. Figure 5 shows the graphs from these adjacency matrices. Demographic and behavioral data were also collected on these individuals. Twenty six students were recorded, although one student left the class before the study was completed; this student was left out of the analysis. Missing edges exist in the data due to some students not being present during a survey. This was dealt with as previously described in Section 4.

Figure 5: Graphs of Dutch classroom data at, from left to right, times 1, 2, 3, and 4.

The trace plots of , , , and are given in the Supplementary Material. A burn-in of 15,000 iterations was removed, leaving a chain of length 85,000. We compared our method with that found in Sarkar and Moore (2005) by AUC values. Our method yielded an AUC value of 0.917 vs. 0.8456 from Sarkar and Moore’s method.

The posterior means of and were 1.29 and 1.00 respectively, implying that popularity was more important in edge formation. The posterior means of the latent locations are given in Figure 6. Some interesting features can be noticed by comparing the latent positions with demographic information. Figure 6 differentiates the actors’ gender by males as dotted lines and females as solid lines. This plot corroborates results shown by Snijders et al. (2010) in that the friendships between two actors of the same gender are more prevalent. Also, only two of the students are of non-Dutch ethnicity, circled in Figure 6, and these two actors are very close together in the social space. One last interesting feature seen in Figure 6 regards an interesting link between academic capability and social behavior. Each student was assessed and ranked from 4 (lowest) to 8 (highest) based on academic capabilities at the end of primary school. There was only one student (actor 9) who was ranked a 4 and one (actor 25) who was ranked an 8. The social behavior of these two individuals, as seen via the latent space positions, are complete opposites. The student with the highest ranked capability moves from outside the social network to the center of the social space, while the student with the lowest ranked capabilities moves directly away from the center of the social space. The reason actor 25 started outside of the network may be explained in part by the fact that he had only gone to primary school with one other student and hence did not start the school term knowing the others.

Edge attraction was detected in four of the actors. Of note is the fourth such influenced actor (actor 25), who was unique in that he was influenced by many of the other actors (9 others). Figure 7 gives the posterior mean of the latent positions of these actors with a wrapped von Mises distribution plotted around actor 25 corresponding to the strongest influencer (largest ). Plots of the von Mises distributions for each of the individual influencing actors are given in the Supplementary Material. From Figure 7 we can visualize the strength and direction of the influence, thus yielding detailed information on the local scale of the network. As mentioned earlier, actor 25 began by only knowing one other actor (determined by having or not having gone to the same primary school as the others), and so it is intuitive that he would be more susceptible to being pulled into others’ existing social circles, bringing him to the center of the social space. The von Mises distribution in Figure 7 matches this intuition in that the edge attraction wanes as time progresses and actor 25 becomes a part of his own social circle. Finally, the results from the analysis of edge attraction fell in line with the overall gender and ethnic separation, in that the first three instances of edge attraction all occurred within the ethnic Dutch girls, and of the nine actors influencing actor 25 (a male) only one was of the opposite gender.

Figure 6: Posterior means of latent actor positions for the Dutch classroom data, arrows indicating the temporal direction of the trajectories. Males’ trajectories are in dotted lines, females’ in solid lines. Also, two of the students are of non-Dutch ethnicity, and these two actors’ latent positions are circled. The two students with the lowest (4) and highest (8) ranked academic capabilities, actors 9 and 25 respectively, are also marked as such.
Figure 7: Corresponding to the Dutch classroom data, this plot is zooming in on the posterior means of the latent positions of the influenced actor (circle), student 25, and those actors doing the influencing (triangles). The circles around the influenced actor are the von Mises distributions from (15) that help to visualize the influence being exerted in terms of the direction the influenced actor moves. Wider and darker areas on the rings indicate higher probability regions.

8.2 Cosponsorship Data

We analyzed data collected by James Fowler on bill cosponsorship of Congressmen in the U.S. House of Representatives for the to Congresses (see Fowler (2006a) and Fowler (2006b)). There were a total of 644 members of Congress (MC’s) who served during these five terms. However, at each time point around 30% of MC’s were not represented (the actual values ranged from 30.1% to 31.1%). These large proportions of unrepresented MC’s leads to even larger proportions of missing edges (from 51.2% to 52.5% missing edges). The data were analyzed by letting if actor sponsored a bill and actor cosponsored it, hence showing support for actor . The graphs from these adjacency matrices from time 1 (97 Congress) to 5 (101 Congress), sans missing data, are given in the Supplementary Material.

Due to the large amount of missing data, some care was needed in initializing the missing edges in the Markov chain. We modified the preferential attachment method of imputation described by

Huisman and Steglich (2008) by doing the following. We first form an aggregated adjacency matrix whose entries are set to one if for any there is a link from to and set to zero otherwise. Next, for each missing actor (at a particular time point ), we assign the probability of a link from to to be proportional to the indegree (averaged over ) of actor and inversely proportional to the shortest path length between and in . That is, letting denote the average indegree of actor and denote the shortest path length between and in , the probability of a link from to is set to be . We then look at the average outdegree of (rounded to the nearest integer), denoted , and randomly draw actors from using these probabilities; the corresponding ’s are set to be 1. In this way we obtain initial values for the missing data.

The trace plots of , , , and are given in the Supplementary Material. A burn-in of 250,000 iterations was removed, leaving a chain of length 1,250,000. Thinning was done by recording only every tenth iteration. Using the posterior means to make predictions on led to an AUC value of 0.787 vs. 0.7148 from Sarkar and Moore’s method; when applying Sarkar and Moore’s method we used constructed from the observed edges and imputed edges. From these AUC values we see that our model fits the data quite well and again outperforms the existing method.

Many of the congressmen (328 MC’s) analyzed were reelected into the 102 Congress, and so it was possible to compare predictions with the truth. In addition to the predictions obtained through the methods described in Section 5, we also considered prediction by using to estimate . For both averaging and applying our method, hard predictions were made by letting if and 0 otherwise. Table 1 gives the results. From this we see that while using a more naïve prediction method yields higher specificity, it does so at the expense of correctly detecting the future edges. Our method can better find the future edges, and also gives the lowest mean squared error (MSE).

Method Specificity Sensitivity MSE
Averaging 0.8014 0.5125 0.2492
0.5962 0.6984 0.2151
Table 1: Prediction results for 328 MC’s in our analysis who also served in the Congress.

The posterior means of the coefficients, , indicate that popularity was dramatically more responsible for creating edges than activity level; i.e., the probability of a cosponsorship is determined mostly by the MC who sponsors the bill rather than the MC who is contemplating cosponsoring it. Figure 8 shows the posterior mean latent positions of the MC’s. Unsurprisingly we see the Republicans and Democrats occupy different halves of the network space. Both parties seem to have the majority of their members in the center of the network space along with a scattering of members along the edge of the network space, implying that both parties have active central members which associate with members from both parties, as well as less active outlying members which interact less with members of the opposite party.

Figure 8: Posterior means of latent positions for the cosponsorship data. Latent positions for all 5 Congresses are plotted simultaneously. Hollow circles are republicans and solid circles are democrats. The surface these points lie upon reflects the political ideological landscape within the network space. Darker regions correspond to more moderate ideologies, and lighter regions correspond to more radical ideologies.

It is of interest to study the dynamics of the network. To evaluate the stability of the network we consider the distance each MC moves during each of the four transitions. Figure 9 gives a boxplot for these distances, and from this we can see that the distances corresponding to each transition fall within a similar range, though the transition to the Congress involves somewhat larger moves. There were a few MC’s (ranging from 4.4% to 7.7% of the MC’s) who were above the top whisker, but these typically were different MC’s at every transition; only 11 of the MC’s were beyond the top whisker in two of the transitions, 2 of the MC’s in three of the transitions, and none more than three. All this indicates that the dynamics of the network remained stable throughout the five terms.

Figure 9: Boxplots of the distances MC’s traveled within the latent network space during each of the four transitions. The similar ranges imply that the dynamics of the network are fairly constant throughout the five terms.

Political ideology, measured from liberal to conservative, is an extremely important aspect of political science. Much literature exists on this topic; for example, Poole and Rosenthal (2011) wrote an entire book on ideology and its effect on Congress. Levitt (1996) discussed various factors’ effects on roll-call voting patterns, concluding that personal ideology is the single most important factor. This relationship between voting patterns and personal ideology is seen in a vivid way by comparing the latent positions of the MC’s with their ideologies. Specifically, this comparison is shown in Figure 8, where the latent positions of the MC’s are superimposed upon a surface which represents a political ideological landscape. This surface was obtained in the following way. Each MC has a particular Nominate score which is a measure of their political ideology (see Poole and Rosenthal 1985). This score ranges from (liberal) to 1 (conservative). Using the latent location coordinates, kriging was performed on the absolute value of the Nominate scores using a spherical variogram model. This gives us the surface in Figure 8 that reflects how regions of the latent network space correspond to radical ideologies or moderate ideologies. In the center of the network space where the actors are most dense (and hence are more active in legislation) is an interesting dividing line between the two parties that reflects a moderate political ideology. We also see that both parties have a less dense (hence less active in legislation) group of MC’s which has more radical ideologies.

Edge attraction was detected on 74 of the MC’s. It is intuitive that an MC would be influenced more by members of his or her own party than by members of a different party, and indeed this is the case. Of the influenced MC’s, only 29% were influenced more by members of the opposite party than by members of their own party. As an example of an MC influenced by members of the opposite party, consider Lawrence Coughlin, a Republican from Pennsylvania. Only 35% of those who exerted influence on Coughlin were also Republicans, and in fact the average Nominate score for those exerting influence on Coughlin was , i.e., Coughlin was influenced mostly by slightly liberal politicians. This influence is manifest in the fact that he is often referred to as a moderate Republican (e.g., Downey 2001)

; his moderate ideology (0.163) is also quantitatively reflected in having his Nominate score below the first quartile of fellow Republicans, and below the first quartile of the absolute value of the Nominate scores of all MC’s. In contrast to Coughlin, consider Sidney Yates, a Democrat from Illinois. 94% of those exerting influence on Yates were also Democrats, and in fact quite liberal Democrats; the mean ideology score of Yates’ influencing MC’s was

(recall that a negative Nominate score implies liberal ideology). The influence of these liberal MC’s on Yates is reflected in Yates also being liberal, himself having a Nominate score () below the first quartile of all Democrats and an absolute score above the third quartile of the absolute values of all Nominate scores. What is left uncertain is whether Yates aimed towards liberal Democrats in the latent space because he himself already had a liberal ideology or whether these liberal Democrats influenced him to become liberal himself. The von Mises distributions corresponding to the edge attraction on both Coughlin and Yates are given in the Supplementary Material.

9 Discussion

A latent space model is given for analyzing dynamic network data. The model provides rich visualization of the dynamics of the network, giving insight into the characteristics of the actors, the evolution of the network, and the overall groupings and communities that exist within the network. Unlike existing methodology, our model can handle directed edges, missing data, and can be used to predict future latent positions and future edges, and detect and visualize edge attraction. We have also given an approximation method to obtain statistically meaningful estimates in a computationally efficient way.

While only directed graphs have been analyzed, our methods can easily be used to model undirected graphs. Clearly with undirected edges there is no distinction between activity and popularity. This can be reflected in the model by setting = in equation (4) and proceeding as before.

While the focus of this paper is binary edges, this model can be easily generalized to dyadic data types other than binary. This is accomplished by changing the link function just as one would in the generalized linear model setting. In (4) we see that the link function

up to this point has been assumed to be the logit of the conditional mean of

, . If, for example, we were dealing with dyadic relations measured in counts, then it may be better to let be the log of , the canonical link for a Poisson random variable. A similar approach has been taken in the static case by Hoff (2005), and in the dynamic case by Sewell and Chen (2015) for rank-order data; this latter work was completed after the present paper, building on the methodology proposed here. Other data types may lead to similar adaptations of the model.


  • A. Anagnostopoulos, R. Kumar, and M. Mahdian (2008) Influence and correlation in social networks. In Proceeding of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 7–15. Cited by: §6.
  • S. Bansal, J. Read, B. Pourbohloul, and L. A. Meyers (2010) The dynamic nature of contact networks in infectious disease epidemiology. Journal of Biological Dynamics 4 (5), pp. 478–489. Cited by: §1.
  • B. Bollobás, S. Janson, and O. Riordan (2007)

    The phase transition in inhomogeneous random graphs

    Random Structures & Algorithms 31 (1), pp. 3–122. Cited by: §1.
  • I. Borg (2005) Modern multidimensional scaling: theory and applications. Springer. Cited by: §3.1.
  • K. M. Carley (2006) A dynamic network approach to the assessment of terrorist groups and the impact of alternative courses of action. Technical report DTIC Document. Cited by: §1.
  • S. Downey (2001) R. lawrence caughlin, former u.s. representative. Philadelphia Inquirer. Cited by: §8.2.
  • R. Durrett (2007) Random graph dynamics. Vol. 20, Cambridge University Press. Cited by: §1.
  • J. Foulds, C. DuBois, A. Asuncion, C. Butts, and P. Smyth (2011) A dynamic relational infinite feature model for longitudinal social networks. In AI and Statistics, Vol. 15, pp. 287–295. Cited by: §1.
  • J. H. Fowler (2006a) Connecting the congress: a study of cosponsorship networks. Political Analysis 14 (4), pp. 456–487. Cited by: §8.2.
  • J. H. Fowler (2006b) Legislative cosponsorship networks in the us house and senate. Social Networks 28 (4), pp. 454–465. Cited by: §8.2.
  • O. Frank and D. Strauss (1986) Markov graphs. Journal of the American Statistical Association 81 (395), pp. 832–842. Cited by: §1.
  • J. Geweke and H. Tanizaki (2001) Bayesian estimation of state-space models using the metropolis–hastings algorithm within gibbs sampling. Computational Statistics & Data Analysis 37 (2), pp. 151–170. Cited by: §3.1.
  • A. Goldenberg, A. X. Zheng, S. E. Fienberg, and E. M. Airoldi (2010) A survey of statistical network models.

    Foundations and Trends in Machine Learning

    2 (2), pp. 129–233.
    Cited by: §1.
  • A. Goyal, F. Bonchi, and L. V. S. Lakshmanan (2010) Learning influence probabilities in social networks. In Proceedings of the third ACM International Conference on Web Search and Data Mining, pp. 241–250. Cited by: §6.
  • M. S. Handcock, A. E. Raftery, and J. M. Tantrum (2007) Model-based clustering for social networks. Journal of the Royal Statistical Society, Series A 170 (2), pp. 301–354. Cited by: §1.
  • M. S. Handcock and K. J. Gile (2010) Modeling social networks from sampled data. The Annals of Applied Statistics 4 (1), pp. 5–25. Cited by: §4.
  • S. Hanneke, W. Fu, and E. P. Xing (2010) Discrete temporal models of social networks. Electronic Journal of Statistics 4, pp. 585–605. Cited by: §1.
  • P. D. Hoff, A. E. Raftery, and M. S. Handcock (2002) Latent space approaches to social network analysis. Journal of the American Statistical Association 97 (460), pp. 1090–1098. Cited by: §1, §1, §2, §2, §3.1.
  • P. D. Hoff (2005) Bilinear mixed-effects models for dyadic data. Journal of the American Statistical Association 100 (469), pp. 286–295. Cited by: §1, §9.
  • J. Hopcroft, T. Lou, and J. Tang (2011) Who will follow you back?: reciprocal relationship prediction. In Proceedings of the 20th ACM International Conference on Information and Knowledge Management, pp. 1137–1146. Cited by: §5.
  • M. Huisman and C. Steglich (2008) Treatment of non-response in longitudinal network studies. Social networks 30 (4), pp. 297–308. Cited by: §4, §8.2.
  • M. Huisman (2009) Imputation of missing network data: some simple procedures. Journal of Social Structure 10 (1), pp. 1–29. Cited by: §4.
  • H. Kashima and N. Abe (2006) A parameterized probabilistic model of network evolution for supervised link prediction. In Proceedings of the Sixth International Conference on Data Mining, pp. 340–349. Cited by: §5.
  • D. Kempe, J. Kleinberg, and É. Tardos (2003) Maximizing the spread of influence through a social network. In Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 137–146. Cited by: §6.
  • A. B. Knecht (2008) Friendship selection and friends’ influence. dynamics of networks and actor attributes in early adolescence. Ph.D. Thesis, University of Utrecht.