5.1 Introduction

Since this chapter is dedicated to Prof. Arjan van der Schaft, we first describe his early work on port-Hamiltonian systems and passivity theory and then describe how his work on chemical reaction network theory which is one of his most recent ventures, is connected with these two concepts. Beginning in the early 1990s, van der Schaft in collaboration with Maschke and Breedveld (see [1316, 29]), began his work on port-controlled Hamiltonian systems which are commonly referred to as port-Hamiltonian systems. The framework of port-Hamiltonian systems combines the earlier well-known Hamiltonian systems framework in which the system is modeled by using its total stored energy or the Hamiltonian, and the network framework which uses nodes and edges, and is commonly used to model electrical systems. For a detailed explanation of port-Hamiltonian systems, the reader is referred to [26, 27]. The port-Hamiltonian framework allows mainly modeling of passive electrical and mechanical systems. By passive systems, we mean systems for which the derivative of the Hamiltonian with respect to time is nonpositive due to dissipation. This derivative is equal to zero for lossless systems and negative for systems with dissipation.

In a first attempt to extend the port-Hamiltonian framework for the modeling of chemical reaction networks, in collaboration with Maschke, van der Schaft published a chapter in Springer lecture notes [28] in 2011. In this work, the Gibbs free energy of a chemical reaction network is considered as the Hamiltonian for its modeling. This work was inspired by the innovative work of Oster, Perelson, and Katchalsky [19, 20] in the area of chemical reaction networks. Later, he refined this work in collaboration with Rao and Jayawardhana who are two of the authors of this manuscript.

Deriving inspiration from the work of Horn, Jackson and Feinberg [5, 8, 9], who can arguably be considered as the founding fathers of chemical reaction network theory, we made a couple of observations. First an easy way of modeling chemical reaction networks is to make use of graphs of complexes of chemical reaction networks. The complexes of a chemical reaction network are the combination of species of the various left- and right-hand sides of the different reactions in the network. The graph of complexes is simply a graph with complexes as nodes and reactions as edges. The complex composition matrix Z, which captures the expression of the various complexes in terms of its constitutive species, and the incidence matrix B corresponding to the graph of complexes can then be used to derive an expression describing the dynamics of a chemical reaction network, given by \(\dot{x}=ZBv\), where x denotes the vector of concentrations of the different species and v denotes the vector of the rates of the reactions in the network.

In their seminal papers published in the early 1970s, Horn, Jackson, and Feinberg [6, 8, 9] mainly considered a special class of chemical reaction networks known as complex-balanced networks. A complex-balanced network is one for which there exists a vector of species concentrations at which the combined rate of outgoing reactions from any complex is equal to the combined rate of incoming reactions to the complex, i.e., in some sense each complex of the network is balanced. A detailed-balanced network is a complex-balanced network for which there exists a vector of species concentrations at which the rate of each of the reactions in the network is zero, i.e., in addition to each complex being balanced, each reaction in the network is also balanced. The second observation that we made from [6, 8, 9] is that it is possible to derive a compact mathematical formulation describing the dynamics of complex and detailed-balanced networks in terms of a known equilibrium concentration vector, and a weighted Laplacian matrix corresponding to the graph of complexes. This weighted Laplacian matrix is symmetric in the case of detailed-balanced networks, and is balanced meaning that it has zero row and column sums in the case of complex-balanced networks. These properties of the weighted Laplacian matrix allows simple derivation of the previously well-known results from [8, 25] regarding equilibria and asymptotic stability of detailed- and complex-balanced networks (see [23, 30]). It can be shown that our compact mathematical formulation admits a direct port-Hamiltonian interpretation, using the Gibbs free energy of the network as the Hamiltonian and it can be shown that complex-balanced networks are passive systems (see [31] for details).

The graph-theoretic approach for the analysis of detailed- and complex-balanced networks also led to the idea of using the Kron reduction method to reduce models of such networks. Kron reduction method is a well-known method for model reduction of electrical networks (see, for example, [12] and an article written by van der Schaft in [32]) and other complex-networked systems (we refer interested readers to a recent article in [3]). This method exploits the balancedness of the weighted Laplacian matrix which we use in our compact mathematical formulation for the network, in order to perform a meaningful deletion of certain complexes of the network, thereby rewiring the graph of complexes and reducing the number of variables in the corresponding model. In collaboration with two system biologists, Bakker (another author of this chapter) and van Eunen from the Center for Systems Biology, University of Groningen, we generalized this model reduction method so as to be applicable for reaction networks that are governed by a variety of general enzyme kinetic rate laws, involving external inflows and outflows and are not necessarily complex balanced (see [22]). The reader is referred to [21, 22] for the current state of the art in the area of model reduction of biochemical reaction networks. Below, the main features of the model reduction method described in [22] are highlighted.

The method described in [22] reduces the number of reactions, species, and parameters in such a way that the transient behavior of the species concentrations of the reduced model under certain predefined conditions are close to those of the original model. This method proceeds by a simple stepwise reduction in the number of complexes, the effect of which is monitored by an error integral that quantifies how much the transient behavior of the reduced model deviates from that of the original. This method does not rely on prior knowledge about the dynamic behavior or biological function of the network. Consequently, it can be automated. Furthermore, the reduced model largely retains the kinetics and structure of the original model. This enables a direct biochemical interpretation and yields insight into which parts of the network have the highest influence on its behavior. It also accelerates computations and facilitates parameter fitting, especially when we deal with models of huge biochemical reaction networks. One of the drawbacks of this method is that it relies on the computation of error integral which could be time-expensive and depends on a number simulations which increases with the size of the model.

