Structural Invertibility and Optimal Sensor Node Placement for Error and Input Reconstruction in Dynamic Systems

Despite recent progress in our understanding of complex dynamic networks, it remains challenging to devisesufficiently accurate models to observe, control or predict the state of real systems in biology, economics or other fields. A largely overlooked fact is that these systems are typically open and receive unknown inputs from their environment. A further fundamental obstacle are structural model errors caused by insufficient or inaccurate knowledge about the quantitative interactions in the real system. Here, we show that unknown inputs to open systems and model errors can be treated under the common framework of invertibility, which is a requirement for reconstructing these disturbances from output measurements. By exploiting the fact that invertibility can be decided from the influence graph of the system, we analyse the relationship between structural network properties and invertibility under different realistic scenarios. We show that sparsely connected scale free networks are the most difficult to invert. We introduce a new sensor node placement algorithm to select a minimum set of measurement positions in the network required for invertibility. This algorithm facilitates optimal experimental design for the reconstruction of inputs or model errors from output measurements. Our results have both fundamental and practical implications for nonlinear systems analysis, modelling and design.


I. INTRODUCTION
Dynamic systems in such diverse areas like physics, biology, economics or engineering are often composed of many interacting components.Developing useful and sufficiently accurate models of such complex dynamic networks having many degrees of freedom remains challenging [1][2][3][4] despite the ever increasing size of network data sets providing the wiring diagrams of diverse systems [5][6][7][8].
One important challenge for modelling real dynamic networks is that they are open systems receiving inputs from their environment, see Fig. 1.These inputs need to be either known or under experimental control to fully characterise the dynamic state of the network.For example, a biological cell is a system with a certain autonomy, but at the same time is crucially dependent on signals and nutrients received from the exterior.It is practically impossible to simultaneously detect or control all signals received by a living cell in their natural environment and to measure all compounds exchanged with the extracellular space.As another example, consider a population dynamic system in a certain geographical area.The state, i.e. the population count of the different species in this area, is not only determined by the inner dynamic interactions (e.g.pray and predator relationships) between the species, but also by migration and by environmental factors.Again, for state estimation it is typically neither feasible to directly quantify all these inputs nor is * kschischo@rheinahrcampus.de it possible to ignore them.The same applies to physical, engineering, or economic systems, which will always be subject to inputs and disturbances from the environment.
If the inputs to the system cannot directly be obtained, then we might want to infer the inputs from the measurable outputs.For the biological cell, we can try to estimate the transport fluxes across the membrane and the signals received by the cell from time series of measured protein concentrations.For a population, the number of certain species will be monitored and we will try to estimate dynamic changes of birth and migration rates for other, not directly observed species.Algorithms to estimate the inputs from the outputs of systems described by ordinary differential equations (ODEs) are an ongoing research topic, see e.g.[9][10][11][12][13][14][15].However, no such algorithm can succeed, if the output doesn't provide sufficient information about the input.Mathematically, this means that the map from input to output is not invertible and thus, systems inversion is bound to fail.
The situation is illustrated in Fig. 2(a), where a hypothetical system is represented by an influence graph.The nodes correspond to the systems states x = (x 1 , . . .x 11 ) and the black arrows indicate the endogenous interactions amongst them.The open system receives three input signals w(t) = (w 1 (t), w 2 (t), w 3 (t)) (wiggly arrows) from its exosystem, targeting the set S = {x 3 , x 5 , x 8 } of three input nodes.
The output signal y(t) = (y 1 (t), y 2 (t), y 3 (t)) in Fig. 2(b) is formed by measuring the time course of the sensor node set Z = {x 2 , x 4 , x 9 }, i.e.y 1 (t) = x 2 (t), y 2 (t) = x 4 (t) and y 3 (t) = x 9 (t).Nonetheless, these output observations are insufficient to uniquely reconstruct the corresponding input signals.Indeed, the two different input signals (Fig. 2(c,d)) gen- erate identical outputs (solid and dahed lines Fig. 2(b)) and both reproduce the data points with good accuracy.Thus, the system is not invertible.The lack of invertibility can be remedied by a careful experimental design.In the example of Fig. 2, the system can be made invertible by measuring the state y 3 (t) = x 6 (t) instead of x 9 (t), compare Fig. 2(a) and (e).As explained below, the modified output from the sensor node set Z = {x 2 , x 4 , x 6 } provides sufficient information to uniquely identify the input signal in Fig. 2(c) as the cause for the observed data (Fig. 2(f)).This example highlights the need for a sensor node placement algorithm for invertibility of open systems, which is one important result of this text.
Systematic model errors are another important source of potential discrepancies between measurements and model outputs.One type of model errors is caused by an incorrect influence graph, i.e. by missing or spurious interactions between the state variables (Fig. 1).Another type of model errors originates from misspecifications of the functional form or parameters of the interactions.However, both types of these endogenous model errors can effectively be treated as unknown inputs to the model system at hand, see Sec.II.As for genuine exogenous inputs, a unique reconstruction of these unknown inputs caused by endogenous model errors is again only possible if the systems model is invertible.
In contrast, the invertibility of open systems has not sufficiently been investigated in the context of large complex dynamic systems.Work in controllabity and observability of complex networks builds on older results from the control engineering literature [17], providing algebraic and graphical conditions for both traits.The situation is similar for invertibility: Theorems providing algebraic conditions for the invertibility of linear systems were already published in the 1960s [35][36][37] and later extended to nonlinear systems [38][39][40][41].These algebraic conditions require a full specification of the ODE system including all the parameters.Even in the rather exceptional case, where these data are available, the numerical test of these conditions is computationally very demanding for large networks.Fortunately, invertibility is a structural property [42,43], which can for all practical purposes be inferred from the influence graph and the input and output node sets S and Z (see Fig. 2).This structural invertibility condition (see Sec. III) can efficiently be tested even for very large linear or nonlinear systems with thousands of state nodes.
In this text, we add invertibility as a systems property which is essential for understanding open and incompletely known systems.As our main new contributions we x 5 x 6 x 9 x 8 x 11 x 10 y 1 x 8 x 11 x 10 y 1 • show that unknown inputs to open systems and structural model errors can be treated under the the same conceptual framework (Sec.II); • establish invertibility as a necessary condition for unknown input observers and input reconstruction algorithms to work (Subsec.III G); • provide a new recursive algebraic criterion for invertibility (Subsec.III C); • discover important structural network properties influencing invertibility (Sec.IV); • provide a simple but efficient algorithm for sensor node placement to achieve structural invertibility with a minimum number of measured outputs (Sec.V).
First we show, that structural model errors in nonlinear dynamic system can be treated as unknown inputs (Sec.II).Thus, the question of whether it is possible to reconstruct model errors and unknown inputs to open systems can be treated under the common framework of invertibility.Second, we provide a novel criterion for the invertibility of linear systems, which can be used for medium sized networks up to a few hundred state nodes due to its recursive nature (Sec.III).For large systems we exploit the structural invertibility criterion, which uses only the graph structure encoded in the interactions of the system.We will also briefly touch upon the topic of practical systems inversion, which requires careful regularisation schemes even for invertible systems.Throughout this text, we will consider three different scenarios (SC I-III).Scenario SC I refers to the case, that the positions of the inputs and outputs of the system are given and that we have no opportunity to deliberately choose these positions (Sec.IV).For SC I we show that invertibility depends largely on the degree distribution of the influence graph and that many sparse and scale free networks tend to be non-invertible.Since many real networks show this characteristics, we assume in scenario SC II, that the inputs are given, but the output positions can be chosen.As an important result we present a sensor node placement algorithm in Sec.V, which provides a minimum set of outputs required to uniquely reconstruct the inputs.This algorithm is also useful in scenario SC III, where we assume that the positions of both inputs and outputs can be manipulated.We show that placing the inputs at hubs with a high out-degree can drastically increase the probability that a certain dynamic network can be made invertible, if in addition the outputs are suitably chosen, e.g. by our sensor node placement algorithm.In Sec.VI we discuss the far reaching implications of invertibility for nonlinear systems analysis and some open questions for further research.

