Automated Classification of Homeostasis Structure in Input-Output Networks Authors: Xinni Lin, Fernando Antoneli, Yangyang Wang Published: 2026 ABSTRACT AbstractHomeostasis is widely observed in biological systems and refers to their ability to maintain an output quantity approximately constant despite variations in external disturbances. Mathematically, homeostasis can be formulated through an input–output function mapping an external parameter to an output variable. Infinitesimal homeostasis occurs at isolated points where the derivative of this input–output function vanishes, allowing tools from singularity theory and combinatorial matrix theory to characterize and classify homeostatic mechanisms in terms of network topology. Although the theoretical framework allows homeostasis subnetworks to be identified directly from combinatorial structures of the input–output network without numerical simulation, the required combinatorial enumeration becomes increasingly intractable as network size grows. Moreover, the reliance on advanced graph-theoretic concepts limits its broader accessibility and practical use across disciplines, particularly in biological applications. To overcome these limitations, we develop a Python-based algorithm that automates the identification of homeostasis subnetworks and their associated homeostasis conditions directly from network topology. Given an input–output network specified solely by its connectivity structure and the designation of input and output nodes, the algorithm automatically identifies the relevant graph-theoretical structures and enumerates all homeostatic mechanisms. We demonstrate the applicability of the algorithm across a range of biological examples, including small and large networks, networks with a single input parameter (with single or multiple input nodes), multiple input parameters, and cases where input and output coincide. This wide applicability stems from our extension of the theoretical framework from single-input–single-output networks to networks with multiple input nodes through an augmented single-input-node representation. The resulting computational framework provides a scalable and systematic approach to classifying homeostatic mechanisms in complex biological networks, facilitating the application of advanced mathematical theory to a broad range of biological systems.Keywords: Infinitesimal homeostasis, Coupled dynamical systems, Input-output network, Robust perfect adaptation Introduction Homeostasis refers to a phenomenon whereby the output z of a system (e.g., body temperature) maintains approximately constant on variation of an input I (e.g., environmental temperature). Mathematically, this is often represented by an input-output function z(I) that is required to be nearly constant over a range of external stimuli I. Many researchers have emphasized that homeostasis is an important phenomenon in biology. For example, the extensive work of Nijhout, Reed, Best and collaborators (Nijhout et al. 2004; Reed et al. 2010; Best et al. 2009; Nijhout and Reed 2014; Nijhout et al. 2017; Reed et al. 2017; Nijhout et al. 2015, 2018) consider networks whose nodes represent the concentrations of certain biochemical substrates. Further examples include regulation of cell number and size (Lloyd 2013), the control of sleep (Wyatt et al. 1999), and the expression level regulation in housekeeping genes (Antoneli et al. 2018). The literature is huge, and these articles are a small sample. In related work under the name of perfect adaptation Ma et al. (2009) identify, among all three-node enzyme networks with Michaelis-Menten chemical kinetics, two networks that are able to adapt, that is, to reset themselves after responding to an external stimulus. This amounts to ask for the input-output function to be independent of the external stimuli I, i.e., z= constant. Perfect adaptation has been used widely, for example, in ecology, chemistry, and control engineering (cf. Ma et al. (2009); Ang and McMillen (2013); Tang and McMillen (2016); Ferrell (2016); Qian and Vecchio (2018); Araujo and Liota (2018); Vecchio et al. (2018); Aoki et al. (2019); Hong et al. (2025); Drengstig et al. (2012)). Golubitsky and Stewart (2017) introduced the notion of infinitesimal homeostasis that is intermediary between perfect adaptation and general homeostasis. Consider system of ordinary differential equations (ODEs) depending on an input parameter I, which varies over a range of external stimuli. Suppose there is a family of equilibrium points X(I) and an observable ϕ, such that the input-output function z(I)=ϕ(X(I)) is well-defined on the range of I. In this situation, we say that the system exhibits homeostasis if, under variation of the input parameter I, the input-output function z(I) remains approximately constant over the interval of external stimuli. We say that the system exhibits infinitesimal homeostasis at I0 if z′(I0)=0, where ′ indicates differentiation with respect to I. Obviously, perfect adaptation (or perfect homeostasis) occurs when z′≡0. Therefore, perfect homeostasis implies infinitesimal homeostasis at all points and infinitesimal homeostasis at I0 implies homeostasis in a neighborhood of I0. It is not difficult to see that the converse do not hold in both cases. One of the benefits of working with the notions of infinitesimal homeostasis is that it amounts to a very simple property to check, namely, if a derivative of a function is zero at some point. On the other hand, this simple property opens up to the possibility to apply the powerful theorems of singularity theory to describe the topological structure of input-output functions. Indeed, already in Golubitsky and Stewart (2017) the authors are able to show that scalar input-output functions z:R→R can be classified by Elementary Catastrophe Theory (Thom 1969, 1975; Zeeman 1977). A particularly fruitful approach to understand the mechanisms that lead to homeostasis is to regard homeostasis as a network concept. This is motivated by the abundance of networks in biology, specially connected to ODE modeling, see e.g. Nijhout et al. (2014); Reed et al. (2017); Ferrell (2016). In fact, almost all ODE models in biology come together with a ‘wiring diagram’, or a network, describing the interactions among the elements in the model. The recently published book (Golubitsky and Stewart 2023) gives an exposition of a formal framework for studying networks of coupled ODEs, that have been developed by the authors and collaborators in the past decade. More precisely, a network of coupled ODEs is determined by directed graph whose nodes and edges are classified into types. Nodes, or cells, represent the variables of a component ODE. Edges, or arrows, between nodes represent couplings from the tail node to the head node. Nodes of the same type have the same phase spaces (up to a canonical identification); edges of the same type represent identical couplings. In the setting of networks of coupled ODEs there is a preferable class of observables, namely the output of the node variables (coordinate functions). Network systems are distinguished from large systems by the ability to keep track of the output from each node individually. Now homeostasis can be naturally defined as the fact that the output of a node variable (the ‘output node’) is held approximately constant as other variables (other nodes) vary (perhaps wildly) under variation of an input parameter that affects another node (the ‘input node’). Placing homeostasis in the general context of network dynamics leads naturally to the methods reviewed here. A special kind of network of coupled ODE, with two distinguished nodes (one input node and one output node) is called an input-output network or single-input-single-output network. It was introduced in (Golubitsky and Wang 2020) in their study of homeostasis on 3-node networks. Wang et al. (2021) extended the notion of input-output network to arbitrary large networks and developed a combinatorial theory for the classification of ‘homeostasis types’ in such networks. A homeostasis type is essentially a ‘combinatorial mechanism’ that causes homeostasis in the full network and is represented by specific subnetworks, called homeostasis subnetworks. The homeostasis subnetworks can be subdivided into two classes called structural and appendage. The motivation for the term structural homeostasis comes from Reed et al. (2017), where the authors identify the feedforward loop as one of the homeostatic motifs in 3-node biochemical networks. In this case, homeostasis is caused by a ‘balance’ along the directed paths of feedforward loop, forming the ‘structural backbone’ of the input-output network. The intuition behind the term appendage homeostasis is that homeostasis is generated by a cycle of nodes attached to nodes in ‘structural backbone’ of the input-output network. Hence, the structural and appendage classes are abstract generalizations of the usual ‘feedforward’ and ‘feedback’ mechanisms. A striking outcome of Wang et al. (2021) is that they do not specify any homeostasis generating mechanisms at the outset and they find a posteriori that there are essentially only the two types of homeostasis generating mechanisms: generalized feedback (structural) and generalized feedforward (appendage). Currently, homeostasis subnetworks are recognized by manually computing certain combinatorial structures of the input-output network (see section 2 for the definitions). However, this process would pose significant computational challenges in the case of large networks. As the network size increases, identifying these combinatorial structures becomes increasingly untractable. Main results of the paper To address this issue, in this paper we present a Python-based algorithm that automates the identification of homeostasis subnetworks of an input-output network. The main contributions of this work are as follows: We extend the existing theory developed for single-input-single-output network (Wang et al. 2021) to more general input-output networks with multiple inputs or multiple input nodes. We extend the existing theory developed for single-input-single-output network (Wang et al. 2021) to more general input-output networks with multiple inputs or multiple input nodes. We develop a fully automated algorithm that identifies all homeostasis subnetworks and derives the corresponding homeostasis conditions directly from network topology. We develop a fully automated algorithm that identifies all homeostasis subnetworks and derives the corresponding homeostasis conditions directly from network topology. We demonstrate the effectiveness of the approach through biologically motivated examples, including networks ranging from small to moderately large scale, with single or multiple inputs, single or multiple input nodes, as well as networks in which the input coincides with the output node. We demonstrate the effectiveness of the approach through biologically motivated examples, including networks ranging from small to moderately large scale, with single or multiple inputs, single or multiple input nodes, as well as networks in which the input coincides with the output node. Structure of the paper The remainder of our paper is organized as follows. In Section 2.1, we give the basic definitions of infinitesimal homeostasis, input-output networks, admissible system, and the homeostasis matrix, together with a number of combinatorial terms required for the theoretical characterization of homeostasis in an input-output network. These combinatorial structures enable the identification and classification of all the homeostasis subnetwork motifs based only on the network architecture, without performing numerical simulations on model equations. In Section 2.2, we extend the theory developed for the single-input framework (Wang et al. 2021) to more general input-output networks with multiple inputs or multiple input nodes. In Section 3, we describe the implementation and usage of our Python-based classification algorithm based on the theory developed in Section 2. We illustrate the workflow using a 12-node example network whose homeostatic structure has been fully analyzed in Wang et al. (2021). In Section 4, we apply the algorithm to several biological network examples ranging from small to relatively large networks. Finally, we conclude in Section 5. Infinitesimal Homeostasis in Input-Output Networks Single-Input Single-Output Networks We start with the case of single-input single-output input-output networks G, see Golubitsky and Wang (2020); Wang et al. (2021). The types of homeostasis that admissible systems of differential equations of G can exhibit are characterized by the topology of so called homeostasis subnetworks. Given an input-output network G there is an algorithm for determining the homoestasis subnetworks of G. In order to present the algorithm, we briefly review the basic definitions and results of Wang et al. (2021). As noted previously (Golubitsky and Stewart 2017; Reed et al. 2017; Golubitsky and Wang 2020), a straightforward application of Cramer’s rule gives a formula for determining infinitesimal homeostasis points. See Lemma 2.3. An input-output network G is a directed graph consisting of n+2 nodes. There is an input node ι, an output node o, and n regulatory nodes ρ=(ρ1,…,ρn). An admissible system associated with the input-output network G is a parameterized system of ODEs where X=(xι,xρ,xo)∈Rn+2 are the node state variables, I∈R is the external input parameter, and F=(fι,fρ,fo) is the associated vector field. Explicitly, (2.1) is the system We make the following assumptions about the vector field F throughout: The vector field F is smooth and has an asymptotically stable equilibrium at (X0,I0). The vector field F is smooth and has an asymptotically stable equilibrium at (X0,I0). fj depends on node ℓ only if there is an arrow in the network G from ℓ→j. fj depends on node ℓ only if there is an arrow in the network G from ℓ→j. fι is the only vector field component that depends explicitly on I and fι,I≠0 generically. fι is the only vector field component that depends explicitly on I and fι,I≠0 generically. We write fi,xj to denote the partial derivative of fi with respect to j at (X0,I0). Remark 2.1 In Wang et al. (2021) the authors explicitly exclude the possibility that the output node is one of the input nodes. This assumption is included purely for the sake of convenience. In fact, all the definitions and results remain valid (including the algorithm for classification of homeostasis subnetworks) when the input node is the same as the output nodes (see Antoneli et al. (2025) and sub-section 2.1.1). In example 4.6 we apply our algorithm and discuss a network where the input node equals the output node. ◊ It follows from the assumption that X0 is a linearly stable equilibrium of (2.2) at I=I0 and the implicit function theorem that there is a unique smooth family of stable equilibria X(I)=(xι(I),xρ(I),xo(I)) as I varies on neighborhood of I0. This allows us to define the notion of ‘infinitesimal homeostasis’ in the context of input-output networks. Definition 2.2 The input-output function of system (2.2), at the family of equilibria (X(I),I), is the function I→xo(I), that is, the projection of X(I) onto the coordinate xo. We say that the input-output function xo(I) exhibits infinitesimal homeostasis at I0, if where ′ indicates differentiation with respect to I. We say that the input-output function xo(I) exhibits perfect homeostasis or perfect adaptation if xo′≡0, that is, xo(I) is constant. ◊ We use the following notation. Let J be the (n+2)×(n+2) Jacobian matrix of (2.2) and let H be the (n+1)×(n+1) homeostasis matrix given by dropping the first row and the last column of J: Here all partial derivatives fℓ,xj are evaluated at the equilibrium Xo. Lemma 2.3 Let (X0,I0) be an asymptotically stable equilibrium of (2.2). The input-output function xo(I) satisfies Hence, I0 is a point of infinitesimal homeostasis if and only if at (Xo,I0). Homeostasis in a given network G can be determined by analyzing a simpler network that is obtained by eliminating certain nodes and arrows from G. We call the network formed by the remaining nodes and arrows the core subnetwork. Definition 2.4 A node τ in a network G is downstream from a node ρ in G if there exists a path in G from ρ to τ. Node ρ is upstream from node τ if τ is downstream from ρ. ◊ Definition 2.5 The input-output network G is a core network if every node in G is both upstream from the output node o and downstream from the input node ι. Gc is the core subnetwork whose nodes are the nodes in G that are both upstream from the output and downstream from the input and whose arrows are the arrows in G whose head and tail nodes are both nodes in Gc. ◊ Core networks always have that det(H)≠0, as multivariate polynomial in fℓ,xj (see (Madeira and Antoneli, 2022, App. B)). In other words, in non-core networks det(H) might vanish identically. The computation of infinitesimal homeostasis reduces to solving det(H)=0, where H is the homeostasis matrix associated with the core subnetwork of G. Applying Frobenius-König theory (Brualdi and Ryser 1991; Schneider 1977) to H, Wang et al. (2021) shows that there is a unique factorization det(H)=det(B1)⋯det(Bm). Each block submatrix Bη is an irreducible component of H, with det(Bη)=0 and det(Bχ)≠0 for all χ≠η being a defining condition for infinitesimal homeostasis. This is generic when there is only one input parameter. Furthermore, one can associate a homeostasis subnetwork Kη of G with each Bη. Definition 2.6 Let G be a core input-output network. A directed path connecting nodes ρ and τ is called a simple path if it visits each node on the path at most once. A directed path connecting nodes ρ and τ is called a simple path if it visits each node on the path at most once. An ιo-simple path is a simple path connecting the input node ι to the output node o. An ιo-simple path is a simple path connecting the input node ι to the output node o. A node in G is simple if the node lies on an ιo-simple path and appendage if the node is not simple. A node in G is simple if the node lies on an ιo-simple path and appendage if the node is not simple. A super-simple node is a simple node that lies on every ιo-simple path. A super-simple node is a simple node that lies on every ιo-simple path. Nodes ι and o are super-simple since by definition these nodes are on every ιo-simple path. ◊ Observe that super-simple nodes are well ordered (by downstream ordering) and hence adjacent super-simple pairs of nodes can be identified. Appendage Homeostasis If Bη corresponds to an irreducible appendage block, then the associated homeostasis subnetwork Kη consists of only appendage nodes and its Jacobian matrix is given by Bη. Combinatorial characterization of appendage homeostasis networks requires the following definitions. Definition 2.7 Let G be a core input-output network. The appendage subnetwork AG of G is the subnetwork consisting of all appendage nodes and all arrows in G connecting appendage nodes. The appendage subnetwork AG of G is the subnetwork consisting of all appendage nodes and all arrows in G connecting appendage nodes. The complementary subnetwork of an ιo-simple path S is the subnetwork CS consisting of all nodes not on S and all arrows in G connecting those nodes. The complementary subnetwork of an ιo-simple path S is the subnetwork CS consisting of all nodes not on S and all arrows in G connecting those nodes. Nodes ρi,ρj in AG are path equivalent if there exists paths in AG from ρi to ρj and from ρj to ρi. An appendage path component is a path equivalence class in AG. Nodes ρi,ρj in AG are path equivalent if there exists paths in AG from ρi to ρj and from ρj to ρi. An appendage path component is a path equivalence class in AG. A cycle is a path whose first and last nodes are identical. A cycle is a path whose first and last nodes are identical. Let K⊂AG be a subnetwork. We say that K satisfies the no cycle condition if for every ιo-simple path S, nodes in K do not form a cycle with nodes in CS\K. ◊ Let K⊂AG be a subnetwork. We say that K satisfies the no cycle condition if for every ιo-simple path S, nodes in K do not form a cycle with nodes in CS\K. ◊ Remark 2.8 Nodes in the appendage subnetwork AG can be written uniquely as the disjoint union where each Ai is an appendage path component that satisfies the no cycle condition and each Bi is an appendage path component that violates the no cycle condition. Moreover, each Ai (resp. Bi) can be viewed as a subnetwork of AG by including the arrows in AG that connect nodes in Ai (resp. Bi). We call Ai a no cycle appendage path component and Bi a cycle appendage path component. ◊ Structural Homeostasis If Bη corresponds to an irreducible structural block, then Kη has two adjacent super-simple nodes and these super-simple nodes are the input node ℓ and the output node j in Kη. In addition, the network Kη contains no backward arrows. That is, no arrows of Kη go into the input node ℓ nor out of the output node j. Definition 2.9 The structural subnetwork SG of G is the subnetwork whose nodes are either simple or in a cycle appendage path component Bi (see Remark 2.8) and whose arrows are arrows in G that connect nodes in SG. ◊ All structural homeostasis subnetworks are contained in SG, which is an input-output network. That is, G and SG have the same simple, super-simple, input, and output nodes. Moreover, every non-super-simple simple node lies between two adjacent super-simple nodes. Definition 2.10 Let ρ1,ρ2 be adjacent super-simple nodes. A simple node ρ is between ρ1 and ρ2 if there exists an ιo-simple path that includes ρ1 to ρ to ρ2 in that order. A simple node ρ is between ρ1 and ρ2 if there exists an ιo-simple path that includes ρ1 to ρ to ρ2 in that order. The super-simple subnetwork, denoted L(ρ1,ρ2), is the subnetwork whose nodes are simple nodes between ρ1 and ρ2 and whose arrows are arrows of G connecting nodes in L(ρ1,ρ2). ◊ The super-simple subnetwork, denoted L(ρ1,ρ2), is the subnetwork whose nodes are simple nodes between ρ1 and ρ2 and whose arrows are arrows of G connecting nodes in L(ρ1,ρ2). ◊ It follows that all L(ρ1,ρ2) are contained in SG and each appendage node in SG connects to exactly one L. Hence, a super-simple subnetwork L⊂SG can be expanded to a super-simple structural subnetwork L′⊂SG as follows. Definition 2.11 Let ρ1 and ρ2 be adjacent super-simple nodes in G. The super-simple structural subnetwork L′(ρ1,ρ2) is the input-output subnetwork consisting of nodes in L(ρ1,ρ2)∪B where B consists of all appendage nodes that form cycles with nodes in L(ρ1,ρ2); that is, all cycle appendage path components that connect to L(ρ1,ρ2). Arrows of L′(ρ1,ρ2) are arrows of G that connect nodes in L′(ρ1,ρ2). Thus, ρ1 is the input node and ρ2 is the output node of L′(ρ1,ρ2). ◊ Networks with Input = Output Andrade et al. (2022); Antoneli et al. (2025, 2026a) provide a detailed discussion of the infinitesimal homeostasis formalism in the case where the input and the output nodes are the same. We briefly recall the main points in the following. When the network G has the same node as the input and output nodes the corresponding variables coincide xι=xo and we call the network an input=output network and ι the input = output node. In this case the vector of state variable is X=(xι,xρ)∈R×RN and the system of ODE’s (2.1) becomes Let J be the (N+1)×(N+1) Jacobian matrix of an admissible vector field F=(fι,fσ), that is, Now, the N×N homeostasis matrix H is obtained from J by removing the first row and the first column: In both (2.9) and (2.10) partial derivatives fℓ,xj are evaluated at the equilibrium (X(I),I). The main difference between the homeostasis matrix (2.10) and the homeostasis matrix of network with distinct input and output nodes is that the former contains only the partial derivatives associated with the regulatory nodes, while the latter contains partial derivatives involving the input and the output nodes, as well. In fact, the matrix H in eq. (2.10) is the Jacobian matrix of the subnetwork generated by the regulatory nodes. As we have seen, the classification of homeostasis subnetworks stats with the reduction the the core subnetwork. The same definition of core network and core-equivalence apply to an input = output network. However, in the input = output case, the condition that a node ρ that is both upstream from the output node and downstream from the input node takes a special form. Lemma 2.12 Let G be an input = output network, with input = output node ι. A regulatory node ρ belongs to the core subnetwork Gc if and only if ρ belongs to a cycle that contains the input = output node ι. Proof A directed path starting and ending at the same node is a cycle. □ Corollary 2.13 An input = output network G is a core network if and only if every regulatory node of G belongs to a cycle that contains the input = output node. In a core network G where the input node is distinct from the output node, a simple node is always downstream from the input node and upstream from the output node, but not ‘the other way around’. That is, if a node is downstream the output node and/or upstream the input node then it must be an appendage node. Indeed, if G is a core network then every node is downstream from the input node and upstream from the output node. Then a node that satisfies ‘the other way around’ condition above must be on an ιo-path that cycles around the input and/or the output node. We note the not every appendage node is of this type, that is, it may be on an ιo-path that cycles around other regulatory nodes. Hence, we have the following. Lemma 2.14 Let G be a core input = output network. Then every node of G is appendage. Proof Since every node in a core input = output network forms a cycle with the input = output node it follows that every node is downstream the output node and upstream the input node. Thus, every node is appendage. □ Corollary 2.15 Structural homeostasis does not exist in input = output networks. The next theorem summarizes the classification of homeostasis subnetworks of an input = output network. Theorem 2.16 If G is an input = output network then the appendage subnetwork of G is exactly the subnetwork of G generated by all regulatory nodes. Moreover, the irreducible factors of det(H) correspond to the appendage path components Ak and are given by det(J(Ak)). Here J(Ak) is the jacobian matrix associated with the network Ak. Proof By lemma 2.14 it follows that the set of nodes of AG is exactly the set of regulatory nodes. Hence they generate the same network. The, it follows from (Wang et al., 2021, Thm. 7.1), that all irreducible blocks of the homeostasis matrix correspond to the appendage path components. Moreover, since there are no simple nodes the “no cycle condition” is trivially satisfied by all appendage path components. Finally, it follows from (Wang et al., 2021, Thm. 5.4) that the corresponding irreducible factor of det(H) is of the form det(J(Ak)). □ Algorithm for the Classification of Homeostasis Subnetworks Here is the algorithm for enumerating subnetworks corresponding to the m homeostasis blocks (see Wang et al. (2021)). Step 1: Determining the appendage homeostasis subnetworks from AG. Let be the no cycle appendage path components of AG (see Remark 2.8). These appendage path components are the subnetworks Kη that correspond to appendage homeostasis blocks. In addition, there are s independent defining conditions for appendage homeostasis given by the determinants of the Jacobian matrices det(JAi)=0 for i=1,…,s. Step 2: Determining the structural homeostasis subnetworks from SG. Let ι=ρ1>ρ2>…>ρq+1=o be the super-simple nodes in SG in downstream order. Then, up to core equivalence, the q super-simple structural subnetworks are the subnetworks Kη that correspond to structural homeostasis blocks. In addition, there are q defining conditions for structural homeostasis blocks given by the determinants of the homeostasis matrices of the input-output networks: det(H(L′(ρi,ρi+1)))=0 for i=1,…,q. Therefore, the m=s+q subnetworks listed in (2.11) and (2.12) enumerate the appendage and structural homeostasis subnetworks in G. Generalization to Multiple-Input Single-Output Networks Here we explain how to extend the theory developed for single-input framework (algorithm 2.1.2) to more general input-output networks, by reducing to the single-input single-output case. The first step is to consider single-input single-output input-output network with multiple input nodes, but a single input parameter. Then we can deal with the general case of multiple-input single-output input-output networks, that is, input-output network with multiple input nodes and multiple input parameters. Single-Input Single-Output Networks with Multiple Input Nodes In Madeira and Antoneli (2022), the authors extend the approach of Wang et al. (2021) to deal with the multiple input node case. They consider the influence of the input parameter on each input node separately by constructing a distinguished set of subnetworks with a single input node. This strategy effectively reduces the problem to the single input node case. Then they show how to put together the classification of homeostasis subnteworks of the the networks in the distinguished set of subnetworks with a single input node. Here, we will present an alternative approach to the classification of the homeostasis subnetworks of networks with multiple input nodes that allows us to directly apply algorithm 2.1.2. Let us briefly recall some definitions and results from Madeira and Antoneli (2022) before introducing the alternative approach. A multiple input-node input-output network is a network G with n distinguished input nodes ι={ι1,…,ιn}, all of them associated to the same input parameter I, one distinguished output node o, and N regulatory nodes ρ={ρ1,…,ρN}. The associated network systems of differential equations have the form where I∈R is an external input parameter and X=(xι,xρ,xo)∈Rn×RN×R is the vector of state variables associated to the network nodes. Finally, assume that G satisfies the following condition: the output node is downstream from all input nodes. We write a vector field associated with the system (2.13) as and call it an admissible vector field for the network G. Let fj,xℓ denote the partial derivative of the jth node function fj with respect to the ℓth node variable xℓ. We make the following assumptions about the vector field F throughout: The vector field F is smooth and has an asymptotically stable equilibrium at (X∗,I∗). Therefore, by the implicit function theorem, there is a function X~(I) defined in a neighborhood of I∗ such that X~(I∗)=X∗ and F(X~(I),I)≡0. The vector field F is smooth and has an asymptotically stable equilibrium at (X∗,I∗). Therefore, by the implicit function theorem, there is a function X~(I) defined in a neighborhood of I∗ such that X~(I∗)=X∗ and F(X~(I),I)≡0. The partial derivative fj,xℓ can be non-zero only if the network G has an arrow ℓ→j, otherwise fj,xℓ≡0. The partial derivative fj,xℓ can be non-zero only if the network G has an arrow ℓ→j, otherwise fj,xℓ≡0. Only the input node coordinate functions fιm depend on the external input parameter I and the partial derivative of fιm,I generically satisfies 2.14fιm,I≠0. Only the input node coordinate functions fιm depend on the external input parameter I and the partial derivative of fιm,I generically satisfies 2.14fιm,I≠0. Let J be the (n+N+1)×(n+N+1) Jacobian matrix of an admissible vector field F=(fι,fσ,fo), that is, The (n+N+1)×(n+N+1) matrix ⟨H⟩ obtained from J by replacing the last column by (-fι,I,0,0)t, is called generalized homeostasis matrix: Here all partial derivatives fℓ,xj are evaluated at (X~(I),I). Lemma 2.17 The input-output function xo(I) satisfies Here det(J) and det(⟨H⟩) are evaluated at (X~(I),I). Hence, I0 is a point of infinitesimal homeostasis if and only if at the equilibrium (X~(I0),I0). By expanding det(⟨H⟩) with respect to the last column and each ιk (input) row one obtains The partial homeostasis matrix Hιm is obtained from the Jacobian matrix J of F by dropping the last column and the ιm row; see (2.20) below. Note that when there is a single input node, i.e. n=1, Lemma 2.17 gives the corresponding result obtained in Wang et al. (2021). In this case, there is only one matrix Hιm=H, which reduces to the homeostasis matrix from single input node case. The generalization of the notion of core network to the multiple input nodes is straightforward. Definition 2.18 Let G be a network with input nodes ι1,…,ιn and output node o. We call G a core network if every node in G is upstream from o and downstream from at least one input node. Gc is the core subnetwork whose nodes are the nodes in G that are both upstream from o and downstream from at least one input node and whose arrows are the arrows in G whose head and tail nodes are both nodes in Gc. ◊ In Madeira and Antoneli (2022) the authors proceed to extend all the combinatorial properties of the single input node case to the multiple input node case, culminating with the definitions of homeostasis subnetworks. Then the classification proceeds by carefully analyzing how these notions relate with the corresponding notions on each single input node subnetwork of the distinguished set. Now, we are in position to describe our new approach to the classification of the homeostasis subnetwork of networks with multiple input nodes (see Theorem 2.19 below). Specifically, we augment the network G by introducing a new input node xI that connects to all original input nodes and whose dynamics enforces xI(t)=I asymptotically. This construction effectively converts an n+N-node multiple input node network to an n+N+1-node single input node network, allowing the theory and classification results we developed in Wang et al. (2021) for single input node networks to be applied directly. Theorem 2.19 Let G be a single-input input-output network with n distinguished input nodes ι=(ι1,⋯,ιn) receiving the same input from I∈R, N regulatory nodes ρ, and one distinguished output node o. Construct the augmented network G⋄ by introducing a new input node I and converting the original input nodes ι=(ι1,⋯,ιn) into regulatory nodes, by adding directed edges I→ιj for j=1,⋯,n. Extend the vector field F=(fι,fρ,fo) to F⋄=(fI,fι,fρ,fo) in such a way that the equation for the new input node variable x˙I(t)=fI(xI,I) enforces xI(t)≡I asymptotically. Then the infinitesimal homeostasis matrix H⋄ of G⋄ is identical to the generalized homeostasis matrix ⟨H⟩ of G given by (2.16), up to a sign difference. Proof Let H⋄ be the homeostasis matrix for the augmented network G⋄. We prove below that det(H⋄)=det(⟨H⟩), as polynomials in (fℓ,xj), up to a sign. Consequently, both formulations yield identical infinitesimal homeostasis conditions. We define the dynamics of the new input node as which ensures xI(t)=I asymptotically. Moreover, because of the skew product form of F⋄, if the original system F is stable at an equilibrium (X0,I0) then the extended system F⋄ is stable at the corresponding equilibrium (I0,X0,I0). Other choices of dynamics are possible. This is one working example. We then rewrite dynamics for the original set of input nodes as which now become regulatory nodes that do not directly depend on the input parameter I. The Jacobian matrix J⋄ of G⋄ becomes: By Lemma 2.3, the input-output function xo(I) of this augmented network satisfies where H⋄ is obtained from removing the first row and the last column of J⋄: The second equality follows that, at the stable equilibrium, xI=I. Through two column exchanges, we obtain that det(H⋄)=det(⟨H⟩). □ Since the multivariate polynomial det(H⋄) have the same irreducible factors of det(⟨H⟩), we can apply algorithm 2.1.2 to the augmented network G⋄. Moreover, it follows from (Madeira and Antoneli, 2022, Thm. 3.26) that there exist exactly one irreducible factor of det(⟨H⟩) that contains all terms of the form fιi,I. This irreducible factor is associated with the input counterweight homeostasis type. In the irreducible decomposition of det(H⋄) the input counterweight homeostasis type corresponds to one of the structural homeostasis types, the one associated with the unique irreducible factor that contains all terms of the form fιi,xI (since these terms correspond to fιi,I). It may happen that the output node coincides with one of the input nodes ιj. Then, in principle, one would have to take into account the observations from sub-section 2.1.1. However, it is easy to see that the augmented network always has the new input node distinct from the output node and hence one is back to the usual case where the input and the output nodes are distinct (Wang et al. 2021). Multiple-Input Single-Output Networks In Madeira and Antoneli (2024), the authors extend the approach of Wang et al. (2021); Madeira and Antoneli (2022) to deal with the general multiple-input single output case. Here, we will show that algorithm 2.1.2 can be applied multiple times to certain single-input single-output networks and hence obtain a classification of homeostasis types in this case, as well. Let us briefly recall some definitions and results from Madeira and Antoneli (2024) before explaining the strategy to apply algorithm 2.1.2 to obtain a classification of homeostasis types. A multiple-input single-output network, or simply a multiple inputs network, is a network G with n distinguished input nodes ι={ι1,ι2,…,ιn}, all of them associated to at least one input parameter IM, M=1,…,N, one distinguished output node o, and r regulatory nodes ρ={ρ1,…,ρr}. The associated system of differential equations has the form where I=(I1,⋯,IN)∈RN is the vector of input parameters, or simple the vector of inputs, and X=(xι,xρ,xo)∈Rn×Rr×R is the vector of state variables associated to the network nodes. We write a vector field associated with the system (2.22) as and call it an admissible vector field for the network G. Let fj,xi denote the partial derivative of the jth node function fj with respect to the ith node variable xi. We make the following assumptions about the vector field F throughout: The vector field F is smooth and has a linearly stable equilibrium at (X∗,I∗). Therefore, by the implicit function theorem, there is a function X~(I) defined in a neighborhood of I∗ such that X~(I∗)=X∗ and F(X~(I),I)≡0. The vector field F is smooth and has a linearly stable equilibrium at (X∗,I∗). Therefore, by the implicit function theorem, there is a function X~(I) defined in a neighborhood of I∗ such that X~(I∗)=X∗ and F(X~(I),I)≡0. The partial derivative fj,xi can be non-zero only if the network G has an arrow i→j, otherwise fj,xi≡0. The partial derivative fj,xi can be non-zero only if the network G has an arrow i→j, otherwise fj,xi≡0. Only the input node coordinate functions fιk depend on at least one of the components of the vector of input parameters I and the partial derivative of fιk,IM generically satisfies 2.23∂fιk∂IM=fιk,IM≠0. for some M=1,…,N. Only the input node coordinate functions fιk depend on at least one of the components of the vector of input parameters I and the partial derivative of fιk,IM generically satisfies 2.23∂fιk∂IM=fιk,IM≠0. for some M=1,…,N. Now the input-output function xo is multivariate, that is xo:RN→R. Infinitesimal homeostasis in a multiple inputs network is given by the critical points of xo(I), namely, the zeros of the gradient vector Let J be the (n+r+1)×(n+r+1) Jacobian matrix of an admissible vector field F=(fι,fσ,fo), that is, For each 1≤M≤N, consider the (n+r+1)×(n+r+1) matrix ⟨HM⟩ obtained from J by replacing the last column by (-fι,IM,0,0)t, which is called IM-generalized homeostasis matrix: Here all partial derivatives fℓ,xj are evaluated at (X~(I),I). Lemma 2.20 Let xo(I) be input-output function of a multiple inputs network. The partial derivative of xo(I) with respect to the M-th parameter IM satisfies Here det(J) and det⟨HM⟩ are evaluated at the equilibrium point X~(I). Hence, Moreover, I0 is a point of infinitesimal homeostasis if and only if as a function of I evaluated at I0. Remark 2.21 An explicit expression for det⟨HM⟩ can be obtained by expanding it with respect to the last column and the ιm-th row: Here Hιm is obtained from H by removing the last column and the ιm-th row. When there is a single input, i.e. N=1, the gradient ∇xo reduces to ordinary derivative xo′ and (2.28) gives the formula for xo′ obtained in Madeira and Antoneli (2022). When there is a single input and a single input node, N=n=1, there is only one matrix Hιm=H, called the homeostasis matrix and (2.28) gives the corresponding formula for xo′ obtained in Wang et al. (2021). ◊ Definition 2.22 Let G be a multiple inputs network. The core subnetwork Gc of G is the subnetwork whose nodes are: (i) the input nodes ι1,…,ιn, (ii) the regulatory nodes ρ that are upstream from the output node and downstream of at least one input node, and (iii) the output node o. The arrows of Gc are the arrows of G connecting the nodes of Gc. ◊ From this point we will depart from Madeira and Antoneli (2024) and incorporate the alternative approach from the previous section 2.2.1. Let G be a core multiple inputs network with inputs I1,…,IN. The IM-specialized network GIM is defined as the (single input prameter) input-output network consisting of the network G with the input nodes being exactly the nodes affected by the input parameter IM. In principle, the specialized network GIM is a multiple input node network with single input parameter IM, as studied in Madeira and Antoneli (2022) and considered in the previous section 2.2.1. Now, when the specialized network GIM has more than one input node we can apply the construction of Theorem 2.19 and replace GIM by its augmented version GM⋄. In this way all specialized networks are single-input single output networks. However, it may happen that, although the multiple inputs network G is core, when one drops all the other input parameters, the network GIM (or GM⋄) become non-core. Therefore, one needs to consider the corresponding core networks GMc (or GM⋄c). Moreover, some of these single-input single-output networks might have the input the same as the output node. In any case, the algorithm can deal with all these networks. Now, in order to put together the results of computation of the homeostasis subnetworks for each network GIM (or GM⋄) we need one more definition. Definition 2.23 The vector determinant associated to an input-output network is the vector-valued function defined by where det⟨HIM⟩, M=1,…,N, is the determinant of generalized homeostasis matrix of the network GIMc or its augmented version GM⋄c, according with the situation. The vector-valued function h^ can be considered as a (formal) polynomial mapping on the ‘variables’ fj,xi and fj,IM. ◊ The following theorem ensures that h^ contains all the information to classify the homeostasis subnetworks (see Madeira and Antoneli (2024)). Theorem 2.24 The irreducible factors of h^ are exactly the irreducible factors of ∇xo that can induce homeostasis. The König-Frobenius theorem (Schneider 1977; Brualdi and Cvetkoić 2009) (see also Wang et al. (2021); Madeira and Antoneli (2022)) imply that the components of the polynomial mapping h^ can be factorized as the product of the determinants of the irreducible diagonal blocks of each ⟨HIM⟩ (defined up to row and column permutations). An irreducible block B of some ⟨HIM⟩ is called a homeostasis block. We can further collect the factors that are common irreducible diagonal blocks of all matrices ⟨HIM⟩ and bring them to the front as scalar factors. Then we can write Therefore, we can split the problem of classifying homeostasis types supported by G into two cases according to whether the components of h^ have a common scalar factor or not. Definition 2.25 Let G be a core multiple inputs network and consider its vector determinant h^ (2.32). A homeostasis block corresponding to scalar factor det(Bi) of h^ is called a pleiotropic homeostasis block. The other homeostasis blocks are called coincidental. ◊ Remark 2.26 In genetics, pleiotropy refers to the phenomenon when a single locus affects multiple traits. Here, we employed the term pleiotropic homeostasis referring to the fact that the vanishing of one single homeostasis block leads to the vanishing of the whole homeostasis vector h^. ◊ Definition 2.27 Let G be a core multiple inputs network. We say that pleiotropic homeostasis occurs when at least one pleiotropic block has vanishing determinant at some fixed input value. The pleiotropic blocks determine the pleiotropic homeostasis types of G, which can be of appendage, structural or counterweight types. We say that pleiotropic homeostasis occurs when at least one pleiotropic block has vanishing determinant at some fixed input value. The pleiotropic blocks determine the pleiotropic homeostasis types of G, which can be of appendage, structural or counterweight types. We say that coincidental homeostasis occurs when a N-tuple of coincidental blocks (BI11,…,BINN) has simultaneously vanishing determinants at some fixed input value. The N-tuples of coincidental blocks determine the coincidental homeostasis types of G. Coincidental blocks can be of appendage, structural or counterweight types. Hence, the coincidental homeostasis type associated to a N-tuple of coincidental blocks is a combination of single homeostasis types. ◊ We say that coincidental homeostasis occurs when a N-tuple of coincidental blocks (BI11,…,BINN) has simultaneously vanishing determinants at some fixed input value. The N-tuples of coincidental blocks determine the coincidental homeostasis types of G. Coincidental blocks can be of appendage, structural or counterweight types. Hence, the coincidental homeostasis type associated to a N-tuple of coincidental blocks is a combination of single homeostasis types. ◊ Reduction to the Single Input Node Case As discussed above, although the algorithm for the classification of homeostasis subnetworks is formulated for single input node networks, the other cases can be reduced to this case, as far as the classification of homeostasis subnetworks is concerned. That is, in applying the algorithm, one does not need to specify the detailed dynamics (knowing at least one such dynamics exists is enough); only the network structure (i.e., the adjacency matrix or edge list) is needed for the algorithm to determine the classification. Networks with multiple input nodes, G, can be readily adapted to the single input node case by augmenting the original network to G⋄ through the introduction of a new input node that connects to all original input nodes (Theorem 2.19). For multiple inputs networks, one can apply the algorithm repeatedly by considering one input parameter at a time, augmenting each specialized network with a new input node if necessary, and then combine the results together as explained above. The reduction of the specialized networks to their core network is done automatically by the algorithm (see Section 3). As shown before, this step is necessary to obtain only the subnetworks corresponding to the irreducible factors of the vector determinant. Algorithm Overview We develop an automated procedure for identifying and classifying all homeostasis subnetworks in input-output networks, based on the theoretical framework introduced in Section 2. This automated classification algorithm operates on a single user-defined input data file, with a special structure, that encodes the network topology (represented as a directed graph) together with the designation of input and output nodes. To specify the network topology, users may provide either an admissible system associated with the network structure, the corresponding adjacency matrix, or an edge list specifying network connectivity. Remark 3.1 The algorithm is designed for single-input-single-output networks with single input node. For networks with multiple input nodes, users must first reformulate the network into an equivalent single-input-node representation, as described in Subsection 2.2.1 (Theorem 2.19). For networks with multiple inputs, users must provide separate input data files for each designated input parameter and run the algorithm independently for each case, then combine the resulting outputs, as described in Subsection 2.2.2. We illustrate this procedure using concrete examples in the following section. ◊ Given an input data file defining an input-output network, the algorithm identifies all homeostasis subnetworks Kη, including appendage homeostasis subnetworks and structural homeostasis subnetworks, as outlined in algorithm 2.1.2. For each Kη, the algorithm derives the corresponding homeostasis condition det(Bη)=0, where Bη is an irreducible diagonal block Bη of the homeostasis matrix H for the full input-output network. Below, we illustrate the workflow of the algorithm and its typical outputs using a 12-node example network (Fig. 1) whose homeostatic structure has been fully analyzed in Wang et al. (2021). All tables and figures in this section, except Fig. 1, are generated directly from the algorithm. Network Diagram of the 12-node example, adapted from Wang et al. (2021) 12-node Network Example In the 12-node network example (Fig. 1), input node ι receives a single input I and node o is the output node. For computational purposes, the algorithm represents network nodes with integer IDs. In this example, nodes are assigned IDs 0 through 11, as summarized in Table 1. Table 1Mapping between internal node IDs and original node labels for the 12-node exampleNode IDNode LabelNode IDNode Label0ι (input node)6ρ61ρ17τ12ρ28τ23ρ39τ34ρ410τ45ρ511o (output node) Mapping between internal node IDs and original node labels for the 12-node example An input data file for this network is shown in Fig. 2. The network structure is specified through an edge list representation, where a pair (i, j) represents an arrow from node i to j. The first line lists the node IDs used in the network, while the next two lines designate the input and output nodes. Input data file for the 12-node network example Given this input file, the algorithm constructs the corresponding input-output network and extracts the core network, as shown in Fig. 3. Algorithm-generated core network for the 12-node example from Fig. 1. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) Users may optionally provide a label mapping in the input data file to associate each node ID with a user-defined node label (e.g., see Fig. 8 for an input data file of the Cholesterol example in Subsection 4.1). When such a mapping is supplied, all exported tables and network visualizations are generated using these labels (see Fig. 9). Input data file for the cholesterol network Algorithm-generated outputs for the cholesterol model. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) Simple paths and node categories Within the core input-output network (Fig. 3), the algorithm enumerates all ιo-simple paths from the designated input node (node 0) to the designated output node (node 11), together with their associated complementary subnetworks. Based on these outputs, nodes are classified into super-simple nodes, simple nodes, and appendage nodes. The appendage subnetwork AG consisting of all appendage nodes and their induced edges is also constructed. These outputs are returned by the algorithm in tabular form; some are shown in Fig. 4. Algorithm-generated tables of simple paths, complementary subnetworks, and node categories for the 12-node example. In the node categories table, super-simple nodes are arranged in downstream order: 0>1>3>4>11 Remark 3.2 In all algorithm-generated network visualizations (e.g., Fig. 3), blue nodes denote super-simple nodes, pink nodes denote simple but not super-simple nodes, and yellow nodes denote appendage node. ◊ In addition to network visualizations and tables, the algorithm writes its textual output to an automatically generated file, run_output.txt. In what follows, boxed blue text reproduces selected excerpts from the output file for the 12-node example. Appendage homeostasis subnetworks As a first step in classifying homeostasis subnetworks, the algorithm determines the appendage path components from the appendage subnetwork AG: Among these components, those satisfying the no-cycle condition are classified as the appendage homeostasis subnetworks Aj. These homeostasis subnetworks are also returned as network visualizations, shown in Fig. 5. Algorithm-generated appendage homeostasis subnetworks for the 12-node example Structural homeostasis subnetworks The algorithm next determines the structural homeostasis subnetworks by enumerating all super-simple structural subnetworks constructed from adjacent super-simple nodes. Since there are five super-simple nodes (Fig. 4), this yields a total of four structural homeostasis subnetworks: Visualizations of these structural homeostasis subnetworks are shown in Fig. 6. Algorithm-generated structural homeostasis subnetworks for the 12-node example Finally, the algorithm returns a table summarizing all identified homeostasis subnetworks, shown in Fig. 7. Algorithm-generated table of homeostasis subnetworks for the 12-node example For each identified homeostasis subnetwork (Kη), the algorithm also outputs the associated irreducible homeostasis block (Bη) and saves them to run_output.txt, as listed below. The corresponding homeostasis condition is det(Bη)=0 and det(Bξ)≠0 for all ξ≠η. For example, to verify whether homeostasis in the 12-node example is induced by A2 (Fig. 7), one evaluates the corresponding matrix block at the equilibrium and checks whether its determinant f8,x8f9,x9-f8,x9f9,x8 vanishes at the homeostasis point. The results obtained by the algorithm for this example are fully consistent with the analytic classification reported in Wang et al. (2021), validating the accuracy of our algorithmic framework. Applications In this section, we apply our algorithm to a series of biologically motivated network models, ranging from small to relatively large networks and covering both single-input and multiple-input network architectures. We consider both networks in which the input and output nodes are distinct and networks in which the input coincides the output. Our goal is to automatically identify all homeostasis motifs that would be difficult or impractical to detect manually, particularly in large networks. For networks of small to intermediate size, the algorithm results are validated against analytic classification results available from previous studies or carried out in the present work. Cholesterol network with single input node Our first example is a model of intracellular cholesterol regulation proposed by Pool et al. (2018). This is a single-input-single-output network consisting of 12 nodes. In the corresponding input data file (Fig. 8), we assign IDs 1 through 12 to the network nodes (i.e., model variables), as summarized in Table 2. Table 2Node IDs, variable names and biological meanings for the cholesterol model. LDL: low density lipoprotein; VLDL: very low density lipoproteinNodesVariablesBiological nameNodesVariablesBiological name1mhHMGCR mRNA7vE (input node)free VLDL2mrLDLR mRNA8vRBreceptor bound VLDL3hHMGCR9vIinternalised VLDL4lEfree LDL10rffree unbound receptors5lRBreceptor bound LDL11rIinternalised receptors6lIinternalised LDL12c (output node)intracellular cholesterol Node IDs, variable names and biological meanings for the cholesterol model. LDL: low density lipoprotein; VLDL: very low density lipoprotein Based on the model formulation in Pool et al. (2018), we first write down the generic admissible system (see (A.1) in Appendix 1). The corresponding mathematical network structure can be encoded in the input data file using the admissible system, its adjacency matrix or edge list. Here we use an edge list representation (see Fig. 8). Below this list, a mapping from node IDs to their corresponding variable names is also included. The algorithm results are therefore reported using these labels rather than numeric node IDs (see Fig. 9). Fig. 9 includes a visualization of the cholesterol network with node vE designated as the input node and node c as the output node, a table of ιo-simple paths, a table of node categories, and the final classification table listing all identified homeostasis subnetworks. Consistent with the analytic classification results in Duncan et al. (2024), our algorithm identifies the same homeostasis subnetworks: one structural homeostasis motif L′{vE,c} (see its network visualization in Fig. 9, lower left), and three appendage subnetworks, each consisting of a single appendage node. To determine which of these mechanisms underlies homeostasis of the output node c in the full biochemical model, the corresponding homeostasis conditions (det(Bη)=0) must be checked. The algorithm lists all the irreducible homeostasis blocks Bη in the output file. We also provide them in Appendix A, Fig. 19. Algorithm output showing homeostasis blocks for the cholesterol example (Fig. 9), with the node ID-variable name mapping provided in Table 2 Remark 4.1 For demonstration purposes, we consider admissible systems under the assumption that all variables in the original ODE system (in this example and all subsequent examples) are independent. Biochemical network models, however, frequently exhibit conservation laws or other algebraic constraints. When such constraints are present, the system should first be reduced to an equivalent ODE formulation involving only independent variables (see Oellerich et al. (2021); Jin and Rempala (2026)). For example, if a conservation relation of the form x1+x2=C holds, where C is a constant, one eliminates a dependent variable (e.g., by substituting x1=C-x2) and writes the admissible system in terms of the remaining independent variables. The algorithm then applies to the reduced system without modification. ◊ Chemotaxis network with multiple input nodes The mathematical modeling of chemotaxis can be roughly divided into two types: single cell models and bacterial population models (Tindall et al. 2008b, a). Single cell models consider the activation of the flagellar motor by detection of attractants and repellents in the extracellular medium. The flagellar motor activity of bacteria is regulated by a signal transduction pathway, which integrates changes of environmental chemical concentrations into a behavioral response. Assuming mass-action kinetics, the reactions in the signal transduction pathway can be modeled mathematically by ODEs. The population models describe evolution of bacterial density by parabolic PDEs allowing movement up-the-gradient, the most prominent feature of chemotaxis. Understanding the response of bacteria such as E. coli to external attractants has been the subject of experimental work and mathematical models for nearly 40 years. Many models of the chemotaxis have been formulated and developed to provide a comprehensive description of the cellular processes and include details of receptor methylation, ligand-receptor binding and its subsequent effect on the biochemical signaling cascade, along with a description of motor driving CheY/CheY-P levels, the main output of the chemotaxis system (see Tindall et al. (2008b) for a survey). Here, we consider a minimal model for the E. coli response proposed by Clausznitzer et al. (2010); Edgington and Tindall (2015, 2018), which nevertheless is in good agreement with experimental findings. It has four variables for the concentrations of CheA/CheA-P (ap), CheY/CheY-P (yp), CheB/CheB-P (bp) and the receptor methylation (m) and is given by the following system of ODEs (in non-dimensional form): where γB, γR, k1,…,k5 are non-dimensional parameters, the extracellular ligand concentration L is the external parameter and the function ϕ is determined by a Monod–Wyman–Changeux (MWC) description of receptor clustering The key observation of Edgington and Tindall (2018) is that system (4.1) has a unique asymptotically stable equilibrium X∗=(m∗,ap∗,yp∗,bp∗), with ap∗, yp∗ and bp∗ positive and m∗ is a real number, for the non-dimensional parameters obtained from the parameter values originally used in Clausznitzer et al. (2010). Furthermore, Edgington and Tindall (2018) were able to show that some pairs of parameters might yield oscillatory behavior, but in regions of parameter space that are outside the experimentally relevant. The network corresponding to the model equations (4.1) has two input nodes m and ap (Fig. 10, left). In Table 3 we list the variables of model (4.1) and the corresponding nodes in the network. As described in Remark 3.1, in order to apply the algorithm, one must first convert this multiple-input-node network into a single-input-node representation. To do so, we introduce a new input node L and connect it to both m and ap. This converts the original multiple-input-node network G to the augmented single-input-node network G⋄ (Fig. 10, right). By Theorem 2.19, this reformulation preserves both the homeostasis matrix and the homeostasis subnetworks of the original network system. (Left ) Network G corresponding to the model equations (4.1) for E. coli chemotaxis. (Right) Augmented network G⋄ obtained from G Table 3Node IDs, variable names and biological meanings for the chemotaxis modelNodesVariablesBiological name1L (input node)Extracellular ligand2mReceptor methylation3apCheA/CheA-P4bpCheB/CheB-P5yp (output node)CheY/CheY-P Node IDs, variable names and biological meanings for the chemotaxis model Representative outputs obtained by the classification algorithm applied to the augmented network G⋄ are shown in Fig. 11, with a layout similar to that in Fig. 9. The algorithm identifies three homeostasis mechanisms, summarized in the lower-right table. Among them is a structural homeostasis motif, L′{L,ap}={L,m,ap}, arising from the balance between the two paths L→m→ap and L→ap. A visualization of this motif is shown on the right. The other two mechanisms correspond to substrate inhibition along the edge ap→yp and null-degradation on the appendage node bp. Going back to the model equations (4.1) and using the homeostasis condition returned by the algorithm (not shown), it can be checked that the structural homeostasis motif, L′{L,ap}, is the one responsible for the homeostasis observed in this model. Algorithm-generated outputs for the chemotaxis model. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) In the original approach of Madeira and Antoneli (2022) the homeostasis subnetworks are computed by hand, using the method described in the paper. The result of the calculation is that there are three types of homeostasis: (1) appendage (null-degradation) homeostasis associated with bp, (2) structural (Haldane) homeostasis associated with ap→yp and (3) input counterweight homeostasis associated with m→ap. This is consistent with the result obtained here. The input counterweight homeostasis subnetwork m→ap corresponds to the structural block L′{L,ap}={L,m,ap}, when the node L is removed from the network. Dopamine network with multiple input nodes Best et al. (2009); Nijhout et al. (2014) proposed a mathematical model to study homeostasis of extracellular dopamine (eDA) in response to variations in the activities of the enzyme tyrosine hydroxylase (TH) and the dopamine transporters (DATs). This model is given by a system of differential equations describing the underlying biochemical network (see, Best et al. (2009), Figure 1). Their modeling and simulation results show that eDA remains approximately constant over a range of TH and DAT activities, indicating the capability of the network to maintain eDA homeostasis. Here, we focus on the case in which TH activity is treated as the input parameter and apply our algorithm to identify homeostatic mechanisms embedded in the full biological network structure. Since variations in TH activity influence four variables, bh2, bh4, tyr and L-dopa, the corresponding network is a single-input-single-output network G with multiple input nodes. As discussed in Subsection 4.2, applying the algorithm requires converting G into an augmented network G⋄ by introducing a new input node TH, and connecting it to nodes bh2, bh4, tyr and L-dopa. The core network of G⋄ is shown in Fig. 12 (upper left). Note that the node DAT is excluded from the core network. Table 4 lists the model variables, their biological names, and the corresponding nodes in G⋄. Algorithm-generated outputs for the dopamine model. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) Table 4Mapping of node IDs to variable names and biological meanings for the dopamine modelNodesVariablesBiological nameNodesVariablesBiological name1TH (input node)Tyrosine hydroxylase6cDaCytosolic dopamine2bh2Dihydrobiopterin7vDaVesicular dopamine3bh4Tetrahydrobiopterin8DATDopamine transporter4tyrTyrosine9tyrpoolThe tyrosine pool5L-dopa3,4-dihyroxyphenylalanine10eDa (output node)Extracellular dopamine Mapping of node IDs to variable names and biological meanings for the dopamine model Representative outputs obtained from applying the algorithm to G⋄ are shown in Fig. 12, with a similar layout as in Fig. 9. For a general admissible system respecting the structure of the dopamine biological network, infinitesimal homeostasis of eDA can arise through four distinct mechanisms, summarized in the lower-right table. Three of these correspond to substrate inhibition along edge L-dopa → cDa, cDa → vDa, or vDA → eDa. The fourth homeostasis mechanism arises through a larger structural subnetwork L′{TH,L-dopa} consisting of nodes TH, bh2, bh4, tyr, L-dopa and tyrpool. A visualization of this subnetwork is displayed in the lower-left panel of Fig. 12. The homeostasis blocks corresponding to these four mechanisms are provided in Appendix B.1, Fig. 20. Algorithm output showing homeostasis blocks for the dopamine example in Fig. 12, with the node ID-variable name mapping provided in Table 4 To validate the outputs of our algorithm, we also compute the Jacobian matrix and the homeostasis matrix H of the dopamine admissible system (B.1), and directly determine the irreducible factors of det(H) whose vanishing corresponds to homeostasis mechanisms (see Appendix B.2). These results are consistent with the algorithm outputs. Hepatic one-carbon metabolism coupled with methionine, choline and betaine synthesis: multiple inputs and multiple choices of output nodes In this subsection, we apply the algorithm to a 17-node input-output biochemical network underlying the model of hepatic one-carbon metabolism proposed in Sadre-Marandi et al. (2018). We examine homeostasis mechanisms in choline (cho) and homocysteine (hcy) under variations in input parameters methionine and methylenetetrahydrofolate reductase (MTHFR) activity. This network contains two distinct input parameters and two possible output nodes. The remaining state variable (network node) names and their biological meanings are listed in Table 5. Table 5Mapping of node IDs to variable names and biological meanings for the hepatic one-carbon metabolism modelNodesVariablesBiological nameNodesVariablesBiological name1metMethionine10mthf5-methyltetrahydrofolate2samS-adenosylmethionine11gnmtGlycine N-methyltransferase3sahS-adenosylhomocysteine12gnmtfGNMT-5mTHF4hcyHomocysteine13fgnmtf5mTHF-GNMT-5mTHF5dhfDihydrofolate14betBetaine6thfTetrahydrofolate15bet-aldBetaine aldehyde7fthf10-formyltetrahydrofolate16choCholine8ch5,10-methenyltetrahydrofolate17pcPtCho9ch25,10-methylenetrahydrofolate Mapping of node IDs to variable names and biological meanings for the hepatic one-carbon metabolism model Variations in the first input methionine only affects a single input node met. We can therefore directly apply our algorithm and classify all homeostasis mechanisms with either cho or hcy as the output node. Representative outputs for these cases are shown in Figs. 13 and 14. In contrast, the other input parameter, MTHFR activity, influences two state variables ch2 and mthf. This leads to a multiple-input node network G and, as discussed previously, can be handled by introducing a new input node denoted as MTHFR and adding edges from this node to ch2 and mthf (see the augmented input-output networks G⋄ in Fig. 15). Algorithm-generated outputs for the one-carbon metabolism model with input node met and output node cho. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes. There are 54 ιo-simple paths in total Algorithm-generated outputs for the one-carbon metabolism model with input node met and output node hcy, with a total of 45 ιo-simple paths. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) Algorithm-generated outputs for the one-carbon metabolism model with the input node MTHFR and output node (A) cho and (B) hcy. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) When met is the input node and cho is the output (Fig. 13), there are 54 ιo-simple paths. The algorithm identifies four homeostasis mechanisms: one appendage subnetwork consisting of a single homeostasis node bet-ald, and three structural homeostasis subnetworks. Two of the structural mechanisms arise from substrate inhibition along either the edge met→sam or the edge pc→cho. The third is a 14-node structural homeostasis subnetwork L′{sam,pc}, whose structure is displayed in Fig. 13 (upper right). When met is the input node and hcy the output (Fig. 14), there are 45 ιo-simple paths. In this case, the algorithm detects two structural homeostasis mechanisms. Infinitesimal homeostasis in hcy can arise either via substrate inhibition along met→sam, or through a 16-node structural subnetwork L′{sam,hcy}, whose network structure is displayed in Fig. 14 (upper right). When the input node is MTHFR and output node is cho, the algorithm detects four homeostasis mechanisms (see Fig. 15A): one appendage and three structural. In particular, two blocks (A1={bet-ald} and L′{pc,cho}) are identical to those identified when met is the input node. These correspond to pleiotropic homeostasis types, in which the vanishing of either block leads to homeostasis in cho with respect to both methionine input and MTHFR activity (see Definition 2.25). By contrast, when MTHFR is the input node and hcy is the output node, the algorithm identifies two structural homeostasis mechanisms (see Fig. 15B). Neither coincides with those obtained when met is the input node. Therefore, in this case there is only coincidental homeostasis. Hepatic one carbon metabolism coupled with glutathione synthesis pathway: moderate size network with multiple input node choices In this subsection, we apply the algorithm to a 34-node input-output biochemical network underlying the model of hepatic one-carbon metabolism coupled with the glutathione synthesis pathway proposed in Reed et al. (2008). This is an extension of the model for hepatic mitochondrial folate metabolism from Nijhout et al. (2006), designed to include cysteine and glutathione metabolism. This mathematical model is quite complicated, since it includes all of one carbon metabolism and not just the transsulfuration pathway in order to couple with the glutathione synthesis pathway. The 34 variables (nodes) are listed in Table 6. The output node is node 14 (bglu). We consider two choices of input node and input parameter: Node 13 (5mf). Here the input parameter I is total concentration of cellular folate (one carbon metabolism), see Figure 16 for the corresponding algorithm outputs. Node 13 (5mf). Here the input parameter I is total concentration of cellular folate (one carbon metabolism), see Figure 16 for the corresponding algorithm outputs. Node 17 (cglu). Here, the input parameter I is the total concentration of cellular glutamate (glutamate synthesis pathway), see Figure 17 for the corresponding altorighm outputs. Node 17 (cglu). Here, the input parameter I is the total concentration of cellular glutamate (glutamate synthesis pathway), see Figure 17 for the corresponding altorighm outputs. In both cases, there is only one single homeostatic mechanism, given by a large structural block that involves all nodes in the core network. Table 6Mapping of node IDs to variable names and biological meanings for the glutathione modelNodesVariablesBiological nameNodesVariablesBiological name1mthftetrahydrofolate18c10f10-formyltetrahydrofolate2m10f10-formyltetrahydrofolate19bcysblood cysteine3msermitochondrial serine20cCOOcytosolic formate4mglymitochondrial glycine21csercytosolic serine5m2cf5-10-methylenetetrahydrofolate22cglycytosolic glycine6mCOOmitochondrial formate23c2cf5-10-methylenetetrahydrofolate7bgsgblood glutathione disulfide24ccyscytosolic cysteine8bgshblood glutathione25samS-adenosylmethionine9cgsgcytosolic glutathione disulfide26sahS-adenosylhomocysteine10m1cf5-10-methenyltetrahydrofolate27c1cf5-10-methenyltetrahydrofolate11cthftetrahydrofolate28aicP-ribosyl-5-amino-4-imidazole carboxamide12hcyhomocysteine29metmethionine135mf (input node 1)5-methyltetrahydrofolate30cytcystathionine14bglu (output node)blood glutamate31srcsarcosine15cgshcytosolic glutathione32dmgdimethylglycine16dhfdihydrofolate33bglyblood glycine17cglu (input node 2)cytosolic glutamate34glcglutamyl-cysteine Mapping of node IDs to variable names and biological meanings for the glutathione model Algorithm-generated outputs for the glutathione model with Input Node 13. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) Algorithm-generated outputs for the glutathione model with Input Node 17. Blue: super-simple nodes; pink: simple but non-super-simple nodes; yellow: appendage nodes (Color figure online) Remark 4.2 In Figs. 16 and 17, due to the large size and density of the network, many arrows overlap and are therefore not clearly visible. In both cases, node 19 (bcys), node 31 (src), and node 32 (dmg) are excluded from the core network. ◊ Zinc homeostasis: network with input=output Zinc is an essential micro-nutrient for plants, because it plays an important role in many enzymes catalyzing vital cellular reactions. In higher doses, however, zinc is toxic. Therefore, plants have to strictly control and adjust the uptake of zinc through their roots depending on its concentration in the surrounding soil. This is achieved by a complicated control system consisting of sensors, transmitters and zinc transporter proteins. In Claus et al. (2015) the authors propose a mathematical model for regulation of zinc uptake in roots of Arabidopsis thaliana based on the uptake of zinc, expression of a transporter protein and the interaction between an activator and inhibitor. The equations in Claus et al. (2015) are obtained by an ad hoc dimensional reduction of a model proposed in Claus and Chavarría-Krauser (2012). The model of Claus et al. (2015) is given by a system of four nonlinear ordinary differential equations. For convenience we represent the concentration of each component by: x1=[Zn2+], x2=[mRNA], x3=[ZIP] and x4=[Dimer]. That is, x1,…,x4 are state variables and the equations are Here, ai, cj and vl are positive parameters. The quantity of interest to be controlled is the concentration of intracellular zinc (x1=[Zn2+]). There is one external control parameter, I, representing the (normalized) concentration of extracelullar zinc. Thus, this network is an example of input=output (Fig. 18, upper left). Consistent with the theory in Subsection 2.1.1, the algorithm detects no simple paths, simple nodes or super-simple nodes; all nodes are appendage nodes. The algorithm identifies two appendage homeostasis mechanisms, summarized in the lower-right table in Fig. 18: the 2-node appendage subnetwork (A1) and null-degradation on node 4 (A2). These results agree with the analytic classification in Antoneli et al. (2025). Algorithm-generated outputs for the zinc model. This input-output network contains only appendage nodes (yellow nodes) (Color figure online) Conclusion and Outlook Despite intensive studies on the structural properties of networks that achieve homeostasis or perfect adaptation (Ma et al. 2009; Ang and McMillen 2013; Tang and McMillen 2016; Ferrell 2016; Qian and Vecchio 2018; Araujo and Liota 2018; Vecchio et al. 2018; Aoki et al. 2019; Hong et al. 2025; Khammash 2021; Yi et al. 2000; Xiao and Doyle 2018; Cappelletti et al. 2020; Briat et al. 2016; Araujo and Liotta 2023; Qiao et al. 2019; Golubitsky and Wang 2020; Golubitsky et al. 2020; Wang et al. 2021), the mathematical complexity of these results can make them difficult to apply in practice, thereby limiting their broader accessibility and usability. In this paper we present a Python-based algorithm that automates the identification of homeostasis subnetworks of an input-output network. More specifically, given an input–output network specified solely by its connectivity structure (e.g., an edge list, adjacency matrix, or admissible ODE system) and the designation of input and output nodes, the algorithm automatically computes the relevant graph-theoretical structures and enumerates all homeostasis subnetworks. The algorithm is able to handle several classes of input-output networks, including those with a single input parameter (with single or multiple input nodes), multiple input parameters, and cases when the input and output nodes coincide. For systems subject to conservation laws or other algebraic constraints (Jin and Rempala 2026; Oellerich et al. 2021), the algorithm remains applicable after reformulating the admissible system in terms of independent variables when such constraints can be identified. We illustrate the algorithm by applying it to several biological examples, covering all the cases mentioned above. We also included some examples of moderately large networks to showcase the algorithm’s capability to handle network sizes that are beyond what can be done by hand. The wide applicability of the algorithm, is due to a new method, developed in this paper, to reduce the analysis of networks with multiple input nodes to the case of a single input node, by introducing an augmented single-input representation (see Theorem 2.19). This new result, together with the observation from Madeira and Antoneli (2024) that the analysis of a multiple inputs network amounts to deal with one parameter at a time, allowed us to extend the scope of an algorithm designed to treat the single input node/parameter case to other classes of networks. The new theoretical approach introduced in this paper may be helpful in the development of another algorithm to enumerate the homeostasis patterns of an input-output network. A homeostasis pattern is defined as a set of nodes, in addition to the output node, that are simultaneously infinitesimally homeostatic. It has been shown in Duncan et al. (2024); Antoneli et al. (2026b) that to each homeostasis subnetwork there corresponds a unique (generic) homeostasis pattern. Moreover, it is shown that the classification of homeostasis patterns is reduced to a combinatorial problem. Hence, it is expected that there is a corresponding algorithm for the computation of homeostasis patterns. So far, the theoretical framework developed for infinitesimal homeostasis (Golubitsky and Wang 2020; Golubitsky et al. 2020; Wang et al. 2021; Madeira and Antoneli 2022, 2024; Antoneli et al. 2025) has focused on deterministic network systems. Jin and Rempala (2026) extended the notion of infinitesimal homeostasis to mass-action systems with a specialized graph structure. In this context, they consider deterministic systems and their associated stochastic version, where the input parameter is a conservation-law constant. In the stochastic case, the output is the expectation of the stationary distribution of an output random variable. They show that the condition for infinitesimal homeostasis in terms of the homeostasis determinant, that is det(H)=0, is the same in both cases. This implies, in particular, that the algorithm described here gives a meaningful answer when applied to the deterministic cases, as well as, the stochastic. However, a general classification of homeostasis types and a topology-based characterization of stochastic homeostasis mechanisms remain undeveloped. Extending our graph-theoretic framework to stochastic settings, especially when the input itself is modeled as noise, would be an interesting direction for future work. The relevance of our algorithm to any possible stochastic extension of the deterministic theory is linked to the following question: does this kind of stochasticity preserve the condition for infinitesimal homeostasis in terms of the homeostasis determinant? Acknowledgements The research of FA was supported by Fundação de Amparo à Pesquisa do Estado de São Paulo (FAPESP) grant 2023/04839-7. YW was partly supported by NIH/NIDA R01DA057767. This work was also supported by the Gordon Science Research Fellows Endowment Fund, established by the Cele H. and William B. Rubin Family Fund, Inc., with additional support from the Brandeis Division of Science. Appendices In all examples presented in Section 4, we reported the homeostasis subnetworks detected by the algorithm, denoted as Kη, but did not list the associated homeostasis blocks Bη. In the appendix sections below, we include the homeostasis blocks, as recorded in the output file run_output.txt, for the cholesterol network in Appendix A and for the dopamine network in Appendix B. In addition, we perform in Appendix B an analytic classification of the homeostasis mechanisms for the dopamine network. This is obtained by computing the Jacobian matrix J, the homeostasis matrix H, and factorizing det(H) to identify all irreducible homeostasis blocks, thereby verifying the accuracy of the algorithm outputs. For the remaining examples, we omit listing the homeostasis blocks here; they can be found in the corresponding run_output.txt files provided in the GitHub repository (see Code Availability). Appendix A Cholesterol network The admissible system for the Cholesterol network equations proposed in Pool et al. (2018) is given by the following equations: where xi denotes the state variable associated with nodes i, with the mapping between nodes, variables, and their biological names given in Table 2. As discussed in Subsection 4.1, the algorithm detects three appendage and one structural homeostasis subnetworks (Fig. 9, lower-right table). Their corresponding homeostasis blocks, which are irreducible components of the homeostasis matrix H, are listed in Fig. 19. Appendix B Dopamine network In this appendix section, we provide additional details for the dopamine network example discussed in Subsection 4.3. Appendix B.1 Algorithm-detected homeostasis blocks We consider a model of dopamine synthesis and release proposed by Best et al. (2009), where the activity of the enzyme tyrosine hydroxylase (TH) is the external input parameter. Table 4 lists the model variables and the corresponding nodes in the network. Variation of TH activity affects variables bh2, bh4, tyr and L-dopa, making this an input-output network with multiple input nodes. In order to apply the algorithm, one must first convert this network G into a augmented single-input-node network G⋄ by introducing a new input node TH and connecting it to bh2, bh4, tyr and L-dopa (Remark 3.1 and Theorem 2.19). As discussed in Subsection 4.3, the algorithm detects four structural homeostasis subnetworks (Fig. 12, lower-right table). Their corresponding homeostasis blocks are listed in Fig. 20. Appendix B.2 Verification of algorithm outputs via direct computation Below, we compute the Jacobian and homeostasis matrices for the admissible system of the augmented network G⋄, determine the irreducible factors of the homeostasis matrix H, and compare them with the blocks detected by the algorithm. The admissible system of G⋄ is given by: where xi denotes the state variable associated with node i (see Table 4 for the corresponding model variables). In particular, x1 denotes TH and represents the newly introduced input node influencing x2,⋯,x5 (i.e., bh2, bh4, tyr, and L-dopa). Since node 8 is not downstream of the input node 1 and hence not part of the core network, it can be excluded when computing the homeostasis blocks. The Jacobian matrix of (B.1), excluding x8, is given by The homeostasis matrix is obtained by removing the first row (corresponding to the input node 1) and the last column (corresponding to the output node 10): By cofactor expansion, we obtain where The four irreducible factors obtained above (f6,x5,f7,x6,f10,x7,B1) are the same as those produced by the algorithm (Fig. 20). They give rise to the four structural homeostasis subnetworks identified by the algorithm. Data Availability The implementation of the algorithm, together with input data files, algorithm outputs for all network examples used in this work, and documentation, is publicly available at GitHub: https://github.com/Homeostasis-Classification/Homeostasis-Classification-Algorithm. Declarations Competing interests The authors have declared no competing interest. Footnotes Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The implementation of the algorithm, together with input data files, algorithm outputs for all network examples used in this work, and documentation, is publicly available at GitHub: https://github.com/Homeostasis-Classification/Homeostasis-Classification-Algorithm.