The configuration model for BarabasiAlbert networks
Abstract
We develop and test a rewiring method (originally proposed by Newman) which allows to build random networks having preassigned degree distribution and twopoint correlations. For the case of scalefree degree distributions, we discretize the tail of the distribution according to the general prescription by Dorogovtsev and Mendes. The application of this method to BarabasiAlbert (BA) networks is possible thanks to recent analytical results on their correlations, and allows to compare the ensemble of random networks generated in the configuration model with that of “real” networks obtained from preferential attachment. For β≥2 (β is the number of parent nodes in the preferential attachment scheme) the networks obtained with the configuration model are completely connected (giant component equal to 100%). In both generation schemes a clear disassortativity of the small degree nodes is demonstrated from the computation of the function k_{nn}. We also develop an efficient rewiring method which produces tunable variations of the assortativity coefficient r, and we use it to obtain maximally disassortative networks having the same degree distribution of BA networks with given β. Possible applications of this method concern assortative social networks.
Keywords
Configuration model BarabasiAlbert networks Assortativity and disassortativity Rewiring methodIntroduction
In spite of the large number of existing studies on BarabasiAlbert (BA) networks, their twopoint correlation functions have been completely analysed only recently by Fotouhi and Rabbat (2013), who have given the full expressions of the conditional probabilities P(hk) in the large network limit for any value of the parameter β (the number of parent nodes in the preferential attachment process).
Concerning the assortativity properties of BA networks, in previous work some estimates of the Newman coefficient r were found (Newman 2002). According to these estimates, for large N (number of nodes), r vanishes as − ln2N/N. It was therefore generally believed that BA networks are almost uncorrelated, and numerical simulations appeared to confirm this. However, more recent asymptotic estimates (Fotouhi and Rabbat 2018; Bertotti and Modanese 2019) yield a different result: r vanishes only as \(\ln ^{2} N/\sqrt {N}\) for large N. It should be recalled that for real networks with the same scalefree exponent (γ=3), the r coefficient is always small in absolute value, so even this small total disassortativity is significant.
By computing the function k_{nn}(k) of BA networks (average nearest neighbor degree of a node of degree k) we have shown in (Bertotti and Modanese 2019) that it is strongly decreasing for small k and slowly increasing for large k. This means that the total slight disassortativity measured by the r coefficient is in fact the result of an unexpected mixed assortative/disassortative behavior of these networks.
Times (in years) of the diffusion peak in the Bass diffusion model on networks for eight different scalefree networks with exponent γ=3, for three different values of the imitation coefficient q
Diffusion times  