II. OPEN SYSTEMS, UNKNOWN INPUTS AND MODEL ERRORS
There are two basic reasons for discrepancies between observed time series data from a real world open system and the output of a mathematical model for the system: First, the system might receive unknown inputs [12-14, 34, 44, 45] from the environment, which are not covered by the model, but nevertheless influence the state and the resulting measured output.Second, there might be model errors, i.e. misspecified functional descriptions or missing interactions between internal model states or inaccurate parameter values.In this section, we define open systems with unknown inputs and then show that for ODE models, both types of error can be treated as additive unknown inputs to the model.

A. Open systems with unknown inputs
Consider a dynamic system S o with time dependent state vector x(t) = (x 1 (t), . . ., x N (t)) T ∈ X .The state space X is either R N , a subset of it, or an N -manifold.A dynamic model of the open system can be formulated as a system of ordinary differential equations (ODEs) The vector field f (x) = (f 1 (x), . . ., f N (x)) T represents the internal dynamic interactions between the state variables.In addition, the system receives M unknown inputs, which are collected in the vector function The N × M matrix D describes, how the unknown input signals are distributed over the N states x.The rows of D provide information about the inputs acting on the respective state.Zero rows correspond to states which are not directly affected by model errors.As discussed below, the unknown input w incorporates genuine inputs from the exterior as well as all possible types of model errors, including incorrect interactions between internal states x and incorrect parameter values.The unknown input aka model error w needs to be estimated from data.This would not be a problem, if the internal system state x(t) could directly be measured.However, typically only a smaller set of P scalar output signals is directly accessible to measurements.The map from the state to the output is here assumed to be given by the function c (x).We assume that both f and c satisfy a Lipschitz condition.In addition, the initial state x 0 needs to be specified.
v It is often useful to represent systems of the form in Eq. ( 1) as an influence graph, see Fig. 2(a) for an example.The nodes of this directed graph correspond to the states x i , i = 1, . . ., N , and the edges represent the interactions encoded by f .More precisely, a directed edge x i → x j indicates, that ∂fj ∂xi = 0 for some x in the state space X .The state nodes targeted by unknown inputs are determined by the nonzero rows of the matrix D. Please note, that these input nodes are sometimes also called driver nodes, in particular in the context of control.In the special case were each unknown input component w k , k ∈ {1, 2, . . ., M } affects only one state node we can choose each element D ik to be either zero or one and we have and as indicated in Fig. 2

B. Model errors and unknown inputs
We now show that the unknown input function w(t) in Eq. (1) can represent both the effect of an exterior dynamic system to our open system S o and the effect of structural model errors in f , i.e. erroneous descriptions of the interactions between the internal state variables.
Let us start with a closed system S modelled by where only the internal dynamics of the system is described, but unknown inputs are not taken into account.
In reality, however, the system S might be embedded into a larger system (see Fig. 1) and interact also with external state variables ξ(t) = (ξ 1 (t), . . ., ξ Ne (t)) T , which are not included in the model in Eq. (11).Instead, the joint dynamics of the system S and its exterior should rather be described by The function φ combines the effect of interactions between internal states x and the effect of the external states ξ on the dynamics of the internal states.The dynamics of the external system is determined by ψ, which is usually not known and thus difficult to include in the model.This unknown dynamics leads to the structural model error η, which can formally be defined as the discrepancy between the model in Eq. (11) and the system Eq.(12a) Thus, instead of explicitly extending the simpler model Eq.(11) to the potentially complicated joint system Eq.( 12), we could correct the former by adding an unknown input to obtain Replacing η(t) = Dw(t) in Eq. ( 15) leads to Eq. ( 1).
Let us illustrate the relationship between model errors and unknown inputs by a simple concrete example.Consider the following model for a protein cascade [46] and assume that Eq. 16c in the model is misspecified.Instead, assume that the correct description is with a time dependent function a(t).Thus, the degradation of x 3 is an enzyme catalysed reaction with a time dependent affinity a(t), which can not be described by the mass action term in Eq. 16c.In addition, the affinity a(t) is controlled by an exogenous regulatory process, which is not covered by the model in Eq. ( 16).The model error (compare Eq. ( 13)) is given by a(t)+x3(t) and D = (0, 0, 1, 0) T .If the correct relationship in Eq. ( 17) is unknown, we can replace Eq. (16c) by ẋ3 (t) = x 2 (t) − x 3 (t) + w 1 (t) (18) and treat w 1 (t) as an external input, which needs to be estimated from measurement data.An example for such an unknown input estimate is provided in Subsec.III G.
If the unknown input function w(t) can uniquely be reconstructed from the output signal y(t), we call the system invertible.An algebraic criterion to check for invertibility of a system was first derived for linear systems [37], see Subsec.III D for details.An algorithm to invert the system, which terminates in the case of a noninvertibility, was also first devised for the linear case [36], but later extended [38] to nonlinear affine models of the form given in Eq. (1).Another type of results is based on differential geometric or differential algebraic criteria for the invariant control distributions [39][40][41].All these criteria involve algebraic manipulations of the systems equations, which makes them useful for smaller models, but limits their utility for large networks.In addition, the invertibility tests require a full specification of the system (Eq.( 1)), including the complete functional form and the parameters of the interaction terms encoded by f .
Here, we state the exact mathematical definition for invertibility of dynamic systems [38].Then, we provide a new recursive algorithm to check invertibility for linear systems, which might be easier to apply to systems of moderate size, in contrast to the mathematically equivalent algebraic rank condition [37].However, for large networks, the structural invertibility algorithm has the huge advantages of scaling to large systems and of only requiring the topology of the influence graph.Invertibility is only a necessary condition and the robustness of unknown input reconstruction to measurement noise might be influenced by other factors than just the network structure.We briefly touch upon this important problem, discuss the role of regularisation and provide a simple, but illustrative example for an unknown input estimate.

A. Invertibility
Mathematically, invertibility means that the map from the unknown input signal w to the output y is injective, which can be expressed as [38]: Definition 1.The system (1) is invertible at the initial state x 0 , if two distinct input signals w(t) and w(t) always induce two distinct outputs y(t) = ỹ(t).If the system is invertible in an open neighbourhood of x 0 , it is called strongly invertible at x 0 .The system is strongly invertible, if there exists a dense submanifold M of X , such that the system is strongly invertible for any x 0 ∈ M.

For linear systems
with a real N × N matrix A and an P × N output matrix C, all the three definitions are equivalent [38], since invertibility at some x 0 ∈ R N implies invertibility at all points in their state space X = R N .Such linear systems are typically obtained as local approximations of the nonlinear model in Eq. ( 1), where A and C are given by the Jacobi matrices of f and c, respectively, taken at a certain reference point.For linear systems (Eq.( 19)), invertibility is a global property and thus it is sufficient to consider the initial condition x 0 = 0.Then, the input-output map Φ is given by the linear operator The linear system is invertible, if this operator is one-toone.Below, we state two different versions of an algebraic criterion to decide invertibility for linear systems.More details on the three criteria are given in the Appendix.Here, we only motivate the structure of the algebraic criteria below: Taking successive time derivatives y (l) (t) of the output (Eq.( 20)), for l ∈ {1, 2, . ..} and evaluating at t = 0, we obtain the sequence of linear equations Invertibility implies, that we can solve these linear equations uniquely for w (l) (0) for given y (l) (0), or, equivalently, that y (l) (0) = 0 implies w (l) (0) = 0. Basically, the two equivalent algebraic criteria in Subsecs.III D and III C provide conditions for unique solutions of this system.

