Graphs over Time: Densification Laws, Shrinking Diameters and Possible Explanations

∗ Jure Leskovec Christos Faloutsos Carnegie Mellon University Carnegie Mellon University [email protected] [email protected] [email protected]

duces graphs exhibiting the full range of properties observed both in prior work and in the present study. ABSTRACT How do real graphs evolve over time? What are “normal” Categories and Subject Descriptors growth patterns in social, technological, and information H.2.8 [Database Management]: Database Applications – networks? Many studies have discovered patterns in static Data Mining graphs, identifying properties in a single snapshot of a large network, or in a very small number of snapshots; these in- General Terms clude heavy tails for in- and out-degree distributions, com- munities, small-world phenomena, and others. However, Measurement, Theory given the lack of information about network evolution over long periods, it has been hard to convert these findings into Keywords statements about trends over time. Here we study a wide range of real graphs, and we observe densification power laws, graph generators, graph mining, some surprising phenomena. First, most of these graphs heavy-tailed distributions, small-world phenomena densify over time, with the number of edges growing super- linearly in the number of nodes. Second, the average dis- 1. INTRODUCTION tance between nodes often shrinks over time, in contrast In recent years, there has been considerable interest in to the conventional wisdom that such distance parameters graph structures arising in technological, sociological, and should increase slowly as a function of the number of nodes scientific settings: computer networks (routers or autonomous (like O(log n)orO(log(log n)). systems connected together); networks of users exchanging Existing graph generation models do not exhibit these e-mail or instant messages; citation networks and hyperlink types of behavior, even at a qualitative level. We provide a networks; social networks (who-trusts-whom, who-talks-to- new graph generator, based on a “forest fire” spreading pro- whom, and so forth); and countless more [24]. The study cess, that has a simple, intuitive justification, requires very of such networks has proceeded along two related tracks: few parameters (like the “flammability” of nodes), and pro- the measurement of large network datasets, and the devel- opment of random graph models that approximate the ob- Work partially supported by the National Science Founda- tion under Grants No. IIS-0209107, SENSOR-0329549, IIS- served properties. 0326322, CNS-0433540, CCF-0325453, IIS-0329064, CNS- Many of the properties of interest in these studies are 0403340, CCR-0122581, a David and Lucile Packard Foun- based on two fundamental parameters: the nodes’ degrees dation Fellowship, and also by the Pennsylvania Infrastruc- (i.e., the number of edges incident to each node), and the ture Technology Alliance (PITA), a partnership of Carnegie distances between pairs of nodes (as measured by shortest- Mellon, Lehigh University and the Commonwealth of Penn- path length). The node-to-node distances are often studied sylvania’s Department of Community and Economic Devel- opment (DCED). Any opinions, findings, and conclusions in terms of the diameter — the maximum distance — and or recommendations expressed in this material are those of a set of closely related but more robust quantities including the author(s) and do not necessarily reflect the views of the the average distance among pairs and the effective diameter National Science Foundation, or other funding parties. ∗ (the 90th percentile distance, a smoothed form of which we This research was done while on sabbatical leave at CMU. use for our studies). Almost all large real-world networks evolve over time by the addition and deletion of nodes and edges. Most of the recent models of network evolution capture the growth pro- Permission to make digital or hard copies of all or part of this work for cess in a way that incorporates two pieces of “conventional personal or classroom use is granted without fee provided that copies are wisdom:” not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to (A) Constant average degree assumption: The average node republish, to post on servers or to redistribute to lists, requires prior specific degree in the network remains constant over time. (Or permission and/or a fee. KDD’05, August 21Ð24, 2005, Chicago, Illinois, USA. equivalently, the number of edges grows linearly in the Copyright 2005 ACM 1-59593-135-X/05/0008 ...$5.00. number of nodes.) (B) Slowly growing diameter assumption: The diameter is lies strictly between 1 and 2. We refer to such a relation as a slowly growing function of the network size, as in a densification power law,orgrowth power law.(Exponent “small world” graphs [4, 7, 22, 30]. a = 1 corresponds to constant average degree over time, while a = 2 corresponds to an extremely dense graph where For example, the intensively-studied preferential attach- each node has, on average, edges to a constant fraction of ment model [3, 24] posits a network in which each new node, all nodes.) when it arrives, attaches to the existing network by a con- What underlying process causes a graph to systematically stant number of out-links, according to a “rich-get-richer” densify, with a fixed exponent as in Equation (1), and to rule. Recent work has given tight asymptotic bounds on the experience a decrease in effective diameter even as its size diameter of preferential attachment networks [6, 9]; depend- increases? This question motivates the second main contri- ing on the precise model, these bounds grow logarithmically bution of this work: we present two families of probabilistic or even slower than logarithmically in the number of nodes. generative models for graphs that capture aspects of these How are assumptions (A) and (B) reflected in data on net- properties. The first model, which we refer to as Community work growth? Empirical studies of large networks to date Guided Attachment (CGA), argues that graph densification have mainly focused on static graphs, identifying properties can have a simple underlying basis; it is based on a decom- of a single snapshot or a very small number of snapshots position of the nodes into a nested set of communities, such of a large network. For example, despite the intense inter- that the difficulty of forming links between communities in- est in the Web’s link structure, the recent work of Ntoulas creases with the community size. For this model, we obtain et al. [25] noted the lack of prior empirical research on the rigorous results showing that a natural tunable parameter evolution of the Web. Thus, while one can assert based in the model can lead to a densification power law with on these studies that, qualitatively, real networks have rela- any desired exponent a. The second model, which is more tively small average node degrees and diameters, it has not sophisticated, exhibits both densification and a decreasing been clear how to convert these into statements about trends effective diameter as it grows. This model, which we refer to over time. as the Forest Fire Model, is based on having new nodes at- tach to the network by “burning” through existing edges in The present work: Densification laws and shrinking epidemic fashion. The mathematical analysis of this model diameters. Here we study a range of different networks, appears to lead to novel questions about random graphs that from several domains, and we focus specifically on the way in are quite complex, but through simulation we find that for which fundamental network properties vary with time. We a range of parameter values the model exhibits realistic be- find, based on the growth patterns of these networks, that havior in densification, distances, and degree distributions. principles (A) and (B) need to be reassessed. Specifically, It is thus the first model, to our knowledge, that exhibits we show the following for a broad range of networks across this full set of desired properties. diverse domains. Accurate properties of network growth, together with mod- (A) Empirical observation: Densification power laws:The els supporting them, have implications in several contexts. networks are becoming denser over time, with the av- • Graph generation: Our findings form means for as- erage degree increasing (and hence with the number of sessing the quality of graph generators. Synthetic graphs are edges growing super-linearly in the number of nodes). important for ‘what if’ scenarios, for extrapolations, and for Moreover, the densification follows a power-law pat- simulations, when real graphs are impossible to collect (like, tern. e.g., a very large friendship graph between people). • Graph sampling: Datasets consisting of huge real- (B ) Empirical observation: Shrinking diameters: The ef- world graphs are increasingly available, with sizes ranging fective diameter is, in many cases, actually decreasing from the millions to billions of nodes. There are many known as the network grows. algorithms to compute interesting measures ( shortest paths, We view the second of these findings as particularly surpris- centrality, betweenness, etc), but most of these algorithms ing: Rather than shedding light on the long-running debate become impractical for the largest of these graphs. Thus over exactly how slowly the graph diameter grows as a func- sampling is essential — but sampling from a graph is a non- tion of the number of nodes, it suggests a need to revisit trivial problem. Densification laws can help discard bad standard models so as to produce graphs in which the ef- sampling methods, by providing means to reject sampled subgraphs. fective diameter is capable of actually shrinking over time. • We also note that, while densification and decreasing diam- Extrapolations: For several real graphs, we have a eters are properties that are intuitively consistent with one lot of snapshots of their past. What can we say about their another (and are both borne out in the datasets we study), future? Our results help form a basis for validating scenarios they are qualitatively distinct in the sense that it is possi- for graph evolution. • ble to construct examples of graphs evolving over time that Abnormality detection and computer network man- exhibit one of these properties but not the other. agement: In many network settings, “normal” behavior will We can further sharpen the quantitative aspects of these produce subgraphs that obey densification laws (with a pre- findings. In particular, the densification of these graphs, dictable exponent) and other properties of network growth. as suggested by (A), is not arbitrary; we find that as the If we detect activity producing structures that deviate sig- graphs evolve over time, they follow a version of the relation nificantly from this, we can flag it as an abnormality; this can potentially help with the detection of e.g. fraud, spam, a e(t) ∝ n(t) (1) or distributed denial of service (DDoS) attacks. The rest of the paper is organized as follows: Section 2 sur- where e(t)andn(t) denote the number of edges and nodes veys the related work. Section 3 gives our empirical findings of the graph at time t,anda is an exponent that generally 12 on real-world networks across diverse domains. Section 4 de- 20 scribes our proposed models and gives results obtained both 10 through analysis and simulation. We conclude and discuss 15 the implications of our findings in Section 5. 10 8

5 6

2. RELATED WORK Average out−degree Average out−degree

Research over the past few years has identified classes of 0 4 1994 1996 1998 2000 2002 1975 1980 1985 1990 1995 properties that many real-world networks obey. One of the Year of publication Year granted main areas of focus has been on degree power laws,show- (a) arXiv (b) Patents ing that the set of node degrees has a heavy-tailed distri- 4.2 3 bution. Such degree distributions have been identified in phone call graphs [1], the Internet [11], the Web [3, 14, 20], 4 2.5 click-stream data [5] and for a who-trusts-whom social net- work [8]. Other properties include the “small-world phe- 3.8 2 nomenon,” popularly known as “six degrees of separation”, 3.6 1.5 Average out−degree which states that real graphs have surprisingly small (aver- Average out−degree age or effective) diameter (see [4, 6, 7, 9, 17, 22, 30, 31]). 3.4 1 0 200 400 600 1994 1996 1998 2000 In parallel with empirical studies of large networks, there Time [days] Year of publication has been considerable work on probabilistic models for graph (c) Autonomous Systems (d) Affiliation network generation. The discovery of degree power laws led to the development of random graph models that exhibited such Figure 1: The average node out-degree over time. degree distributions, including the family of models based Notice that it increases, in all 4 datasets. That is, on preferential attachment [2, 3, 10] and the related copying all graphs are densifying. model [18, 19]. See [23, 24] for surveys of this area. It is important to note the fundamental contrast between ing model discussed above, for example, a new node creates one of our main findings here — that the average number of links by consulting the links of existing nodes. However, the out-links per node is growing polynomially in the network recursive process by which nodes in the Forest Fire Model size — and body of work on degree power laws. This earlier creates these links is quite different, leading to the new prop- work developed models that almost exclusively used the as- erties discussed in the previous section. sumption of node degrees that were bounded by constants (or at most logarithmic functions) as the network grew; our findings and associated model challenge this assumption, by 3. OBSERVATIONS showing that networks across a number of domains are be- We study the temporal evolution of several networks, by coming denser. observing snapshots of these networks taken at regularly The bulk of prior work on the study of network datasets spaced points in time. We use datasets from four differ- has focused on static graphs, identifying patterns in a sin- ent sources; for each, we have information about the time gle snapshot, or a small number of network snapshots (see when each node was added to the network over a period of also the discussion of this point by Ntoulas et al. [25]). Two several years — this enables the construction of a snapshot exceptions are the very recent work of Katz [16], who in- at any desired point in time. For each of datasets, we find dependently discovered densification power laws for citation a version of the densification power law from Equation (1), a networks, and the work of Redner [28], who studied the e(t) ∝ n(t) ; the exponent a differs across datasets, but evolution of the citation graph of Physical Review over the remains remarkably stable over time within each dataset. past century. Katz’s work builds on his earlier research on We also find that the effective diameter decreases in all the power-law relationships between the size and recognition of datasets considered. professional communities [15]; his work on densification is The datasets consist of two citation graphs for different focused specifically on citations, and he does not propose a areas in the physics literature, a citation graph for U.S. generative network model to account for the densification patents, a graph of the Internet, and five bipartite affiliation phenomenon, as we do here. Redner’s work focuses on a graphs of authors with papers they authored. Overall, then, range of citation patterns over time that are different from we consider 9 different datasets from 4 different sources. the network properties we study here. Our Community Guided Attachment (CGA) model, which 3.1 Densification Laws produces densifying graphs, is an example of a hierarchical Here we describe the datasets we used, and our findings graph generation model, in which the linkage probability be- related to densification. For each graph dataset, we have, tween nodes decreases as a function of their relative distance or can generate, several time snapshots, for which we study in the hierarchy [8, 17, 31]. Again, there is a distinction be- the number of nodes n(t) and the number of edges e(t)at tween the aims of this past work and our model here; where each timestamp t.Wedenotebyn and e the final number these earlier network models were seeking to capture proper- of nodes and edges. We use the term Densification Power ties of individual snapshots of a graph, we seek to explain a Law plot (or just DPL plot) to refer to the log-log plot of time evolution process in which one of the fundamental pa- number of edges e(t) versus number of nodes n(t). rameters, the average node degree, is varying as the process unfolds. Our Forest Fire Model follows the overall frame- 3.1.1 ArXiv citation graph work of earlier graph models in which nodes arrive one at We first investigate a citation graph provided as part of a time and link into the existing structure; like the copy- the 2003 KDD Cup [12]. The HEP–TH (high energy physics 6 8 theory) citation graph from thee-printarXivcoversallthe 10 10 Apr 2003 citations within a dataset of n=29,555 papers with e= 352,807 5 1999 10 7 edges. If a paper i cites paper j, the graph contains a di- 10

4 rected edge from i to j. If a paper cites, or is cited by, a 10 paper outside the dataset, the graph does not contain any 6

Number of edges Number of edges 10 3 information about this. We refer to this dataset as arXiv. 10 Jan 1993 1975 This data covers papers in the period from January 1993 Edges Edges = 0.0113 x1.69 R2=1.0 = 0.0002 x1.66 R2=0.99 2 5 10 10 2 3 4 5 5 6 7 to April 2003 (124 months). It begins within a few months 10 10 10 10 10 10 10 of the inception of the arXiv, and thus represents essentially Number of nodes Number of nodes the complete history of its HEP–TH section. For each month (a) arXiv (b) Patents 6 10 4.4 m (1 ≤ m ≤ 124) we create a citation graph using all papers 10

published before month m. For each of these graphs, we 5 10 4.3 plot the number of nodes versus the number of edges on a 10

4 logarithmic scale and fit a line. 10 4.2 Figure 2(a) shows the DPL plot; the slope is a =1.68 10 Number of edges Number of edges 3 and corresponds to the exponent in the densification law. 10 4.1 10 Notice that a is significantly higher than 1, indicating a Edges Edges = 0.87 x1.18 R2=1.00 = 0.4255 x1.15 R2=1.0 2 10 3.5 3.6 3.7 3.8 2 3 4 5 large deviation from linear growth. As noted earlier, when 10 10 10 10 10 10 10 10 a graph has a>1, its average degree increases over time. Number of nodes Number of nodes Figure 1(a) exactly plots the average degree d¯ over time, (c) Autonomous Systems (d) Affiliation network and it is clear that d¯increases. This means that the average length of the bibliographies of papers increases over time. Figure 2: Number of edges e(t) versus number of There is a subtle point here that we elaborate next: With nodes n(t), in log-log scales, for several graphs. All almost any network dataset, one does not have data reaching 4 graphs obey the Densification Power Law, with a all the way back to the network’s birth (to the extent that consistently good fit. Slopes: a = 1.68, 1.66, 1.18 this is a well-defined notion). We refer to this as the problem and 1.15, respectively. of the “missing past.” Due to this, there will be some ef- fect of increasing out-degree simply because edges will point Figure 1(b) illustrates the increasing out-degree of patents to nodes prior to the beginning of the observation period. over time. Note that this plot does not incur any of the We refer to such nodes as phantom nodes, with a similar complications of a bounded observation period, since the definition for phantom edges. In all our datasets, we find patents in the dataset include complete citation lists, and that this effect is relatively minor once we move away from here we are simply plotting the average size of these as a the beginning of the observation period; on the other hand, function of the year. the phenomenon of increasing degree continues through to the present. For example, in arXiv, nodes over the most 3.1.3 Autonomous systems graph recent years are primarily referencing non-phantom nodes; The graph of routers comprising the Internet can be or- we observe a knee in Figure 1(a) in 1997 that appears to ganized into sub-graphs called Autonomous Systems (AS). be attributable in large part to the effect of phantom nodes. Each AS exchanges traffic flows with some neighbors (peers). (Later, when we consider a graph of the Internet, we will We can construct a communication network of who-talks-to- see a case where comparable properties hold in the absence whom from the BGP (Border Gateway Protocol) logs. of any “missing past” issues.) We use the the Autonomous Systems (AS) dataset from [26]. We also experimented with a second citation graph, taken The dataset contains 735 daily instances which span an in- from the HEP–PH section of the arXiv, which is about the terval of 785 days from November 8 1997 to January 2 2000. same size as our first arXiv dataset. It exhibits the same In contrast to citation networks, where nodes and edges behavior, with the densification exponent a =1.56. The only get added (not deleted) over time, the AS dataset also plot is omitted for brevity. exhibits both the addition and deletion of the nodes and edges over time. 3.1.2 Patents citation graph Figure 2(c) shows the DPL plot for the Autonomous Sys- Next, we consider a U.S. patent dataset maintained by the tems dataset. We observe a clear trend: Even in the pres- National Bureau of Economic Research [13]. The data set ence of noise, changing external conditions, and disruptions spans 37 years (January 1, 1963 to December 30, 1999), and to the Internet we observe a strong super-linear growth in includes all the utility patents granted during that period, the number of edges over more than 700 AS graphs. We totaling n=3,923,922 patents. The citation graph includes show the increase in the average node degree over time all citations made by patents granted between 1975 and in Figure 1(c). The densification exponent is a =1.18, 1999, totaling e=16,522,438 citations. Because the dataset lower than the one for the citation networks, but still clearly begins in 1975, it too has a “missing past” issue, but again greater than 1. the effect of this is minor as one moves away from the first few years. 3.1.4 Affiliation graphs We follow the same procedure as with arXiv. For each Using the arXiv data, we also constructed bipartite affil- year Y from 1975 to 1999, we create a citation network on iation graphs. There is a node for each paper, a node for patents up to year Y , and give the DPL plot, in Figure 2(b). each person who authored at least one arXiv paper, and an As with the arXiv citation network, we observe a high den- edge connecting people to the papers they authored. Note sification exponent, in this case a =1.66. that the more traditional co-authorship network is implicit 10 12 in the affiliation network: two people are co-authors if there Full graph Full graph Post ’95 subgraph 11 Post ’95 subgraph is at least one paper joined by an edge to each of them. 9 Post ’95 subgraph, no past Post ’95 subgraph, no past 10 8 We studied affiliation networks derived from the five largest 9 categories in the arXiv (ASTRO–PH, HEP–TH, HEP–PH, 7 8

COND–MAT and GR–QC). We place a time-stamp on each 7 6 Effective diameter Effective diameter node: the submission date of each paper, and for each per- 6 5 son, the date of their first submission to the arXiv. The 5 4 4 data for affiliation graphs covers the period from April 1992 1992 1994 1996 1998 2000 2002 2004 1992 1994 1996 1998 2000 2002 Time [years] Time [years] to March 2002. The smallest of the graphs (category GR– (a) arXiv citation graph (b) Affiliation network QC) had 19,309 nodes (5,855 authors, 13,454 papers) and 35 5 Full graph Linear fit 26,169 edges. ASTRO–PH is the largest graph, with 57,381 Post ’85 subgraph 30 Post ’85 subgraph, no past nodes (19,393 authors, 37,988 papers) and 133,170 edges. It 4.8 25 has 6.87 authors per paper; most of the other categories also 4.6 have similarly high numbers of authors per paper. 20 4.4 15

For all these affiliation graphs we observe similar phe- Effective diameter Effective diameter

4.2 nomena, and in particular we have densification exponents 10 between 1.08 and 1.15. Due to lack of space we present 5 4 1975 1980 1985 1990 1995 2000 3000 3500 4000 4500 5000 5500 6000 6500 the complete set of measurements only for ASTRO–PH, the Time [years] Size of the graph [number of nodes] largest affiliation graph. Figures 1(d) and 2(d) show the (c) Patents (d) AS increasing average degree over time, and a densification ex- ponent of a =1.15. Figure 3: The effective diameter over time.

3.2 Shrinking Diameters diameter has the following interpretation: Since all the links We now discuss the behavior of the effective diameter over out of a node are “frozen” at the moment it joins the graph, time, for this collection of network datasets. Following the the decreasing distance between pairs of nodes appears to be conventional wisdom on this topic, we expected the under- the result of subsequent papers acting as “bridges” by cit- lying question to be whether we could detect the differences ing earlier papers from disparate areas. Note that for other among competing hypotheses concerning the growth rates graphs in our study, such as the AS dataset, it is possible for of the diameter — for example, the difference between loga- an edge between two nodes to appear at an arbitrary time rithmic and sub-logarithmic growth. Thus, it was with some after these two nodes join the graph. surprise that we found the effective diameters to be actually We note that the effective diameter of a graph over time is decreasing over time (Figure 3). necessarily bounded from below, and the decreasing patterns Let us make the definitions underlying the observations of the effective diameter in the plots of Figure 3 are consis- concrete. We say that two nodes in an undirected network tent with convergence to some asymptotic value. However, are connected if there is an path between them; for each nat- understanding the full “limiting behavior” of the effective ural number d,letg(d) denote the fraction of connected node diameter over time, to the extent that this is even a well- pairs whose shortest connecting path has length at most d. defined notion, remains an open question. The hop-plot for the network is the set of pairs (d, g(d)); it thus gives the cumulative distribution of distances between 3.2.1 Validating the shrinking diameter conclusion connected node pairs. We extend the hop-plot to a function Given the unexpected nature of this result, we wanted to defined over all positive real numbers by linearly interpolat- verify that the shrinking diameters were not attributable to ing between the points (d, g(d)) and (d+1,g(d+1))for each artifacts of our datasets or analyses. We explored this issue d, and we define the effective diameter of the network to be in a number of ways, which we now summarize; the conclu- the value of d at which this function achieves the value 0.9. sion is that the shrinking diameter appears to be a robust, (Note that this varies slightly from an alternate definition and intrinsic, phenomenon. Specifically, we performed ex- of the effective diameter used in earlier work: the minimum periments to account for (a) possible sampling problems, (b) value d such that at least 90% of the connected node pairs the effect of disconnected components, (c) the effect of the areatdistanceatmostd. Our variation smooths this defi- “missing past” (as in the previous subsection), and (d) the nition by allowing it to take non-integer values.) The effec- dynamics of the emergence of the giant component. tive diameter is a more robust quantity than the diameter Possible sampling problems: Computing shortest paths (defined as the maximum distance over all connected node among all node pairs is computationally prohibitive for graphs pairs), since the diameter is prone to the effects of degener- of our scale. We used several different approximate meth- ate structures in the graph (e.g. very long chains). However, ods, obtaining almost identical results from all of them. the effective diameter and diameter tend to exhibit qualita- In particular, we applied the Approximate Neighborhood tively similar behavior. Function (ANF) approach [27] (in two different implementa- For each time t (as in the previous subsection), we create tions), which can estimate effective diameters for very large a graph consisting of nodes up to that time, and compute graphs, as well as a basic sampling approach in which we ran the effective diameter of the undirected version of the graph. exhaustive breadth-first search from a subset of the nodes Figure 3 shows the effective diameter over time; one ob- chosen uniformly at random. The results using all these serves a decreasing trend for all the graphs. We performed methods were essentially identical. a comparable analysis to what we describe here for all 9 Disconnected components: One can also ask about the ef- graph datasets in our study, with very similar results. For fect of small disconnected components. All of our graphs the citation networks in our study, the decreasing effective have a single giant component – a connected component (or weakly connected component in the case of directed graphs, 1 1 0.9 0.9 ignoring the direction of the edges) that accounts for a sig- 0.8 0.8 nificant fraction of all nodes. For each graph, we computed 0.7 effective diameters for both the entire graph and for just the 0.6 0.7 giant component; again, our results are essentially the same 0.5 0.6 0.4 using these two methods. 0.5 0.3 0.4 “Missing Past” effects: A third issue is the problem of 0.2 Full graph Full graph Post 1995 subgraph, no past Post 1995 subgraph, no past the “missing past,” the same general issue that surfaced in 0.1 1992 1994 1996 1998 2000 2002 2004 1992 1994 1996 1998 2000 2002 the previous subsection when we considered densification. (a) arXiv citation graph (b) Affiliation network In particular, we must decide how to handle citations to papers that predate our earliest recorded time. (Note that Figure 4: The fraction of nodes that are part of the the missing past is not an issue for the AS network data, giant connected component over time. We see that where the effective diameter also decreases.) after 4 years the 90% of all nodes in the graph belong To understand how the diameters of our networks are af- to giant component. fected by this unavoidable problem, we perform the follow- ing test. We pick some positive time t0 > 0, and determine what the diameter would look like as a function of time, if giant component? this were the beginning of our data. We can then put back in It appears fairly clear that this is not the case. Figure 4 the nodes and the edges from before time t0, and study how shows the fraction of all nodes that are part of the largest much the diameters change. If this change is small — or at connected component (GCC) over time. We plot the size of least if it does not affect the qualitative conclusions — then the GCC for the full graph and for a graph where we had no it provides evidence that the missing past is not influencing past — i.e., where we delete all out-links of the nodes dated the overall result. before the cut-off time t0. Because we delete the out-links of Specifically, we set this cut-off time t0 to be the beginning the pre-t0 nodes the size of GCC is smaller, but as the graph of 1995 for the arXiv (since we have data from 1993), and grows the effect of these deleted links becomes negligible. to be 1985 for the patent citation graph (we have data from We see that within a few years the giant component ac- 1975). We then compared the results of three measurements: counts for almost all the nodes in the graph. The effective • Diameter of full graph. We compute the effective diameter, however, continues to steadily decrease beyond diameter of the graph’s giant component. this point. This indicates that the decrease is happening in • Post-t0 subgraph. We compute the effective diameter a “mature” graph, and not because many small disconnected of the post-t0 subgraph using all nodes and edges. This components are being rapidly glued together. means that for each time t (t>t0) we create a graph using Based on all this, we believe that the decreasing diameters all nodes dated before t. We then compute the effective in our study reflect a fundamental property of the underlying diameter of the subgraph of the nodes dated between t0 networks. Understanding the possible causes of this prop- and t. To compute the effective diameter we can use all erty, as well as the causes of the densification power laws edges and nodes (including those dated before t0). This discussed earlier, will be the subject of the next section. experiment measures the diameter of the graph if we knew the full (pre-t0) past — the citations of the papers which we 4. PROPOSED MODELS have intentionally excluded for this test. • We have now seen that densification power laws and shrink- Post-t0 subgraph, no past. We set t0 the same ing effective diameters are properties that hold across a way as in previous experiment, but then for all nodes dated range of diverse networks. Moreover, existing models do not before t0 we delete all their out-links. This creates the graph capture these phenomena. We would like to find some sim- we would have gotten if we had started collecting data only ple, local model of behavior, which could naturally lead to at time t0. the macroscopic phenomena we have observed. We present In Figure 3, we superimpose the effective diameters using increasingly sophisticated models, all of which naturally achieve the three different techniques. If the missing past does not the observed densification; the last one (the “Forest Fire” play a large role in the diameter, then all three curves should model) also exhibits shrinking diameter and all the other lie close to one another. We observe this is the case for the main patterns known (including heavy-tailed in- and out- arXiv citation graphs. For the arXiv paper-author affilia- degree distributions). tion graph, and for the patent citation graph, the curves are quite different right at the cut-off time t0 (where the effect 4.1 Community Guided Attachment of deleted edges is most pronounced), but they quickly align What are the underlying principles that drive all our ob- with one another. As a result, it seems clear that the contin- served graphs to obey a densification power law, without ued decreasing trend in the effective diameter as time runs central control or coordination? We seek a model in which to the present is not the result of these boundary effects. the densification exponent arises from intrinsic features of Emergence of giant component: A final issue is the dynam- the process that generates nodes and edges. While one could ics by which the giant component emerges. For example, in a clearly define a graph model in which e(t) ∝ n(t) by simply the standard Erd¨os-Renyi random graph model (which has a− having each node, when it arrives at time t, generate n(t) 1 a substantially different flavor from the growth dynamics out-links — the equivalent of positing that each author of of the graphs here), the diameter of the giant component a− a paper in a citation network has a rule like, “Cite n 1 is quite large when it first appears, and then it shrinks as other documents,” hard-wired in his or her brain — such a edges continue to be added. Could shrinking diameters in model would not provide any insight into the origin of the our case also be, in some way, a symptom of emergence of exponent a, as the exponent is unrelated to the operational We will construct a random graph on a set of nodes V Table 1: Table of symbols by specifying the probability that v and w form a link as Symbol Description a function f of h(v, w). We refer to this function f as the a Densification Exponent Difficulty Function. What should be the form of f? Clearly, c Difficulty Constant it should decrease with h; but there are many forms such a f(h) Difficulty Function decrease could take. n(t) number of nodes at time t The form of f that works best for our purposes comes from e(t) number of edges at time t the self-similarity arguments we made earlier: We would like b community branching factor − ¯ f to be scale-free; that is, f(h)/f(h 1) should be level- d expected average node out-degree independent and thus constant. The only way to achieve H height of the tree level-independence is to define f(h)=f(0) ∗ c−h. Setting h(v, w) least common ancestor height of v, w f(0) to 1 for simplicity, we have: p forest fire forward burning probability −h pb forest fire backward burning probability f(h)=c (2) r ratio of backward and forward probability where c ≥ 1. We refer to the constant c as the Diffi- culty Constant. Intuitively, cross-communities links become details by which the network is being constructed. Instead, harder to form as c increases. our goal is to see how underlying properties of the network This completes our development of the model, which we evolution process itself can affect the observed densification refer to as Community Guided Attachment: If the nodes of behavior. a graph belong to communities-within-communities, and if We take the following approach. Power laws often ap- the cost for cross-community edges is scale-free (Eq. (2)), pear in combination with self-similar datasets [29]. Our the Densification Power Law follows naturally. No central approach involves two steps, both of which are based on control or exogenous regulations are needed to force the re- self-similarity. Thus, we begin by searching for self-similar, sulting graph to obey this property. In short, self-similarity recursive structures. In fact, we can easily find several such itself leads to the Densification Power Law. recursive sets: For example, computer networks form tight Theorem 1. In the Community Guided Attachment ran- groups (e.g., based on geography), which consist of smaller dom graph model just defined, the expected average out-degree groups, and so on, recursively. Similarly for patents: they d¯ of a node is proportional to: also form conceptual groups (“chemistry”, “communications”, − c etc.), which consist of sub-groups, and so on recursively. d¯ = n1 logb( ) if 1 ≤ cb (5) e.g. [31] and the references therein) that social structures exhibit self-similarity, with individuals organizing their so- cial contacts hierarchically. Moreover, pairs of individuals Proof. For a given node v, the expected out-degree (num- belonging to the same small community form social ties ber of links) d¯ of the node is proportional to