network  q=0.30  q=0.38  q=0.48 
BA1  4.84  4.22  3.64 
BA2  5.20  4.54  3.94 
BA3  5.40  4.74  4.10 
UNC  5.50  4.84  4.20 
BA4  5.54  4.86  4.22 
BA5  5.66  4.96  4.32 
DIS  5.76  5.06  4.40 
ASS  6.00  5.50  4.98 
In this work we use for the first time the correlation functions found in (Fotouhi and Rabbat 2013) in order to build in the configuration model networks which display these peculiar correlations, and investigate their properties.
The configuration model (Newman 2010) is a method for the generation of random networks having an assigned degree distribution. It is therefore a powerful extension of the original concept of random network introduced by Erdös, and has been extensively studied with analytical and numerical methods, especially for the case of scalefree networks. Classical results concern the conditions for the formation of a giant component (Molloy and Reed 1995) and its clustering features.
Some authors have also raised the question of whether it is possible to generate networks with preassigned correlations. Newman has proposed for this purpose in (Newman 2003) a method based on a degreepreserving rewiring procedure; more recently, the issue has been also discussed by Bassler et al. (2015) and by Boguna et al. (Boguná and PastorSatorras 2003). The practical applications of these ideas have been, until now, rather limited. Yet, from the applicative point of view the possibility of an efficient generation of networks with given correlations is quite attractive.
For example, social networks are known to be generally assortative, and in order to study diffusion processes on these networks in the meanfield approximation it is very useful to construct mathematically certain families of assortative correlation matrices (Bertotti et al. 2016). If it is possible to produce explicit realizations of networks with such correlations, these can be used to obtain a further characterization of the diffusion process, possibly also with agentbased methods etc. In fact, an assortative rewiring has been proposed already in (Newman 2003) and in (XulviBrunet and Sokolov 2004), but with some limitations; in the first case the assortative matrices employed do not generally satisfy a positivity criterium, in the second case no correlations matrices are employed, and the rewiring criterium works on an heuristic basis.
With the above applications in mind, our aim in this work is to use the correlations matrices of BA networks and the rewiring procedure by Newman to test under controlled conditions the configuration model with preassigned correlations. In fact, one of the features of BA networks which makes them so popular and widely used for the simulation of real networks is that they can be readily generated via a preferential attachment procedure. Since their correlation matrices are now available, by reconstructing them in the configuration model we can compare the features of the resulting ensemble of networks with those of the networks produced by preferential attachment. As we shall see, this gives useful insights on the method in general.
The rest of the paper is organized as follows. In “The configuration model with Newman rewiring” section we discuss the mentioned rewiring procedure which generates by using the configuration model an ensemble of networks having as prescribed correlations the correlations of BA networks. Some features of the networks of the ensemble obtained in this way are then discussed, including the behavior of their average nearest neighbours degree function k_{nn}(k). The rewiring procedure is also adapted in “Maximally disassortative networks with scalefree exponent 3” section to generate maximally disassortative scalefree networks having the same exponent as the BA ones. “Conclusion” section concludes by discussing the results and some potential followups. Finally, in the Appendix some definitions and the expressions for the case of BA networks of some quantities used throughout the paper are recalled.
The configuration model with Newman rewiring
Discretized degree distribution
This means that n is the degree above which one expects to find at most one node. For the case of γ=3, we obtain \(n \simeq \sqrt {N}\).
as the average number of nodes with degree k present in the network, where “Round” denotes rounding to the nearest integer.
In this way, however, we find that N_{k} becomes zero when k>n_{1}≃(2Nc_{γ})^{1/γ}, which is considerably smaller than the value n given by the integral criterium (1). The reason is that we are essentially discarding the fractional expectation values found from (3), instead of cumulating them as in (1).
This procedure has been employed in the influential paper (Aiello et al. 2000) in order to generate scalefree networks with the configuration model. This work, however, predates Ref. (Boguña et al. 2004) and the widespread use of preferential attachment for the generation of scalefree networks, especially of the BA type. Actually it is immediate to realize, by plotting the degree distribution of finite BA networks generated via preferential attachment, that a random succession of hubs in the degree interval k∈[n_{1},+∞] is always present. These hubs play an important role in several dynamical processes on the network.
Therefore we shall use in the following, to obtain the discretized degree distribution N_{k}, not the simple recipe (3) but one of three different improvements of it, which give practically equivalent results for the networks considered in this work:
(1) “Cumulation” method. In this method, for k>n_{1} the values of P(k)N are cumulated, as k increases, until their sum exceeds 1; at this point, one hub is created, the cumulation procedure starts again, and so on.
(2) “Random hubs” method. The idea is the following: if the average number of nodes with degree k is smaller than 1, say NP(k)=X<1, then a node with this degree will be created in each realization with probability X. Extending the procedure to all degrees, a random variable ξ∈(0,1) is generated for each value of k, and then denoting by Int(NP(k)) the integer part of NP(k) and by Dec(NP(k)) its decimal part, one sets N_{k}=Int(NP(k)) if ξ>Dec(NP(k)) and N_{k}=Int(NP(k))+1 if ξ<Dec(NP(k)). The number of nodes is therefore not fixed, with random variations of 1 for each degree (in particular, with values 0 or 1 in the tail of the distribution), such to respect the degree distribution in an ensemble average.
(3) The most general way for generating the degrees of the nodes is to use a probability transformation method. For this one needs to define first a vector \(F_{k}={\sum \nolimits }_{j=1}^{k} P(j), F(0)=0\), where k=1,…,n and P(j) denotes the normalized degree distribution. The values of F_{k} define breakpoints of the unit interval (0,1). After generating a random number ξ in this interval, a new node is introduced with degree k if F_{k−1}<ξ<F_{k}, and the procedure is repeated N times. This method has the advantage of allowing the generation of exactly N nodes.
Description of the wiring and rewiring algorithm
After a degree D_{i} has been assigned to each candidate node (or “stub”) i, in the classical configuration model a certain number of links is randomly attached to the stubs, until each stub reaches its planned degree. In our algorithm this wiring procedure is not random, but partially deterministic. This is more efficient and makes sense because the wiring is followed by a massive random rewiring phase (see below) which preserves the degrees of the nodes but makes the correlations close, in an ensemble average, to the “target” correlations \(e^{0}_{jk}\).