B. Invertibility versus Unknown Input Observability
Let us clarify the relationship between unknown input observability and invertibility.The notion of unknown input observability is not uniquely defined in the literature.Some authors call a system unknown input observable, if the state is completely or partially observable even in the presence of unknown inputs (see e.g.[47]).This weaker definition does not necessarily imply that the unknown input itself can be reconstructed.Other authors define unknown input observability in the stricter sense that both the systems state as well as the unknown input can be inferred from the outputs [44].
Invertibility or structural invertibility ensures, that the unknown input can uniquely be reconstructed from the vii output.It does not necessarily imply that the system state can simultaneously be observed [44].Only if the initial state x 0 is known, then invertibility is not only necessary but also sufficient for simultaneous state and input observability.
It is only recently, that a general algorithm for testing the weaker form of unknown input observability of nonlinear systems exists [47].This algorithm is based on symbolic computation and thus restricted to very small systems with only a few state variables.

C. Recursive Algebraic Criterion for Invertibility of Linear Systems
For the first version of the algebraic criterion we define a sequence of block matrices which appear in the derivatives of the output (Eq.( 21)).
Each matrix R l in the sequence has P rows and (l + 1)M columns.Recall, that P was the number of measurement signals and M the number of unknown inputs.For each matrix R l in the sequence, the null space is defined as In addition, we recursively define the following sets Here, "×" indicates the cartesian product of two sets.Now we can state the invertibility criterion: The linear system in Eq. ( 19) is invertible, if and only if K l is the empty set ∅ for some l ≤ N − 1.
To apply this criterion we have to calculate the null spaces of all R l and then iteratively to evaluate the sequence of sets K l , starting from l = 0.The iteration terminates if K l = ∅ for some l ≤ N − 1, indicating invertibility.If no such l can be found, the system is not invertible.

D. Rank Condition for Invertibility of Linear Systems
The iterative criterion above is equivalent to the following algebraic rank condition proofed by Sain and Massey [37]: Consider the sequence of matrices for l ∈ N 0 .The linear system in Eq. ( 19) is invertible, if and only if rank As before, N is the number of states in the system and M the number of inputs.Thus, the criterion requires to compute the rank of two matrices.The size of these matrices increases quadratically with the number of states N in the system.Such rank computations can be very memory intensive for large networks with many nodes.It is worthwhile remarking on an interesting property of invertibility.For an invertible system, the null space of the operator Φ is zero dimensional, containing as its single element the zero input w(t) ≡ 0. For a noninvertible system, the null space of Φ is always infinite dimensional (see Lemma 1 in the Appendix).This means that for non-invertible systems there are infinitely many independent inputs which cannot be distinguished from each other.This shows, that there is no such thing like "nearly invertible".Thus, any algorithm attempting to infer the inputs for the outputs is bound to fail without further assumptions about the inputs.Assumptions like smoothness and sparsity of the input signals can be encoded into these inversion algorithms by using suitable regularisation schemes [12] or Bayesian priors [13].However, even these additional smoothness and sparsity assumptions restricting the domain of the input-output map are not always sufficient for invertibility [12].

E. Graphical Criterion for Linear and Nonlinear Systems
The quite intricate algebraic conditions can be replaced by a simple graphical criterion [43], see Fig. 3. Recall, that in the influence graph g each state variable x i is represented as a node and the edges are determined by the adjacency matrix A: For each A ji = 0 draw an directed edge i → j.Now assume, that the columns of the input matrix consist only of a subset of M canonical basis vectors e k ∈ R N .Thus D ik ∈ {0, 1} with k D ik ∈ {0, 1}.Then, the nonzero rows of D indicate the states receiving an input signal.Denote these M input nodes as Similarly, we assume that the output matrix C has only P rows which are a subset of the canonical basis of R P and thus C ji ∈ {0, 1} with j C ji ∈ {0, 1}.Then, the nonzero columns of C indicate the output or sensor nodes i.e. the state nodes for which direct measurements are available.Now, the graphical criterion can be stated as follows: The linear system in Eq. ( 19) is structurally invertible, if and only if there is a family Π of M directed paths in the influence graph g fulfilling the following conditions (i) Each path in Π starts in S and terminates in Z.
(ii) All paths of Π are pairwise node-disjoint.In the following, we will call the triplet (S, g, Z) consisting of the influence graph g, the input node set S and the output node set Z invertible, if the structural invertibility criterion is fulfilled.
To put it differently: There must be a family Π of directed paths in g connecting each input node in S with an output node in Z and no two paths in the family intersect at any node of the influence graph.If no such family of node-disjoint paths exists, the systems is structurally non-invertible.For the example graphs in Fig. 2(a,b), this path condition is illustrated in Fig. 3(a,b) for the non-invertible (a) and invertible case (b), respectively.Obviously, a system with fewer output nodes than input nodes is never invertible.This intuitive graphical condition implies, that only the structure of the influence graph and the position of the inputs and outputs, i.e.only the patterns of nonzero entries in the systems matrices A, D, and C, are rel-evant for invertibility [43].Indeed, structural invertibility and algebraic invertibility coincide up to pathological cases, where the graphical condition could indicate structural invertibility, whereas none of the algebraic conditions would be fulfilled due to an exact cancellation of numerical terms.These pathological conditions are irrelevant in practice, since any arbitrarily small numerical perturbation of one of the nonzero terms in the systems matrices would repair invertibility.Or, in mathematical language: The set of systems matrices A, D, and C, for which the graphical and the algebraic conditions give contradictory results is a set of measure zero.The situation is completely analogous to the structural and algebraic controllability or observability conditions [17][18][19]43].
The structural invertibility condition was extended to nonlinear systems of the form in Eq. (1), see [42] for details.This means, that we can replace the matrix A by the Jacobi matrix of f and the output matrix C by the Jacobi matrix of c at some point of the state space X to obtain the systems graph and the output node set Z. Thus, the structural properties of the linearisation of Eq. ( 1) are also sufficient to detect the invertibility of a nonlinear system.There is one subtlety for nonlinear systems: The structural invertibility condition does not imply regularity of the system, which is relevant for feedback systems, see [42] for further details.

F. Structural Invertibility Algorithm
The graphical criterion for (structural) invertibility requires to count the number of node-disjoint paths connecting the input nodes S with the output nodes Z.Counting all these paths in a combinatorial manner is not feasible for larger systems.Thanks to the Max-Flow-Min-Cut-Theorem [43,48,49], the graphical node disjoint path counting problem can be reformulated as flow problem, which can efficiently be solved.
As an initial step of the algorithm, the influence graph g is transformed to a corresponding flow graph G by copying each node i to separate the ingoing and outgoing edges (see Fig. 4).Now, a familiy Π of node-disjoint paths in the original graph g corresponds to a family of edge-disjoint paths in G.In a second step, an additional source node σ is connected to each of the input nodes and an additional sink node ζ is connected to each of the output nodes.If each edge in the resulting graph G is assigned a weight of 1, the maximum flow from source σ to sink ζ in G equals the number of edge-disjoint paths from source to sink, and thus the number of node-disjoint paths from S to Z in the original graph g.In our implementation we use the Goldberg-Tarjan algorithm [50] to efficiently compute the maximum flow.Several alternative algorithms exist in the combinatorial optimisation literature, see e.g.[49].
To analyse the computational complexity of the structural invertibility algorithm, let N and E be the number of nodes and edges in the original graph g.As before, we denote the number of input nodes by M and the number of sensor nodes by P .In directed graphs the number of edges is limited by E ≤ N 2 .For large networks we can assume M ≈ P << N .To create the flow graph G, n = 2N + 2 nodes and e = N + E + M + P edges are created.On G we use the Goldberg-Tarjan algorithm with running time scaling like O(n 2 √ e) to compute the maximum flow.All together we find that the structurally invertibility algorithm has a running time of O(N 3 ).Please note that there are even more efficient optimised versions of the Goldberg-Tarjan algorithm with better running time [49], but for all our purposes the standard version was sufficient.
Our implementation is based on the python networkx package.On a single node of an Intel Xeon Processor E5-2690 v2 we need an average time of 0.15 ± 0.03 seconds for a network with N = 10 3 nodes and 2.4 ± 0.4 seconds for N = 10 4 nodes to decide structural invert-ibility.