The main contribution of this chapter is to propose two alternative methods to the computation of error integral for determining the best combination of complexes that should be removed from the original network. We restrict ourselves to the class of detailed-balanced chemical reaction networks governed by the law of mass action kinetics. Thermodynamically, the assumption of detailed-balancedness of any reaction network without external fluxes is well-justified as it corresponds to microscopic reversibility.

The first method is based on the spectral clustering method on a graph which has been used to solve the ratio-cut and normalized-cut problems [33]. In graph theory, they are related to the problem of clustering the vertices in a graph such that the cost function associated with the weights of the cut-setsFootnote 1 is minimized. It has been applied widely for signal and image analyses [24, 33]. In our present context, we adapt the spectral clustering method to cluster complexes, thereby modifying the graph of complexes. Based on the clustering, we can pick complexes for the deletion from weakly coupled clusters since these clusters have minimal influence on the rest of the network.

The second method is based on the interlacing property of eigenvalues of Laplacian matrices associated with undirected graphs. From the classical work of Haemers [7], it is known that Laplacian matrices associated with graphs obey certain eigenvalue interlacing properties. In particular, it is known that the eigenvalues of any principal sub-matrix of a symmetric matrix interlace with the eigenvalues of the original matrix. As a direct consequence, for an undirected graph, the eigenvalues of any Schur complement of the corresponding symmetric Laplacian matrix (which defines the Kron reduction of a graph as will be explained later) interlace with the eigenvalues of the original Laplacian matrix. Based on this property, in our second approach, we look for the best combination of complexes to be deleted by finding a principal sub-matrix that results in a tight eigenvalue interlacing. This approach can be interpreted as finding the set of complexes with fast dynamics and a weak coupling to the rest of the network.

The layout of the chapter is as follows. In Sect. 5.2, we describe the modeling procedure for detailed-balanced mass action kinetics networks using a weighted Laplacian matrix corresponding to the graph of complexes. In Sect. 5.3, we review Kron reduction method for an undirected graph and its application to our chemical reaction network setting as proposed in [22]. The proposed spectral-based approaches are discussed in Sect. 5.4 and the efficacy of our proposed methods are evaluated in Sect. 5.5.

Notation: The space of m-dimensional real vectors is denoted by \(\mathbb {R}^{{m}}\), the space of m-dimensional real vectors consisting of all strictly positive entries by \(\mathbb {R}_+^{m}\) and the space of m-dimensional real vectors consisting of all nonnegative entries by \(\bar{\mathbb {R}}_+^{m}\). Given \(a_1,\ldots ,a_n \in \mathbb {R}\), \(\text{ diag }(a_1,\ldots ,a_n)\) denotes the diagonal matrix with diagonal entries \(a_1,\ldots ,a_n\). The time-derivative \(\frac{\mathrm{d}x}{\mathrm{d}t}(t)\) of a vector x depending on time t will be denoted by \(\dot{x}(t)\) or \(\dot{x}\). The mapping \(\mathrm {Ln} : \mathbb {R}_+^m \rightarrow \mathbb {R}^m, x \mapsto \mathrm {Ln}(x),\) is defined as the mapping whose ith component is given as \(\left( \mathrm {Ln}(x)\right) _i := \mathrm {ln}(x_i).\) Similarly, the mapping \(\mathrm {Exp} : \mathbb {R}^m \rightarrow \mathbb {R}_+^m, \quad x \mapsto \mathrm {Exp}(x),\) is the mapping whose ith component is given as \(\left( \mathrm {Exp}(x)\right) _i := \mathrm {exp}(x_i).\) Also, for any vectors \(x,z \in \mathbb {R}^m\) the vector \(\frac{x}{z} \in \mathbb {R}^m\) is defined as the elementwise quotient \(\left( \frac{x}{z}\right) _i := \frac{x_i}{z_i}, \, i=1,\ldots ,m\).

For \(n\in \mathbb N\), we define the index set \(\mathcal I_n := \{1, \ldots , n\}\). For describing sub-matrices, we will use the following notations throughout the paper. Let \(a,b\subset \mathcal I_n\) be two given subindices of \(\mathcal I_n\). The sub-matrix of a matrix \(\mathcal L\in \mathbb {R}^{n\times n}\) whose rows are indexed by a and columns are indexed by b is denoted by \(\mathcal L[a,b]\). Correspondingly, we define the complementary sub-matrices \(\mathcal L[a,b), \mathcal L(a,b], \mathcal L(a,b)\) as follows:

$$\begin{aligned} \mathcal L[a,b) :=\mathcal L[a,\mathcal I_n\backslash b], \ \ \ \ \mathcal L(a,b] :=\mathcal L[\mathcal I_n\backslash a,b], \ \ \ \ \mathcal L(a,b) :=\mathcal L[\mathcal I_n\backslash a,\mathcal I_n\backslash b]. \end{aligned}$$

For a symmetric matrix \(\mathcal {L}\in \mathbb {R}^{c\times c}\), we arrange the eigenvalues in an increasing order so that

$$ \lambda _1(\mathcal {L}) \le \lambda _2(\mathcal {L}) \le \cdots \le \lambda _c(\mathcal {L}). $$

5.2 Detailed-Balanced Chemical Reaction Networks

In this section, we describe the modeling procedure of detailed-balanced mass action networks as in [30]. Consider a reversible reaction networks with r reversible reactions among m chemical species. Assume that the reaction network has c complexes whose expression in terms of the species can be described using the complex composition matrix Z of dimension \(m \times c\). The \(i{\text {th}}\) column of Z expresses the composition of the \(i{\text {th}}\) complex of the network in terms of its m species. As an example, the complex composition matrix for the following reversible network:

$$\begin{aligned} 2X_1 + X_2 \rightleftharpoons X_3 \rightleftharpoons X_1 + 2X_2 \end{aligned}$$
(5.1)

is given by

$$ Z=\begin{bmatrix} 2&0&1 \\ 1&0&2 \\ 0&1&0 \end{bmatrix} $$

The graph of complexes corresponding to a reversible reaction network is a directed graph with complexes as nodes and one edge corresponding to each reversible reaction with direction of the edge given by that of the forward reaction. Note that the modeling and model reduction can be carried out irrespective of the direction that is chosen for the edge corresponding to each of the reversible reactions of the network. One can associate an incidence matrix B of dimension \(c \times r\) corresponding to the graph of complexes for which the \(j{\text {th}}\) column refers to the \(j{\text {th}}\) reaction of the network. If this reaction has the pth complex as the substrate and the qth complex as the product, then the \(j{\text {th}}\) column of B has \(-1\) as its \(p{\text {th}}\) element, \(+1\) as its qth element and all the remaining elements equal to 0. For example, the incidence matrix of the reaction network (5.1) is given by

$$ B=\begin{bmatrix} -1&0 \\ 1&-1 \\ 0&1 \end{bmatrix} $$

Now if \(v \in \mathbb {R}^r\) denotes the vector of reaction rates and x denotes the vector of species concentrations, then the dynamics of the reaction networks can be described using the equation

$$ \dot{x}=ZBv $$

Note that v as a function of x depends on the governing law of the reaction network. Here we describe how v can be written as a function of x in case the governing law is mass action kinetics.

The mass action reaction rate of the jth reaction of a chemical reaction network, from a substrate complex \(\mathcal {S}_j\) to a product complex \(\mathcal {P}_j\), is given as

$$\begin{aligned} v_j(x) = k_j^{\text {forw}} \prod _{i=1}^m x_i ^{Z_{i \mathcal {S}_j}} - k_j^{\text {rev}} \prod _{i=1}^m x_i^{Z_{i \mathcal {P}_j}}, \end{aligned}$$
(5.2)

where \(Z_{i \rho }\) is the \((i,\rho )\)th element of the complex stoichiometric matrix Z, and \(k_j^{\text {forw}}, k_j^{\text {rev}}\) \( \ge 0\) are the forward and reverse reaction constants of the \(j{\text {th}}\) reaction, respectively.

Equation (5.2) can be rewritten in the following way. Let \(Z_{\mathcal {S}_j}\) and \(Z_{\mathcal {P}_j}\) denote the columns of the complex stoichiometry matrix Z corresponding to the substrate complex \(\mathcal {S}_j\) and the product complex \(\mathcal {P}_j\) of the \(j{\text {th}}\) reaction. Using the mapping \(\mathrm {Ln} : \mathbb {R}^c_+ \rightarrow \mathbb {R}^c\) as defined at the end of the Introduction, the mass action reaction Eq. (5.2) for the \(j{\text {th}}\) reaction takes the form

$$\begin{aligned} v_j(x)=k^{\text {forw}}_{j} \exp \big (Z_{\mathcal {S}_j}^T \mathrm {Ln}(x)\big )-k^{\text {rev}}_{j} \exp \big (Z_{\mathcal {P}_j}^T \mathrm {Ln}(x)\big ). \end{aligned}$$
(5.3)

At this point, we define a detailed-balanced chemical reaction network. A vector of concentrations \(x^* \in \mathbb {R}^m_+\) is called a thermodynamic equilibrium if \(v(x^*)=0\). Note that at a thermodynamic equilibrium, the rate of each of the reactions in the network is zero. A chemical reaction network \(\dot{x}=ZBv(x)\) is called detailed balanced if it admits a thermodynamic equilibrium \(x^* \in \mathbb {R}^m_+\). It can be shown that a detailed-balanced network is necessarily reversible. Note that \(x^* \in \mathbb {R}^m_+\) is a thermodynamic equilibrium, i.e., \(v(x^*)=0\), if and only if

$$ k^{\text {forw}}_{j} \exp \big (Z_{\mathcal {S}_{j}}^T \mathrm {Ln}(x^*)\big ) = k^{\text {rev}}_{j} \exp \big (Z_{\mathcal {P}_{j}}^T \mathrm {Ln}(x^*)\big ), \quad j=1, \ldots ,r $$

Define the ‘conductance’ \(\kappa _{j}(x^*) > 0\) of the \(j{\text {th}}\) reaction as the common value of the forward and reverse reaction rates at thermodynamic equilibrium \(x^*\), i.e.,

$$ \kappa _{j}(x^*) :=k_{j}^{\text {forw}} \exp \left( Z_{\mathcal {S}_{j}}^T \mathrm {Ln}(x^*)\right) =k_{j}^{\text {rev}} \exp \left( Z_{\mathcal {P}_{j}}^T \mathrm {Ln}(x^*)\right) , \quad j = 1, \ldots , r $$

Then the mass action reaction rate (5.3) of the \(j{\text {th}}\) reaction can be rewritten as

$$ v_{j}(x)=\kappa _{j}(x^*)\left[ \exp \left( Z_{\mathcal {S}_{j}}^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) -\exp \left( Z_{\mathcal {P}_{j}}^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) \right] , $$

where for any vectors \(x,z \in \mathbb {R}^m\) the quotient vector \(\frac{x}{z} \in \mathbb {R}^m\) is defined elementwise (see the end of the Introduction).

