Data-driven control of complex networks

Our ability to manipulate the behavior of complex networks depends on the design of efficient control algorithms and, critically, on the availability of an accurate and tractable model of the network dynamics. While the design of control algorithms for network systems has seen notable advances in the past few years, knowledge of the network dynamics is a ubiquitous assumption that is difficult to satisfy in practice. In this paper we overcome this limitation, and develop a data-driven framework to control a complex network optimally and without any knowledge of the network dynamics. Our optimal controls are constructed using a finite set of data, where the unknown network is stimulated with arbitrary and possibly random inputs. Although our controls are provably correct for networks with linear dynamics, we also characterize their performance against noisy data and in the presence of nonlinear dynamics, as they arise in power grid and brain networks.

This manuscript was compiled on March 30, 2020 Our ability to manipulate the behavior of complex networks depends on the design of efficient control algorithms and, critically, on the availability of an accurate and tractable model of the network dynamics.While the design of control algorithms for network systems has seen notable advances in the past few years, knowledge of the network dynamics is a ubiquitous assumption that is difficult to satisfy in practice, especially when the network topology is large and, possibly, time-varying.In this paper we overcome this limitation, and develop a data-driven framework to control a complex dynamical network optimally and without requiring any knowledge of the network dynamics.Our optimal controls are constructed using a finite set of experimental data, where the unknown complex network is stimulated with arbitrary and possibly random inputs.In addition to optimality, we show that our data-driven formulas enjoy favorable computational and numerical properties even when compared to their model-based counterpart.Finally, although our controls are provably correct for networks with deterministic linear dynamics, we also characterize their performance against noisy experimental data and for a class of nonlinear dynamics that arise when manipulating neural activity in brain networks.
complex networks | dynamical systems | big data | data-driven control W ith the development of sensing, processing, and stor- ing capabilities of modern sensors, massive volumes of information-rich data are now rapidly expanding in many physical and engineering domains, ranging from robotics (1), to biological (2,3) and economic sciences (4).Data are often dynamically generated by complex interconnected processes, and encode key information about the structure and operation of these networked phenomena.Examples include temporal recordings of functional activity in the human brain (5), phasor measurements of currents and voltages in the power distribution grid (6), and streams of traffic data in urban transportation networks (7).When first-principle models are not conceivable, costly, or difficult to obtain, this unprecedented availability of data offers a great opportunity for scientists and practitioners to better understand, predict, and, ultimately, control the behavior of real-world complex networks.
Existing works on the controllability of complex networks have focused exclusively on a model-based setting (8)(9)(10)(11)(12)(13)(14), although, in practice, constructing accurate models of largescale networks is a challenging, often unfeasible, task (15)(16)(17).In fact, errors in the network model (i.e., missing or extra links, incorrect link weights) are unavoidable, especially if the network is identified from data (see, e.g., (18,19) and Fig. 1(a)).This uncertainty is particularly important for network controllability, since, as exemplified in Fig. 1(b)-(c), the computation of model-based network controls tends to be unreliable and highly sensitive to model uncertainties, even for moderate size networks (20,21).It is therefore natural to ask whether network controls can be learned directly from data,