G. Practical invertibility and robustness
Invertibility (or structural invertibility) is a necessary condition for the unique reconstruction of unknown inputs w(t) from outputs y(t).If the input-output map Φ defined by the general system in Eq. ( 1) is invertible, the operator equation y = Φw (28) for given y = y(t) has a unique solution w(t) and the inverse operator Φ −1 exists.
In reality, we have to reconstruct the unknown input w from measured output data y data , which will always be subject to measurement errors and noise.Therefore, the data based estimate ŵ = Φ −1 y data will differ from the true input w = Φ −1 y.For a discontinuous inverse operator Φ −1 , the difference between ŵ and w can be drastic.Unfortunately, the inverse operator of the general nonlinear system Eq.( 1) is not continuous.Thus, estimating the unknown input from real data remains an ill posed problem [51,52], even if the system is invertible and Φ −1 exists.
The underlying reason for the discontinuity of the inverse input-output operator Φ −1 of the linear system (Eq.( 19)) is a well known theorem from the theory of inverse problems (see e.g.[51,52]): Linear compact operators with an infinite dimensional range cannot have a continuous inverse.The linear input-output operator Eq. ( 20) corresponding to the linear system in Eq. ( 19) is an integral operator and thus it is compact and has infinite range, as shown in the Appendix (Theorem 1).For nonlinear operators, a similar theorem states that completely-continous operators with infinite range cannot have a continuous inverse.This indicates, that the inverse of the nonlinear system Eq.( 1) cannot be continuous.
The degree of discontinuity of the inverse to the linear compact operator in Eq. ( 20) can be quantified by means of the singular value decomposition (SVD).Since Φ has an infinite dimensional range, its SVD is an infinite series.The infinite series (σ k ), k = 1, 2, . . . of singular values is usually ordered by decreasing magnitude (σ k+1 ≥ σ k ).The smaller singular values determine the response of Φ −1 to high frequency components of y data and are thus responsible for the discontinuity of the inverse.Thus, it is in principle possible to quantify the degree of discontinuity by the speed of decay of the sequence (σ k ).The problem in Eq. ( 28) is considered to be mildly ill-posed, if the sequence of singular value (σ k ) decays at most with polynomial speed, whereas it is called severely ill-posed, if (σ k ) decays faster than any polynomial [51].However, this approach is not straightforward to implement, because it requires computing the spectrum of the gramian operator Φ * Φ, where Φ * is the adjoint of Eq. (20).In addition, it is not yet clear x whether the SVD can also be useful for the inverse nonlinear input-output operator corresponding to nonlinear system Eq.( 1), possibly after a suitable linearisation.This is certainly beyond the scope of this text and we leave this as an interesting direction for further research.
Please note, that the situation for invertibility is different from that of controllability or observability [24,[27][28][29][30][31][32][33], where the corresponding gramian matrices correspond to operators with finite dimensional range.Consequently, there is a smallest singular value which can be used as the condition number characterising the degree of controllability or observability, respectiveley.

Regularisation of Unknown Inputs
There are several algorithms for estimating the unknown input w from measurement data, ranging from feedback controllers via modifications of the nonlinear Kalman filter to moving horizon estimation [9][10][11][12][13][14][15].We can not discuss all these approaches here, but it is instructive to briefly discuss a simple version of the optimisation based approach, where an error functional J[w] is minimised with respect to w(t).This leads to the following optimal control problem minimize Here, d quantifies the fit of the corrected model output y to the data y data .A typical choice is the squared error Usually, one has discrete time measurements y data (t k ) at time points t k ∈ [0, T ], k = 0, 1, . . ., n and the discrete time squared error in the second row is used instead of the integral.If the components of the output function have very different magnitudes, it is often also useful to use a weighted squared error.In addition, for zero mean gaussian measurement noise y data − y, the squared error corresponds to the log-likelihood function [52].
The regularisation term R[w] in Eq. ( 29) can be chosen to penalise overly complex input functions w(t).The regularisation parameter α ≥ 0 provides a way of balancing the data fit (d) with the complexity of the estimated function w(t).There are several ways to select the regularisation parameter.One useful idea is known as the discrepancy principle [52], where the regulation parameter is chosen such that the data error d is approximatl y equal to the level of measurement noise.
Even for invertible systems the regularisation is necessary, because the unregularised least squares fit (α = 0) will be very sensitive to measurement errors, again a symptom of the discontinuity of the inverse input-output operator Φ −1 corresponding to Eq. ( 1).Typical choices for the regularisation function are which penalises the squared 2-norm of the unknown input w or which penalises the norm of the first derivative ẇ.
These two examples are known as Tikhonov regularisation in function spaces [52].For linear operators like the Eq. ( 20), the effect of the regularisation is to suppress the effect of small singular values.There are many more possible choices for regularisation terms, e.g.sparsity promoting regularisation [12].Often, regularisation terms are also chosen to render the optimisation problem convex, which avoids problems with local minima [53].

Example for an unknown input estimate
In our computational experiments we found the regularisation of the derivative as in Eq. ( 30) to yield good results for the case of additive measurement noise, where y data − y is a zero mean stochastic disturbance of the output measurement.This is illustrated in Fig. 5 for the model of a protein cascade [46] ẋ1 (t) = −0.2x 1 (t) + w 1 (t) with known initial value We generated synthetic data by solving the system of ODEs for a given input function w(t) acting on the input nodes S = {x 1 , x 3 } and adding gaussian noise to the output, see Fig. 5(a,b).We then tried to recover the input from the noisy output data by solving the regularised optimal control problem in Eqs. ( 29) and (30).If the measurement nodes are Z = {x 3 , x 4 }, the measured output data can accurately be fitted (Fig. 5(b)), but the recovered inputs 5(c) do not correspond to the true inputs.The reason is that the system with the output nodes Z = {x 3 , x 4 } is not structurally invertible.For the sensor node set Z = {x 2 , x 4 }, the system is structurally invertible and the solution of the optimal control xi problem (Eqs.( 29) and ( 30)) provides a reconstruction of the inputs from the noisy measurements, see Fig. 5(df).In particular, the magnitude of the estimate for w 1 is very small and differs from the true unknown input w 1 = 0 only due to transient effects of the numerics and measurement noise.This simple example illustrates again the importance of structural invertibility as a prerequisite for systems inversion.As discussed above, the accuracy of the estimates can vary with the degree of continuity of the inverse input-output operators, which itself depends on the functional form and on the specific parameters of the ODE.However, structural invertibility is a necessary requirement to estimate unknown inputs or model errors.Therefore, we will focus on structural aspects of invertibility in the remainder of this text.

IV. STRUCTURAL INVERTIBILITY OF COMPLEX NETWORKS
It is natural to ask whether certain network properties affect structural invertibility.It has been shown previously, that important systems properties including controllability [18], observability [19] or target controllability [20] are related to network structure, see [21,22] for reviews.
In this section we will explore the invertibility of large simulated and real networks using the very efficient structural invertibility algorithm from Subsec.III F. To mimick scenario SC I, where we have no influence on the choice of the input and output nodes, we will first use a uniform random sampling scheme for the selection of both node sets.Later, we will investigate the effect of hubs on invertibility and study the preferential selection of hubs as input or output nodes.
A. Invertibility of random and scale free networks under uniform sampling (scenario SC I) Intuitively, a densely connected network allows to find many node-disjoint paths connecting the input node set S to the output node set Z. Thus, for a set of randomly selected input nodes S and a disjoint set of randomly selected output nodes Z, the chance for invertibility should increase with the average degree d of the network g.
To test this hypothesis, we simulated graphs with N = 10 3 nodes using either Erdős-Rényi random graphs [54] or scale-free networks [55,56] with varying average degree d.Throughout these simulations, we used M = P , i.e. the same number of input and output nodes.For a given graph g, we first sampled a set S of M input nodes uniformly at random and then randomly sampled the set Z of P output nodes from the remaining nodes, such that the input and output node sets are disjoint: S ∩ Z = ∅.We will refer to this sampling scheme for inputs and outputs as uniform random sampling, which simulates scenario SC I.Then, we used the structural invertibility algorithm to check whether the resulting network represents the influence graph of an invertible or a non-invertible system (Eq.( 20)).To estimate the probability ρ = ρ( d, N, M ), that a graph with N nodes, M = P inputs and outputs and average degree d is invertible under this random scheme, we sampled 100 triples of (S, g, Z) of different graphs and input/output node sets and counted the relative frequency of structurally invertible systems represented by these graphs.
As can be seen in Fig. 6(a), the probability of invertibility for Erdős-Rényi random graphs increases indeed monotonously with the average degree d.For small d, almost no graph is invertible, whereas for large d almost all graphs are invertible.These two regimes are separated by a transition zone, where some networks are invertible and others are not.In this transition zone, invertibility depends on the specific characteristics of the random graph and the average degree is not sufficient to decide about invertibility.For more inputs and outputs (increasing M = P ), the transition zone moves towards higher d.This is plausible, because a family of M = P node disjoint paths Π connecting the input and the output sets S and Z cannot be found in sparse networks with a small overall number of paths.We found empirically, that for M = P the function ρ = ρ( d, N, M ) attains an asymptotic limit ρ( d, M ) for large networks with a given average degree (N → ∞ and d fixed).
Scale-free networks offer another network topology induced by a power law degree distribution P (k) ∝ k −γ that has been observed to be the underlying structure of many real networks [55,56].Scale-free networks have a tendency for a few highly connected hubs and many weakly connected satellites.The effect of this heterogeneity is not immediately obvious: On the one hand, the hubs act as bottlenecks, that shrink the chance of finding node-disjoint paths.On the other hand, the diameter of scale-free networks is much smaller than the diameter of Erdős-Rényi random graphs [57]; hence paths are shorter and might possibly find their way to the output set Z, before they intersect.
The python networkx package was used to do the simulations.For the Erdős-Rényi graphs g = g(N, p) we used fast gnp random graph.We implemented the static model from [56] to generate scale-free graphs g = g( d, N, γ).Here, N is the node number, p the probability, that an edge in the Erdős-Rényi graph exists, d is the average degree and γ the exponent in the power law degree distribution.As before we drew 100 graphs, distributed M = P input and output nodes uniformly over each graph, and took ρ as the fraction of structural invertible graphs.For a given number of inputs and outputs, the transition zone for scale free networks (see Fig. 6(b)) is broader in comparison to Erdős-Rényi systems.In scale free networks, increasing the number of inputs and outputs has a more drastic effect on diminishing the chance for invertibility, as can be seen from the larger gaps between the different curves in Fig. 6 29) and ( 30)) provides accurate fits to the data (red line).(c) However, the estimates of the unknown inputs (red lines) are incorrect (dashed lines indicate the true inputs), because the system is not structurally invertible.(d) The system is structurally invertible, if y1 = x2 and y2 = x4 are measured.(e,f) The fit to the measurements in (e) is now sufficient to estimate the unknown inputs in (f).Please note also the different scale of the plots for in (c) and (f).All values are understood in arbitrary units.pared to Fig. 6(a).For the same average degree d, one is less likely to sample an invertible combination of inputs and outputs in a scale free network than in a homogenous Erdős-Rényi random graph.Thus, under the uniform random placement scheme (scenario SC I) of inputs and outputs, hubs are typically detrimental for invertibility.