Defining the \(r \times r\) diagonal matrix of conductances as

$$ \mathcal {K} := \mathrm {diag} \big ( \kappa _1(x^*), \ldots , \kappa _r(x^*) \big ) $$

it follows that the mass action reaction rate vector of a balanced reaction network can be written as

$$ v(x) = - \mathcal {K} B^T \mathrm {Exp} \left( Z^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) , $$

and thus the dynamics of a balanced reaction network takes the form

$$\begin{aligned} \dot{x} = - Z B \mathcal {K}B^T \mathrm {Exp} \left( Z^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) , \quad \mathcal {K} > 0 \end{aligned}$$
(5.4)

The matrix \(\mathcal {L}:= B \mathcal {K}B^T\) in (5.4) defines a weighted Laplacian matrix for the complex graph, with weights given by the conductances \(\kappa _1(x^*), \ldots , \kappa _r(x^*)\). Note that \(\mathcal {L}\) is symmetric. Thus Eq. (5.4) can be written as

$$\begin{aligned} \dot{x} = - Z \mathcal {L}\mathrm {Exp} \left( Z^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) \end{aligned}$$
(5.5)

The above equation is the compact mathematical formulation that was referred to in the Introduction, which is written in terms of a symmetric weighted Laplacian matrix \(\mathcal {L}\) and a known equilibrium concentration vector \(x^*\) of the network. In addition to the system equation in (5.5), we define the output function y that represents measured or important variables (species concentrations) as follows:

$$\begin{aligned} y = Cx \end{aligned}$$
(5.6)

where \(y\in \mathbb {R}^p\) is the vector of output variables and \(C\in \mathbb {R}^{p\times m}\). Note that y is typically a subset of the set of species, in which case, the matrix C is defined simply by an indicator matrix. We will use this output function to measure the quality of our model reduction method.

5.2.1 Detailed-Balanced CRN with General Kinetics

When enzymatic reactions or allosteric regulation are involved in the network, as commonly found in metabolic pathways, we can generalize (5.5) to take these into account. For describing such reactions, the mass action reaction rate as in (5.2), for every jth reaction, can be generalized to

$$\begin{aligned} v_j(x) = d_j(x)\left( k_j^{\text {forw}} \prod _{i=1}^m x_i ^{Z_{i \mathcal {S}_j}} - k_j^{\text {rev}} \prod _{i=1}^m x_i^{Z_{i \mathcal {P}_j}}\right) , \end{aligned}$$
(5.7)

where, \(d_j:\mathbb {R}^n\rightarrow \mathbb {R}_+\) is a positive definite function. In this new formulation, the function \(d_j\) models a sigmoidal/Hill function or another nonlinear function that is associated with an enzymatic reaction or allosteric regulation.

Following similar steps as in the mass action case, the detailed-balanced CRN with general kineticsFootnote 2 as in (5.7) can be described by

$$\begin{aligned} \left. \begin{array}{rl}\dot{x} &{} = - Z \mathcal {L}(x) \mathrm {Exp} \left( Z^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) \\ y &{} = Cx \end{array} \right\} \end{aligned}$$
(5.8)

where the state-dependent weighted balanced Laplacian matrix \(\mathcal {L}(x)\) is defined by

$$ \mathcal {L}(x) := B \ \text {diag}\big (d_1(x),\ldots ,d_r(x)\big )\mathcal K \ B^T $$

with \(\mathcal K\) denoting the conductance matrix as before.

5.3 Kron Reduction

Consider again the graph of complexes of a detailed-balanced CRN with mass action kinetics as discussed in Sect. 5.2 where a weighted Laplacian matrix \(\mathcal {L}\) has been defined to describe the interconnecting complexes and their associated reaction rates in (5.5). Similar to the Kron reduction method for electrical circuits, we can potentially reduce the dimension of CRN in (5.5) by applying Kron reduction to the graph of complexes.

The Kron reduction of a detailed-balanced chemical reaction network results in another detailed-balanced chemical reaction network, the vertices of whose complex graph is a subset of the vertices of the complex graph corresponding to the original network. Suppose that \(\mathcal C_{red} \subset \mathcal I_c\) is the set of vertices (i.e., complexes) that we wish to remove from the complex graph corresponding to the original network. Then the Kron reduction of the network results in another detailed-balanced chemical reaction network, whose corresponding Laplacian matrix \(\mathcal L_\mathrm{red}\) is the Schur complement of \(\mathcal {L}\) with respect to \(\mathcal {L}[\mathcal C_{red},\mathcal C_{red}]\), given by

$$ \mathcal {L}_\mathrm{red} = \mathcal {L}(\mathcal {C}_\mathrm{red},\mathcal {C}_\mathrm{red}) - \mathcal {L}(\mathcal {C}_\mathrm{red},\mathcal {C}_\mathrm{red}]\left( {\,\,}\mathcal {L}[\mathcal {C}_\mathrm{red},\mathcal {C}_\mathrm{red}]\right) ^{-1}\mathcal {L}[\mathcal {C}_\mathrm{red},\mathcal {C}_\mathrm{red}). $$

The fact that \(\mathcal {L}_{red}\) is again a symmetric Laplacian matrix has been shown, for instance, in [3, Lemma 2.1].

The dynamics of the Kron-reduced CRN is then given by

