Chapter 6
Connection types and system dynamics
The networks used in controllability studies are often taken as they are recorded: who regulates whom, who links to whom. A dynamical system built on such a network, however, almost always contains self-influence (a state that decays, a level that drives its own outflow) and interactions (flows driven by differences). This chapter introduces the seven connection types of the NOCAD study, proves that self-loops and interactions can only reduce the number of driver and sensor nodes and computes what remains when they are present everywhere, and compares networks with and without system dynamics. The conclusion is practical: driver and sensor counts computed from bare networks can overestimate the inputs and outputs a dynamical system needs by an order of magnitude.
6.1 Problem and idea
Two tanks connected by a pipe illustrate why the bare network is not enough (fig. 6.1). If a pump moves liquid from the first tank to the second at a rate that does not depend on the levels, the level influences nothing and the network has a single edge at most. If the liquid flows out by gravity, the outflow depends on the level above the outlet: depends on (a self-loop) and on ; with a free outlet on the second tank, also depends on . If the two tanks are connected vessels, the flow depends on the difference of the levels and runs in both directions: the edge becomes an interaction , again with self-loops. The three cases have the same physical layout and different networks, and the numbers of inputs and outputs needed to control and observe them differ. Leitold, Vathy-Fogarassy and Abonyi [1] classified the possible patterns between two connected states into seven connection types and showed that the type of the connections, not only the topology, decides the driver and sensor nodes.
6.2 Theory
6.2.1 Seven connection types
Let be an edge. The block of the two states, with , can take seven essentially different zero patterns [1]: the bare edge (type a), the edge with a self-loop on its start (b), on its end (c) or on both (d), the interaction (e), and the interaction with a self-loop on one end (f) or on both (g). Self-loops stand for self-influence: capacities and accumulation in process systems [26], decay and degradation in biological networks, inertia in mechanical ones. Interactions stand for flows driven by differences, such as conduction, diffusion and pressure-driven flow, and for every pair of mutually coupled conservation balances. The MATLAB toolbox and nocad.connection count the types of a network, add self-loops and reverse edges, and turn every edge into a given type.
6.2.2 Dynamics can only help
Proposition 6.1. Adding edges, in particular self-loops or reverse edges, never increases the minimum number of driver nodes with dedicated inputs, nor the minimum number of sensor nodes.
Proof. Let be a minimum set of dedicated driver nodes of . Every state of is reachable from , and some matching of leaves only nodes of unmatched (Lin’s conditions, section 3.2.4). Both properties survive the addition of edges: paths and matchings of remain paths and matchings of the larger network. Hence is a valid design for the larger network, whose minimum is at most . Sensors follow by duality. □
The heat maps of section 6.4 are therefore monotone in expectation. What remains when the dynamics are present everywhere is determined by two graph quantities.
Proposition 6.2. (a) If every node has a self-loop, the minimum number of dedicated inputs equals the number of source components of , and the minimum number of dedicated outputs the number of sink components. (b) If, in addition, every edge is an interaction, both equal the number of weakly connected components.
Proof. (a) Every source component needs a driver node (accessibility), so at least inputs are necessary. The self-loops form a perfect matching, so condition (ii) holds for any set of driver nodes; one driver node in every source component makes every node reachable, so inputs suffice. (b) With every edge reversible, every weakly connected component is strongly connected and has no incoming edge, so it is a source (and a sink) component; part (a) applies. □
Type d applies self-loops to every node that has an edge, type g in addition reverses every edge; isolated nodes are components on their own. Interactions alone (type e) do not give a perfect matching: an undirected network keeps the dilations of its bipartite double cover, such as the leaves of a star, which is why some networks need more than one input after type e and only one after type g. Self-loops alone leave the source components untouched, so they cannot remove the driver nodes that sit on source nodes; interactions can, because a reverse edge gives every source node a parent.
6.2.3 Heat maps of node and edge dynamics
To see how quickly the driver and sensor nodes disappear, the NOCAD study adds a share of the missing self-loops and a share of the missing reverse edges at random and records the mean numbers of driver and sensor nodes on a grid of values (algorithm 6.1). The corners of the grid are the bare network (), type d (), type e () and type g (both); by proposition 6.2 the last corner shows the number of weakly connected components.
6.2.4 Networks with and without system dynamics
The NOCAD study compared three sets of networks [1]. Set I contains networks used in controllability studies whose dynamics can be interpreted: the neural network of C. elegans, the transcription networks of E. coli and yeast, the macaque cortex and three electronic circuits [10]. Set II contains networks without system dynamics: the dolphin social network [53], a social network of researchers and two food webs. Set III contains the state matrices of real dynamical systems from the benchmark collection of Chahlaoui and Van Dooren [54]: structural models, thermal and fluid systems, circuit models, an International Space Station module, a CD player and others. Self-loops and interactions are frequent in Set III and rare in Sets I and II; turning the connections of Sets I and II into types with self-influence and interactions removes most of their driver and sensor nodes, while those of Set III do not change, because their state matrices contain these dynamics already. Networks stripped of their dynamics therefore overestimate the number of inputs and outputs a dynamical system needs.
In a nutshell: Connection types
- Seven types describe the pattern of two connected states: bare edge (a), self-loops (b–d), interaction (e), interaction with self-loops (f, g).
- Adding self-loops or reverse edges never increases the minimum numbers of driver and sensor nodes.
- With self-loops everywhere one input per source component and one output per sink component suffice; with self-loops and interactions, one of each per weakly connected component.
- Heat maps over the shares of added self-loops and interactions show how fast the counts fall; real dynamical systems already contain these dynamics.
6.3 Using it in nocad
functions of nocad.connection
CONNECTION_TYPES maps "a"–"g" to (loop on start, loop on end, reverse edge); connection_type(adj, i, j) and connection_type_counts(adj) classify the existing connections; apply_connection_type(adj, kind) turns every edge into a type; add_node_dynamics and add_edge_dynamics add a share of the missing self-loops or reverse edges; dynamics_heatmap(adj, levels, n_repeats, method, random_state) returns drivers, sensors, loop_percent, sym_percent; connection_type_study(networks, method) tabulates the driver and sensor shares of every type; nocad.viz.plot_dynamics_heatmap draws the result.
The driver shares of three networks under every connection type:
nets = {"random (N=100)": make_random_network(100, 1.5, random_state=0).adj, "dolphins": load_network("dolphins").adj, "s208 circuit": load_network("s208").adj} table = connection_type_study(nets, method="minimum") print(table.pivot(index="type", columns="network", values="driver_share").round(3))
The comparison of the three network sets:
rows = [] for name in names: net = load_network(name) loops, sym = percent_loop_sym(net.adj) n = net.n_states row = {"network": name, "set": net.group, "N": n, "loops %": loops, "symmetric %": sym} for kind in ("a", "d", "e", "g"): G = nocad.apply_connection_type(net.adj, kind) row[f"drivers {kind}"] = nocad.n_driver_nodes(G, "minimum") / n row[f"sensors {kind}"] = nocad.sensor_nodes(G, "minimum").size / n rows.append(row) table = pd.DataFrame(rows)
A heat map:
net = load_network("celegans131") result = nocad.dynamics_heatmap(net.adj, levels=11, n_repeats=3, method="minimum", random_state=0) axes = plot_dynamics_heatmap(result, title="C. elegans frontal network (131 neurons)")
6.4 Examples
6.4.1 The seven types on three networks
Figure 6.2 shows the seven patterns. Applied to every edge of a sparse random network, the dolphin network and the s208 circuit (fig. 6.3), they change the share of driver nodes from 0.29, 0.31 and 0.24 (type a) to 0.21, 0.24 and 0.08 with self-loops on the targets or on both ends (types c and d), and to 0.07, 0.02 and 0.01 with interactions and self-loops (type g). Types c and d give the same counts: nodes without incoming edges are drivers anyway, and every other node receives a self-loop under both types. Type b leaves the sinks without self-loops, so more of them remain unmatched. For type b, path finding needs more driver nodes than the exact minimum (0.30 instead of 0.21 on the random network, 0.32 instead of 0.26 on the dolphins): many self-looped source nodes compete for the same unmatched nodes, the situation of fig. 3.6.
Open in ColabExample plot_01_connection_types.py in the gallery
6.4.2 Three network sets
The networks of Sets I and II have almost no self-loops and few symmetric edges, whereas most state matrices of Set III have self-loops on half or all of their states and symmetric patterns (fig. 6.4). Turning every edge into type g reduces the mean share of driver nodes of Set I from 0.32 to 0.02 and that of Set II from 0.34 to 0.02, with similar reductions for the sensors (fig. 6.5). The shares of Set III do not change at all. Their mean, 0.21, is dominated by four models whose state matrices are diagonal or block diagonal, the CD player, the ISS module, the transmission line and the FOM benchmark: each diagonal block is a separate source component and needs its own input, as proposition 6.2 predicts; the other models of Set III need a single input or very few.
6.4.3 Heat maps
The frontal network of C. elegans (131 neurons, 764 edges, 20% symmetric edges) needs twelve driver nodes as recorded (fig. 6.6). Self-loops alone reduce them only to ten, because most driver nodes sit on neurons without incoming edges; interactions alone bring them down to one, and so do both together, since the network is weakly connected. The dolphin network (62 nodes, stored with one direction per tie) behaves similarly (fig. 6.7): 19 driver nodes as stored, 15 with all self-loops, two with all interactions, one with both.
Open in ColabExample plot_03_dynamics_heatmap.py in the gallery
6.5 Further reading
The connection types and the three network sets are from Leitold, Vathy-Fogarassy and Abonyi [1]; the book [3] treats them in the broader context of network-based analysis of dynamical systems. Cowan et al. [55] showed earlier that self-loops (nodal dynamics) change the controllability of networks fundamentally, and the role of self-influence in process systems is discussed by Hangos and Cameron [26]. The Set III benchmarks are described by Chahlaoui and Van Dooren [54].