B. The role of the degree distribution
To explore the effect of the degree distribution on invertibility, we compared the scale free E.coli metabolic network [58] to an ensemble of simulated scale free networks.The E.coli metabolic network has an estimated power law exponent of γ = 2.61 and an average degree of d = 11.17.We used the static model and the same parameters to simulate the ensemble of 100 scale free xiii (a) (b) Figure 6.The structural invertibility of (a) Erdős-Rényi random graphs and (b) scale free networks (power law exponent γ = 2.4) depends on the average node degree d.For each data point, an ensemble of 100 networks with N = 10 3 nodes was simulated and disjoint sets of M = P input and output nodes were chosen by uniform random sampling.Each network was tested for structural invertibility and the fraction ρ of invertible networks in the ensemble was recorded.For large networks with many nodes N → ∞ and fixed average degree d, the function ρ( d, N, M ) asymptotically approaches ρ( d, M ).We found empirically that N = 10 3 is a good approximation for this asymptotic regime.
(a) (b) (c) networks.We selected 100 input and output node sets for the E.coli network using uniform random sampling (scenario SC I) and computed the fraction ρ of invertible systems as a function of the number M = P of in-and outputs.The uniform random sampling scheme was also applied to each of the 100 simulated scale free graphs.Intriguingly, we found that the probability for invertibility ρ is higher in the simulated networks than in the E.coli metabolic network, see Fig. 7(a).In addition, we performed a degree-preserving randomization (rand-Degree) [59] to all networks (E.coli and simulated) and found that this doesn't change ρ, up to small sampling deviations (see next Subsec.IV C).In this degree-preserving randomization, the in-degree d in (number of incoming edges) and the out-degree d out (number of outgoing edges) of each node is preserved, but the nodes which link to each other are randomly selected.
In Fig. 7(b,c) we have plotted d out versus d in for the E.coli metabolic network (b) and a typical simulated scale free network (c).It can be seen, that the E.coli network has many more high degree nodes with a large difference d out − d in between out-and in-degree.This asymmetry is by construction much smaller in the simulated networks.These results indicate, that the joint distribution of in-and out-degrees P (d in , d out ) largely determines the probability of finding an invertible system Figure 8. Preferential sampling of hubs as input nodes (blue) or output nodes (orange) for an ensemble of 300 scale free networks (N = 500, M = P = 10, γ = 2.4).The blue triangles show the fraction of invertible networks, when the M = 10 nodes with highest degree are chosen as input nodes and the P = 10 output nodes are sampled uniformly from the remaining N − M = 490 nodes.Conversely, for the orange symbols, the P = 10 nodes with highest degree were chosen as outputs and the inputs were uniformly sampled from the remaining N − P = 490 nodes.The black dots were obtained for the same uniform random scheme as in Fig. 6, were both inputs and outputs were sampled uniformly (scenario SC I).
under the uniform input-output sampling scheme (scenario SC I).
To further explore the role of hubs in networks with a more symmetric assignment of in-and output nodes, we modified the uniform random scheme.Instead of uniform sampling (see IV A), we now ranked all the state nodes according to their degree and selected the M nodes with the highest degree as input set S. The P = M output nodes Z were again uniformly sampled from the remaining nodes.As can be seen from Fig. 8, this preferred selection of hub nodes as inputs can drastically increase the probability of invertibility in scale free networks.A less drastic improvement can also be observed, when the high degree nodes are used as outputs and then the input nodes are uniformly sampled.