If E_{1}=0 the rewiring is performed, i.e., the links (a,b),(c,d) are replaced by (a,c),(b,d).

If E_{1}>0, we define P=E_{2}/E_{1} and then generate a random number ξ∈(0,1).

If P≥1, the rewiring is performed.

If P<1 and ξ<P, the rewiring is performed.
Then another couple of links is chosen and the same steps are repeated.
The ergodicity property of this rewiring procedure has been discussed in (Newman 2003). As empirical criterium for the attainment of equilibrium we set an average of 10^{3} rewirings per node. The fraction of successful rewirings for the present case of BA networks turns out to be larger than 0.5. Therefore, 10^{7} can be taken with a safe margin as a total number of attempts necessary for our trial networks with N=2500. This can be accomplished in less than 1 second on a normal machine. The time scales linearly with the size of the network. We chose to report here on the size N=2500 also for practical reasons of visualization of the network and of its function k_{nn}(k) (see below, “Function k_{nn}(k) of BA networks obtained with the configuration model” section).
The N parameter and the number of rewirings given above are only one of many possible safe choices and do not substantially affect the properties observed in the networks. Concerning the choice of the rewiring algorithm itself, we are not aware of any alternative to the Newman algorithm, if the purpose of the rewiring is to obtain networks having (in a statistical sense) predefined twopoint “target” correlations.
Properties of BA networks obtained in the configuration model
For a BA network with β=1 (in the following also denoted as BA1), the correlation P(11) is zero, according to the general formulas of Fotohui and Rabbat. This particular case is also obvious if one considers the totallyconnected growth process of the network as obtained in the preferential attachment scheme: no node of degree 1 can be connected to a node of the same degree, otherwise an isolated pair would be formed.
Function k _{nn}(k) of BA networks obtained with the configuration model
A possible way to check if the twopoint correlation functions of the BA networks have been correctly reproduced in the configuration model is to plot the function \(k_{nn}(k)={\sum \nolimits }_{h=1}^{n} hP(hk)\), also known as average nearest neighbours degree distribution. Due to the partial summation in its definition, this function depends only on one argument and is therefore easier to analyse than the full P(hk); moreover, it has a direct qualitative interpretation in terms of assortativity and disassortativity of the network. For an uncorrelated network it is constant and equal to 〈k^{2}〉/〈k〉. By computing the k_{nn}(k) function of the BA correlations given by Fotouhi and Rabbat, we have shown that it is decreasing at small k, reaching a minimum for a k_{min} almost proportional to n (k_{min}≃0.2n+20 in the range 50≤n≤500), ad then it is slightly increasing for large k.
Note that the degrees of the largest hubs in Fig. 3 are randomly generated according to the “random hubs” method described in “Discretized degree distribution” section. This is very similar to what one obtains using a standard randomized preferential attachment algorithm: if one analyzes a relatively small number of realizations, one will find that the largest hubs present have variable degrees, and most of the degrees in the tail of the degree distribution are actually missing.
The assortativity coefficient r of the configuration model ensemble, which condensates the information on the correlations into a single number, is for the examples given (BA2, n=80), 〈r〉=−0.031, with standard deviation σ_{r}=0.028. The value of r computed from the FR correlations is larger in absolute value: r_{FR}≃−0.10. The difference can probably be explained as due to the fluctuations.
Maximally disassortative networks with scalefree exponent 3
We have seen that finite BA networks are moderately disassortative, and not uncorrelated as frequently stated in the literature. A natural question arises: how relevant is this disassortativity? For scalefree networks with the same exponent (γ=3) what is the lowest possible value of r attainable? And what is the aspect of networks with such minimum r, compared to BA networks? We recall that the r coefficient of realworld scalefree disassortative networks is rarely more negative than −0.15, see (Bertotti and Modanese 2019), even if in general the r coefficient of biological and technological networks can be smaller, especially for small size networks. For example, the proteinprotein interaction network of H. pylori (N=709) has r=−0.243 and the proteinprotein interaction network of C. elegans (N=2386) has r=−0.183. This fact has important consequences for the spectra of the networks (Jalan and Yadav 2015).
The configuration model offers a powerful tool for the exploration of such issues. In this section we shall show that it is possible to do an efficient rewiring of a network with the BA degree distribution which decreases the value of r, and consistently yields a minimum value which is approximately three times the value of the r coefficient of the corresponding BA network. For instance, for a maximum degree n=80 and β=2 we have r≃−0.32. This makes sense for BA networks with β≥2, because for β=1 the giant component obtained from the configuration model is not complete.
With the pseudorandom wiring process described in “Description of the wiring and rewiring algorithm” section we obtain a network in the form of a list of L links. We shall now perform on this network a rewiring process with the aim of increasing or decreasing its assortativity coefficient r until respectively a maximum or minimum are reached. Each elementary rewiring step works as follows.
(1) Two links are chosen at random in the list. Suppose the first link is between nodes a and b and the second between nodes c and d (a,b,c,d=1,…,N). Let the excess degrees of these nodes be respectively A,B,C,D.
The variation is accepted when r>0, if we are looking for the maximum assortativity, or viceversa. The algorithm performs a large number of rewirings, for instance 10^{5} rewirings for a network with ∼ 10^{3} nodes; then r is visualized and another 10^{5} rewirings are performed, and so on, until the value of r stabilizes (this can be checked visually or through some automated criterium; the convergence is usually quick, and we shall discuss in further work the issue of possible local maxima and minima and how to exclude them).
The values of r obtained will depend (for fixed N) on the degree distribution, therefore on the scalefree exponent γ in the case of a pure power law, or on β for a “BAlike” degree distribution P(k)=2β(β+1)/[k(k+1)(k+2)]. We use this degree distribution as a variation of the pure power law γ=3, in order to investigate the role of the details of the degree distribution at small k; we recall that these details influence the average degree and may have a strong impact, for instance, on the giant component of random networks in the configuration model (Newman 2010).
Conclusion
The degree distribution, correlation functions and assortativity character are distinctive features of any network, and affect in an essential way the dynamics processes which take place on it. It is therefore desirable to develop methods and algorithms which generate networks where such characters are preassigned; this allows to study the resulting networks in detail and to simulate dynamical processes on them.
The configuration model (Newman 2010; Barabási 2016) in its traditional form allows to generate uncorrelated networks with assigned degree distribution and has been widely investigated – even though, for the scalefree case, defining the discretized degree distribution of the highdegree “stubs” in accordance with the integral criterium of DorogovtsevMendes is not trivial (a point that we also fix in this paper, before addressing the correlations).
An improvement of the configuration model through a rewiring algorithm that generates an ensemble of networks with preassigned correlations has been proposed by Newman in his seminal paper on assortative mixing (Newman 2003). In that paper Newman applied his rewiring algorithm to scalefree networks of the disassortative kind (and also of the assortative kind, in a small range of the r coefficient). No further applications of this method have been published, to our knowledge; degreepreserving rewirings have been often used (XulviBrunet and Sokolov 2004; Van Mieghem et al. 2010; D’Agostino et al. 2012), but not in connection with the correlation functions. Therefore the recent full computation of the correlations for BA networks (Fotouhi and Rabbat 2013) offers the possibility of a new test of the Newman rewiring by comparison with the BA networks generated directly via the preferential attachment scheme.
In particular, we have tested numerically (and we plan to extend this work to other classes of correlation functions, besides those of BA networks): (a) the giant connected component of the networks obtained; (b) the average of the function k_{nn} in their ensemble; (c) the fluctuations of k_{nn} in the ensemble.
Furthermore, we have developed a new rewiring criterium which allows to obtain in an almostdeterministic way (i.e., with very small fluctuations in the resulting ensemble) networks having maximum or minimum values of the r assortativity coefficient.
Finally, with this method it is also possible to focus on features related to specific components of the correlations. For instance, we observe that in the configuration model of BA1 networks the isolated couples are completely absent, thanks to the vanishing of the e_{00} correlation; in a maximally disassortative network with BA2 degree distribution all the largest hubs are connected exclusively with nodes of degree 2, etc. These features have been obtained in trial networks with 2500 nodes, and therefore with a statistical significance of the order of 1 part in 10^{3}. In future computations we plan to increase the accuracy and especially to address the case of assortative networks.
Appendix
We recall here some formulae which have been used throughout the paper and in the simulations.
Whereas P(k) expresses the probability that a randomly chosen node of a network has degree k, the degree correlation P(hk) expresses the conditional probability that a node with degree k is connected to one with degree h.
The expressions in (10) have been established by Fotouhi and Rabbat in (Fotouhi and Rabbat 2013) and have been employed by us, here and in (Bertotti and Modanese 2019), after a suitable normalization, due to the fact that we deal with network with a finite maximal degree.
Notes
Acknowledgements
Not applicable.
Authors’ contributions
All authors contributed equally to this work. Both authors read and approved the final manuscript.
Funding
This work was supported by the Open Access Publishing Fund of the Free University of BozenBolzano.
Competing interests
The authors declare that they have no competing interests.
References
 Aiello, W, Chung F, Lu L (2000) A random graph model for massive graphs In: Proceedings of the thirtysecond annual ACM symposium on Theory of computing, Portland, Oregon, USA, May 2123, 2000, 171–180.. Association for Computing Machinery, New York.Google Scholar
 Barabási, AL (2016) Network Science. Cambridge University Press, Cambridge.zbMATHGoogle Scholar
 Bassler, K, Del Genio C, Erdȯs P, Miklós I, Toroczkai Z (2015) Exact sampling of graphs with prescribed degree correlations. New J Phys 17(8):083,052.MathSciNetCrossRefGoogle Scholar
 Bertotti, M, Brunner J, Modanese G (2016) The Bass diffusion model on networks with correlations and inhomogeneous advertising. Chaos Solitons Fract 90:55–63.MathSciNetCrossRefGoogle Scholar
 Bertotti, M, Modanese G (2019) The Bass diffusion model on finite BarabasiAlbert networks. Complexity 2019(6352):657.Google Scholar
 Boguná, M, PastorSatorras R (2003) Class of correlated random networks with hidden variables. Phys Rev E 68(3):036,112.CrossRefGoogle Scholar
 Boguña, M, PastorSatorras R, Vespignani A (2004) Cutoffs and finite size effects in scalefree networks. Eur Phys J B 38(2):205–209.CrossRefGoogle Scholar
 D’Agostino, G, Scala A, Zlatić V, Caldarelli G (2012) Robustness and assortativity for diffusionlike processes in scalefree networks. Europhys Lett 97(6):68,006.CrossRefGoogle Scholar
 Fotouhi, B, Rabbat M (2013) Degree correlation in scalefree graphs. Eur Phys J B 86(12):510.CrossRefGoogle Scholar
 Fotouhi, B, Rabbat M (2018) Temporal evolution of the degree distribution of alters in growing networks. Netw Sci 6(1):97–155.CrossRefGoogle Scholar
 Jalan, S, Yadav A (2015) Assortative and disassortative mixing investigated using the spectra of graphs. Phys Rev E 91(1):012,813.CrossRefGoogle Scholar
 Jiang, Z, Bass F, Bass P (2006) Virtual Bass model and the lefthand datatruncation bias in diffusion of innovation studies. Int J Res Mark 23(1):93–106.CrossRefGoogle Scholar
 Molloy, M, Reed B (1995) A critical point for random graphs with a given degree sequence. Random Struct Algoritm 6(23):161–180.MathSciNetCrossRefGoogle Scholar
 Newman, M (2002) Assortative mixing in networks. Phys Rev Lett 89(20):208,701.CrossRefGoogle Scholar
 Newman, M (2003) Mixing patterns in networks. Phys Rev E 67(2):026,126.MathSciNetCrossRefGoogle Scholar
 Newman, M (2010) Networks: An Introduction. Oxford University Press, Oxford.CrossRefGoogle Scholar
 Van Mieghem, P, Wang H, Ge X, Tang S, Kuipers F (2010) Influence of assortativity and degreepreserving rewiring on the spectra of networks. Eur Phys J B 76(4):643–652.CrossRefGoogle Scholar
 Vespignani, A (2012) Modelling dynamical processes in complex sociotechnical systems. Nat Phys 8(1):32–39.CrossRefGoogle Scholar
 XulviBrunet, R, Sokolov I (2004) Reshuffling scalefree networks: From random to assortative. Phys Rev E 70(6):066,102.CrossRefGoogle Scholar
Copyright information
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.