$$\begin{aligned} \left. \begin{array}{rl}\dot{x} &{} = - Z[\mathcal I_c,\mathcal {C}_\mathrm{red}) \mathcal {L}_\mathrm{red} \mathrm {Exp} \left( {\,\,}Z[\mathcal I_c,\mathcal {C}_\mathrm{red})^T \mathrm {Ln}\left( \frac{x}{x^*}\right) \right) \\ y_{\mathrm{red}} &{} = Cx\end{array}. \right\} \end{aligned}$$
(5.9)

Since some of the complexes have been removed from the original state equations, some species in the image of \(Z[\mathcal I_c,\mathcal {C}_\mathrm{red}]\) can be constant, in particular, if they are not in the image of \(Z[\mathcal I_c,\mathcal {C}_\mathrm{red})\). These species can therefore be removed from the state equation, leading to a reduced model. For a detailed-balanced CRN with general kinetics, the Kron reduction method follows the same procedure as above.

The following lemma establishes the spectrum relation of \(\mathcal {L}_\mathrm{red}\) and its original Laplacian \(\mathcal {L}\), which will be useful for our determination of the complex combination for the deletion.

Lemma 5.1

Consider a weighted symmetric Laplacian matrix \(\mathcal {L}\) of a complex graph and its associated Kron-reduced Laplacian \(\mathcal L_\mathrm{red}\) with respect to a set of deleted complexes \(\mathcal {C}_\mathrm{red}\). Let \(k=\dim (\mathcal {C}_\mathrm{red})\). Then for every \(i=1,\ldots , c-k\),

$$ \lambda _i(\mathcal {L}) \le \lambda _i(\mathcal L_\mathrm{red}) \le \lambda _i(\mathcal {L}(\mathcal {C}_\mathrm{red},\mathcal {C}_\mathrm{red})) \le \lambda _{i+k}(\mathcal {L}), $$

where \(\lambda _i(\mathcal {L})\) (or \(\lambda _i(\mathcal L_\mathrm{red})\)) is the ith eigenvalue of \(\mathcal {L}\) (or \(\mathcal L_\mathrm{red}\), respectively).

The proof of this lemma follows from [7, Theorem 2.1] or a recent exposition of Kron reduction on graph in [3, Theorem 3.5]. It follows immediately from this lemma that if \(\dim (\mathcal {C}_\mathrm{red})=1\) then

$$ \lambda _1(\mathcal {L}) \le \lambda _1(\mathcal L_\mathrm{red}) \le \lambda _2(\mathcal {L}) \le \lambda _2(\mathcal L_\mathrm{red}) \le \cdots \le \lambda _{c-1}(\mathcal L_\mathrm{red}) \le \lambda _{c}(\mathcal {L}). $$

In other words, the eigenvalues of \(\mathcal L_\mathrm{red}\) interlace those of \(\mathcal {L}\).

5.3.1 Error Integral

Although the Kron reduction method as described above involves a fairly straightforward computation, it is not obvious how to determine the set of complexes for removal such that the dynamic behavior of the Kron-reduced CRN remains close to that of the original one.

One approach to do that, which has been proposed in our previous work [22], is to perform an iterative Kron reduction method where at each iteration a removal of a complex that minimizes a cost function is sought for. Since we use the output function to assess the quality of model reduction method, it is assumed that the complexes containing the chemical species in y do not belong to \(\mathcal {C}_\mathrm{red}\). Based on this assumption, the cost function as given in [22] is a normalized error integral that is defined by

$$\begin{aligned} J(x) = \sum _{i=1}^p\frac{1}{Tp}\int _t^{t+T}{\left| 1-\frac{y_{i,\mathrm{red}}(\tau )}{y_i(\tau )}\right| \mathrm{d}\quad \tau }, \end{aligned}$$
(5.10)

where \(y_{i,\mathrm{red}}\) and \(y_i\) are the ith output of the reduced model (5.9) and of the full model (5.6), respectively. This cost function evaluates the discrepancy of the reduced model’s transient behavior compared with that of the full model one on the interval of \([t,t+T]\). It is normalized with respect to the total number of output variables and the length of time interval. Although other type of functions, such as, an \(L^p\)-norm-based cost function, can be used instead of (7.10), the normalized error integral as in (7.10) has been found to be effective in our numerical simulations.

One can show that the Kron reduction with respect to a given set of complexes to be deleted \(\mathcal {C}_\mathrm{red}\) can be done by an iterative Kron reduction with respect to each individual complex in \(\mathcal {C}_\mathrm{red}\) (see, for example, [3, Lemma 3.3]) and is invariant to the order of complex deletion. This fact supports the aforementioned iterative procedure of finding the combination of complexes for removal.

5.4 Spectral-Based Approaches

In this section, we present two alternative approaches to the iterative procedure of the previous section, for finding the combination of complexes for removal. These approaches are based on the spectral property of \(\mathcal {L}\) (or \(\mathcal {L}(x)\) for the case of detailed-balanced CRN with general kinetics) so that they do not depend on the numerical integration of the state equations as in (7.10). We show the approach assuming that the complex graph is connected. In case of graphs having more than one connected component, the same approach can be applied for each connected component. Hence, in the following we assume that \(\mathcal {L}\) has eigenvalue 0 with multiplicity 1 so that \(\lambda _2(\mathcal {L})>0\).

5.4.1 Spectral Clustering-Based Approach

For our first approach, we will consider clustering vertices of the complex graph into k clusters such that the combined weight of edges between vertices belonging to different clusters is minimized. More precisely, let us consider the following RatioCut problem [33]

$$ \min _{\mathcal {C}_{\ell } \atop \ell =1,\ldots k}\sum _{\ell =1}^k \frac{W(\mathcal C_\ell , \overline{\mathcal C}_\ell )}{{\dim (C_\ell )}}, $$

