Common greedy wiring and rewiring heuristics do not guarantee maximum assortative graphs of given degree
Jonathan Stokes, Steven Weber

TL;DR
This paper investigates greedy heuristics for constructing maximum assortative graphs with a given degree sequence, revealing their limitations through counterexamples that show they do not always produce optimal solutions.
Contribution
It demonstrates that common greedy wiring and rewiring heuristics can fail to find maximum assortative graphs, challenging assumptions about their effectiveness.
Findings
Greedy rewiring heuristics do not always produce maximum assortative graphs.
A greedy wiring heuristic may fail to achieve the target degree sequence.
Counterexamples illustrate the limitations of these heuristics.
Abstract
We examine two greedy heuristics - wiring and rewiring - for constructing maximum assortative graphs over all simple connected graphs with a target degree sequence. Counterexamples show that natural greedy rewiring heuristics do not necessarily return a maximum assortative graph, even though it is known that the meta-graph of all simple connected graphs with given degree is connected under rewiring. Counterexamples show an elegant greedy graph wiring heuristic from the literature may fail to achieve the target degree sequence or may fail to wire a maximally assortative graph.
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * | ||||
| * |
| overall | heuristic A | heuristic B | heuristic C | |||||
|---|---|---|---|---|---|---|---|---|
| feasibility | optimality | ||
|---|---|---|---|
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Common greedy wiring and rewiring heuristics do not guarantee maximum assortative graphs of given degree
Jonathan Stokes
Steven Weber
Department of Electrical and Computer Engineering
Drexel University, Philadelphia, PA, USA
Abstract
We examine two greedy heuristics — wiring and rewiring — for constructing maximum assortative graphs over all simple connected graphs with a target degree sequence. Counterexamples show that natural greedy rewiring heuristics do not necessarily return a maximum assortative graph, even though it is known that the meta-graph of all simple connected graphs with given degree is connected under rewiring. Counterexamples show an elegant greedy graph wiring heuristic from the literature may fail to achieve the target degree sequence or may fail to wire a maximally assortative graph.
keywords:
Assortativity, graph wiring, graph rewiring, graph algorithms
††journal: Information Processing Letterst1t1footnotetext: This work was supported by the National Science Foundation, Grant IIS-1250786.
1 Introduction
1.1 Motivation
The assortativity of a graph (Newman [1]) is the correlation of the degrees of the endpoints of a randomly selected edge. High degree vertices tend to be connected to high (low) degree vertices in positively (negatively) assortative graphs.
One (of many) practical implications of assortativity is in graph search, e.g., searching a (often large order) graph for (one or all) vertices of maximum (or at least large) degree [2]: the work presented in [3, 4] has studied the performance impact of assortativity on search heuristics such as sampling and random walks. Finding such vertices in large graphs has diverse applications, including viral marketing in social networks and network robustness analysis [5, 6], among numerous others.
The motivation for this paper is the problem of identifying a collection of graphs, all from the class of graphs with a given degree sequence, with the assortativity of the graphs in the collection varying from the minimum to the maximum possible within that class. The performance impact of the assortativity on the search heuristic may be studied by running the heuristic on all graphs in the collection. Given this objective, the first step is to identify graphs with extremal assortativity within the class. This paper examines two greedy heuristics for finding maximum assortative graphs within a class: graph rewiring and wiring.
1.2 Related Work
There is an extensive literature on extremization of assortativity over different graph classes; this section briefly covers the most pertinent points of this literature, focusing on the distinctions between the work presented in this paper and the prior work.
Assortativity. Newman [1] introduced (graph) assortativity which is denoted . Van Meighem [7] showed perfect assortativity () is only possible in regular graphs, while any complete bipartite graph () is perfectly disassortative (). There is a large literature on network degree correlations and assortativity (e.g., [8]), and on graphs with extremal assortativity within a class (e.g., [9]).
Joint Degree Matrix (JDM). The generation of random graphs with a particular JDM (also called a 2K-series) has been the subject of a number of recent papers. Stanton [10] and Orsini [8] have proposed random edge rewiring as a method of sampling graphs with a given JDM, while Gjorka [11] has introduced a random wiring method for constructing these graphs. However, there is no means known to us by which JDMs may be efficiently enumerated, and therefore there is no easy means to maximize assortativity, which is a statistic of the JDM, short of enumerating all (in our case, simple and connected) graphs with a given degree sequence.
Rewiring. The meta-graph for a degree sequence, with a vertex for each connected simple graph with that degree sequence and an edge connecting graphs related by rewiring a pair of edges, was studied by Taylor [12]; in particular, he showed this meta-graph to be connected (Thm. 3.3) extending an earlier result by Rysler for simple graphs [13]. This fact is used in §2.
Following Rysler’s work, rewiring heuristics for sampling graphs with a particular degree sequence (e.g., [14], [15], [8]) have been introduced. Rewiring heuristics have also been proposed by Newman [16], Xuli-Burnet [17], Van Meighem [7], and Winterbach [18] along others for changing a graph’s assortativity. The first three of these algorithms, being purely stochastic, cannot efficiently maximize assortativity. Winterbach’s algorithm uses a guided rewiring technique to maximize assortativity. However, this technique does not maintain graph connectivity, as its rewirings are a subset of those explored by rewiring heuristic (see §2.1), and therefore Winterbach’s algorithm does not necessarily maximize assortativity.
Wiring. Li and Alderson [19] introduced a greedy wiring heuristic for constructing a graph with maximum assortativity over the set of simple connected graphs with a target degree sequence. Kincaid [9] argues wiring a minimally or maximally assortative connected simple graph is NP-hard and proposes a heuristic which is shown numerically to perform near optimally in minimizing graph assortativity. Winterbach [18], Zhou [20], and Meghanathan [21] have also proposed methods unconstrained by graph connectivity of wiring maximally assortative graphs. This paper examines Li’s heuristic further in §3.
Graph enumeration and generation. The results in this paper where achieved using geng, a tool in the nauty package created by McKay [22], to generate all simple connected graphs of a given order.
1.3 Notation
Let denote equal by definition. Let denote for . A graph of order is denoted , with vertices and edges ; size is denoted by . A directed edge between vertices and is denoted , and an undirected edge is denoted or .111Except in §3 where Alg. 1’s undirected pedges are listed as an ordered pair. Let denote the degree of vertex , denote a degree sequence, and the degree sequence for graph . Additionally, let denote the uniform distribution over vertex set , be the variance of the degree of a randomly selected vertex , and be the correlation between the degrees of random vertices and .
The collection of distinct unlabeled undirected simple connected graphs of order is denoted . Let be the collection of degree sequences found in graph collection , and let be the graphs in with degree sequence , henceforth referred to as the degree class . It follows that is the partition of by the degree sequence .
The -metric and assortativity, for , are defined below.
Definition 1**.**
The -metric [19] is,
[TABLE]
This implies for an edge selected uniformly at random . It follows that the assortativity [1] is, for a vertex selected uniformly at random,
[TABLE]
It is evident that maximizing the -metric is equivalent to maximizing assortativity over a degree class:
[TABLE]
Here, denotes those graphs achieving maximum assortativity over . If there is a unique such graph it is denoted .
1.4 Contributions and outline
The rest of the paper is organized as follows. §2 studies several greedy rewiring heuristics, each with the goal of identifying a graph of maximum assortativity over the degree class. Counterexamples are presented showing each of the rewiring heuristics may fail to identify such a graph. §3 examines the greedy wiring heuristic of Li and Alderson [19] designed to identify a graph of maximum assortativity over the degree class. We present a counterexample showing the heuristic may fail to produce a graph in the degree class, and also present a counterexample showing that the heuristic may produce a graph in the class that is not maximally assortative. Both §2 and §3 present tabulations of the number of counterexamples of the various types for graphs of order up to . §4 contains concluding remarks.
2 Rewiring
For a degree class and an initial graph , a rewiring heuristic produces a sequence of graphs , each graph in , where is obtained from by selecting two edges (connecting four distinct vertices) from , say , and forming with replaced by either or . Any rewiring is invalid if the resulting graph is either disconnected or has multiple edges, i.e., not in .
2.1 Greedy rewiring heuristics
A stochastic rewiring heuristic involves selecting the two edges at random. While simple to implement, stochastic rewiring has no guarantee on efficiency. This observation lead to the focus of this paper, greedy rewiring heuristics. Fix and four distinct vertices , such that has edges . Rewire edges to produce either graph or ; the arguments denote the two new edges replacing edges . Rewiring induces a change in the -metric:
[TABLE]
Given edges , in (4) is the scalar difference of the -metric of and one of the two possible rewirings, or , producing distinct . The greedy rewiring heuristics we introduce below explore both rewirings.
Three greedy rewiring heuristics are developed using ; each yields a neighborhood of graphs in a meta-graph on (defined below), where each is achieved by a heuristic approved single rewiring of .
- •
A: Improve (or maintain) : holds all simple connected graphs obtainable by a single rewiring of such that .
- •
B: Maximize : holds all simple connected graphs obtainable by a single rewiring of such that is maximum over all .
- •
C: Improve and maximize: holds all simple connected graphs obtainable by a single rewiring of such that and is maximum over all .
2.2 Meta-graphs for a degree class
Meta-graphs are graphs with vertices corresponding to the (simple and connected) non-isomorphic graphs in a degree class , for a given degree sequence . Taylor [12] defined the undirected meta-graph , where edges are added between all pairs of graphs related by edge rewiring, i.e., iff or for some pair of edges . Taylor proved (Thm. 3.3) that is connected. Thus, any graph in is obtainable, starting from any other graph in , through a sequence of rewirings, where each graph in the sequence is simple and connected. Note may have self-loops as rewiring may yield isomorphic to .
Rewiring heuristics A, B, and C each correspond to directed meta-graphs. First, label each graph with its assortativity (alternately, ). Next, for each heuristic , form the directed meta-graph , where . That is, each rewiring heuristic is represented by retaining (and orienting) the subset of edges in Taylor’s meta-graph that satisfy the heuristic.
2.3 Rewiring heuristic counterexamples
One might hope that (one or more of) the rewiring heuristics would provide a guarantee that, for any initial graph , there exists a directed path, following the heuristic, from to one or more graphs in . Unfortunately, all three heuristics can fail to achieve this goal, as shown by the counterexamples below. A counterexample for heuristic identifies a triple, with , , and , such that there is no path from to any graph in in the directed meta-graph .
Note that these heuristics do not specify a particular rewiring, i.e., each heuristic identifies, in general, a collection of possible neighborhood graphs , where each graph in the neighborhood is consistent with the heuristic. Thus, a counterexample for the heuristic has the property that the heuristic would fail to achieve the target set for any possible choice of , for each “reachable” from .
Counterexample 1**.**
Fix order , degree sequence , and initial graph (graph in Fig. 1). The (unique) graph with maximum assortativity, , is graph in Fig. 1. The meta-graph and directed meta-graph under heuristic A, are graph and in Fig. 3. There is no path from to in , and hence no path in (graph in Fig. 3). Thus, is a counterexample for heuristics and .
This counterexample asserts that graph has locally (i.e., over graphs adjacent to in ) maximal but not globally (i.e., over ) maximum assortativity. To see that is locally maximal, Table 1 lists possible pairs of edges from which if rewired as or maintain graph simplicity and connectivity: for each possible .
Counterexample 2**.**
Fix order , degree sequence , and initial graph (graph in Fig. 2). The (unique) graph with maximum assortativity, , is graph in Fig. 2. The meta-graph and directed meta-graph under heuristic B, , are graph and in Fig. 3. There is no path from to in . Thus, is a counterexample for heuristic .
This counterexample asserts that graph has locally maximal but not globally maximum assortativity. This can be seen by enumerating all possible pairs of edges from which if rewired maintain graph simplicity and connectivity, and showing the (unique) optimal choice to maximize produces a new graph isomorphic to ; this enumeration is omitted due to space constraints. The isomorphism between and produces the self-loop in at the vertex corresponding to .
Counterexamples C.E. 1 and C.E. 2 were found via exhaustive search. We enumerated the class of non-isomorphic simple connected graphs of vertices and degree sequence , , using the tool geng [22]. Letting denote the graph in corresponding to the vertex in meta-graph , under greedy rewiring heuristic , we enumerate all non-isomorphic edge rewirings of . For each rewiring of that satisfies heuristic we check for isomorphism of with . If is isomorphic with , we add directed edge to meta-graph . Upon completing this procedure for all , we check that a path exists from each vertex in to a vertex in . Using this procedure we generated Table 2, which counts the number of counterexamples for each of the greedy rewiring heuristics.
3 Wiring
If a degree sequence satisfies the Erdős Gallai theorem there exists one or more simple connected graphs with that degree sequence, i.e., [23]. Given such a , a wiring heuristic produces a sequence of graphs , with the empty graph, such that is formed from by adding one edge, subject to the constraint that no vertex is ever assigned a degree exceeding its target . It is typical to consider each vertex in graph as having “stubs” of which some number hold edges, and the remainder, , are available for wiring. The goal of the wiring heuristics is to obtain a graph of maximum assortativity, i.e., given .
3.1 Greedy wiring heuristic
Li and Alderson [19] developed the elegant greedy wiring heuristic in Alg. 1 which, given a degree sequence is intended to produce a graph that is feasible, i.e., that is in , and optimal, i.e., in . Although the heuristic performs well on most inputs, the following section will present counterexamples demonstrating neither property is guaranteed for all .
Each potential edge, hereafter a “pedge”, is denoted by the ordered pair with . The basic idea is to select from set of all pedges those with the largest endpoint degree product, (Line 4), after removing from and pedges in without available (unwired) stubs (Line 6). If pedges remain then further ties are broken by first (then second) selecting the pedge with the most unwired stubs (). Vertices are partitioned into , where () holds any vertex with one or more (no) edges. If the pedge has and then the edge is added and vertex moves from to (Line 11). Else holds both and and we must check the “tree condition”, , and “disconnected cluster condition”, , in Line 14.
The “tree condition” is required since at any point in wiring the graph, connecting the vertices in to the free stubs in requires acyclic graphs and at least free stubs in . As decreases, the number of free stubs in required to connect the vertices in to the free stubs in increases. Letting , if an edge is added between vertices and in which results in then there are not enough free stubs in to connect all the vertices in to those in , entailing that is disconnected. The “disconnected cluster condition” is required since wiring an edge between the only two free stubs in entails is disconnected, as no additional vertices in can be attached to those in (see [19]). Regardless of whether or not the conditions in Line 14 are satisfied, the pedge being considered for wiring is removed from the set in Line 16.
Alg. 1 is underspecified in Line 9, i.e., there may be multiple edges after sorting by , , and , and no guidance is provided in [19] for selecting a pedge in such a case. To compensate for this, the implementation of Alg. 1 in this paper selects all possible pedge choices, via a breadth first search, returning all possible graphs that may result from a valid pedge selection in Line 9. A degree sequence is considered to be a counterexample for feasibility if none of the returned graphs are in , and optimality if at least one returned graph is in , yet none are in .
3.2 Wiring heuristic counterexamples
Counterexample 3**.**
Fix and (which satisfies the Erdős Gallai theorem). The graph returned by Alg. 1 does not have the target degree sequence, i.e., , and thus is not feasible, i.e., .
Proof.
Table 3 gives the sequence of wirings satisfying , illustrated in Fig. 4. The first four edges added, namely , have identical priority as , , and are equal for each. These four may be added in any order without affecting the resulting graph. The next edges added will be , , , , , . Finally, will be added, leaving the only two free stubs in the graph on vertex , which can only be wired via a self-loop, thereby violating the requirement that be simple. ∎
Counterexample 4**.**
Fix and (which satisfies the Erdős Gallai theorem). The graph returned by Alg. 1 is feasible, but its assortativity is not maximum and thus is not optimal, i.e., .
Proof.
The proof is similar to C.E. 3. The partially wired graphs at steps , , , and are shown in Fig. 5. The returned graph achieves the target degree sequence , however its assortativity is not optimal. Namely, while , where is graph in Fig. 5. ∎
To find counterexamples C.E. 3 and C.E. 4 we enumerate all degree sequences of order which satisfy the Erdős Gallai theorem. Given a degree sequence of vertices, we use Alg. 1 to wire target degree sequence . Given the breadth first search, Alg. 1 returns a set of graphs . If for all , we count as a feasibility counter example. Otherwise, we check if there exists any (obeying ) for which . If not, we count as an optimality counterexample. We use this procedure to generate the counts of feasibility and optimality counterexamples in Table 4.
4 Conclusion
The main point of this paper is to demonstrate the failure of natural greedy heuristics, for both graph rewiring and wiring, to produce connected simple graphs with maximum assortativity over an arbitrary target degree class. Many open questions remain, such as how the relative prevalence of the various classes of counterexamples scale with . One possible direction for future work is to seek to characterize common structural properties of the degree sequences comprising the four types of counterexamples given above.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] M. E. J. Newman, Assortative mixing in networks, Physics Review Letters 89 (20) (2002) 208701. doi:10.1140/epjb/e 2010-00219-x . · doi ↗
- 2[2] K. Avrachenkov, N. Litvak, L. O. P. Yandex, E. Suyargulova, Quick detection of high-degree entities in large directed networks, in: Proceedings of the IEEE International Conference on Data Mining (ICDM), Shenzhen, China, 2014, pp. 20–29. doi:10.1109/ICDM.2014.95 . · doi ↗
- 3[3] J. Stokes, S. Weber, On random walks and random sampling to find max degree nodes in assortative Erdős Rényi graphs, in: Proceedings of the IEEE Global Communications Conference (GLOBECOM), Washington, D.C., 2016. doi:10.1109/GLOCOM.2016.7842044 . · doi ↗
- 4[4] J. Stokes, S. Weber, The self-avoiding walk-jump (SAWJ) algorithm for finding maximum degree nodes in large graphs, in: Proceedings of the IEEE International Conference on Big Data, Washington, D.C., 2016, pp. 142–149. doi:10.1109/Big Data.2016.7840599 . · doi ↗
- 5[5] D. Kempe, J. Kleinberg, E. Tardos, Maximizing the spread of influence through a social network, in: Proceedings of the ACM International Conference on Knowledge Discovery and Data Mining (SIGKDD), Washington, D.C., 2003, pp. 137–146. doi:10.1145/956750.956769 . · doi ↗
- 6[6] R. Cohen, K. Erez, D. ben Avraham, S. Havlin, Breakdown of the internet under intentional attack, Physical Review Letters 86 (2001) 3682–3685. doi:10.1103/Phys Rev Lett.86.3682 . · doi ↗
- 7[7] P. Van Mieghem, H. Wang, X. Ge, S. Tang, F. A. Kuipers, Influence of assortativity and degree-preserving rewiring on the spectra of networks, The European Physical Journal B 76 (4) (2010) 643–652. doi:10.1140/epjb/e 2010-00219-x . · doi ↗
- 8[8] C. Orsini, M. M. Dankulov, P. Colomer-de Simon, A. Jamakovic, P. Mahadevan, A. Vahdat, K. E. Bassler, Z. Toroczkai, M. Boguna, G. Caldarelli, S. Fortunato, D. Krioukov, Quantifying randomness in real networks, Nature Communications 6 (2015) 8627. doi:10.1038/ncomms 9627 . · doi ↗
