The method of moments and degree distributions for network models
Peter J. Bickel, Aiyou Chen, Elizaveta Levina
Introduction
The analysis of network data has become an important component of doing research in many fields; examples include social and friendship networks, food webs, protein interaction and regulatory networks in genomics, the World Wide web and computer networks. On the algorithmic side, many algorithms for identifying important network structures such as communities have been proposed, mainly by computer scientists and physicists; on the mathematical side, various probability models for random graphs have been studied. However, there has only been a limited amount of research on statistical inference for networks, and on learning the network features by fitting models to data; to a large extent, this is due to the gap between the relatively simple models that are analytically tractable and the complex features of real networks not easily reproduced by these models.
Probability models on infinite graphs have a nice general representation based on results [Aldous 1981, Hoover 1979, Kallenberg 2005, Diaconis and Janson 2008], analogous to de Finetti’s theorem, for exchangeable matrices. Here, we give a brief summary closely following the notation of Bickel and Chen 2009. Graphs can be represented through their adjacency matrix , where if there is an edge from node to and 0 otherwise. We assume , that is, there are no self-loops. ’s can also represent edge weights if the graph is weighted, and for undirected graphs, which is our focus here, . For an unlabeled random graph, it is natural to require its probability distribution on the set of all matrices to satisfy , where is an arbitrary permutation of node indices. In that case, using the characterizations above one can write
where , and are i.i.d. random variables distributed uniformly on , and is a function symmetric in its second and third arguments. as in de Finetti’s theorem corresponds to the mixing distribution and is not identifiable. The equivalent of the i.i.d. sequences in de Finetti’s theorem here are distributions of the form . This representation is not unique, and is not identifiable. These distributions can be parametrized through the function
be the probability of an edge in the network. Then the density of conditional on is given by
With this parametrization, it is natural to let , make independent of and control the rate of the expected degree as . The case most studied in probability on random graphs is [where means and ]. The case of corresponds to the so-called phase transition, with the giant connected component emerging for .
Many previously studied probability models for networks fall into this class. It includes the block model [Holland, Laskey and Leinhardt 1983, Snijders and Nowicki 1997, Nowicki and Snijders 2001], the configuration model [Chung and Lu 2002] and many latent variable models, including the univariate [Hoff, Raftery and Handcock 2002] and multivariate [Handcock, Raftery and Tantrum 2007] latent variable models, and latent feature models [Hoff 2007]. In fact, dynamically defined models such as the “preferential attachment” model [which seems to have been first mentioned by Yule in the 1920s, formally described by de Solla Price 1965 and given its modern name by Barabási and Albert 1999] can also be thought of in this way if the dynamical construction process continues forever producing an infinite graph; see Section 16 of Bollobás, Janson and Riordan 2007.
The block model is very attractive from the analytical point of view and useful in a number of applications, but the class (2) is much richer than the block model itself. Moreover, the block model cannot deal with nonuniform edge distributions within blocks, such as the commonly encountered “hubs,” although a modification of the block model introducing extra node-specific parameters has been recently proposed by Karrer and Newman 2011 to address this shortcoming. It may also be difficult to obtain accurate results from fitting the block model by maximum likelihood when the graph is sparse.
In this paper, we develop an alternative approach to fitting models of type (2), via the classical tool of the method of moments. By moments, we mean empirical or theoretical frequencies of occurrences of particular patterns in a graph, such as commonly used triangles and stars, although the theory is for general patterns. While specific parametric models like the block model can be fitted by other methods, the method of moments applies much more generally, and leads to some general theoretical results on graph moments along the way. We note that related work on the method of moments was carried out for some specific parametric models in Picard et al. 2008.
A well-studied class of random graph models where moments play a big role is the exponential random graph models (ERGMs). ERGMs are an exponential family of probability distributions on graphs of fixed size that use network moments such as number of edges, -stars and triangles as sufficient statistics. ERGMs were first proposed by Holland and Leinhardt 1981 and Frank and Strauss 1986 and have then been generalized in various ways by including nodal covariates or forcing particular constraints on the parameter space; see Robins et al. 2007 and references therein. While the ERGMs are relatively tractable, fitting them is difficult since the partition function can be notoriously hard to estimate. Moreover, they often fail to provide a good fit to data. Recent research has shown that a wide range of ERGMs are asymptotically either too simplistic, that is, they become equivalent to Erdös–Renyi graphs, or nearly degenerate, that is, have no edges or are complete; see Handcock 2003 for empirical studies and Chatterjee and Diaconis 2011 and Shalizi and Rinaldo 2011 for theoretical analysis.
The rest of the paper is organized as follows. In Section 2, we set up the notation and problem formulation and study the distribution of empirical moments, proving a central limit theorem for acyclic patterns. We also work out examples for several specific patterns. In Section 3 we show how to use the method of moments to fit the block model, as well as identify a general nonparametric model of type (2). In Section 4, we focus on degree distributions, which characterize (asymptotically) the model (2). Section 5 discusses the relationship between normalized degrees and more complicated pattern counts that can be used to simplify computation of empirical moments. Section 6 concludes with a discussion. Proofs and additional lemmas are given in the Appendix.
The asymptotic distribution of moments
We start by setting up notation. Let be a random graph on vertices , generated by
where , symmetric, , . We cannot, unfortunately, treat and as two completely free parameters, as we need to ensure that . We can either assume that the sequence is such that for all , or restrict our attention to classes where . In either case, we can ignore the weak dependence of on and effectively replace with .
Let be the operator defined by
Thus is the degree of node , is the average degree and is the total number of edges in .
Let be a subset of . We identify with the vertex set and the edge set . Let be the subgraph of induced by . Recall that two graphs and are called isomorphic () if there exists a one-to-one map of to such that the map is one-to-one from to .
Throughout the paper, we will be using two key quantities defined next:
Next, we give a proposition summarizing some simple relationships between and . The proof, which is elementary, is given in the Appendix. Similar results are implicit in Diaconis and Janson 2008.
If is a random graph, and a subset of , then
where . Further,
Here refers to .
The quantities and are unknown population quantities which we can estimate from data, that is, from the graph . Define, for with ,
where is the number of graphs isomorphic to on vertices . For instance, if is a 2-star consisting of two edges , , then . Further, let
Here we use and to denote both a subset and a subgraph. Evidently,
The scaling here is controlled by the parameter , the natural assumption for which is . In that case, for any fixed with a fixed number of vertices . Therefore we consider the following rescaling of and : writing for , let
if .
is the estimated probability of an edge. For these rescaled versions of and , we have the following theorem.
Suppose .
for some . Suppose further is fixed, acyclic with and . Then,
More generally, for any fixed as above with ,
Suppose . Conclusions (9)–(12) continue to hold save that , depend on as well as .
(1) Note that part (b) yields consistency and asymptotic normality of acyclic graph moment estimates across the phase transition to a giant component, that is, for as well as .
(2) Note that we are, throughout, estimating features of the canonical . Unnormalized and are trivially 0 if is not of order .
(4) Part (c) of the theorem shows that for graphs with , always gives -consistent estimates of any pattern while is not consistent unless we assume acyclic graphs,
since the bias is of order . In the range to , what is possible depends on the pattern. For instance, if , a triangle, (because there is no other graph on three nodes containing ), and is -consistent if by part (c) but otherwise only consistent if .
2 Examples of specific patterns
Next we give explicit formulas for several specific . Our main focus is on wheels (defined next), which, as we shall see, in principle can determine the canonical .
A -wheel is a graph with vertices and edges isomorphic to the graph with edges .
In other words, a wheel consists of node at the center and “spokes” connected to the center, and each spoke is a chain of edges. We consider only . The number of isomorphic -wheels on vertices is .
If the graph is a -wheel, the theoretical moments have a simple form and can be expressed in terms of the operator as follows:
where the first equality holds by the definition of and the second by the structure of a -wheel.
order larger than . In the range between and , we do not exhibit a -consistent estimate though we conjecture that by appropriate de-biasing of such an estimate may be constructed. However, seems a reasonable assumption
for most graphs in practice, and then we can use the more easily computed .
A -wheel, where , are vectors and the ’s are distinct integers, is the union , where is a -wheel, , and the wheels share a common hub but all their spokes are disjoint.
-wheel has a total of vertices and edges. For example, a graph defined by , is a -wheel with and . The number of distinct isomorphic -wheels on vertices is .
We can compute, defining ,
Thus -wheels give us all cross moments of , . Note that all -wheels are acyclic.
We are not aware of other patterns for which the moment formulas are as simple as those for wheels. For example, if is a triangle, then
where corresponds to .
Moments and model identifiability
We establish two results in this section: identifiability of block models with known using a -wheel, , and
the general identifiability of the function from using all -wheels .
Let correspond to a -block model defined by parameters , where is the probability of a node being assigned to block as before, and
Recall that the function in (2) is not unique, but a canonical can be defined. For the block model, we use the canonical given by Bickel and Chen 2009. Let . Let the labeling of the communities satisfy , where is proportional to the expected degree for a member of block . The canonical function then takes the value on the block of the product partition where each axis is divided into intervals of lengths . Let .
In view of (10), we will treat as known. Let be the specified set of -wheels, and let
Suppose defines a block model with known , and the vectors are linearly independent. Suppose . Then:
identify the parameters of the block model other than (i.e., the map is one to one).
If has a gradient which is of rank at the true , then is a -consistent estimate of , where and is the closest point in the range of to .
Note that the linear independence condition rules out all matrices that have as an eigenvector. In particular, it rules out the case of equal for all , equal for all , which was studied in detail by Decelle et al. 2011. Using physics arguments, they showed that in that particular case, when , there are regions of the parameter space where neither the parameters nor the block assignments can be estimated by any method.
2 The nonparametric model
In the general case, we express everything in terms of the operator induced by the canonical . We require that:
the joint distribution of is determined by the cross moments of , for arbitrary.
A simple sufficient condition for (A) is . A more elaborate one is the following:
Let characterize , where . By Mercer’s theorem,
where the are orthonormal eigenfunctions and the eigenvalues, .
Suppose . Assume the eigenvalues of are each of multiplicity with corresponding eigenfunction , and for all . The joint distribution of then determines, and is determined by, .
Note again that interesting cases are ruled out by the condition that all eigenfunctions of are not orthogonal to . The general analogue to the block model case is that cannot be constant for all and . Constancy can be interpreted as saying that and the latent variable associated with vertex are independent. The proof of Theorem 3 is given in the Appendix. The almost immediate application to wheels is stated next.
Since has a moment generating function converging on , the moments (including cross moments) determine the distribution of the vector. By (14), the give all moments of the vector for all . By Theorem 1, the are -consistent.
Degree distributions
The average degree is, as we have seen in Theorem 1, a natural data dependent normalizer for moment statistics which eliminates the need to “know” . In fact, as we show in this section, the joint empirical distribution of degrees and what we shall call degrees below can be used in estimating asymptotic approximations to in a somewhat more direct way than moment statistics. They can also be used to approximate moment estimates based on -wheels in a way that potentially simplifies computation.
The complexity of this computation is (first term is for computing the row sums of and the second for eliminating the loops).
Define the empirical distribution of the vector of normalized degrees
Suppose and . Then as , where is the distribution of , and is monotone increasing. Moreover, if is the empirical distribution of , then
There is an attractive interpretation of the last statement of Theorem 5. If , , , then can be identified with in the following sense: While is unobserved but is, on average, and are close. Since is monotone increasing in , that is, is a measure of on another scale, we can treat as the latent affinity of to form relationships.
Bollobás, Janson and Riordan 2007 show that if , , then the limit of the empirical distribution of the degrees can be described as follows: given , the limit distribution is Poisson with mean . The limit of the joint degree distribution in this case can be determined but does not seem to give much insight.
Theorem 5 shows that the normalized degree distributions can be used for estimation of parameters only if . If that is the case we can proceed as follows:
Let be the empirical quantiles of the normalized 1-degree distribution, and let be the -degree of the vertex with normalized degree .
Fit smooth curves to viewed as observations of functions at , , for each , and call these (on ). By Theorem 5, for all . If are smooth, the convergence can be made uniform on compacts.
From the fitted functions , we can estimate the parameters of block models of any order consistently by replacing in the proof of identifiability of block models by fitting the by of the type specified by block models and then using the corresponding . We only need the conditions of Theorem 5.
Computation of moment estimates and estimation of their variances
General acyclic graph moment estimates including those corresponding to patterns arising from -wheels are computationally difficult. For -wheels with small and , we can use brute force counting, but unfortunately, the complexity of moment computation even for -wheels appears to be . Note that we need to count the sets of loopless paths of length , , for each , where is the set of all paths of length originating at node which intersect another such path at , , and is the set of all paths of length from which do not intersect. The number of -wheels with hub is then the number of -tuples of such paths selected so that elements from appear at most once, with the remaining paths coming from . This is computationally nontrivial.
For very sparse graphs, however, intersecting paths can be ignored up to a certain order, and the wheel counts can be related to normalized -degrees via a following approximation. If the conditions of Theorem 5 hold and for all , then
A similar formula holds for .
The heuristic argument for (17) is that the expected number of paths of lengths from is . The expected number of pairs of such paths which intersect at least once is
if for all . Note that for -block models this condition is not necessary for all , since we only need to count a finite number of -wheels.
Estimation of variances of moment estimates even for -wheels involve the counting of more complicated patterns. However, we propose the following bootstrap method:
Associate with each vertex the counts of -wheels for which it is a hub, , .
Sample without replacement vertices , and let
For a -wheel, define
Repeat this times to obtain , and let
Then is an estimate of the variance of if .
Discussion
Our Theorem 4 suggests that we might be able to construct consistent nonparametric estimates of . That is, can be estimated at rate for all . But determines , and thus in principle we can estimate arbitrarily closely using . This appears difficult both theoretically and practically. Theoretically, one difficulty seems to be that we would need to analyze the expectation of moments or degree distributions when the block model does not hold, which is doable. What is worse is that the passage to from moments is very ill-conditioned, involving first inversion via solution of the moment problem, and then estimation of eigenvectors and eigenvalues from a sequence of iterates , etc. If we assume so that we can use consistency of the degree distributions, we bypass the moment problem, but the eigenfunction estimation problem remains. A step in this direction is a result of Rohe, Chatterjee and Yu 2011 which shows that spectral clustering can be used to estimate the parameters of block models if sufficiently, even if slowly. Unfortunately this does not deal with the problem we have just discussed, how to pick a block model which is a good approximation to the nonparametric model. For reasons which will appear in a future paper, smoothness assumptions on have to be treated with caution.
While has not occurred in practice in the past, networks with high average degrees are now appearing routinely. In particular, university Facebook networks have of 15 or more with in the low thousands. In any case can still be useful as an asymptotic regime that can help us understand some general patterns, in the same way that the sample size going to infinity does in ordinary statistics. Note that most of the time we do not specify the rate of growth of , which can be very slow.
2 Adding covariates and directed graphs
In principle, adding covariates at each vertex or at each edge simply converts our latent variable model, into a mixed model
which can be turned into a logistic mixed model. Special cases of such models have been considered in the literature; see Hoff 2007 and references therein. We do not pursue this here. The extension of this model to directed graphs is also straightforward.
3 Dynamic models
Many models in the literature have been specified dynamically; see Newman 2010. For instance, the “preferential attachment” model constructs an graph by adding 1 vertex at a time, with edges of that vertex to previous vertices formed with probabilities which are functions of the degree of the candidate “old” vertex. If we let , we obtain models of the type we have considered whose function can be based on an integral equation for , our proxy for the degree of the vertex with latent variable . We shall pursue this elsewhere also.
Appendix: Additional lemmas and proofs
[Proof of Proposition 1] The first line of (6) is immediate, conditioning on . The second line in (6) follows by expanding the second product. Finally, (6) follows directly from the definitions of and .
The following standard result is used in the proof of Theorem 1.
Suppose are random elements such that,
in probability. Then , are asymptotically independent,
Since , the first term is
The second term is a -statistic of order 2, which is well known to be . Thus, (9) follows in case (a).
To establish (10) and (b), we note that the conditional distribution of given is that of a sum of independent random variables with conditional variance
Applying Lemma 1, we see that if , (b) follows. On the other hand, if , is negligible, and the Gaussian limit is determined by .
The proof of (1) and (12) is similar. We shall decompose as as we did . If , it is enough to prove that
replacing by gives a perturbation of order .
In case (b), it is enough to show that the joint distribution of is Gaussian
in the limit, since in view of (9) and (10) we can apply the delta method to . Let , . Each term in is of the form
Condition on . Then terms , as above, yield
We begin by considering which we can write as
where the sum ranges over all , .
If the covariance is 0. In general, suppose the graph has vertices and edges. Since is acyclic any subgraph is acyclic. By Corollary 3.2 of Chartrand, Lesniak and Behzad 1986 for every acyclic graph, . Now,
There are terms in (18) which have vertices in common. Therefore by (19) the total contribution of all such terms to is
if . On the other hand
Thus, are jointly asymptotically Gaussian; see, for instance, Serfling 1980.
Since if , , the result follows if . If , we note that are sums of dependent random variables in the sense of Bulinski [see Doukhan 1994] and hence, given , are jointly asymptotically Gaussian. It is not hard to see that the limiting conditional covariance matrix is independent of , as it was for marginally. By Lemma 1 again and are asymptotically independent and (a) and (b) follow.
Since we obtain
For fixed this is maximized by and is maximized for by .
[Proof of Theorem 2] Since corresponds to the canonical ,
Continuing we see that the moments yield
for where .
Given linearly independent, we can compute since by (21), we can write
where and and hence
Consistency and -consistency follow from Theorem 1 and the delta method. {proof}[Proof of Proposition 2] Note that
by the arithmetic/geometric mean and Minkowski inequalities. By Hölder’s inequality (23) is bounded by
is computable since we know and the eigenfunction and eigenvalue . More generally, , can be similarly determined. Then, by the same argument as before, using 1 not orthogonal to , we obtain and . Now form and proceed as before, and continue to determine for all . This and (15) complete the proof. {proof}[Proof of Theorem 5] Note first that (16) implies that the distance between and the empirical distribution of tends to 0. The first conclusion of the theorem now follows by the Glivenko–Cantelli theorem and the Law of Large Numbers.
where . Further, (Appendix: Additional lemmas and proofs) is a -statistic of order under and
Note that is acyclic if all vertices are distinct. As in the proof of Theorem 1, all nonzero covariance terms in (Appendix: Additional lemmas and proofs) are of order where since the intersection graphs all have in common but are otherwise acyclic. The largest order term corresponds to , so that
where depends on only. Thus (25) holds if .
Acknowledgment
Thanks to Allan Sly for a helpful discussion.