C. Invertibility of real networks under uniform sampling of inputs and outputs (scenario SC I)
In addition to the E.coli metabolic network, we tested a compilation of real networks (Table I) for invertibility under the uniform input-output sampling scheme (scenario SC I).Again, we estimated the probability of invertibility ρ as a function of the number of in-and output nodes M = P , see Fig. 9(a).Here, we observe a ranking with the (not scale-free) Intraorganizational networks on top, with the highest chance for structural invertibility, followed by the (scale-free) biological E.coli and C.elegans networks.Many of the remaining networks are much larger, with N > 10 5 nodes, and have a higher average degree.Nevertheless, the chance to find a structural invertible in-and output configuration under the uniform sampling scheme is vanishingly small already for M = P ≈ 5 for many real networks in this compilation.Thus, in these networks, it is typically difficult to reconstruct unknown inputs or model errors, if the outputs nodes are chosen randomly and the inputs can not be selected.These results are robust under a degreepreserving randomisation [59], where the nodes linked to each other are randomly selected, but the in-degree d in and out-degree d out of each node is preserved (Fig. 9(b)).
To summarise, we find that invertibility under the uniform random scheme (scenario SC I) depends mainly on the joint distribution of in-and out-degree.Dense and homogeneous networks tend to be invertible, while sparse and scale-free networks provide a smaller chance to reconstruct structural model errors and hidden inputs.As emphasised by the results for real networks, more efficient ways to select sensor nodes or inputs are required.The positive effects of the preferential selection of hubs, either as inputs or outputs, hint at possible ways to improve the chance for invertibility under different scenarios, where only outputs (SC II) or both input and output (SC III) nodes can deliberately be selected.

V. SENSOR NODE PLACEMENT FOR INVERTIBILITY
Whilst the uniform random scheme (scenario SC I) provides some insights into the effects of network properties on invertibility, it is not a very efficient strategy to randomly place the sensor nodes over the network.
A second, more realistic scenario (SC II) is the following: Assume, we have observed a systematic discrepancy between the output measurements and the model and we want to infer the unknown inputs (or model errors).Assume further, that the input node set S is given, either from domain knowledge about the respective system or from educated guessing about possible positions for input signals or model errors.However, the system might not be invertible with the current output node set.Typically, we know which states could in principle be measured and we can define a maximum set Z 0 of potential sensor nodes.If the resulting system with the maximum output set Z 0 is invertible, one can start the acquisition of time series data and feed them into one of the algorithms [9][10][11][12][13][14][15]. to infer the input.This approach, though straightforward, would potentially be wasteful or even impractical.In domains like biology or economics, measurements might in principle be possible, but costly or take a great deal of time.Thus, a more feasible approach is to reduce this excessive effort by selecting a minimum set of sensor nodes from the maximum set Z 0 .
A similar sensor node placement problem for state observability [19,44] has been investigated before.In this  I, the disjoint sets of M = P in-and ouput nodes were obtained by uniform random sampling (scenario SC I).This was repeated 100 times for each M and the fraction ρ of structural invertible graphs was estimated.(b) Comparison of ρ from (a) to the probability of invertibility after a degree-preserving randomization (ρ rand ).Note that some of the symbols are exactly masking each other.In this randomisation, the in-and out-degree of each node is preserved and the nodes linked to each other are randomly selected [59].Table I.A compilation of networks from various fields, also examined by other authors ( [19]).Here N is the number of nodes and |E| the number of edges.The column "Scale free" indicates whether the degree distribution shows a power law and if so, the power law exponent γ was computed.
section, we present a very simple but efficient greedy algorithm to select a minimum set of sensor nodes for invertibility for a given fixed set of input nodes (scenario SC II).This algorithm can drastically improve the chances for invertibility, as we will demonstrate by comparing to uni-form random sampling for scenario SC I. Finally, we will also investigate a third scenario SC III, where the input nodes can also be selected.Let us formalise the scenario SC II motivated above: The influence graph g for dynamic system (19) including a set S of M potential input nodes is assumed to be given.In addition, we have an initial maximum set of P 0 potential output or sensor nodes.Thus, Z 0 incorporates all systems states which could potentially be monitored.If the system with S as given input set and Z 0 as maximum output set is not invertible, then there is no way to reconstruct the inputs from the outputs.However, if invertibility is ensured for Z 0 , then we want to reduce this maximum set to a smaller, potentially minimal subset Z * ⊆ Z 0 with P * outputs, which is still invertible, given the inputs S.
From the structural invertibility theorem (see Subsec.III E) we know that the smallest output set has at least as many nodes as the input set.Thus, we will always have P * ≥ M .For small sets Z 0 , it might be possible to try all P0 M possible subsets of M nodes from the maximum set Z 0 .However, this brute force strategy becomes quickly infeasible, if P 0 is large.Reducing P 0 from the beginning is usually also not an option, since the maximum sensor node set Z 0 needs to provide an invertible system, which might not be the case for small sets.
A practical solution is given by a simple greedy algorithm, which assumes that the triple (S, g, Z 0 ) containing the maximum node set Z 0 is invertible.To initialise the algorithm, we assume that the nodes are in some random order in Z 0 .In the first iteration, we select the first node z from Z 0 and try to delete it, but only if (S, g, Z 0 \ z) with P 0 −1 sensor nodes is still invertible.If not, we keep z in the node set Z 1 := Z 0 , i.e. we reject the deletion of this node.Otherwise we delete the node by setting Z 1 := Z 0 \ z.In any case, we continue and try to delete a different node, say the next node in Z 1 .We proceed in this way until we have a sensor node set Z k with P k = M output nodes and set Z * = Z k .This algorithm takes at most P 0 − M steps.Note, that the greedy algorithm will always find a minimum node set with the minimum number P * = M of sensor nodes, provided (S, g, Z 0 ) with the initial node set Z 0 is invertible.
In Fig. 10 we present an example for a network with N = 1000 nodes and M = 100 uniformly sampled input nodes.All other nodes were included in the maximum output set Z 0 , i.e.P 0 = 900.The algorithm takes 598 iterations to find a minimum node set Z * with P * = 100.The number of iterations can be reduced by replacing the random removal of output nodes by a more selective satellite-deletion strategy.By ranking the nodes in Z 0 according to their degree and selectively removing nodes with low degree shrinks the (invertible) output set much faster than random deletion.Reversing the order of the ranking, i.e. trying to selectively delete hubs from the set of sensor nodes results in more rejections and thus Figure 10.The greedy algorithm for optimal sensor node selection for invertibility applied to a network with N = 1000 state nodes, and M = 100 randomly distributed inputs.From the remaining 900 nodes, the maximum output set Z0 with P0 = 700 potential sensor nodes was randomly chosen.The plot compares the number of sensor nodes P versus the number of iterations of the greedy algorithm for random-, satellite-, and hub-deletion strategies.more iterations (Fig. 10).This is consistent with the results from (Fig. 8), were we found that preferential selection of high degree output nodes improves the chance for invertibility.Please note, that the greedy algorithm is usually fast enough for most purposes, even without ranking the nodes.This analyses merely serves to better understand the role of hubs as inputs or outputs.