Significance Statement
Manipulating the behavior of complex networks is necessary in critical situations ranging from the disruption of power generation in the grid, to the containment of spreading pathogens and the design of innovative treatments for neurological diseases.
To design targeted interventions, an accurate and tractable model of the network structure and dynamics is needed.Yet, such a model is typically too difficult to estimate or derive from first principles, thus limiting, or even preventing, the use of existing control strategies to manipulate any real complex network.
In this work we develop an alternative control framework, which relies on experimental data and does not require any model.We show that our data-driven controls are optimal, computationally reliable, and robust, especially for large networks.
and, if so, how well these data-driven control policies perform.
Data-driven control of dynamical systems has attracted increasing interest over the last few years, triggered by recent advances and successes in machine learning and artificial intelligence (22,23).The classic (indirect) approach to learn controls from data is to use a sequential system identification and control design approach.That is, one first identifies a model of the system from the available data, and then computes the desired controls using the estimated model (24).However, identification algorithms are sometimes inaccurate and timeconsuming, and several direct data-driven methods have been proposed to by-pass the identification step.These include, among others, (model-free) reinforcement learning (25,26), iterative learning control (27), adaptive and self-tuning control (28), and behavior-based methods (29,30).
The above techniques differ in the data generation procedure, class of system dynamics considered, and control objectives.In classic reinforcement learning settings, data are generated online and updated under the guidance of a policy evaluator or reward simulator, which in many applications is represented by an offline-trained (deep) neural network (31).Iterative learning control is used to refine and optimize repetitive control tasks: data are recorded online during the execution of a task repeated multiple times, and employed to improve tracking accuracy from trial to trial.In adaptive control, the structure of the controller is fixed and a few control parameters are optimized using data collected on the fly.A widely known example is the auto-tuning of PID controllers (32).Behaviorbased techniques exploit a trajectory-based (or behavioral) representation of the system, and data that typically consist of a single, noiseless, and sufficiently long input-output system trajectory (30).Each of the above data-driven approaches has its own limitations and merits, which strongly depend on the intended application area.However, a common feature of all these approaches is that they are tailored to or have been employed for closed-loop control tasks, such as stabilization or tracking, and not for finite-time point-to-point control tasks.
In this paper, we address the problem of learning from data point-to-point optimal controls for complex dynamical networks.Precisely, following recent literature on the controllability of complex networks (33,34), we focus on control policies that optimally steer the state of (a subset of) network nodes from a given initial value to a desired final one within a finite time horizon.To derive analytic, interpretable results that capture the role of the network structure, we consider networks governed by linear dynamics, quadratic cost functions, and data consisting of a set of control experiments recorded offline.Importantly, experimental data are not required to be optimal, and can even be generated through random control experiments.In this setting, we establish closed-form expressions of optimal data-driven control policies to reach a desired target state and, in the case of noiseless data, characterize the minimum number of experiments needed to exactly reconstruct optimal control inputs.Further, we introduce suboptimal yet computationally simple data-driven expressions, and discuss the numerical and computational advantages of using our datadriven approach when compared to the classic model-based one.Finally, we illustrate by means of a numerical study how our framework can be applied to control, and characterize the controllability properties of, functional brain networks.While the focus of this paper is on designing optimal control inputs, the expressions derived in this work also provide an alternative, computationally reliable, and efficient way of analyzing the controllability properties of large network systems.This constitutes a significant contribution to the extensive literature on the model-based analysis of network controllability, where the limitations imposed by commonly used Gramian-based techniques limit the investigation to small and well-structured networks (20,21).