more easily than pairs of individuals who are only related by 

logb(n) logb(n)  j−1

membership in a larger community. In a different domain, j− −j b − 1 b d¯= f(h(x, v)) = (b − 1)b 1c = . Menczer studied the frequency of links among Web pages c c that are organized into a topic hierarchy such as the Open x= v j=1 j=1 Directory [21]. He showed that link density among pages (6) ≤ decreases with the height of their least common ancestor in There are three different cases: if 1 c

the hierarchy. That is, two pages on closely related topics summing the geometric series we obtain

¡  n  are more likely to be hyperlinked than are two pages on more − b logb( ) − 1 −

¯ b 1 c b 1 1−logb(c) ¡ distantly related topics. d = · = (n − 1) b − − This is the first, qualitative step in our explanation for the c c 1 b c − c Densification Power Law. The second step is quantitative. =Θ(n1 logb( )). We will need a numerical measure of the difficulty in crossing

communities; we call this the Difficulty Constant,andwe In the case when c = b the series sums to 

define it more precisely below. logb(n)  j−1 b − 1 b b − 1 d¯ = f(h(x, v)) = = log (n) b b b b 4.1.1 The Basic Version of the Model x= v j=1

We represent the recursive structure of communities-within- =Θ(logb(n)). communities as a tree Γ, of height H.Weshallshowthat The last case is when Difficulty Constant c is greater than even a simple, perfectly balanced tree of constant fanout b branching factor b (c>b), then the sum in Eq. (6) converges is enough to lead to a densification power law, and so we to a constant even if carried out to infinity, and so we obtain will focus the analysis on this basic model. d¯= Θ(1). The nodes V in the graph we construct will be the leaves of the tree; that is, n = |V |. (Note that n = bH .) Let h(v, w) Note that when cb2, the average node degree is constant and rapidly with their distance from this center of gravity. How- the probability of an in-degree exceeding any constant ever, we add to this picture the notion that, occasionally, bound k decreases exponentially in k. a new node will produce a very large number of out-links. Such nodes will help cause a more skewed out-degree distri- Thus, the dynamic Community Guided Attachment model bution; they will also serve as “bridges” that connect for- exhibits three qualitatively different behaviors as the pa- merly disparate parts of the network, bringing the diameter rameter c varies: densification with heavy-tailed in-degrees; down. 4.2.1 The Basic Forest Fire Model node u lying k steps away is exponentially small in k.(Of Following this plan, we now define the most basic version course, in the Forest Fire Model, there may be many paths of the model. Essentially, nodes arrive one at a time and that could be burned from v to u, adding some complexity form out-links to some subset of the earlier nodes; to form to this analogy.) out-links, a new node v attaches to a node w in the exist- In fact, our Forest Fire Model combines the flavors of sev- ing graph, and then begins “burning” links outward from eral older models, and produces graphs qualitatively match- w, linking with a certain probability to any new node it ing their properties. We establish this by simulation, as we discovers. One can view such a process as intuitively corre- describe below, but it is also useful to provide some intuition sponding to a model by which an author of a paper identifies for why these properties arise. references to include in the bibliography. He or she finds a • Heavy-tailed in-degrees. Our model has a “rich get first paper to cite, chases a subset of the references in this richer” flavor: highly linked nodes can easily be reached by paper (modeled here as random), and continues recursively a newcomer, no matter which ambassador it starts from. with the papers discovered in this way. Depending on the • Communities. The model also has a “copying” fla- bibliographic aids being used in this process, it may also vor: a newcomer copies several of the neighbors of his/her be possible to chase back-links to papers that cite the paper ambassador (and then continues this recursively). under consideration. Similar scenarios can be considered for • Heavy-tailed out-degrees. The recursive nature of link social networks: a new computer science graduate student formation provides a reasonable chance for a new node to arrives at a university, meets some older CS students, who burn many edges, and thus produce a large out-degree. introduce him/her to their friends (CS or non-CS), and the • Densification Power Law. A newcomer will have a introductions may continue recursively. lot of links near the community of his/her ambassador; a We formalize this process as follows, obtaining the Forest few links beyond this, and significantly fewer farther away. Fire Model. To begin with, we will need two parameters, a Intuitively, this is analogous to the Community Guided At- forward burning probability p,andabackward burning ratio tachment, although without an explicit set of communities. r, whose roles will be described below. Consider a node • Shrinking diameter. It is not a priori clear why the v joining the network at time t>1, and let Gt be the Forest Fire Model should exhibit a shrinking diameter as it graph constructed thus far. (G1 will consist of just a single grows. Graph densification is helpful in reducing the diame- node.) Node v forms out-links to nodes in Gt according to ter, but it is important to note that densification is certainly the following process. not enough on its own to imply shrinking diameter. For example, the Community Guided Attachment model obeys (i) v first chooses an ambassador node w uniformly at ran- the Densification Power Law, but it can be shown to have a dom, and forms a link to w. diameter that slowly increases. Rigorous analysis of the Forest Fire Model appears to be (ii) We generate a random number x that is binomially quite difficult. However, in simulations, we find that by − distributed with mean (1 − p) 1.Nodev selects x varying just the two parameters p and r, we can produce links incident to w, choosing from among both out- graphs that densify (a>1), exhibit heavy-tailed distribu- links and in-links, but selecting in-links with proba- tions for both in- and out-degrees (Fig. 6), and have diam- bility r timeslessthanout-links.Letw1,w2,...,wx eters that decrease. This is illustrated in Figure 5, which denote the other ends of these selected links. shows plots for the effective diameter and the Densification Power Law exponent as a function of time for some selec- (iii) v forms out-links to w1,w2,...,wx, and then applies tions of p and r. We see from these plots that, depending on step (ii) recursively to each of w1,w2,...,wx.Asthe the forward and backward burning parameters, the Forest process continues, nodes cannot be visited a second Fire Model is capable of generating sparse or dense graphs, time, preventing the construction from cycling. with effective diameters that either increase or decrease. Thus, the “burning” of links in Forest Fire model begins at w, spreads to w1,...,wx, and proceeds recursively until it 4.2.2 Extensions to the Forest Fire Model dies out. In terms of the intuition from citations in papers, Our basic version of the Forest Fire Model exhibits rich the author of a new paper v initially consults w, follows a structure with just two parameters. By extending the model subset of its references (potentially both forward and back- in natural ways, we can fit observed network data even more ward) to the papers w1,...,wx, and then continues accu- closely. We propose two natural extensions: “orphans”and mulating references recursivelybyconsultingthesepapers. multiple ambassadors. The key property of this model is that certain nodes pro- “Orphans”: In both the patent and arXiv citation graphs, duce large “conflagrations,” burning many edges and hence there are many isolated nodes, that is, documents with no forming many out-links before the process ends. citations into the corpus. For example, many papers in the Despite the fact that there is no explicit hierarchy in the arXiv only cite non-arXiv papers. We refer to them as or- Forest Fire Model, as there was in Community Guided At- phans. Our basic model does not produce orphans, since tachment, there are some subtle similarities between the each node always links at least to its chosen ambassador. models. Where a node in Community Guided Attachment However, it is easy to incorporate orphans into the model was the child of a parent in the hierarchy, a node v in the in two different ways. We can start our graphs with n0 > 1 Forest Fire Model also has an “entry point” via its chosen nodes at time t = 1; or we can have some probability q>0 ambassador node w. Moreover, just as the probability of that a newcomer will form no links (not even to its ambas- linking to a node in Community Guided Attachment de- sador). creased exponentially in the tree distance, the probability We find that such variants of the model have a more pro- that a new node v burns k successive links so as to reach a nounced decrease in the effective diameter over time, with 5 4 4 10 10 10 9.5