B. Application to real networks
The sensor node placement algorithm can only be successful, if the maximum sensor node set Z 0 (together with the given input node set) yields an invertible system.Larger Z 0 , i.e. a larger number P 0 of potentially measurable outputs, will obviously increase the chances for invertibility and thus also the chance to find a minimum sensor node set Z * of cardinality P * = M .Apart from directly measuring all possible nodes, the largest possible nontrivial sensor node set Z 0 is given by the N − M nodes which are not input nodes.We used this Z 0 with P 0 = N − M to check the compendium of real networks (Table I) for invertibility.
For the results in Fig. 11(a), we sampled M input nodes S uniformly from all nodes and then selected Z 0 as the remaining N − M nodes (scenario SC I with the largest possible Z 0 ).We repeated this over 100 randomly sampled input sets S and estimated the fraction ρ of invertible systems (S, g, Z 0 ).Thus, ρ provides an estimate for the probability to obtain a structurally invertible system (for a given graph g) under scenario SC II, where the M input nodes S are given and cannot be chosen, but all the other nodes can in principle be measured.This is then identical to the fraction of systems, where the sensor node algorithm can reduce this initial sensor node set Z 0 to a minimum set Z * with P * = M outputs.By comparing Fig. 11(a) with Fig. 9(a) we can observe, that this strategy improves (in some cases drastically) the chances to find an invertible system.For better visibility see also Fig. 11(b), where we have plotted the difference ∆ρ between optimal sensor node placement in Fig. 11(a) and uniform output sampling Fig. 9(a).

C. Input node selection
So far we have assumed the input node set S as given.To mimick this frequent situation that the input nodes can not deliberately be selected, we performed uniform random sampling of the input nodes.However, there might be situations where we can influence the selection of inputs (scenario SC III).For the design of communication networks, the ability to uniquely distinguish different input signals is clearly a requirement and input node sets are often deliberately chosen [76].Another example is given by the modular approach to model building, where one aims to describe a subsystem (or module) by a system of ODEs [1,2].This module will by definition receive inputs from the environment (see Fig. 1), which might not be directly measurable.Then, invertibility to infer these inputs from outputs is clearly an important requirement, which might influence decisions about the right state variables to include in the subsystem.
Based on the results of Fig. 8 we hypothesised that hubs with a high node degree are good candidates for inputs promoting invertibility.To test this hypothesis, we used again the networks listed in Table I.For each network g, we selected the M nodes with highest outdegree as input node set S. As before, we used the re-maining N − M nodes as maximum sensor node set Z 0 .If (S, g, Z 0 ) is invertible, the sensor node selection algorithm can always reduce this to (S, g, Z * ) with a minimum node set Z * having only P * = M outputs.Starting from M = 1 we increased the number of input nodes for each network one by one as long as the corresponding system (S, g, Z 0 ) was invertible.The maximum number M max of inputs for each network is shown in Fig. 12, together with the probability of invertibility for the other scenarios using the uniform random scheme (data from Fig. 9(a)) and the sensor node placement algorithm (data from Fig. 11(a)).Please note, that for this hub input selection strategy all systems with M < M max inputs are invertible.Clearly, the hub input selection strategy provides a way to increase the number of input signals which can still reconstructed in these networks.

VI. SUMMARY AND OPEN QUESTIONS A. Summary and significance of the results
Reconstructing unknown inputs from outputs of open systems is useful in many settings.For modellers, the inputs provide important information about model errors and cues for model improvement or extension [12,13,34].In biomedical systems, the unknown inputs can represent unmodelled environmental or physiological inputs, which might be interesting for the design of devices or measurement strategies.In electrical or secure networks, the unknown inputs could be attack signals, which need to be reconstructed and then mitigated.Unknown inputs can also be useful for improved state estimation [12][13][14] and data assimilation [53,77].Thus, from the viewpoint of modellers and engineers, invertibility is a desirable prop-  I with three different node selection schemes as a function of the number of inputs.Scenario SC I, where neither inputs nor outputs can be selected, was simulated by uniform random sampling of input and output nodes (same data as in Fig. 9(a)).In scenario SC II we are able to select the output nodes and the results for the optimal sensor node placement from Fig. 11(a) are included for comparison.Under scenario scenario SC III, we can select both, input and output nodes.We used hub input selection (selection of nodes with highest out-degree) in combination with optimal sensor node placement and found that ρ is either one or zero.The numbers on the right indicate the maximum number Mmax of inputs which still provide an invertible system.erty for open systems.In this work, we have focused on structural invertibility, which has the two advantages of (i) only requiring topological network information and (ii) being testable even for large networks using the structural controllability algorithm.
Although invertibility is desirable from an applied and analytic perspective, our results for an uniform random input selection scheme indicate that invertibility cannot be taken for granted, especially not in networks with low average degree, many inputs and with a scale free degree distribution.Thus, under the scenario SC I, were neither inputs nor outputs can deliberately be chosen, many real networks have a disposition to mask differences between different input signals.It is well known that for example some dynamic biological systems respond often identically or similarly to a variety of different stimuli.Thus, living dynamic systems often distinguish different patterns rather than small differences in the inputs.In addition, real systems need to have a certain robustness against small perturbations and noise.Thus, invertibility is possibly not always a desirable property for the specific tasks to be performed by the network.Further research is needed to investigate tradeoffs between invertibility and other network traits, like e.g.controllability or robustness.Nevertheless, non-invertibility poses a challenge for experimentalists and modellers to reconstruct structural model errors and inputs from the environment.
We approached this problem by deriving an efficient sensor node placement algorithm, which extracts a minimum set of measurement nodes required for invertibility of a given network with a given input set (scenario SC II).In this scenario, the sensor node placement algorithm facilitates optimal experimental design for the reconstruction of inputs from outputs.As such, it can be used in conjunction with input reconstruction algorithms [9][10][11][12][13] and input observers [14,15].Structural invertibility pro-xix vides a necessary condition for these algorithms to work.
In a third scenario SC III we assumed that both inputs and outputs can be selected.We found that selecting nodes with a high out-degree as input nodes, in combination with optimal output selection using the sensor node placement algorithm, drastically increases the number of inputs which can still be reconstructed from output measurements.Intuitively, these input hubs distribute the input signal widely over the network, therefore increasing the likelihood for finding node disjoint paths linking these inputs to the outputs.Although scenario SC III, where input nodes can deliberately be selected, might not always be realistic, it can be useful for the design of dynamic mathematical models or for the design of synthetic systems.For example, a key goal of Synthetic Biology is to engineer new biological systems for desired functionalities.In general, these systems are embedded in larger systems and will receive inputs from their environment, which should be inferable from measurements.In this case, optimal input selection in conjunction with optimal sensor node placement can provide important benefits.Another example is modular modelling, were an interesting subsystem embedded in a larger system is modelled in detail [1,2].To detect both potential model error or genuine inputs from the environment to the model, invertibility is essential.To achieve invertibility, it might be useful to include additional states which otherwise would not be deemed to be essential to understand the modular subsystem.