Results
Network dynamics and optimal point-to-point control.We consider networks governed by linear time-invariant dynamics [1] where x(t) ∈ R n , u(t) ∈ R m , and y(t) ∈ R p denote, respectively, the state, input, and output of the network at time t.
The matrix A ∈ R n×n describes the (directed and weighted) adjacency matrix of the network, and the matrices B ∈ R n×m and C ∈ R p×n , respectively, are typically chosen to single out prescribed sets of input and output nodes of the network.
In this work, we are interested in designing open-loop control policies that steer the network output y(t) from an initial value y(0) = y0 to a desired one y(T ) = y f in T steps.If y f is output controllable (33,35) (a standing assumption in this paper), then the latter problem admits a solution and, in fact, there are many ways to accomplish such a control task.Here, we assume that the network is initially relaxed (x(0) = 0), and we seek the control input u 0: that drives the output of the network to y f in T steps and, at the same time, minimizes a prescribed quadratic combination of the control effort and locality of the controlled trajectories.
Mathematically, we study and solve the following constrained minimization problem: 1) and yT = y f , [2] where Q 0 and R 0 are tunable matrices * that penalize output deviation and input usage, respectively, and subscript •t 1 :t 2 denotes the vector containing the samples of a trajectory in the time window [t1, t2], t1 ≤ t2 (if t1 = t2, we simply write •t 1 ).If Q = 0 and R = I, then u 0:T −1 coincides with the minimum-energy control to reach y f in T steps (35).Eq. ( 2) admits a closed-form solution whose computation requires the exact knowledge of the network matrix A and suffers from numerical instabilities (Materials and Methods).In the following section, we address this limitation by deriving model-free and reliable expressions of u 0:T −1 that solely rely on experimental input/output data collected during the network operation.
Learning optimal controls from non-optimal data.We assume that the network matrix A is unknown and that N control experiments have been performed with the dynamical network in Eq. ( 1).The i-th experiment consists of generating and applying the input sequence u (i) 0:T −1 , and measuring the resulting output trajectory y (i) 0:T (Fig. 2(a)).Here, as in, e.g., (36), we consider episodic experiments where the network state is In all simulations the entries of the input data matrix U are normal i.i.d.random variables, and the input and output nodes are randomly selected.Target controllability is always ensured for all choices of input nodes by adding self-loops and edges that guarantee strong connectivity when needed.All curves represent the average over 500 realizations of data, networks, and input/output nodes.For additional computational details, see Materials and Methods.
reset to zero before running a new trial, and refer to the SI Appendix for an extension to the non-episodic setting.We let U0:T −1, Y1:T −1, and YT denote the matrices containing, respectively, the experimental inputs, the output measurements in the time interval [1, T − 1], and the output measurements at time T .Namely, An important aspect of our analysis is that we do not require the input experiments to be optimal, in the sense of Eq. ( 2), nor do we investigate the problem of experiment design, i.e., generating data that are "informative" for our problem.In our setting, data are given, and these are generated from arbitrary, possibly random, or carefully chosen experiments.By relying on the data matrices in Eq. ( 3), we derive the following data-driven solution to the minimization problem in Eq. (2) (see the SI Appendix): where L is any matrix satisfying T denotes a matrix whose columns form a basis of the kernel of YT , and the superscript symbol • † stands for the Moore-Penrose pseudoinverse operation (37).
Minimum number of data to learn optimal controls.Finite data suffices to exactly reconstruct the optimal control input via the data-driven expression in Eq. (4) (see the SI Appendix).In Fig. 2(c), we illustrate this fact for the class of Erdös-Rényi networks of Fig. 2(b).Specifically, the data-driven input û0:T −1 equals the optimal one u 0:T −1 (for any target y f ) if the data matrices in Eq. ( 3) contain mT linearly independent experiments; that is, if U0:T −1 is full row rank (Fig. 2

(c), left).
We stress that linear independence of the control experiments is a mild condition that is normally satisfied when the experiments are generated randomly.Further, if the number of independent trials is smaller than mT but larger than or equal to p, the data-driven control û0:T −1 still correctly steers the network output to y f in T steps (Fig. 2(c), right), but with a cost that is typically larger than the optimal one.In this case, û0:T −1 is a suboptimal solution to Eq. ( 2), which becomes optimal (for any y f ) if the collected data contain p independent trials that are optimal as well.
Data-driven minimum-energy control.By letting Q = 0 and R = I in Eq. ( 4), we recover a data-driven expression for the T -step minimum-energy control to reach y f .We remark that the family of minimum-energy controls has been extensively employed to characterize the fundamental capabilities and limitations of controlling networks, e.g., see (9,11,14).After some algebraic manipulations, the data-driven minimum-energy control input can be compactly rewritten as (see the SI Appendix) The latter expression relies on the final output measurements only (matrix YT ) and, thus, it does not exploit the full output data (matrix Y1:T −1).Eq. ( 5) can be further approximated as This is a simple, suboptimal data-based control sequence that correctly steers the network to y f in T steps, as long as p independent data are available.Further, and more importantly, when the input data samples are drawn randomly and independently from a distribution with zero mean and finite variance, Eq. ( 6) converges to the minimum-energy control in the limit of infinite data (see the SI Appendix).Fig. 3(a) compares the performance (in terms of control effort and error in the final state) of the two data-driven expressions in Eq. ( 5) and Eq. ( 6), and the model-based control as a function of the data size N .While the data-driven control in Eq. ( 5) becomes optimal for a finite number of data (precisely, for N = mT ), the approximate expression in Eq. ( 6) tends to the optimal control only asymptotically in the number of data (Fig. 3(a), left plot).In both cases, the error in the final state goes to zero after collecting N = p data In all simulations the entries of the input data matrix U are normal i.i.d.variables, and the input and output nodes are randomly selected.Target controllability is always ensured for all choices of input nodes by adding self-loops and edges that guarantee strong connectivity when needed.For additional computational details, see Materials and Methods.
(Fig. 3(a), right plot).For the approximate control in Eq. ( 6), we also establish upper bounds on the size of the dataset to get a prescribed deviation from the optimal cost in the case of Gaussian noise.Our non-asymptotic analysis indicates that this deviation is proportional to the worst-case control energy required to reach a unit-norm target.This, in turn, implies that networks that are "easy" to control require fewer trials to attain a prescribed approximation error (SI Appendix).
Numerical and computational benefits of data-driven controls.By relying on the same set of experimental data, in Fig. 3(b), we compare the numerical accuracy, as measured by the error in the final state, of the data-driven controls in Eq. ( 5) and Eq. ( 6) and the minimum-energy control computed via a standard two-step approach comprising a network identification step followed by model-based control design.We consider Erdös-Rényi networks as in Fig. 2(b) in which the state of all nodes can be accessed (C = I), and, to reconstruct the network matrices A and B, the subspace-based identification technique described in Materials and Methods.Data-driven strategies significantly outperform the standard sequential approach for both dense (Fig. 3(b), top) and sparse topologies (Fig. 3(b), bottom).This is not surprising because, independently of the network identification procedure, the standard two-step approach requires a number of operations larger than those required by the data-driven approach, resulting in an increased sensitivity to round-off errors.Nevertheless, it is interesting to note that the data-driven approach is especially effective for large, dense networks for which the standard approach leads to errors of considerable magnitude (up to approximately 10 2 ).A further advantage in using data-driven controls over model-based ones arises when dealing with massive networks featuring a small fraction of input and output nodes.Specifically, in Fig. 3(c) we plot the time needed to numerically compute the data-driven and model-based controls as a function of the size of the network.We focus on Erdös-Rényi networks as in Fig. 2(b) of dimension n ≥ 1000 with n/100 input and output nodes and a control horizon T = 50.The model-based control input requires the computation of the first T − 1 powers of A (Materials and Methods).The computation of the data-driven expressions in Eq. ( 5) and Eq. ( 6) involves, instead, linear-algebraic operations on two matrices (U0:T −1 and YT ) that are typically smaller than A (precisely, when T < n/m and N < n).Thus, the computation of the control input via the data-driven approach is normally faster than the classic model-based computation (Fig. 3(c), right).In particular, the data-driven control in Eq. ( 6), although suboptimal, yields the most favorable performance due to its particularly simple expression.Importantly, this computational speed-up does not come at the expense of accuracy.Indeed, the error in the final state achieved by the data-driven controls is approximately the same as the one achieved by the model-based strategy (Fig. 3

(c), right).
Data-driven controls with noisy data.The analysis so far has focused on noiseless data.A natural question is how the datadriven controls behave in the case of noisy data.Here, we consider data corrupted by additive i.i.d.noise with zero mean and known variance.† Namely, the available data read as [7] where Ū0:T −1, Ȳ1:T −1, ȲT denote the ground truth values and ∆U , ∆Y , and ∆Y T are random matrices with i.i.d.entries with zero mean and variance σ 2 U , σ 2 Y , and σ 2 Y T , respectively.In this setting, it can be shown that the data-driven control in Eq. ( 4) and the data-driven minimum-energy controls in Eq. ( 5) and Eq. ( 6) are typically not consistent; that is, they do not converge to the true control inputs as the data size tends to infinity (see SI Appendix for a concrete example).However, by suitably modifying these expressions, it is possible to recover asymptotically correct data-driven formulas (SI Appendix).The key idea is to add correction terms that compensate for the noise variance arising from the pseudoinverse operations.In particular, the asymptotically correct version of the datadriven controls in Eq. ( 5) and Eq. ( 6) read, respectively, as where we used the fact that X † = X T (XX T ) † for any matrix X (37), and N σ 2 U I and N σ 2 Y T I represent the noise-dependent correction terms.Note, in particular, that if the noise corrupts the output data YT only, then Eq. ( 8) coincides with the original data-driven control in Eq. ( 5), so that no correction is needed.Similarly, if the noise corrupts the input data UT only, then Eq. ( 9) coincides with the original data-driven control in Eq. ( 6).

