Chapter 7
Measures for system characterization
Comparing systems requires numbers. The second module of the NOCAD toolbox computes about fifty measures from the state-space matrices of a system: network-level values, node centralities, control and observe centrality, the types of the driver and sensor nodes, and similarity measures of drivers, sensors and edges built on reachability. This chapter defines them, states what they measure in terms of controllability and observability, and shows how nocad returns them as tables.
7.1 Problem and idea
The NOCAD papers relate the structure of a system to the effort of controlling and observing it [1, 2]: how many inputs and outputs it needs, how far the states are from them, and how evenly the inputs share the work. Measures of complex networks answer part of these questions, provided that they are computed on the right network (the network of the state variables, ) and interpreted with the direction of the edges in mind. The toolbox therefore organizes its measures in four groups, from the whole system down to single edges, and returns them in a form that can be compared across systems (fig. 7.1).
7.2 Theory
7.2.1 System-level measures
With and the in- and out-degrees of without self-loops and , the toolbox computes:
- the density , counting self-loops as possible edges;
- the diameter, the largest finite distance ;
- the degree variance of the and Freeman’s degree centralization [56], which is one for a star and zero for a regular network;
- four degree assortativities , , , : Pearson correlations, over the edges, between a degree of the start node and a degree of the end node [57, 58];
- the shares of nodes with a self-loop and of edges whose reverse edge exists (the connection dynamics of chapter 6);
- the relative degree of the configuration, : every sensor node is assigned to its closest driver node and the worst sensor decides [20].
7.2.2 Node centralities
Besides the degrees and Scott’s normalized degree , the toolbox computes three classical centralities on the directed network. The closeness of is corrected for the nodes it cannot reach,
| (7.1) |
where is the set of nodes reachable from ; in-closeness uses the nodes that reach [56]. The betweenness of a node counts the shortest paths through it [59], and PageRank [60] is the stationary distribution of a random walk with teleportation, reported in percent as in the MATLAB code. Out-closeness and betweenness measure how quickly and how centrally a node distributes the effect of an input, in-closeness how quickly it collects the information a sensor needs.
7.2.3 Control and observe centrality
Liu, Slotine and Barabási [61] defined the control centrality of a node as the dimension of the subspace that an input acting on it alone can control, the generic rank of with the -th unit vector. Hosoe’s theorem [27] gives it a graph meaning: the generic dimension of the controllable subspace is the largest number of edges in a subgraph made of a stem from the input and of disjoint cycles that the input reaches. Observe centrality is the same quantity on the reversed network. nocad computes both from random realizations of the pattern with the orthogonal Krylov iteration of algorithm 2.1, which returns the generic value with probability one.
Proposition 7.1. The control centrality of is at most the number of nodes that reaches (itself included), with equality if every node has a self-loop.
Proof. States that the input cannot reach are not influenced by it, which gives the bound. If every node has a self-loop, the path from to itself is a stem of length zero and every other reachable node carries a cycle of its own, its self-loop, reached by the input; this subgraph covers all reachable nodes, so by Hosoe’s theorem the generic dimension is . □
Without self-loops the gap between reach and control centrality measures the dilations on the way: in a tree only one root-to-leaf path can be a stem, so the root controls as many dimensions as the longest path has nodes, however many nodes it reaches. The MATLAB toolbox computed the structural rank of the numerically formed Kalman matrix; that value is an upper bound of the generic rank and can exceed it (method="sprank" reproduces it): for the NOCAD example without and with the input at , the structural rank of the Kalman matrix is eight, the generic dimension seven.
7.2.4 Similarity of drivers, sensors and edges
The NOCAD toolbox introduced three similarity measures built on reachability and the Jaccard index [62]. Let be the set of states that driver node influences and the number of derivations after which its input appears in . The driver similarity of two driver nodes is
| (7.2) |
the overlap of what they control, weighted by the agreement of the delays; two driver nodes with similarity close to one duplicate each other’s work. Sensor similarity is the same on the reversed network. The endpoint similarity of an edge is the product ; it is one for edges inside a strongly connected component, whose endpoints reach and are reached by the same nodes, and low for edges at which what can be reached, or what reaches, changes much. The edge similarity of two edges multiplies the Jaccard indices of the four corresponding sets of their endpoints; groups of similar edges mark redundant parts of a network, dissimilar edges the bridges that carry a unique share of the influence. The controlling and observing matrices list the number of derivations between every driver (sensor) node and every state.
In a nutshell: Measures
- System: density, diameter, degree variance and centralization, four assortativities, shares of self-loops and symmetric edges, relative degree of the configuration.
- Nodes: degrees, closeness corrected for reachability, betweenness, PageRank, control and observe centrality, driver and sensor types.
- Control centrality is bounded by the reach of the node and equals it when every node has a self-loop; it is computed as a generic rank, not as the structural rank of a numerical Kalman matrix.
- Similarities: Jaccard indices of reachable sets, weighted by delays for drivers and sensors; endpoint and edge similarities for edges.
7.3 Using it in nocad
nocad.measures
measures_tables(A, B, C, D, labels, config) returns system, nodes and edges tables; system_measures returns the same values in the nested structure of the MATLAB function matricesToStruct; get_config(**flags) switches individual measures off. Single measures: density, degree_in, degree_out, degree, degree_scott, degree_variance, degree_freeman, pearson_dir, percent_loop_sym, closeness_centrality, node_betweenness, edge_betweenness, pagerank, reachability, driver_similarity, sensor_similarity, endpoint_similarity, edge_similarity; nocad.control_centrality(A, nodes, method) and nocad.observe_centrality.
The tables of the NOCAD example:
A, B, C, D = nocad.generate_matrices(adj) tables = measures_tables(A, B, C, D) print(tables.system) print(tables.nodes[["degree", "closeness", "betweenness", "pagerank", "control", "observe"]].round(3))
Control centrality against reach:
A = tree.T cc = nocad.control_centrality(A) reach = reach_c(A).sum(axis=1) print("control centrality:", cc) print("reachable nodes: ", reach)
The similarity measures:
ds = driver_similarity(A, B) ss = sensor_similarity(A, C) S, edges = edge_similarity(adj) es = endpoint_similarity(adj)
7.4 Examples
7.4.1 Network and node measures
The nine-state example has 15 edges, density , diameter four, degree variance 2.67, Freeman centralization 0.43 and 40% symmetric edges, the values printed in the NOCAD manual; its relative degree is four (the sensor is four edges from the driver ). The node table (fig. 7.2) shows as the most central node by degree and closeness and, with , by betweenness, whereas PageRank, which accumulates along the edges, favors the sink cycle . The control centrality of the driver is nine, the observe centralities of the sensors and are seven and six. For Erdős–Rényi networks (fig. 7.3) the diameter peaks near mean degree 1.5, where the long chains of the emerging giant component appear, and falls afterward.
Open in ColabExample plot_01_network_measures.py in the gallery
7.4.2 Control centrality
In the binary tree of seven nodes, the root reaches all seven nodes but controls only three dimensions, the nodes of one root-to-leaf path; each inner node reaches three and controls two. On a random network with 80 nodes (fig. 7.4) control centrality equals reach for only 36% of the nodes and stays far below it for the nodes that reach most (at most 17 controlled dimensions against up to 47 reached nodes). With a self-loop on every node the two coincide for every node, as proposition 7.1 states. The single driver of the heat exchanger network has control centrality 22, the full state dimension.
Open in ColabExample plot_02_control_centrality.py in the gallery
7.4.3 Similarities
With the drivers , and , the first two are the most similar pair (0.81; fig. 7.5): and lie on the same cycle and reach the same states with similar delays, whereas reaches the same states one step later. The edge similarity matrix groups the edges of each cycle into blocks. The endpoint similarities (fig. 7.6) are one on the edges of the two cycles and lowest on the edges into (0.20), into (0.21) and from the source (0.22), the places where reachability changes most.
7.5 Further reading
The measures and their use in the NOCAD studies are described in [2, 3]. Centralities are due to Freeman [56, 59] and Brin and Page [60], assortativity to Newman [57]; Barabási’s textbook [63] covers these measures in the context of network science. Control centrality is from [61], its graph characterization from Hosoe [27].