9

3 3 8.5 10 10 4 10 8

7.5 2 2 10 10

7 Count Count 3

Number of edges 10 6.5 Effective diameter 1 1 10 10 6 Edges 5.5 = 1.96 x1.01 R2=1.00 2 Log fit 0 0 10 10 10 1 2 3 4 5 5 0 1 2 3 0 1 2 3 10 10 10 10 10 0 2000 4000 6000 8000 10000 10 10 10 10 10 10 10 10 Number of nodes Number of nodes Node in−degree Node out−degree

5 10 8.5 In-degree Out-degree

8 4 10 7.5 Figure 6: Degree distribution of a sparse graph with decreasing diameter (forward burning probability: 3 7 10 6.5 0.37, backward probability: 0.32). Number of edges

2 Effective diameter 10 6 1 1 Edges 5.5 2 = 0.83 x1.21 R2=1.00 1 Log fit 1.8 10 0.8 0.8 1 2 3 4 5 5 10 10 10 10 10 0 2000 4000 6000 8000 10000 1.5 Number of nodes Number of nodes 0.6 1.6 0.6 1 7 10 7 0.5 0.4 1.4 0.4 6 10 6.5 0 6 1.2 5 Backward buring ratio 0.2 Backward buring ratio 0.2 −0.5 10 5.5 −1 4 5 10 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 4.5 Forward buring probability Forward buring probability 3