Controlling functional brain networks via fMRI snapshots.
To demonstrate the potential relevance and applicability of the data-driven framework presented thus far, we investigate the problem of generating prescribed patterns of activity in functional brain networks directly from task-based functional magnetic resonance imaging (task-fMRI) time series.Specifically, we examine a dataset of task-based fMRI experiments related to motor activity and extracted from the Human Connectome Project (HCP) (41) (see Fig. 4(a)).In these experiments, participants are presented with visual cues that ask them to execute specific motor tasks; namely, tap their left or right fingers, squeeze their left or right toes, and move their tongue.We consider a set of m = 6 input channels associated with different task-related stimuli; that is, the motor tasks' stimuli and the visual cue preceding them.As in (38), we encode the input signals as binary time series taking the value of 1 when the corresponding task-related stimulus occurs and 0 otherwise.The output signals consist of minimally pre-processed blood-oxygen-level-dependent (BOLD) time series associated with the fMRI measurements at different regions of the brain (see also Materials and Methods).In our numerical study, we parcellated the brain into p = 148 brain regions (74 regions per hemisphere) according to the Destrieux 2009 atlas (39).Further, as a baseline for comparison, we approximate the dynamics of the functional network with a low-dimensional (n = 20) linear model computed via the approach described in (38), which has been shown to accurately capture the underlying network dynamics.
In Fig. 4(b), we plot the inputs (top) and outputs (center) of one subject for the first sequence of five motor tasks.The bottom plot of the same figure shows the outputs obtained by approximating the network dynamics with the above-mentioned linear model.In Fig. 4(c), we compare the performance of the minimum-energy data-driven control in Eq. ( 5) with the model-based one, assuming that the network obeys the dynamics of the approximate linear model.We consider a control horizon T = 150, form the data matrices in Eq. ( 3) by sliding a window of fixed size T over the available fMRI data, and consider a set of 20 orthogonal targets corresponding to eigenvectors of the estimated T -step controllability Gramian (see Materials and Methodsfor further details).The top plot of Fig. 4(c) reports the error (normalized by the output dimension) in the final state of the two strategies, while the bottom plot shows the corresponding control energy (that is, the norm of the control input).In the plots, the targets are ordered from the most (y f,1 ) to the least (y f,20 ) controllable.The datadriven and the model-based inputs exhibit an almost identical behavior with reference to the most controllable targets.As we shift towards the least controllable targets, the data-driven strategy yields larger errors but, at the same time, requires less energy to be implemented, thus being potentially more feasible in practice.Importantly, since the underlying brain dynamics are not known, errors in the final state are computed using the identified linear dynamical model.It is thus expected that data-driven inputs yield larger errors in the final state than model-based inputs, although these errors may not correspond to control inaccuracies when applying the data-driven inputs to the actual brain dynamics.Ultimately, our numerical study suggests that the data-driven framework could represent a viable alternative to the classic model-based approach (e.g., see (12,42,43)) to infer controllability properties of brain networks, and (by suitably modulating the reconstructed inputs) enforce desired functional configurations.