where \(\mathcal C_{\ell }\) denotes the set of vertices (or complexes) in the \(\ell \)th cluster, \(\overline{\mathcal C}_\ell \) is the complement of \(\mathcal C_\ell \) defined by \(\overline{\mathcal C}_\ell :=\mathcal I_c\backslash \mathcal C_\ell \) and \(W(\mathcal C_\ell ,\overline{\mathcal C}_\ell )\) is the sum of weights in the cut-set of the cut \((\mathcal C_\ell ,\overline{\mathcal C}_\ell )\), i.e.,

$$ W(\mathcal C_\ell ,\overline{\mathcal C}_\ell ) = \sum _{i \in \mathcal C_\ell , j \in \overline{\mathcal C}_\ell } -\mathcal {L}_{i,j}. $$

This RatioCut problem can be recasted into another equivalent form by using clustering (or indicator) vectors \(u_\ell =\left[ \begin{matrix} u_{1,\ell }&\ldots&u_{c,\ell } \end{matrix}\right] ^T\), \(\ell =1,\ldots ,k\) defined by

$$ u_{j,\ell }=\left\{ \begin{array}{ll}\frac{1}{\sqrt{\dim (\mathcal C_{\ell })}} &{} \qquad \text {if }\ j\in \mathcal C_{\ell } \\ 0 &{} \qquad \text {otherwise,} \end{array}\right. $$

which are orthonormal vectors. Using \(u_\ell \), the RatioCut clustering problem can be reformulated as follows:

$$ \min _{\mathcal {C}_{\ell } \atop \ell =1,\ldots k}\sum _{\ell =1}^k \frac{W(\mathcal C_\ell , \overline{\mathcal C}_\ell )}{\dim (C_\ell )} = \min _{\mathcal {C}_{\ell } \atop \ell =1,\ldots k}\sum _{\ell =1}^ku_{\ell }^T\mathcal {L}u_\ell = \min _{\mathcal {C}_{\ell } \atop \ell =1,\ldots k} \text {Tr}(U^T\mathcal {L}U), $$

where \(\text {Tr}\) is the trace of a matrix and \(U=\left[ \begin{matrix} u_1&u_2&\ldots&u_k \end{matrix}\right] \) satisfies \(U^TU=I_{k\times k}\).

Instead of finding minimizing clustering vectors \(u_\ell \) which can be NP-hard, we can look for any orthonormal vectors \(u_\ell \) that minimize the following relaxed RatioCut problem

$$ \min _{U\in \mathbb {R}^{c\times k}} \text {Tr}(U^T\mathcal {L}U) \qquad \text {subject to }\ \ U^TU=I_{k\times k}. $$

Based on the solution U to this relaxed problem, we cluster the vertices by considering the rows of U as points in the k-dimensional space and by clustering these c pointsFootnote 3 into k clusters using any distance metric. For instance, we can apply the standard k-means algorithm to cluster these points. The resulting clustering result is known to approximate the solution to the original RatioCut problem [33].

Finally, we propose the following algorithm to find the candidate \(\mathcal {C}_\mathrm{red}\) for our Kron reduction:

Spectral clustering-based algorithm:

  1. 1.

    Set k = 2 and calculate \(\mathcal {L}\) (or \(\mathcal {L}(x)\) with x be taken as the species concentration in a given steady state).

  2. 2.

    Obtain k clusters of vertices: \(\mathcal C_1, \ldots , \mathcal C_k\), based on the approximate solution to the aforementioned RatioCut problem.

  3. 3.

    If \(y\cap \mathcal C_i \ne \emptyset \) for every \(i=1,\ldots , k\) (i.e., every cluster contains some elements of y) then increment k by one (i.e., increase the number of cluster) and return to Step 2. Otherwise define \(\overline{\mathcal C}_{red}\) as the union of all sets \(\mathcal C_i\), \(i=1,\ldots ,k\), such that \(y\cap \mathcal C_i = \emptyset \) and we can chooseFootnote 4 \(\mathcal {C}_\mathrm{red}\subset \overline{\mathcal C}_{red}\).

5.4.2 Minimal Eigenvalue Interlacing-based Approach

If one considers that the dynamics of CRN can have multiple timescales since the eigenvalues of \(\mathcal {L}\) are related to the rate of decay of complexes, then one can consider removing fast complexes that have minimal influence on the dynamics of the network. This can be done by minimizing the eigenvalue interlacing distance. In this regard, the interlacing property as in Lemma 5.1 can be useful as we demonstrate below.

Suppose that we are looking for a combination of k vertices to be removed for Kron reduction. In order to minimize the influence of the to-be-removed complexes on the rest of the network, we can determine \(\mathcal {C}_\mathrm{red}\) which solves the following minimization problem:

$$\begin{aligned} \min _{\mathcal {C}_\mathrm{red}\in \left( {\begin{array}{c}{\mathcal I_c\backslash y}\\ k\end{array}}\right) } \sum _{i=2}^{c-k}{\lambda _i(\mathcal L_\mathrm{red})-\lambda _i(\mathcal {L})}, \end{aligned}$$
(5.11)

where \(\left( {\begin{array}{c}{\mathcal I_c\backslash y}\\ k\end{array}}\right) \) is the set of all k-combination from the admissible set of complexes for the deletion \(\mathcal I_c\backslash y\). Note that the cost function as used above is nonnegative according to the interlacing property in Lemma 5.1.

We summarize our second proposed approach in the following algorithm:

Minimal Eigenvalue Interlacing-based algorithm:

  1. 1.

    Set \(k=1\), set an (averaged and normalized) interlacing distance threshold \(\epsilon >0\) and calculate \(\mathcal {L}\) (or \(\mathcal {L}(x)\) with x taken as the species concentration in a given steady state).

  2. 2.

    Solve the minimization problem of eigenvalue interlacing as in (5.11). Denote its solution by \(\mathcal {C}_\mathrm{red}\).

  3. 3.

    If

    $$\begin{aligned} \frac{1}{c-k-1}\sum _{i=2}^{c-k}\frac{\lambda _i(\mathcal L_\mathrm{red})-\lambda _i(\mathcal {L})}{\lambda _i(\mathcal {L})} < \epsilon \end{aligned}$$
    (5.12)

    then increment k by one and return to Step 2. Otherwise set \(\mathcal {C}_\mathrm{red}\) from the previous iteration as the desired set of complexes for removal.

Note that in the summation on the left-hand side of (5.12), last term, i.e., the term corresponding to \(i=c-k\), contributes much more than the other terms. Therefore, the left-hand side of (5.12) may not be easily interpreted as the normalized deviation of eigenvalues, as will be shown later in the simulation results. One way to overcome this problem is to modify condition (5.12) as

$$\begin{aligned} \frac{1}{N-1}\sum _{i=2}^{N}\frac{\lambda _i(\mathcal L_\mathrm{red})-\lambda _i(\mathcal {L})}{\lambda _i(\mathcal {L})} < \epsilon \end{aligned}$$
(5.13)

where \(N\le c-k\) is the number of the smallest eigenvalues that are considered to be important.

5.5 Numerical Simulation Results

We evaluate the efficacy of our proposed approaches using two different models. The first one is based on the glycolysis model which has been used in our model reduction paper [22]. The second one is an arbitrary model that is taken from the BioModels database on biological models [1]. This is a model of insulin-dependent glucose metabolism as proposed and studied in [18].

5.5.1 Glycolysis Model

This model describes the glycolysis metabolism based on the work in [4]. The original model in [4] consists of 12 species and 12 reactions and it has successfully been reduced using our Kron reduction approach in [22] to 7 species and 7 reactions. In Table 5.1 below, we reproduce the complexes that are removed at each step of the iterative reduction procedure as described before in Sect. 5.3.

Table 5.1 Order of complex removal using the iterative procedure for the glycolysis model as in [22]

Using the same numerical values as in [22], we apply the spectral clustering-based algorithm to obtain 7 clusters of complexes as shown in Fig. 5.1. It can be seen that four of the complexes in Table 5.1 are in clusters \(\mathcal C_2\) and \(\mathcal C_6\) which do not contain any important variables as marked in red color in Fig. 5.1. Since these clusters have minimal cut-set with their neighbors, the corresponding vertices/complexes can be deleted using Kron reduction and it is expected to give us a good reduced model (cf. Table 5.1). Indeed, if we take \(\mathcal {C}_\mathrm{red}=\{\text {G6P, F6P, P2G, PEP}\}\) then the numerical simulation result gives us an error integral of 0.0701.

Fig. 5.1
figure 1

The clustering of complexes in the glycolysis model as used in [22] into 7 clusters using the proposed spectral clustering-based algorithm. The clusters are indicated by the dashed-line boxes and the labels \(\mathcal C_k\), \(k=1,\ldots , 7\) are given on the top-right corner of each boxes. The model contains 13 complexes that form a complex graph with three connected components (see [22] for the description and an explanation of all the abbreviations of the complexes). The text in red indicates the species defined in output variable y. The number on top of every edge shows the edge weight which are taken from the adjacency matrix in the Laplacian matrix \(\mathcal {L}(x)\) using the nominal values of x

Table 5.2 Optimal complexes for removal in the first connected sub-graph containing vertices GLci, G6P, F6P, F16BP and 2TRIO, using the minimal eigenvalue interlacing-based algorithm

We now apply our second proposed approach, i.e., the minimal eigenvalue interlacing-based algorithm to this model and the results are shown in Tables 5.2 and 5.3. From both tables, minimizing the interlacing distance for the first couple of eigenvalues (where we have considered the second and third eigenvalues for the results shown in the lower rows of Tables 5.2 and 5.3) provides a reasonably good combination of complexes for Kron reduction. In particular, if we choose \(\epsilon = 0.1\) (i.e., the deviation of eigenvalues of the reduced model should deviate less than \(10\,\%\), in average, from those of the full one), then the application of (5.13) leads to F6P and P2G as optimal complexes for reduction. In this case, the error integral value associated with the removal of both complexes is 0.025.

However, as shown in Table 5.2, the algorithm still identifies F16BP as a candidate for removal which leads to a large error integral value (which implies that the transient behavior of the reduced model deviates significantly from the full one). On the other hand, our first proposed approach does not identify F16BP as a suitable complex for the Kron reduction. This result shows that the spectral-based clustering algorithm outperforms the eigenvalue interlacing-based algorithm.

Table 5.3 Optimal complexes for removal in the second connected sub-graph containing vertices BPG, P3G, P2G, PEP, PYR and Acald, using the minimal eigenvalue interlacing-based algorithm
Fig. 5.2
figure 2

Complex graph of the original and reduced models of the insulin-signaling-dependent glucose metabolism. The left-hand panel is a schematic representation of the original model used for model reduction. The full model description and an explanation of all the abbreviations is found in [18]. The right-hand panel represents the reduced model after deleting 9 complexes (LAC, PYRin, PYRout, p2IRS, p1p2IRS, G1P, Foxo, pFoxo, mRNA). a The complex graph of the full model. b The complex graph of the reduced model

Table 5.4 Order of complex removal using the iterative procedure for the insulin-signaling-dependent glucose metabolism model

5.5.2 Insulin-Signaling-Dependent Glucose Metabolism Model

The model describes the insulin-signaling-dependent glucose metabolism that includes glycolysis, gluconeogenesis and glycogenesis pathways, all of which are regulated by insulin. The full model consists of 39 reactions (where forward and reverse reactions in a reversible reaction are counted as 2 separate reactions), 23 species, and 23 complexes.Footnote 5 Figure 5.2a shows the complex graph of the full model and we refer interested readers to [18] for a description and detailed explanation of the network. The output vector y consists of the concentrations of the species pAkt, GLCex, PEPCK, Glycogen, p1IRS, and F16P.

The iterative reduction procedure as discussed in Sect. 5.3 is performed based on the response to a step increase of external insulin concentration from 0 to 100 nM. For the error integral, we take \(t=0\) and \(T=480\) min. Table 5.4 gives the value of the error integral and the complex deleted at each iterative step. The resulting reduced complex graph is shown in Fig. 5.2b.

Fig. 5.3
figure 3

Comparison of transient behavior of species concentrations in the full model and reduced models of insulin-signaling-dependent glucose metabolism model. The figures in the left column are the concentration plots of the full model, the figures in the middle column are concentration plots of the reduced model with 9 complexes deleted and the figures on the right column are the concentration plots of the reduced model with 10 complexes deleted

In Fig. 5.3, we compare the transient behaviors of the species concentrations of the full model with those of the reduced models obtained by deleting 9 and 10 complexes, following the iterative reduction steps as before. It can be observed from these results that the dynamics of the reduced model with 10 complexes deleted, whose error integral value exceeds 0.1, deviates significantly from the full model dynamics. On the other hand, the transient behavior of y of the reduced model with 9 complexes deleted is in close agreement with that of the original model. This reduced model has 14 complexes and 20 reactions and its complex graph is shown in Fig. 5.2b.

Fig. 5.4
figure 4

The clustering of complexes in the insulin-signaling-dependent glucose metabolism into 11 clusters using the proposed spectral clustering-based algorithm. The clusters are indicated by the dashed-line boxes and the labels \(\mathcal C_k\), \(k=1,\ldots , 11\) are given on the top-right corner of each boxes. The text in red indicates the species defined in output variable y. The number on top of every edge shows the edge weight which are taken from the adjacency matrix in the Laplacian matrix \(\mathcal {L}(x)\) using the nominal values of x

Since this network contains a directed sub-graph (the one that interconnects F16P, PYRin and OAA), for evaluating our proposed methods, we replace the cyclic sub-graph F16P\(\leftrightarrow \)FYRin\(\rightarrow \)OAA\(\rightarrow \)F16P by a reversible reaction F16P\(\leftrightarrow \)PYRin. The equilibrium constant of this reversible reaction is set according to the reaction constants in the original subnetwork. This ad hoc modification gives us an undirected complex graph for which our two proposed methods can be applied.

We apply our spectral clustering-based algorithm to this modified complex graph and the result is shown in Fig. 5.4. The subnetwork containing F16P, GLY, and GLCex is clustered into 5 clusters where three complexes, G1P, LAC, and PYRout are in clusters that do not contain any elements of y. On the other hand, for another subnetwork, there are two complexes, p2IRS and p1p2IRS, which is in a cluster that does not include any element of y. Similar to the result in glycolysis model above, one can observe that these five complexes are also listed in the Table 5.4. Hence removing these complexes via Kron reduction will give us a good reduced model. Indeed, numerical simulation of the Kron-reduced model where \(\mathcal {C}_\mathrm{red}=\{\text {G1P, LAC, PYRout, p2IRS, p1p2IRS}\}\) gives us an error integral of 0.0071. Since the rest of the network consists of simple sub-graphs with two vertices each, we can delete, for instance the clusters, \(\mathcal C_9\), \(\mathcal C_{10}\) and \(\mathcal C_{11}\).

Table 5.5 Optimal complexes for removal in the first connected sub-graph containing vertices F16P, GLY and GLCex, using the minimal eigenvalue interlacing-based algorithm

Using the same modified graph of complexes as above, we apply our second proposed approach to the first connected component of the graph and the result is given in Table 5.5. Our second approach identifies G6P as one of the best candidate for removal, in contrast to the result obtained in Table 5.4 where G6P is shown to be the least preferred complex for removal. Hence for this second model, we can conclude again that the spectral-based clustering approach is a better method than the eigenvalue interlacing-based one to identify complexes for the Kron reduction.

5.6 Conclusion

In this chapter, we propose two approaches for finding the best set of complexes to be deleted for the Kron reduction of a chemical reaction network. The proposed methods are based on the spectral properties of the weighted Laplacian of the complex graph corresponding to the network. The aim of these methods is to provide an alternative to the use of error integral that requires a numerical integration which can be computationally expensive, in particular, if we need to handle a very large dimensional model. We have applied the two approaches on two biological models. For both cases, it has been observed that the spectral-based clustering approach performs better than the eigenvalue interlacing-based approach. The extension of these methods to directed complex graphs, as commonly found in large dimensional biological models, is an interesting topic for further research. The result for directed graphs proposed in [17] can potentially be adapted to modify the spectral-based clustering approach presented in this chapter so as to make it applicable for directed graphs.