Estimation of global network statistics from incomplete data
Complex networks underlie an enormous variety of social, biological, physical, and virtual systems. A profound complication for the science of complex networks is that in most cases, observing all nodes and all network interactions is impossible. Previous work addressing the impacts of partial network data is surprisingly limited, focuses primarily on missing nodes, and suggests that network statistics derived from subsampled data are not suitable estimators for the same network statistics describing the overall network topology. We generate scaling methods to predict true network statistics, including the degree distribution, from only partial knowledge of nodes, links, or weights. Our methods are transparent and do not assume a known generating process for the network, thus enabling prediction of network statistics for a wide variety of applications. We validate analytical results on four simulated network classes and empirical data sets of various sizes. We perform subsampling experiments by varying proportions of sampled data and demonstrate that our scaling methods can provide very good estimates of true network statistics while acknowledging limits. Lastly, we apply our techniques to a set of rich and evolving large-scale social networks, Twitter reply networks. Based on 100 million tweets, we use our scaling techniques to propose a statistical characterization of the Twitter Interactome from September 2008 to November 2008. Our treatment allows us to find support for Dunbar’s hypothesis in detecting an upper threshold for the number of active social contacts that individuals maintain over the course of one week.
Data collected for complex networks is often incomplete due to covert interactions, measurement error, or constraints in sampling. Particular individuals may wish to remain hidden, such as members of organized crime, and individuals who are otherwise overt may have some interactions that they wish to remain hidden because those interactions are of a sensitive nature (e.g., romantic ties). In other instances, links may be erroneously inferred from spurious or noisy interactions. Furthermore, extremely large networks necessitate an understanding of how network statistics scale under various sampling regimes Leskovec2006sampling (); morstatter2013sample (). Explorations of empirically studied networks have largely ignored these biases and consequently, characterizations of the observable (sub)networks have been reported as if they represent the “true” network of interest.
When members of a population are drawn at random, each with equal selection probability, the sample statistic being studied is often a good estimate of the population statistic. Problematically, subsampling networks often induces bias: some individuals or interactions may be more likely to be selected Kolaczyk2009 (). Consider, for example, a network for which a random selection of links is observed. The collection of observed nodes in such a subnetwork is biased because large degree nodes are more likely to be included in the sample than nodes of small degree.
The development of techniques to correct sample estimates of population statistics is needed to enable more accurate portrayals of empirically studied large -scale networks and aid in efforts to model dynamics such as cascading failures and complex contagion weng2013 (); hines2009cascading (); pahwa2014abruptness (); cotilla2012predicting ().
A central confounding issue is that the errors introduced by biases in sampling may be exacerbated both by particular sampling strategies and by various underlying network topologies of the true network from which the subsamples are chosen costenbader2003 (); Han2005 (); Stumpf2005 (); kossinets2006effects (); Wiuf2006 (); Stumpf2008 (); frantz2009robustness (); Martin2006870 (). Researchers have explored the effects of sampling by nodes Stumpf2008 (); Han2005 (); desilve2006 (); Lakhina2003 (); Leskovec2006sampling (); Lee2006 (); sampling by edges or messages morstatter2013sample (); Leskovec2006sampling (); Lee2006 (); and graph exploration methods based on random walks, snowball sampling, and respondent driven sampling Leskovec2006sampling (); frank1994estimating (); biernacki1981snowball ().
We organize our paper as follows. First, we outline some of the most common global network statistics. In Section 2, we describe our data and sampling strategies. In Section 3, we describe scaling methods for global network statistics and apply our methods to four classes of simulated networks and six empirical datasets. We provide a summary of all our estimates in Table 2. In Section 4, we apply our methods to Twitter reply networks as both a case of scientific interest and demonstration of our methods. In Section 5, we discuss the implications of our findings and suggest further areas of research.
Global network statistics
Real complex networks have come to be characterized by a range of functional network statistics. In this paper, we explore how descriptive measures such as the
the number of nodes, ,
the number of edges, ,
degree distribution, ,
the average degree, ,
the max degree, ,
clustering coefficient, , newman2001clustering (), and
the proportion of nodes in the giant component, ,
scale with respect to missing network data. Based on our observations, we suggest predictor methods for inferring these network statistics from subsampled network data.
The most important structural feature of a network is the degree distribution, , and this has been the focus of much previous work on subsampled networks. The classical Erdös-Rényi random graph model famously exhibits a Poisson degree distribution, erdHos1960 (). In contrast to Erdös-Rényi random networks, preferential attachment growth models describe a random process whereby new nodes attach with greater likelihood to nodes of large degree giving rise to a Power-law or Scale-free degree distribution, de_Solla_Price30071965 (); Barabási15101999 (); simon1955class (); yule1925mathematical (). Other distributions, such as lognormals and power-laws with exponential cutoffs may equally characterize the degree distributions of some empirical networks Clauset2009 ().
Previous work has explored how the degree distribution is distorted when the subnetwork is the induced subgraph on sampled nodes Han2005 (); Lee2006 (); Stumpf2005 (); Stumpf2008 (); stumpf-2005 (); Lakhina2003 (); Frank1980_estimation (); girvan2013robustness (). Han et al. Han2005 () investigated the effect of sampling on four types of simulated networks: random graphs with (1) Poisson, (2) Exponential, (3) Power-law, and (4) Truncated normal distributions. They observed that degree distributions of sampled Erdös-Rényi random graphs appear to be linear on a log-log plot. Others have also suggested that subnetworks of Erdös-Rényi random graphs appear “power-law-like” and could be mistaken for a scale-free network Lakhina2003 (); Han2005 (). Typically, scale-free networks have degree distributions which span several orders of magnitude and thus, subnetworks of Erdös-Rényi random graphs would not be classified as scale-free networks by most researchers. As warned in Clauset2009 (), further errors may be incurred when attempting to use linear regression to fit a power-law.
Stumpf and Wiuf stumpf-2005 () examined how degree distributions of Erdös-Rényi random graphs scale when subnetworks are obtained through uniform random sampling on nodes and “preferential sampling of nodes,” whereby large degree nodes have a greater probability of being selected. They showed that Erdös-Rényi random graphs exhibit closure111An Erdös-Rényi random graph sampled by nodes is an Erdös-Rényi random graph. under subsampling by nodes, but not under preferential sampling of nodes.
Stumpf et al. Stumpf2008 () suggested that the degree distribution of the subnetwork induced on randomly selecting nodes is independent of the proportion of nodes sampled and that the true degree distribution can only be determined by knowledge of the generating mechanism for the network. Unfortunately, this is often not known or fully understood.
Several researchers have explored techniques for estimating the true degree distribution from subnetwork data. We first examine the subnetwork degree distribution before examining attempts to solve for the true degree distribution in terms of the subnetwork degree distribution. We consider three cases. First, when links are sampled with probability and the subnetwork is taken to be the network generated on sampled links, the probability that a node of degree in the true network will become a node of degree in the subnetwork () is given by . The subnetwork degree distribution can be determined by weighting these probabilities by , the probability of node appearing in the true network cohen2000resilience (). The subnetwork degree distribution is then given by
Next, we consider subnetworks obtained by link failure. In these cases, all nodes are observed, only a proportion () of links are observed. This cases is nearly identical to Equation 1, except for the presence of nodes of degree zero.
Lastly, we consider subnetworks obtained from the induced network on sampled nodes. In this case, the probability of observing a node is . As such,
We note that this is not the observed subnetwork degree distribution because when a subnetwork obtained from the induced network on sampled nodes is observed, the frequencies of nodes of degree are computed relative to the number of observed nodes. This becomes
which is normalized. For added clarity, consider a network of nodes and edges. We observe that whereas . The latter agrees with our observation, namely the (observed) network induced on sampled nodes will have all nodes of degree 0 and an observed probability distribution which is simply .
Viewing Equation (1) as a system of equations, we may derive an expression for the true degree distribution in terms of the observed subnetwork degree distribution. We refer the interested reader to the Appendix for the derivation of this result:
Given a network with degree distribution , with sampling fraction , and the subnetwork degree distribution , we may solve for in terms of the subnetwork degree distribution . This yields
where represents the predicted degree distribution and nodes of degree 0 are handled appropriately.
Verification of this result is also presented in the Appendix.
Our derivation differs from Frank Frank1980_estimation () by a factor of ,
Equation 4 solves , for in terms of , however is not the observed degree distribution. Neither of these derivations, however, are guaranteed to be non-negative Kolaczyk2009 () and their practicality of use is limited.
Model selection methods provide a different approach by employing maximum likelihood estimates to identify which type of degree distribution characterizes a true network, given only a subnetwork degree distribution stumpf2005statistical (). Although these methods are able to discern that some network degree distributions may be better characterized by lognormal or exponential cutoff models instead of power-laws, only models selected a priori for testing form the candidate pool of possible distributions.
In contrast to the model selection technique proposed by Stumpf et al. stumpf2005statistical (), we explore a probabilistic approach which utilizes knowledge of the proportion of sampled network data () and the subnetwork degree distribution. In doing so, we desire an estimation that captures the qualitative nature of the degree distribution without making any assumptions about candidate models. We show that reasonably good estimates of can be achieved with no knowledge of the generating mechanism. With a reasonable estimate of the degree distribution available, we are able to overcome a previously noted obstacle identified by Kolaczyk Kolaczyk2009 () who notes that predictors for network statistics (sampled by links) have proven more elusive because of the need for knowledge of the true degree distribution Kolaczyk2009 (). Our method can be used in conjunction with Hortiz-Thompson estimators to reasonably predict network statistics for cases where node selection is not uniform (i.e., subnetworks generated by sampled links or weights).
In the subsequent sections, we summarize this work and show how our method surmounts this obstacle. To our knowledge, scaling techniques for networks generated by sampled interactions (e.g., weighted networks) have not been addressed in the literature and given the interest in large, social networks derived from weighted, directed interactions, we find this analysis timely and relevant.
In this paper, we focus on four sampling regimes: (1) subnetworks induced on randomly selected nodes, (2) subnetworks obtained by random failure of links, (3) subneworks generated by randomly selected links, and (4) weighted subnetworks generated by randomly selecting interactions. Motivated by our work with Twitter reply networks Bliss2012 () for which we have a very good approximation of the percent of messages which are obtained, we base our work on the assumption that the proportion of missing data is known. This is a critical assumption and one that we acknowledge may not always be satisfied in practice. Efforts to estimate the proportion of missing nodes or links are intriguing, but are beyond the scope of this paper.
2.1 Unweighted, undirected networks
Our data consist of simulated and empirical networks. We generate unweighted, undirected networks with nodes and average degree according to four known topologies: Erdös-Rényi random graphs with a Poisson degree distribution erdHos1960 (), Scale-Free random graphs with a power-law degree distribution price1976 (); Barabási15101999 (), Small world networks watts1998collective (), and Range dependent networks grindrod2002 ().222Erdös-Rényi, Scale-free, Small world, and Range dependent models were constructed with the CONTEST Toolbox for Matlab Taylor_Contest (). We note that the small world networks were set to have random rewiring probability and preferential attachment networks were set to have new links when they enter the network. Range dependent networks were set to establish a link between nodes and with probability where we set and . As noted by Taylor_Contest (), this choice of ensures that nodes and are adjacent and ensures that short range connections are more probable than long range connections. We also examine six well known empirical network datasets: C. elegans White1986 (); watts1998collective (), Airlines woolley2013 (), Karate Club zachary1977information (), Dolphins Lusseau2003 (), Condensed matter newman2001clustering (), and Powergrid watts1998collective ().
We sample each of these simulated and empirical networks and examine the subnetwork induced on sampled nodes (Fig. 1), the subnetwork obtained by failing links (Fig. 2), and the subnetwork generated by sampled links (Fig. 3). For a given network, 100 simulated subnetworks are obtained for a given sampling strategy and subsampling percentage , as varies from 5% to 100% in increments of 5%.
2.2 Weighted, undirected networks
We examine the effects of uniformly increasing edge weight (Experiment 1, Cases I-V) as well as the distribution of edge weights (Experiment 2, Cases VI and VII) on the scaling of network statistics (Table 1).
|Case||Distribution of weights|
2.2.1 Experiment 1: Uniform distribution of edge weights
In this set of experiments, we generate Erdös-Rényi networks with nodes and . We assign each edge to have equal weight, , where or 5 (corresponding to Cases I-V). We similarly generate Scale-free networks with nodes and . We then sample each of the weighted, undirected networks by randomly selecting interactions and examine the subnetwork generated by links with (Fig. 4). This procedure is repeated to generate one hundred simulated networks for each class and varying proportions of sampled interactions ().
2.2.2 Experiment 2: Non-uniform distribution of edge weights
In this set of experiments, we explore how the distribution of weights on edges can impact scaling of global network statistics. As in the previous case, we first generate an Erdös-Rényi network with and . We then add weights to edges in one of two ways. In Case VI, we assume “equal effort” in that all nodes will have an equal number of interactions distributed equally among their incident edges. This requirement ensures that all nodes have equal node strength and that effort is equally distributed to each neighbor. More specifically, for node , we set each of the edges to have weight . In Case VII, for each edge we select an integer weight between 1 and 9 from a uniform probability distribution. Certainly, other variants of the weight distribution exist and their analysis may provide additional insight in future studies.
2.3 Weighted, directed networks–Twitter reply networks
Twitter reply networks Bliss2012 () are weighted, directed networks constructed by establishing a directed edge between two individuals if we have a directed reply from a individual to another during the week under analysis. These networks are derived from over 100 million tweets obtained from the Twitter streaming API service during September 2008 to February 2009.333We refer the interested reader to Bliss2012 () for more information. The data for these networks is provided at http://www.uvm.edu/~storylab/share/papers/bliss2014a/ During this time, we obtained between 25% to 55% of all tweets (Table A24). Using the scaling methods developed in Sections 4.1-4.4, we predict global network statistics for the Twitter interactome during this period of time by viewing in- and out-network statistics separately (e.g., two distinct networks) to account for directionality.
3 Estimating global network statistics
3.1 Sampling by nodes
Given a network, , where is the collection of nodes (or vertices) and is the collection of links (or edges), we randomly select a portion of nodes , where . The node induced subgraph on these randomly sampled nodes is given by , where represents the randomly selected nodes and represents the edges in for whom both endpoints lie in (Fig. 1). This type of sampling occurs when a selected group, representative of the whole, is observed and all interactions between sampled individuals are known. This sampling strategy is well studied and we will only view key results here (see Kolaczyk2009 ()).
3.1.1 Scaling of and
Given a subnetwork of size known to be obtained by randomly selecting nodes, the number of nodes in the subsample clearly scales linearly with (see Figs. A1a and A2a). The size of the true network is predicted by
which shows good agreement with the true network statistic (Table A1). Note that this result is independent of network type and is only dependent on , the fraction of nodes subsampled, and , the size of the subsample.
Given a network with nodes and a subnetwork of nodes, the probability of selecting edge is given by . This is simply the probability that the two nodes, and , incident with the edge , are selected. The number of edges in the subnetwork is found by
where represents the number of edges in the subnetwork and represents the number of edges in the true network. For large networks, This agrees well with simulated results (Figs. A1b and A2b). The predicted number of edges is given by
which scales as for large networks. This predictor shows good agreement with actual values (Table A2).
The average degree, , is found by
where in line (10) we have assumed that , and . Comparing this result to simulated subnetworks induced by subsampling nodes (Figs. A1c and A2c), we find very good agreement between the predicted average degree and true average degree (Table A3), except for the small empirical networks (Karate club and Dolphins) sampled with low . In these cases, we violate the assumption that because subsamples of the Karate Club network degenerate to subnetworks of 3 edges or less when . Similarly, subsamples of the Dolphin network degenerate to subnetworks of 3 edges or less when . When the observed number of edges in the subnetwork exceeds , our predicted has an error less than 5% (Table A3).
The scaling of the max degree is highly dependent on network type, or more precisely, the relative frequency of high degree nodes. For networks with relatively few large hubs and many small nodes of small degree, scales linearly with and . For networks with many nodes of maximal degree444An example of this would be a regular lattice. All nodes have the same (and hence maximal) degree. This pathological example is not often seen in practice. Simulated Small world networks begin as a regular lattice with random rewiring probability, . Since our Small world networks have , our Small world networks exhibit this pathological behavior more so than several empirical Small world networks. We note that this is simply a matter of tuning and not indicative of all Small world networks. scales nonlinearly with (Figs. A1d and A2d).
This distinction makes predicting the maximum degree more challenging since an accurate predictor ultimately relies on knowledge of the network type - knowledge one usually does not have in an empirical setting. Our proposed technique utilizes , unless our algorithm detects a large number of nodes with degree similar to and are assured that the subnetwork that has not degenerated to a small network ().555More specifically, if our algorithm detects , then we use the adjustment Equation 13, where represents the number of nodes of degree . In this case,
where the number of nodes with degree greater than 75% of . The rationale for this rough approximation is that the nodes which have high degree ( 75% of the observed max. degree) may have been nearly equal contenders for losing a neighbor during subsampling. When all nodes have equal degree, the denominator of Equation 13 tends to . Table A4 presents the error for this predictor and demonstrates that our method performs reasonably well for most networks in our data set. To our knowledge, this is the first attempt to characterize how scales with subsampling and we hope that future work improves upon our estimate.
We measure clustering using Newman’s global clustering coefficient newman2003clustering () where denote the number of triangles on a graph and , which is the number of vertex triples connected by exactly two edges (as in the notation used by Kolaczyk2009 ()). Since the probability of selecting a node is , both the number of triangles and connected vertex triples scale as . Thus, and Frank1978 (). We then expect
This is supported by simulations (Figs. A1e and A2e) and small errors in (Table A5). We note that for small , some subnetworks completely breakdown and no connected triples are present. In these situations, the clustering coefficient can not be computed nor can the true network’s clustering coefficient be well predicted.
We next explore how the size of the giant component scales with the proportion of nodes sampled (Fig. A1f and A2f). For the Erdös-Rényi and Scale-free random graphs, the giant component emerges when the subnetwork has . This occurs when and so for our simulated Erdös-Rényi and Scale-free networks, this occurs when because the true networks have . The thresholds for the emergence of the giant component in Small World and Range dependent networks are much higher. This may be due to the relatively large clustering coefficients of these networks. As suggested by Holme et al. holme2002attack (), networks with a large clustering coefficient watts1998collective () are more vulnerable to random removal of nodes. We observe the same trend with Newman’s global clustering coefficient.
In the case of the empirical networks, we find that the giant component emerges for corresponding to . C. elegans, Airlines, and Condensed Matter networks are more resilient to random removal of nodes in that the giant component persists for small levels of . This is most likely due to their relatively high average degrees, as compared to the other networks (heterogeneity of nodes’ degrees in these networks). Heterogeneous networks demonstrate more resilience due to random removal of nodes at high levels of damage barrat2008dynamical (). In general, it may be very difficult to predict the exact critical point at which the giant component emerges from subnetwork datasets.
3.1.2 Scaling of
The complementary cumulative degree distribution (CCDF) becomes more distorted as smaller proportions of nodes are sampled, as shown in Figure A3 and given by Equation 1. Subnetworks obtained by the induced graph on sampled nodes will often have . This occurs when is selected in sampling, but no neighbors of are selected in the sample.
Our goal is to predict the degree distribution, given only knowledge of the proportion of nodes sampled () and the subnet degree distribution. We note that the probability that an observed node of degree came from a node of degree in the true network is given by
where is the probability that a node’s neighbor was included in the subsample and is the probability that a node’s neighbor is not included in the subsample.
After normalizing, we find describes the normalized probability that an observed node of degree came from a node of degree in the true network, where . Note that when this series converges and we find . Thus,
Let represent the number of nodes of degree . We compute
where we use Stirling’s approximation to estimate the binomial coefficients for large . We have taken care to include observed nodes of degree zero in this process (e.g., in Equation 16).
For networks with nodes of large degree (e.g., hubs), one can further speed up the computation and reduce floating point arithmetic errors by mapping back observed nodes of degree to the expected value of the distribution obtained in Equation 15:
where . In making use of , we perform a separate calculation for nodes of degree zero666In all cases, we assume a finite network. We limit our calculations to as a rough estimate on the upper bound needed for the sum in Equation 15.: .
Figure A4 reveals the predicted degree distribution for subnets induced on varying levels of randomly selected nodes. To test the goodness of fit for the estimated degree distribution and the true , we apply the two sample Kolmogorov-Smirnov test. Figure A16 shows the test statistics for the predicted degree distributions for both estimation methods (Equations 16 and 18), as well as the computed from , where and . For most networks, for , suggesting that when at least 30% of network nodes are sampled, our methods provide an estimated degree distribution which is statistically indistinguishable from the true degree distribution. Although we reject the null hypothesis for the preferential attachment case, for all , we wish to point out the potential for bias in the Kolmogorov-Smirnov test with large goldstein2004problems (). As shown, values are quite low and the bias in this test is due to large and . The statistical power in this test leads to the detection of statistically significant differences, even when the absolute difference is negligible. Thus, we caution the interpretation of this statistical test and place more interest in the value , where and represent the true and predicted CDFs.
3.2 Link failure
We now turn our attention to link failure. As in the previous cases, we denote the true, unsampled network as . Some proportion, of links remain “on” (or present in the sample) and are hidden or undetected by sampling. consists of precisely the links that remain “on” and (Fig. 2). Figures SI.5-SI.6 demonstrate how network statistics scale in this sampling regime.
In this case we may use the estimator to predict the number of nodes, and we may predict the number of edges by . The average degree is found by
Using Newman’s global clustering coefficient newman2003clustering (), we note that and because each edge is selected with probability . Thus,
We compute the maximum degree with the same method as described in Section 4.4.1 because the number of neighbors of a node scales the same in both cases. Using these estimates, we find relatively low error in the predicted the network measures for , and (Tables A6– A10).
Several networks’ giant components exhibit similar patterns of resilience when sampling by nodes or failing links. Comparing the resilience of the proportion of nodes in the giant component under sampling by nodes vs. failing links, we see that Erdös-Rényi random graphs, random graphs with preferential attachment, Airlines, Condensed matter, C. elegans, and Powergrid networks all perform relatively similarly under the two sampling regimes. A noticeable difference is seen in Small world, Range dependent, Karate club, and Dolphin networks. In the case of Small world and Range dependent networks, the regularity of the underlying lattice in these networks means that each time a node is not observed, this also means that edges are also missing. Given that the majority of nodes have roughly the same degree for these networks, subsampling fractures the giant component quickly (i.e., for around 0.7 and 0.8 respectively). In the case of the small Karate club and Dolphins networks sampled by nodes, the proportion of nodes in the giant component increases with decreasing . In these cases, the network consists of relatively few nodes, which are connected. In contrast, when examining the failing links case, we have all nodes present, but these nodes are missing almost all links and the network is highly disconnected.
Figure A7 reveals the distortion of the CCDF when links fail in a network and all nodes remain known to the observer. Clearly, there are nodes of degree zero that are observed in this sampling regime. The predicted degree distribution is obtained by the methods described under sampling by nodes (including the treatment of observed nodes of degree zero) and presented in Fig. SI.8. The results of the two sample Kolmogorov-Smirnov test reveal that the estimated degree distribution and the true degree distribution are statistically indistinguishable for for most networks (Fig. A17). As previously noted, the large number of observations in degree distribution for the random graph grown with preferential attachment leads to high statistical power and a low .
3.3 Sampling by links
The problem of missing links may also manifest itself in another manner. In contrast to the case when all nodes are known and some links are hidden, we now consider subnetworks generated by sampled links and the nodes incident to those links (Fig. 3). This type of sampling occurs in many social network settings, such as networks constructed from sampled email exchanges or message board posts. In this case, we have data pertaining to messages (links). Nodes (individuals) are only discovered when a link (email) which connects to them is detected.
In this case, edges are sampled uniformly at random and we may use our previous estimator, . Node inclusion is biased, however, in that nodes of high degree will be detected with greater probability than nodes of low degree precisely because they are more likely to have an incident edge sampled.
To motivate an appropriate predictor, we must first consider how the number of nodes in a subnetwork obtained by the subnetwork generated by sampled links scales with (Figs. A9a and A10a). To do this, let us consider the probability that a node is included in such a subsample. If the number of edges not sampled () is less than the degree of node , then we can be certain that our node of interest will be detected in sampling. On the other hand, if , then the probability of being in the subnetwork scales nonlinearly with . Using the framework set forth by Kolaczyk Kolaczyk2009 (), observe that there are ways of choosing edges from the edges not incident with node and there are total ways of choosing edges from all . Thus, we have
The Horvitz-Thompson estimator given by
Kolaczyk Kolaczyk2009 () warns that this may not be a useful result, due to the fact that the true degree of a given node is likely to be unknown. We overcome this limitation by using our predicted degree distributions obtained by the techniques previously mentioned. Observe that when sampling by links, no nodes of degree zero will be observed. We also note that in the case when and , we may make the following approximation which is less computationally burdensome:
This is simply the probability that a node of degree loses all edges during subsampling and thus Thus,
We apply these methods to our simulated and empirical networks.
Once and have been computed, the average degree is simply . The max degree scales roughly linearly for preferential attachment models and many of the empirical networks, however scales sublinearly in networks with a high proportion of nodes of similar degree (e.g. the regular lattice structure seen in Small world and Range dependent networks). Clustering scales approximately as and the giant component shows a critical threshold which varies according to network type and average degree. The relative errors of our predictors are summarized in Tables A11– A15. The scaling of and the predicted degree distribution are presented in Figs. SI.11 and SI.12.
To test the goodness of fit for the estimated degree distribution and the true , we again compute , two sample Kolmogorov-Smirnov test statistic (Fig. A18). This figure shows that reasonable results are achieved when , a noticeable increase in the percent of network knowledge needed, as compared to other sampling strategies (sampling by nodes and failing links).
3.4 Sampling by interactions
Lastly, we consider the case of sampling by interactions in the special case of a weighted network (Fig. 4). In this case, we begin with , where is a set of edges777We will treat the directed case as a special case in the next section., , with weight . The weight on an edge represents the number of interactions between two vertices. An alternative representation is simply a network with multiple edge between two such vertices, one for each interaction. A subnetwork generated by sampled interactions is simply a sampled collection of multi-edges and the nodes incident to these edges (e.g., the subnetwork generated by links with nonzero weight and nodes incident to those edges).
To consider how the number of nodes scales, we consider a similar formulation as discussed in the previous section for the probability that a given node is selected when sampling by links, however instead of the degree of a node, , we are now interested in the strength of a node. The strength of a node is given by , where denotes the neighborhood of vertex barrat2004 (). Let represent network load and , the number of sampled interactions. If the number of interactions which are not sampled () is less than the strength of a node , then we can be certain that node will be detected in sampling.
On the other hand, if , then there are at most ways888As an upper bound, we assume that the interactions are distributed over edges (weight of 1 on each edge) which maximizes the number of ways these could be chosen. of choosing interactions from the interactions not involving node and there are at most total ways of choosing (distinct, labeled) interactions from all . Letting represent the probability that is sampled, we have
Thus, our Horvitz-Thompson estimator is,
where . This can be well approximated by
It should be noted that the strength of a node is merely predicted. Thus, effort must be made to predict the node strength distribution in the same spirit as was previously done for the degree distribution. To predict the node strength distribution, we modify Equation 17 and predict an observed node of strength to be of strength in the true network. Applying this corrector to our subsampled weighted networks, we find low relative error in the predicted number of nodes for most networks (Tables A16 and A17). An exception to this is Case I (Erdös-Rényi) for . We predict thenode strength to be and yet in this case, the true network is unweighted (e.g., ). If there is knowledge that the network is unweighted, this example shows that the techniques from sampling by edges subsection will yield much better results..
We now consider how the number of edges in the subnetwork scales with the proportion of sampled interactions. The probability of selecting an edge is equal to 1-. Notice that when the , the edge is certain to be included in the subsample. When , the probability of not selecting edge is simply the number of ways of selecting the interactions at a time, which are not on edge divided by the number of ways of selecting weights from .
Thus, our Horvitz-Thompson estimator is,
where , which is well approximated by
Again, we must have knowledge of the edge weights, or be able to predict them with reasonable accuracy. To do this, we predict an edge of weight in the subnetwork to be of edge weight in the true network.
As the weights on edges tends to 1 (the unweighted network case), we retrieve our result for how edges scale when links are sampled (synonymous with weights in the case where ):
where is the proportion of sampled links. Thus, when the weights on edges tends to 1, our Horvitz-Thompson estimator is
Having found suitable predictors for and , the average degree may be predicted by,
To estimate , we recognize that the observed max degree will need to be scaled by roughly the proportion of missing edges. Using as our scaling factor, we find relatively high error for both networks (Tables A22– A23). This is due to errors in hindering accuracy in .
|Predicted number of nodes ()|
|Predicted number of edges ()|
|Predicted average degree|
|Predicted clustering ()||–|
|Predicted max. degree|
4 Estimating the size of the Twitter interactome
We now consider the weighted, directed network of replies whereby a link from node to node represents the existence of at least one reply directed from to and the weight on this edge represents the number of messages sent in the time period under consideration. We apply our methods to reply networks constructed from tweets gathered during the ten week period from September 9, 2008 to November 17, 2008, a period for which we have a substantially higher percentage of all authored messages.
For each of these weeks, we receive between 20-55% of all messages posted on Twitter and similarly believe that we receive approximately 20-55% of all replies posted in this period (Table A24). We apply our previously developed methods to estimate the number of nodes, edges, strengths on these edges, average degree, max degree, and distribution of node strength. To help validate our predictions, we also predict the number of nodes, edges, average degree, and max degree by performing 100 sampling experiments in which a proportion of the observed messages used for subnetwork construction. These sampling experiments essentially “hide” some of the messages from our view and thus allow us to consider how further subsampling impacts the inferred networks statistics. Curve fitting over this region of allows us to extrapolate the network statistic to a predicted value over increased percentages of observed messages. We use this to validate with our estimated statistic using the methods from the previous section.
4.1 Number of nodes
Since our reply networks are directed, we consider both the number of nodes which make a reply () and the number of nodes which receive a reply (). As expected from our previous discussion, the number of nodes scales nonlinearly with the proportion of observed messages (Fig. 5). We fit models of the form to observed data and in doing so find an excellent fit () for all weeks over the subsampled region (Fig. 5). Extrapolating these fitted models to , we find excellent agreement with our predicted number of nodes obtained from Equations 29 and 30. The predicted number of nodes from both methods agree to within 5%. Figure 6 reveals that the predicted number of nodes is nearly double the number of observed nodes.
4.2 Strength of nodes
Figure 7 depicts a log-log plot of the predicted node strength distribution. This plot reveals that there are fewer nodes in the high strength region than would be expected in a scale-free distribution. Figure 8 reveals that low degree nodes dominate the dataset and that many of these low degree nodes often have low average edge weight (). We find a peak in the average weight per edge as a function of degree around . This peak is more pronounced for out-going edges. Beyond this value, a limiting factor may prevent increases in the weight per edge, a result also noted by Gonçalves et al. Goncalves2011 ().
4.3 Number of edges
The number of edges can be predicted using Equations 31 and 32. We present our results in Figure 9. In all cases, the number of edges increases throughout the period of the study. Figure 10 depicts the predicted edge weight and degree distributions. The edge weight distribution shows that very few () edges have weight greater than . The degree distribution of the observed subnetwork can be rescaled by reassigning nodes of degree , to nodes of degree . Figure 10 demonstrates a slightly heavier tail in the in-degree distribution as compared to the out-degree distribution. The degree distribution reveals that fewer than .01% of the nodes have more than distinct neighbors. This value is approximately Dunbar’s number, a value suggested to be the upper limit on the number of active social contacts for humans Dunbar1992 ().
4.4 Average degree
Once the number of nodes and edges have been predicted for the network, we may simply compute the average degree as and . Upon doing so, we find that the average degree for Twitter reply networks is between 4 and 5 (Fig. 11). We find that the average in-degree is less than the average out-degree (Fig. 12).
4.5 Maximum degree
The maximum degree simply scales in proportion to the probability of edge inclusion. Since the probability of edge inclusion is no longer , as in the case of sampling by links, we may approximate the probability of edge inclusion by and thus . The predicted maximum degree for Twitter reply networks is shown in Figures 13 and 14.
Network measures derived from empirical observations will often be poor estimators of the true underlying network structure of the system. We have explored four sampling regimes: (1) subnetworks induced on randomly sampled nodes, (2) subnetworks obtained when all nodes are known and some links fail or are hidden, (3) subnetworks generated from randomly sampled links, and (4) weighted subnetworks generated by randomly sampled interactions. We have described how network statistics scale under these regimes via sampling experiments on simulated and empirical networks. Our paper advances an understanding of how network statistics scale, and more importantly how to correct for missing data when the proportion of missing nodes, links or interactions is known.
A major obstacle to generating scaling techniques for subnetworks generated by sampled links or interactions has previously been the lack of a practical method for estimating the true degree distribution or node strength distribution. Problematically, the random selection of links creates a biased sample of nodes whereby hubs are more likely to be detected, and nodes of small degree are more likely to go undetected. Although scaling methods have been suggested, they are based on knowledge of (or a reasonable estimate of) the degree or node strength distribution Kolaczyk2009 (). In this paper, we have overcome this obstacle by our proposed scaling techniques for the degree distribution and apply this to several simulated and empirically derived networks with reasonably good results.
Very few studies have addressed the missing data problem in empirically studied networks, such as those constructed from tweets. An exception is work by Morstatter et al. morstatter2013sample () who compared network statistics for the current Twitter’s Spritzer ( 1% of all tweets) to the full Firehose (100% of all tweets), however no methods for scaling from data collected via the API were suggested.
We concluded our work by applying our derived scaling methods to Twitter reply networks. Our work supports Dunbar’s hypothesis which suggests that individuals maintain an upper limit of roughly 100-150 contacts each week Dunbar1992 (). Further evidence for this hypothesis comes from previous work in link prediction. Bliss et al. bliss2013evolutionary () detect the Resource Allocation index to often evolve a large, positive weight–thus contributing heavily (and positively) in the prediction of new links. This index considers the amount of time and attention one individual has as a “social resource” to spend in the social network and assumes that each node will distribute its resource equally among all neighbors. Although the presence of hubs is suggestive of preferential attachment, it is clear that the constraints of time and attention limit truly scale-free behavior in weekly Twitter reply networks. We find that the number of individuals who make replies is less than the number of individuals who receive replies.
One limitation of our work is that our scaling methods are based upon the assumption that the sampling fraction, is known, while in practice this need not be the case. In cases where one may establish an upper and lower bound for , our methods could be used to help establish bounds for the predicted network measures. In some cases, particularly when sampling by links or interactions, small changes in may have relatively little impact on the predicted statistics, especially for large . Future work that seeks to classify subnetworks by network class based on signature subsampling properties may also prove to be fruitful. With some knowledge of network class or generative model, methods for estimating may be possible. Additionally, efforts to predict structural holes in networks from localized information may also greatly advance the field bagrow2013shadow ().
To our knowledge, this is the first attempt provide scaling methods for . While our scaling techniques for predicting perform well for several networks, they did not perform as well on simulated networks with a regularized structure.999Our rewiring probability for the simulated Small world networks was quite low, with . Our methods perform well on other networks which are known to exhibit to Small world structure, such as our empirical networks Powergrid and C. elegans. Future work which detects and accounts for motif distributions may improve upon our efforts here.
With an increased interest in large, networked datasets, we hope that continued efforts will aid in the understanding of how subsampled network data can be used to infer properties of the true underlying system. Our methods advance the field in this direction, not only adding to the body of literature surrounding sampling issues and Twitter’s API morstatter2013sample (), but also to the growing body of literature on incomplete network data.
The authors acknowledge the Vermont Advanced Computing Core and support by NASA (NNX-08AO96G) at the University of Vermont for Providing High Performance Computing resources that have contributed to the research results reported within this paper. CAB and PSD were funded by an NSF CAREER Award to PSD (# 0846668). CMD and PSD were funded by a grant from the MITRE Corporation.
-  J. Leskovec and C. Faloutsos. Sampling from large graphs. In Proceedings of the 12th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’06, pages 631–636, New York, NY, USA, 2006. ACM.
-  Fred Morstatter, Jurgen Pfeffer, Huan Liu, and Kathleen M Carley. Is the sample good enough? Comparing data from Twitters streaming API with Twitters firehose. Proceedings of ICWSM, 2013.
-  Eric D. Kolaczyk. Statistical Analysis of Network Data: Methods and Models. New York, NY: Springer Publishing Company, Inc., 1st edition, 2009.
-  L. Weng, F. Menczer, and Y.-Y. Ahn. Virality prediction and community structure in social networks. Scientific Reports, 3, 2013.
-  Paul Hines, Karthikeyan Balasubramaniam, and Eduardo Cotilla Sanchez. Cascading failures in power grids. Potentials, IEEE, 28(5):24–30, 2009.
-  Sakshi Pahwa, Caterina Scoglio, and Antonio Scala. Abruptness of cascade failures in power grids. Scientific reports, 4, 2014.
-  Eduardo Cotilla-Sanchez, Paul DH Hines, and Christopher M Danforth. Predicting critical transitions from time series synchrophasor data. Smart Grid, IEEE Transactions on, 3(4):1832–1840, 2012.
-  E. Costenbader and T. W. Valente. The stability of centrality measures when networks are sampled. Social Networks, 25(4):283–307, 2003.
-  J. D. J. Han, D. Dupuy, N. Bertin, M. E. Cusick, and M. Vidal. Effect of sampling on topology predictions of protein-protein interaction networks. Nature Biotechnology, 23:839–944, 2005.
-  M. P. H. Stumpf, C. Wiuf, and R. M. May. Subnets of scale-free networks are not scale-free: Sampling properties of networks. Proceedings of the National Academy of Sciences of the United States of America, 102(12):4221–4224, 2005.
-  G. Kossinets. Effects of missing data in social networks. Social Networks, 28(3):247–268, 2006.
-  C. Wiuf and M. P. H Stumpf. Binomial subsampling. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Science, 462(2068):1181–1195, 2006.
-  M. P. H. Stumpf, T. Thorne, E. de Silva, R. Stewart, H. J. An, M. Lappe, and C. Wiuf. Estimating the size of the human interactome. Proceedings of the National Academy of Sciences, 105(19):6959–6964, 2008.
-  T.L. Frantz, M. Cataldo, and K.M. Carley. Robustness of centrality measures under uncertainty: Examining the role of network topology. Computational and Mathematical Organization Theory, 15(4):303–328, 2009.
-  S. Martin, R. D. Carr, and J.-L. Faulon. Random removal of edges from scale free graphs. Physica A: Statistical Mechanics and its Applications, 371(2):870 – 876, 2006.
-  E. de Silva, T. Thorne, P. Ingram, I. Agrafioti, J. Swire, C. Wiuf, and M. Stumpf. The effects of incomplete protein interaction data on structural and evolutionary inferences. BMC Biology, 4(1):39, 2006.
-  A. Lakhina, J. Byers, M. Crovella, and P. Xie. Sampling biases in IP topology measurements. In Proceedings of IEEE Infocom, April 2003.
-  S. H. Lee, P.-J. Kim, and H. Jeong. Statistical properties of sampled networks. Physical Review E, 73(1):016102, 2006.
-  O. Frank and T. Snijders. Estimating the size of hidden populations using snowball sampling. Journal of Official Statistics, 10:53–53, 1994.
-  P. Biernacki and D. Waldorf. Snowball sampling: Problems and techniques of chain referral sampling. Sociological Methods and Research, 10(2):141–163, 1981.
-  M. E. J. Newman. The structure of scientific collaboration networks. Proceedings of the National Academy of Sciences, 98(2):404–409, 2001.
-  P. Erdös and A. Rényi. On the evolution of random graphs. Magyar Tud. Akad. Mat. Kutató Int. Közl, 5:17–61, 1960.
-  Derek J. de Solla Price. Networks of scientific papers. Science, 149(3683):510–515, 1965.
-  A.-L. Barabási and R. Albert. Emergence of scaling in random networks. Science, 286(5439):509–512, 1999.
-  H. A. Simon. On a class of skew distribution functions. Biometrika, 42(3/4):425–440, 1955.
-  G. U. Yule. A mathematical theory of evolution, based on the conclusions of Dr. JC Willis, FRS. Philosophical Transactions of the Royal Society of London. Series B, Containing Papers of a Biological Character, 213:21–87, 1925.
-  A. Clauset, C. Shalizi, and M. Newman. Power-law distributions in empirical data. SIAM Review, 51(4):661–703, 2009.
-  M. P. H. Stumpf and C. Wiuf. Sampling properties of random graphs: the degree distribution. Physical Review E, 72(3):036118, 2005.
-  Ove Frank. Estimation of the number of vertices of different degrees in a graph. Journal of Statistical Planning and Inference, 4(1):45 – 50, 1980.
-  J. Platig, M. Girvan, and E. Ott. Robustness of network measures to link errors. Bulletin of the American Physical Society, 58, 2013.
-  R. Cohen, K. Erez, D. Ben-Avraham, and S. Havlin. Resilience of the internet to random breakdowns. Physical Review Letters, 85(21):4626, 2000.
-  M. Stumpf, P. Ingram, I. Nouvel, and C. Wiuf. Statistical model selection methods applied to biological networks. Transactions on Computational Systems Biology III, pages 65–77, 2005.
-  C. A. Bliss, I. M. Kloumann, K. D. Harris, C. M. Danforth, and P. S. Dodds. Twitter reciprocal reply networks exhibit assortativity with respect to happiness. Journal of Computational Science, 3(5):388 – 397, 2012.
-  D. D. S. Price. A general theory of bibliometric and other cumulative advantage processes. Journal of the American Society for Information Science, 27(5):292–306, 1976.
-  D. J. Watts and S. H. Strogatz. Collective dynamics of small-world networks. Nature, 393(6684):440–442, 1998.
-  P. Grindrod. Range-dependent random graphs and their application to modeling large small-world Proteome datasets. Physical Review E, 66:066702, 2002.
-  A. Taylor and D. J. Higham. CONTEST: A controllable test matrix toolbox for MATLAB. ACM Transactions on Mathematical Software, 35:26:1–26:17, February 2009.
-  J.G. White, E. Southgate, J.N. Thompson, and S. Brenner. The structure of the nervous system of the nematode C. Elegans. Philosophical Transactions of the Royal Society of London, 314:1–340, 1986.
-  O. Woolley-Meza, D. Grady, C. Thiemann, J. P. Bagrow, and D. Brockmann. Eyjafjallajökull and 9/11: The impact of large-scale disasters on worldwide mobility. PloS one, 8(8):e69829, 2013.
-  W. W. Zachary. An information flow model for conflict and fission in small groups. Journal of Anthropological Research, pages 452–473, 1977.
-  D. Lusseau, K. Schneider, O. Boisseau, P. Haases, E. Slooten, and S. Dawson. The bottlenose dolphin community of Doubtful Sound features a large proportion of long-lasting associations. Behavioral Ecology and Sociobiology, 54:396–405, 2003.
-  M. E. J. Newman. Mixing patterns in networks. Physical Review E, 67:026126, 2003.
-  Ove Frank. Sampling and estimation in large social networks. Social Networks, 1(1):91–101, 1978.
-  P. Holme, B. J. Kim, C. N. Yoon, and S. K. Han. Attack vulnerability of complex networks. Physical Review E, 65(5):056109, 2002.
-  A. Barrat, M. Barthlemy, and A. Vespignani. Dynamical processes on complex networks. Cambridge University Press, 2008.
-  M. L. Goldstein, S. A. Morris, and G. G. Yen. Problems with fitting to the power-law distribution. The European Physical Journal B-Condensed Matter and Complex Systems, 41(2):255–258, 2004.
-  A. Barrat, M. Barthelemy, R. Pastor-Satorras, and A. Vespignani. The architecture of complex weighted networks. Proceedings of the National Academy of Sciences of the United States of America, 101(11):3747–3752, 2004.
-  B. Gonçalves, N. Perra, and A. Vespignani. Modeling users’ activity on Twitter networks: Validation of Dunbar’s Number. PLoS one, 6, 08 2011.
-  R. I. M. Dunbar. Neocortex size and group size in primates: A test of the hypothesis. Journal of Human Evolution, 28(3):287 – 296, 1995.
-  C. A. Bliss, M. R. Frank, C. M. Danforth, and P. S. Dodds. An evolutionary algorithm approach to link prediction in dynamic social networks. Journal of Computational Science, 2014.
-  J. P. Bagrow, S. Desu, M. R. Frank, N. Manukyan, L. Mitchell, A. Reagan, E. E. Bloedorn, L. B. Booker, L. K. Branting, M. J. Smith, B. F. Tivnan, C. M. Danforth, P. S. Dodds, and J. C. Bongard. Shadow networks: Discovering hidden nodes with models of information flow. arXiv preprint, arXiv:1312.6122, 2013.
Appendix A Appendix
Derivation of Equation (2) Restating Equation (1) for convenience, with for ease of notation, we have
Assume a finite network with maximum degree, . Equation (1) may be rewritten as:
Back solving for yields:
Continuing, we solve for .
Solving for yields,