Discussion
In this paper we present a framework to control complex dynamical networks from data generated by non-optimal (and possibly random) experiments.We show that optimal pointto-point controls to reach a desired target state, including the widely used minimum-energy control input, can be determined exactly from data.We provide closed-form and approximate data-based expressions of these control inputs and characterize the minimum number of samples needed to compute them.Further, we show by means of numerical simulations that datadriven inputs are more accurate and computationally more efficient than model-based ones, and can be used to analyze and manipulate the controllability properties of real networks.
More generally, our framework and results suggest that many network control problems may be solved by simply relying on experimental data, thus promoting a new, exciting, and practical line of research in the field of complex networks.Because of the abundance of data in modern applications and the computationally appealing properties of data-driven controls, we expect that this new line of research will benefit a broad range of research communities, spanning from engineering to biology, which employ control-theoretic methods and tools to comprehend and manipulate complex networked phenomena.
Some limitations of this study should also be acknowledged and discussed.First, in our work we consider networks governed by linear dynamics.On the one hand, this is a restrictive assumption since many real-world networks are inherently nonlinear.On the other hand, linear models are used successfully to approximate the behavior of nonlinear dynamical networks around desired operating points, and capture more explicitly the impact of the network topology.Second, in many cases a closed-loop control strategy is preferable than a point-topoint one, especially if the control objective is to stabilize an equilibrium when external disturbances corrupt the dynamics.However, we stress that point-to-point controls, in addition to being able to steer the network to arbitrary configurations, are extensively used to characterize the fundamental control properties and limitations in networks of dynamical nodes.For instance, the expressions we provide for point-to-point control can also lead to novel methods to study the energetic limitations of controlling complex networks (9), select sensors and actuators for optimized estimation and control (44), and design optimized network structures (45).Finally, although we provide data-driven expressions that compensate for the effect of noise in the limit of infinite data, we do not provide non-asymptotic guarantees on the reconstruction error.Over-coming these limitations represents a compelling direction of future work, which can strengthen the relevance and applicability of our data-driven control framework, and ultimately lead to viable control methods for complex networks.