Number of edges 10 4 Effective diameter Densification exponent Diameter

2 3.5 10 Edges 3 = 0.03 x1.88 R2=0.99 1 Log fit 10 Figure 7: Contour plots: The Densification Power 1 2 3 4 5 2.5 10 10 10 10 10 0 2000 4000 6000 8000 10000 Number of nodes Number of nodes Law exponent a (left) and diameter log-fit α factor DPL exponent Diameter (right) over the parameter space (forward-burning probability and ratio). Figure 5: The DPL plot and diameter for Forest Fire model. Top: sparse graph (a =1.01 < 2), with hence the current number of vertices) to the last half of increasing diameter (forward burning probability: the effective diameter plot; we then report the coefficient α. p =0.35, backward probability: pb =0.20). Middle: Thus, α<0 corresponds to decreasing effective diameter (most realistic case:) densifying graph (a =1.21 < 2) over time. with decreasing diameter (p =0.37, pb =0.32). Bot- Figure 7(a) gives the contour plot of the densification ex- tom: dense graph (a ≈ 2), with decreasing diameter ponent a. The white color is for a = 1 (the graph maintains (p =0.38, pb =0.35). constant average degree), while the black color is for a =2 (the graph is “dense”, that is, the number of edges grows large distances caused by groups of nodes linking to differ- quadratically with the number of nodes, as, e.g., in the case ent orphans gradually diminishing as further nodes arrive to of a clique). The desirable grey region is in-between; we ob- connect them together. serve that it is very narrow: a increases dramatically along Multiple ambassadors: We experimented with allowing a contour line, suggesting a sharp transition. newcomers to choose more than one ambassador with some Figure 7(b) gives the contour plot for the factor α in the positive probability. That is, rather than burning links start- effective diameter fit, as defined above. The boundary be- ing from just one node, there is some probability that a tween decreasing and increasing effective diameter is shifted newly arriving node burns links starting from two or more. somewhat from the contour line for densification, indicating This extension also accentuates the decrease in effective di- that even the basic Forest Fire Model is able to produce ameter over time, as nodes linking to multiple ambassadors sparse graphs (with densification exponent near 1) in which serve to bring together formerly far-apart portions of the the effective diameter decreases. graph. For lack of space, we omit the phase plots with orphans and multiple ambassadors, which show similar behavior. 4.2.3 Phase plot In order to understand the densification and diameter 5. CONCLUSION properties of graphs produced by the Forest Fire Model, we Despite the enormous recent interest in large-scale net- have explored the full parameter space of the basic model in work data, and the range of interesting patterns identified terms of its two underlying quantities: the forward burning for static snapshots of graphs (e.g. heavy-tailed distribu- probability p and the backward burning ratio r. tions, small-world phenomena), there has been relatively Figure 7 shows how the densification exponent and the ef- little work on the properties of the time evolution of real fective diameter depend on the values of these parameters. graphs. This is exactly the focus of this work. The main The densification exponent a is computed as in Section 3, findings and contributions follow: by fitting a relation of the form e(t) ∝ n(t)a.Fortheef- • The Densification Power Law: In contrast to the stan- fective diameter, we fit a logarithmic function of the form dard modeling assumption that the average out-degree re- diameter = α log t + β (where t is the current time, and mains constant over time, we discover that real graphs have out-degrees that grow over time, following a natural pattern 5(2):149–151, 2003. (Eq. (1)). [13] B. H. Hall, A. B. Jaffe, and M. Trajtenberg. The nber • Shrinking diameters: Our experiments also show that patent citation data file: Lessons, insights and the standard assumption of slowly growing diameters does methodological tools. NBER Working Papers 8498, not hold in a range of real networks; rather, the diame- National Bureau of Economic Research, Inc, Oct. ter may actually exhibit a gradual decrease as the network 2001. grows. [14] B. A. Huberman and L. A. Adamic. Growth dynamics • We show that our Community Guided Attachment- of the world-wide web. Nature, 399:131, 1999. model can lead to the Densification Power Law, and that it [15] J. S. Katz. The self-similar science system. Research needs only one parameter to achieve it. Policy, 28:501–517, 1999. • Finally, we give the Forest Fire Model, based on only [16] J. S. Katz. Scale independent bibliometric indicators. two parameters, which is able to capture patterns observed Measurement: Interdisciplinary Research and both in previous work and in the current study: heavy-tailed Perspectives, 3:24–28, 2005. in- and out-degrees, the Densification Power Law, and a [17] J. M. Kleinberg. Small-world phenomena and the shrinking diameter. dynamics of information. In Advances in Neural Our results have potential relevance in multiple settings, Information Processing Systems 14, 2002. including ’what if’ scenarios; in forecasting of future pa- rameters of computer and social networks; in anomaly de- [18] J. M. Kleinberg, R. Kumar, P. Raghavan, tection on monitored graphs; in designing graph sampling S. Rajagopalan, and A. Tomkins. The web as a graph: Measurements, models, and methods. In Proc. algorithms; and in realistic graph generators. International Conference on Combinatorics and Acknowledgements: We would like to thank Michalis Computing, pages 1–17, 1999. Faloutsos and George Siganos of UCR, for help with the [19] R. Kumar, P. Raghavan, S. Rajagopalan, data and for early discussions on the Autonomous System D. Sivakumar, A. Tomkins, and E. Upfal. Stochastic dataset. models for the web graph. In Proc. 41st IEEE Symp. on Foundations of Computer Science, 2000. 6. REFERENCES [20] R. Kumar, P. Raghavan, S. Rajagopalan, and A. Tomkins. Trawling the web for emerging [1] J. Abello, A. L. Buchsbaum, and J. Westbrook. A cyber-communities. In Proceedings of 8th International functional approach to external graph algorithms. In World Wide Web Conference, 1999. Proceedings of the 6th Annual European Symposium [21] F. Menczer. Growing and navigating the small world on Algorithms, pages 332–343. Springer-Verlag, 1998. web by local content. Proceedings of the National [2]J.Abello,P.M.Pardalos,andM.G.C.Resende. Academy of Sciences, 99(22):14014–14019, 2002. Handbook of massive data sets. Kluwer, 2002. [22] S. Milgram. The small-world problem. Psychology [3] R. Albert and A.-L. Barabasi. Emergence of scaling in Today, 2:60–67, 1967. random networks. Science, pages 509–512, 1999. [23] M. Mitzenmacher. A brief history of generative models [4] R. Albert, H. Jeong, and A.-L. Barabasi. Diameter of for power law and lognormal distributions, 2004. the world-wide web. Nature, 401:130–131, September [24] M. E. J. Newman. The structure and function of 1999. complex networks. SIAM Review, 45:167–256, 2003. [5] Z. Bi, C. Faloutsos, and F. Korn. The dgx distribution [25] A. Ntoulas, J. Cho, and C. Olston. What’s new on the for mining massive, skewed data. In KDD, pages web? the evolution of the web from a search engine 17–26, 2001. perspective. In WWW Conference, pages 1–12, New [6] B. Bollobas and O. Riordan. The diameter of a York, New York, May 2004. scale-free random graph. Combinatorica, 24(1):5–34, [26] U. of Oregon Route Views Project. Online data and 2004. reports. http://www.routeviews.org. [7] A. Broder, R. Kumar, F. Maghoul, P. Raghavan, [27] C. R. Palmer, P. B. Gibbons, and C. Faloutsos. Anf: S. Rajagopalan, R. Stata, A. Tomkins, and J. Wiener. A fast and scalable tool for data mining in massive Graph structure in the web: experiments and models. graphs. In SIGKDD, Edmonton, AB, Canada, 2002. In Proceedings of World Wide Web Conference, 2000. [28] S. Redner. Citation statistics from more than a [8] D. Chakrabarti, Y. Zhan, and C. Faloutsos. R-mat: A century of physical review. Technical Report recursive model for graph mining. In SDM, 2004. physics/0407137, arXiv, 2004. [9] F. Chung and L. Lu. The average distances in random [29] M. Schroeder. Fractals, Chaos, Power Laws: Minutes graphs with given expected degrees. Proceedings of the from an Infinite Paradise. W.H. Freeman and National Academy of Sciences, 99(25):15879–15882, Company, New York, 1991. 2002. [30]D.J.Watts,P.S.Dodds,andM.E.J.Newman. [10] C. Cooper and A. Frieze. A general model of web Collective dynamics of ’small-world’ networks. Nature, graphs. Random Struct. Algorithms, 22(3):311–335, 393:440–442, 1998. 2003. [31]D.J.Watts,P.S.Dodds,andM.E.J.Newman. [11] M. Faloutsos, P. Faloutsos, and C. Faloutsos. On Identity and search in social networks. Science, power-law relationships of the internet topology. In 296:1302–1305, 2002. SIGCOMM, pages 251–262, 1999. [12] J. Gehrke, P. Ginsparg, and J. M. Kleinberg. Overview of the 2003 kdd cup. SIGKDD Explorations,