B. Limitations and open questions
Purely structural approaches to controllability and observability have been criticised to sometimes provide suboptimal conclusions for real systems.Depending on the quantitative properties of the interactions between the state nodes, a system might be practically uncontrollable or unobservable, even if the structural criteria are fulfilled [24][25][26][27][28][29][30][31][32][33].Non-binary indices quantifying the degree of controllability and observability have been devised.These indices require at least the algebraic structure of the coupling functions between the state nodes [32] or even the full functional form and the parameters of the network [29].
A similar caveat applies to structural invertibility, which is only a condition for the existence of the inverse input-output map.As in any inverse problem [52], this might not be sufficient to actually implement this inverse map for reconstructing unknown inputs (including model errors) from outputs.Some unknown input signals might be hard to detect by noisy sensors with limited sensitivity.As discussed in Subsec.III G, these issues are related to the mathematical fact that the inverse of the compact input-output map is not continuous.Devising an index or condition number for the degree of invertibility (or continuity of the inverse) is therefore an important question for future research.Such an invertibility index might be used to rank sensor nodes, which could readily be utilised in a straightforward modification of our sensor node placement algorithm (Sec.V).The desired invertibility index might also be useful for improving or designing unknown input reconstruction algorithms [9][10][11][12][13][14][15], which adapt their regularisation automatically to the degree of discontinuity of the inverse input-output map.
A further potential objection against structural invertibility is that the influence graph has to be completely known.Indeed, if the aim is to assess invertibility of the true but unknown systems structure, we might obtain erroneous results if we use an incorrect influence graph with missing or spurious edges.However, the aim of systems inversion is to detect unknown inputs including systematic model errors.Missing or spurious interactions in the incorrect model graph are therefore causes of unknown inputs.To reconstruct the model errors, it is important that our potentially incorrect or incomplete model is invertible.
Currently, our invertibility results are limited to deterministic systems described by ODEs.However, the definition of invertibility doesn't exclude stochastic unknown unput functions.Nonlinear extensions of the Kalman-Filter [9][10][11] or fully probabilistic approaches [13] to reconstruct the moments or even the full probability distribution of the unknown input will only work for invertible systems.Their actual utility to simultaneously overcome the discontinuity of the inverse input-output map and to estimate probabilistic features of unknown inputs should systematically be explored.
Invertibility of systems with intrinsic process noise, which are often described by stochastic differential equations (SDEs), is a largely unexplored field.First, a modified probabilistic definition of invertibility is required for systems governed by SDEs.Second, the role of the different sources of noise for the invertibility needs to be investigated.Recent results for stochastic synchronisation [78,79] indicate, that noise can have both, detrimental and beneficial effects.It would be exciting to investigate, whether similar effects are possible for unknown input reconstruction.
To conclude, invertibility (or the lack of it) has important implications for modelling frameworks and strategies to deal with incomplete and uncertain systems.Our analysis and algorithm for optimal experimental design are only a first step towards more sophisticated methods specifically tailored to handle systematic model errors and open systems.We belive that these approaches will increase our ability to better understand and manipulate complex systems, even if our knowledge will not be complete.

Figure 1 .
Figure 1.Schematic illustration of an open system and its environment.(a) The open system (blue shadowed region) interacts with its dynamic environment.The state (black nodes) of the open system is determined by both internal interactions and by the interactions with the (unknown) state of the environment (grey nodes).There are also systematic model errors, as indicated by a missing interaction between state variables (green dashed line).(b) Both the effects of the environment on the state of the open system and model errors can be regarded as unknown inputs.

Figure 2 .
Figure 2. Invertibility of a dynamic system.(a) The influence graph represents the states x = (x1, . . ., x9) of a system as nodes (circles).Endogenous interactions are indicated by arrows between the states.This system receives three input signals w(t) = (w1(t), w2(t), w3(t)) (wiggly arrows) targeting the input nodes S = {x3, x5, x8}.The output y(t) = (y1(t), y2(t), y3(t)) (squares) is given by measurements of the state variables in the sensor node set Z = {x2, x4, x9}.(b) The measured output data (dots) of the open system can be explained by different input signals (c,d) causing identical outputs, as indicated by the dotted line for input (c) and by the solid line for input (d).Thus, the system is not invertible.(e) For Z = {x2, x4, x6}, i.e. if the sensor for the output y3 is moved to state x6 instead of x9 (compare (a)), we obtain an invertible system and the input signal in (d) is unique for the observed output in (f).

Figure 4 .
Figure 4.An example for the structural invertibility algorithm counting the number of node-disjoint paths connecting the input node set S = {x1, x2} with the output node set Z = {x3, x4, x5}.The influence graph g is transformed into the graph G by replicating each of the state nodes x1, . . ., x5 to x + 1 , . . ., x + 5 and x − 1 , . . ., x − 5 , thereby separating the ingoing and outgoing edges.A family of node-disjoint paths in g corresponds to a family of edge-disjoint paths in G.Then, an additional source node σ is connected to the inputs and an additional sink node ζ to the outputs and edge weights of 1 are added to G. The maximum flow from σ to ζ corresponds to the number of node-disjoint paths from S to Z in g.

Figure 5 .
Figure 5. Estimation of unknown inputs to a simple protein cascade.(a) The influence graph of the system in Eq. (31) with input nodes S = {x1, x3} and output nodes y1 = x3 and y2 = x4.(b) The model output for the system without unknown inputs (blue) can not reproduce the observed data (dots with error bars for measurement noise).Solving the regularised optimisation problem (see Eqs. (29) and (30)) provides accurate fits to the data (red line).(c) However, the estimates of the unknown inputs (red lines) are incorrect (dashed lines indicate the true inputs), because the system is not structurally invertible.(d) The system is structurally invertible, if y1 = x2 and y2 = x4 are measured.(e,f) The fit to the measurements in (e) is now sufficient to estimate the unknown inputs in (f).Please note also the different scale of the plots for in (c) and (f).All values are understood in arbitrary units.

Figure 7 .
Figure 7. Effect of the degree distribution on invertibility under the uniform random scheme.(a) The fraction of structural invertible input-output configurations for the E.coli metabolic network (black dots) is compared to an ensemble of scale free random networks with the same power law exponent γ = 2.61 and the same average degree d = 11.17.(b,c) The out-degree versus the in-degree for the E.coli metabolic network (b) and a typical scale free network (c).

xvFigure 9 .
Figure 9. Structural invertibility of real networks.(a) The probability of invertibility under the random scheme.For each network in TableI, the disjoint sets of M = P in-and ouput nodes were obtained by uniform random sampling (scenario SC I).This was repeated 100 times for each M and the fraction ρ of structural invertible graphs was estimated.(b) Comparison of ρ from (a) to the probability of invertibility after a degree-preserving randomization (ρ rand ).Note that some of the symbols are exactly masking each other.In this randomisation, the in-and out-degree of each node is preserved and the nodes linked to each other are randomly selected[59].

xviiFigure 11 .
Figure 11.The sensor node placement algorithm can increase the probability of invertibility ρ, if the input node set is given (scenario SC II).(a) The input node set was again uniformly sampled.All other nodes were considered as potential maximum output node set Z0.In case of invertibility, the sensor node placement algorithm can reduce Z0 to a minimum sensor node set Z * with P * = M outputs.(b) The difference ∆ρ between the probability of invertibility ρ in (a) and the uniform random selection scheme used in Fig.9(a) to highlight the improvement.

Figure 12 .
Figure 12.A heatmap comparing the probability of invertibility ρ for the networks in TableIwith three different node selection schemes as a function of the number of inputs.Scenario SC I, where neither inputs nor outputs can be selected, was simulated by uniform random sampling of input and output nodes (same data as in Fig.9(a)).In scenario SC II we are able to select the output nodes and the results for the optimal sensor node placement from Fig.11(a) are included for comparison.Under scenario scenario SC III, we can select both, input and output nodes.We used hub input selection (selection of nodes with highest out-degree) in combination with optimal sensor node placement and found that ρ is either one or zero.The numbers on the right indicate the maximum number Mmax of inputs which still provide an invertible system.