Materials and Methods
Model-based expressions of optimal controls.The model-based solution to Eq. ( 2) can be written in batch form as where ] is the T -step output controllability matrix of the dynamical network in Eq. ( 1), K Y T denotes a basis of the kernel of C T , and M is any matrix satisfying and 0 entries denoting p × m zero matrices.If Q = 0 and R = I (minimum-energy control input), Eq. ( 10) simplifies to u 0:T −1 = C † T y f .Alternatively, the minimum-energy input can be compactly written in terms of the T -step output controllability Gramian of the system in Eq. ( 1) Eq. ( 11) is the classic (Gramian-based) expression of the minimumenergy control input (35).It is well-known that this expression is numerically unstable, even for moderate size systems, e.g., see (20).If the data are noiseless, the system is controllable in T − 1 steps, and U 0:T −1 has full row rank, then this procedure provably returns correct estimates of A and B (46).Task-fMRI dataset, pre-processing pipeline, and identification setup.The motor task fMRI data used in our numerical study are extracted from the HCP S1200 release (41,47).The details for data acquisition and experiment design can be found in (47).The BOLD measurements have been pre-processed according to the minimal pipeline described in (40), and, as in (38), filtered with a band-pass filter to attenuate the frequencies outside the 0.06-0.12Hz band.Further, as common practice, the effect of the physiological signals (cardiac, respiratory, and head motion signals) is removed from the BOLD measurements by means of the regression procedure in (38).

Subspace
The data matrices in Eq. ( 3) are generated via a sliding window of fixed length T = 150 with initial time in the interval [−140, 10].We assume that the inputs and states are zero for times less than or equal to 10, i.e., the instant at which the first task condition is issued.We approximate the input-output dynamics with a linear model with state dimension n = 20 computed using input-output data in the interval [0, 200] and the identification procedure detailed in (38).Computational details.All numerical simulations have been performed via standard linear-algebra LAPACK routines available as built-in functions in Matlab ® R2019b, running on a 2.6 GHz Intel Core i5 processor with 8 GB of RAM.In particular, for the computation of pseudoinverses we use the singular value decomposition method (command pinv in Matlab ® ) with a threshold of 10

Fig. 1 .
Fig. 1.The effect of model uncertainty in the computation of optimal network controls.Panel (a) shows a schematic of a classic network identification procedure.The reconstructed network is affected by estimation errors δij .Panel (b) illustrates the error in the final state induced by an optimal control design based on the reconstructed network.In panel (c), we consider minimum-energy controls designed from exact and incorrectly reconstructed networks, and compute the resulting error in the final state as the network size n varies.We consider connected Erdös-Rényi networks with edge probability p = ln n/n + 0.1, 10 randomly selected control nodes, control horizon T = 2n, and a randomly chosen final state x f .Each curve represents the average of the error in the final state over 100 random realizations.To mimic errors in the network reconstruction process, we add to each edge of the network a disturbance modeled as an i.i.d.random variable uniformly distributed in [−δ, δ], δ > 0. To compute minimum-energy control inputs, we use the classic Gramian-based formula and standard LAPACK routines (see Materials and Methods).

Fig. 2 .
Fig. 2. Experimental setup and optimal data-driven network controls.Panel (a) illustrates the data collection process.With reference to the i-th control experiment, a T -step input sequence u (i) 0:T excites the network dynamics in Eq. (1), and the time samples of the resulting output trajectory y (i) 0:T are recorded.The input trajectory u (i) 0:T may be generated randomly, so that the final output y (i) (T ) does not normally coincide with the desired target output y f .Panel (b) shows a realization of the Erdös-Rényi graph model G(n, p) used in our examples, where n is the number of nodes and p is the edge probability.We set the number of nodes to n = 100, the edge probability to p = ln n/n + ε, ε = 0.05, to ensure connectedness with high probability, and normalize the resulting adjacency matrix by a factor √ n.Panel (c) shows the value of the cost function (left) and the error in the final state (right) for the data-driven input in Eq. (4) and the model-based control, as a function of the number of data points.We choose Q = R = I, n = 100, T = 10, m = 5, and p = 20, and consider Erdös-Rényi networks as in panel (b).In all simulations the entries of the input data matrix U are normal

Fig. 3 .
Fig. 3. Performance of minimum-energy data-driven network controls.Panel (a) shows the value of the cost function (left) and the error in the final state (right) for the minimum-energy data-driven control inputs in Eq. (5), Eq. (6), and the model-based one as a function of the number of data N .We consider Erdös-Rényi networks as in Fig.2(b) with ε = 0.05, and n = 100, T = 10, m = 5, p = 20.In Panel (b), we compare the error in the final state of the data-driven approach (Eq.(5), Eq. (6)), and the classic two-step approach (identification and model-based control design) as a function of the network size n.We use the subspace-based identification procedure described in Materials and Methods, Erdös-Rényi networks as in Fig.2(b) with two different edge densities, and parameters T = 40, m = n/10, n = p, N = mT + 10.The curves in panels (a) and (b) represent the average over 500 realizations of data, networks, and input/output nodes, and the light-colored regions in panel (b) contain the values of all realizations.Panel (c), left, compares the time needed to compute the optimal controls via data-driven and model-based strategies as a function of the network size, for one realization of the Erdös-Rényi network model and data.Panel (c), right, shows the errors in the final state.We use the following parameters: ε = 0.05, m = n/100, p = n/50, T = 50, and N = mT + 100.In all simulations the entries of the input data matrix U are normal i.i.d.variables, and the input and output nodes are randomly

Fig. 4 .
Fig. 4. Data-driven control of functional brain networks.Panel (a) provides a schematic of the experimental setup.A set of external stimuli represented by m different task commands induce brain activity.Functional magnetic resonance (fMRI) blood oxygen level dependent (BOLD) signals are measured and recorded at different times and converted into p time series, one for each brain region.The top and center heatmaps of panel (b) show the inputs and outputs, respectively, for the first 110 measurements of one subject of the HCP dataset.The inputs are divided into m = 6 channels corresponding to different task conditions, i.e., CUE (a visual cue preceding the occurrence of other task conditions), LF (squeeze left toe), LH (tap left fingers), RF (squeeze right toe), RH (tap right finger), and T (move tongue).As in (38), each input is a binary 0-1 signal taking the value 1 when the corresponding task condition is issued and 0 otherwise.The outputs represent the BOLD signals of the p = 148 brain regions obtained from and enumerated according to the Destrieux 2009 atlas (39).These outputs have been minimally pre-processed following standard techniques (40) as detailed in Materials and Methods.The bottom heatmap of panel (b) displays the simulated outputs obtained by exciting the approximate low-dimensional linear model of (38) with the input sequence of the top plot.In panel (c), we compare the performance of the data-driven and model-based strategy, assuming that the dynamics obey the above-mentioned approximate linear model.We set the control horizon to T = 150 and generate the data matrices by sliding a time window of size T across the data samples.The target state y f,i is the eigenvector associated with the i-th eigenvalue of the empirical Gramian matrix ŴT = ĈT T ĈT , where ĈT = Y T U † 0:T −1 .The top plot shows the error to reach the

2 F , [ 12 ] 2 F,
-based system identification.Given the data matrices U 0:T −1 and Y T as defined in Eq. (3) and assuming that C = I, a simple deterministic subspace-based procedure (46, Ch. 6) to estimate the matrices A and B from the available data consists of the following two steps: 1. Compute an estimate of the T -step controllability matrix of the network as the solution of the minimization problem ĈT = arg min C T Y T − C T U 0:T −1 where • F denotes the Frobenius norm of a matrix.The solution to Eq. (12) has the form ĈT = Y T U † 0:T −1 .2. In view of the definition of the controllability matrix, obtain an estimate of the matrix B by extracting the first m columns of ĈT .Namely, B = [ ĈT, ] :,1:m , where [X] :,i:j indicates the sub-matrix of X obtained from keeping the entries from the i-th to j-th columns and all of its rows.An estimate of the matrix A can be obtained as the solution to the least-squares problem Â = arg min A [ ĈT ] :,m+1:mT − A [ ĈT ] :,1:(T −1)m which yields the matrix Â = [ ĈT ] :,m+1:mT [ ĈT ] † :,1:(T −1)m .

− 8 .
Materials and data availability.Data  were provided (in part) by the Human Connectome Project, WU-Minn Consortium (Principal Investigators: David Van Essen and Kamil Ugurbil; 1U54MH091657) funded by the 16 NIH Institutes and Centers that support the NIH Blueprint for Neuroscience Research; and by the McDonnell Center for Systems Neuroscience at Washington University.The code used in this study is freely available in the public GitHub repository: https://github.com/baggiogi/data_driven_control.