Composable Rate-Independent Computation in Continuous Chemical Reaction Networks
Cameron Chalk, Niels Kornerup, Wyatt Reeves, David Soloveichik

TL;DR
This paper characterizes the computational capabilities of rate-independent, composable chemical reaction networks, showing their limitations and necessary conditions for modular molecular computing systems.
Contribution
It provides a precise characterization of functions computable by composable, rate-independent CRNs and establishes necessary and sufficient conditions for their construction.
Findings
CRNs must have output species not as reactants within modules
Computable functions are superadditive, positive-continuous, and piecewise rational linear
Limitations on rate-independent computation without advanced input/output encoding
Abstract
Biological regulatory networks depend upon chemical interactions to process information. Engineering such molecular computing systems is a major challenge for synthetic biology and related fields. The chemical reaction network (CRN) model idealizes chemical interactions, allowing rigorous reasoning about the computational power of chemical kinetics. Here we focus on function computation with CRNs, where we think of the initial concentrations of some species as the input and the equilibrium concentration of another species as the output. Specifically, we are concerned with CRNs that are rate-independent (the computation must be correct independent of the reaction rate law) and composable ( can be computed by concatenating the CRNs computing and ). Rate independence and composability are important engineering desiderata, permitting implementations that violate mass-action…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Composable Rate-Independent Computation in Continuous Chemical Reaction Networks
Cameron Chalk, Niels Kornerup, Wyatt Reeves, David Soloveichik The authors were with the University of Texas at Austin.C. Chalk and D. Soloveichik were supported in part by National Science Foundation grants CCF-1618895 and CCF-1652824.
Abstract
Biological regulatory networks depend upon chemical interactions to process information. Engineering such molecular computing systems is a major challenge for synthetic biology and related fields. The chemical reaction network (CRN) model idealizes chemical interactions, allowing rigorous reasoning about the computational power of chemical kinetics. Here we focus on function computation with CRNs, where we think of the initial concentrations of some species as the input and the equilibrium concentration of another species as the output. Specifically, we are concerned with CRNs that are rate-independent (the computation must be correct independent of the reaction rate law) and composable ( can be computed by concatenating the CRNs computing and ). Rate independence and composability are important engineering desiderata, permitting implementations that violate mass-action kinetics, or even “well-mixedness”, and allowing the systematic construction of complex computation via modular design. We show that to construct composable rate-independent CRNs, it is necessary and sufficient to ensure that the output species of a module is not a reactant in any reaction within the module. We then exactly characterize the functions computable by such CRNs as superadditive, positive-continuous, and piecewise rational linear. Thus composability severely limits rate-independent computation unless more sophisticated input/output encodings are used.
1 Introduction
A ubiquitous form of biological information processing occurs in complex chemical regulatory networks in cells. The formalism of chemical reaction networks (CRNs) has been widely used for modelling the interactions underlying such natural chemical computation. More recently CRNs have also become a useful model for designing synthetic molecular computation. In particular, DNA strand displacement cascades can in principle realize arbitrary CRNs, thus motivating the study of CRNs as a programming language [2, 5, 15, 16]. The applications of synthetic chemical computation include reprogramming biological regulatory networks, as well as embedding control modules in environments that are inherently incompatible with traditional electronic controllers for biochemical, nanotechnological, or medical applications.
The study of information processing within biological CRNs, as well the engineering of CRN functionality in artificial systems, motivates the exploration of the computational power of CRNs. In general, CRNs are capable of Turing universal computation [8]; however, we are often interested in restricted classes of CRNs which may have certain desired properties. Previous work distinguished two programmable features of CRNs: the stoichiometry of the reactions and the rate laws governing the reaction speeds [4]. As an example of computation by stoichiometry alone, consider the reaction . We can think of the concentrations of species and to be the input and output, respectively. Then this reaction effectively computes , as in the limit of time going to infinity, the system converges to producing one unit of for every two units of initially present. The reason we are interested in computation via stoichiometry is that it is fundamentally rate-independent, requiring no assumptions on the rate law (e.g., that the reaction occurs at a rate proportional to the product of the concentrations of the reactants). This allows the computation to be correct independent of experimental conditions such as temperature, chemical background, or whether or not the solution is well-mixed.
Computation does not happen in isolation. In an embedded chemical controller, inputs would be produced by other chemical systems, and outputs would affect downstream chemical processes. Composition is easy in some systems (e.g. digital electronic circuits can be composed by wiring the outputs of one to the inputs of the other). However, in other contexts composition presents a host of problems. For example, the effect termed retroactivity, which results in insufficient isolation of modules, has been the subject of much research in synthetic biology [7]. In this paper, we attempt to capture a natural notion of composable rate-independent computation, and study whether composability restricts computational power.
[TABLE]
[TABLE]
Above, we see two examples of rate-independent computation. Example (a) shows . The amount of eventually produced will be the minimum of the initial amounts of and , since the reaction will stop as soon as the first reactant runs out. Example (b) shows . (The last reaction generates waste species that are not used in the computation; thus, we describe the products as an empty set.) The amount of eventually produced in reactions and is the sum of the initial amounts of and . The amount of eventually produced in reaction is the minimum of the initial amounts of and . Reaction subtracts the minimum from the sum, yielding the maximum.
Now consider how rate-independent computation can be naturally composed. Suppose we want to compute . It is easy to see that simple concatenation of two min modules (with proper renaming of the species) correctly computes this function:
[TABLE]
where represents the output of the composed computation. In contrast, suppose we want to compute . Concatenating the modules yields:
[TABLE]
where represents the output of the composed computation. Observe that depending on the relative rates of reactions and , the eventual value of will vary between and , and the composition does not compute in a rate-independent manner.
Why is min composable, but max not? The problem arose because the output of the max module () is consumed in both the max module and in the downstream min module. This creates a competition between the consumption of the output within its own module and the downstream module.
Towards modularity, we assume the two CRNs to be composed do not share any species apart from the interface between them (i.e., a species representing the output of the first network is used as the species representing the input to the second network, and otherwise the two sets of species are disjoint). We prove that to construct composable rate-independent modules in this manner, it is necessary and sufficient to ensure that the output species of a module is not a reactant in any reaction of that module. We then exactly characterize the computational power of composable rate-independent computation.
Previously it was shown that without the composability restriction, rate-independent CRNs can compute arbitrary positive-continuous, piecewise rational linear functions [4]. Positive-continuity means that the only discontinuities occur when some input goes from 0 to positive, and piecewise rational linear means that the function can by defined by a finite number of linear pieces (with rational coefficients). Note that non-linear continuous functions can be approximated to arbitrary accuracy.111To approximate arbitrary continuous non-linear functions, piecewise linear functions are not sufficient, but rather we need piecewise affine functions (linear functions with offset). However, affine functions can be computed if we use an additional input fixed at . We show that requiring the CRN to be composable restricts the class of computable functions to be superadditive functions; i.e., functions that satisfy: for all input vectors . This strongly restricts computational power: for example, subtraction or max cannot be computed or approximated in any reasonable sense. In the positive direction, we show that any superadditive, positive-continuous, piecewise rational linear function can be computed by composable CRNs in a rate-independent manner. Our proof is constructive, and we further show that unimolecular and bimolecular reactions are sufficient.
We note that different input and output encodings can change the computational power of rate-independent, composable CRNs. For example, in the so-called dual-rail convention, input and output values are represented by differences in concentrations of two species (e.g., the output is equal to the concentration of species minus the concentration of ). Dual-rail simplifies composition—instead of consuming the output species to decrease the output value, a dual-rail CRN can produce —at the cost of greater system complexity. Dual-rail CRNs can compute the full class of continuous, piecewise rational linear functions while satisfying rate-independence and composability [4]. Note, however, that the dual-rail convention moves the non-superadditive subtraction operation to “outside” the system, and converting from a dual-rail output to a direct output must break composability.
2 Preliminaries
Let and denote the set of nonnegative integers and the set of real numbers, respectively. The set of the first positive integers is denoted by . Let be the set of nonnegative real numbers, and similarly be the set of positive real numbers. If is a finite set (in this paper, of chemical species), we write to denote the set of functions , and similarly for , , etc. Equivalently, we view an element as a vector of elements of , each coordinate “labeled” by an element of . Given a function , we use to denote the restriction of to the domain . We also use the notation to represent projected onto . Thus, iff . If , we view a vector equivalently as a vector by assuming for all
2.1 Chemical reaction networks
We will start by defining the notation used to describe chemical reactions.
Definition 1**.**
Given a finite set of chemical species , a reaction over is a pair , specifying the stoichiometry of the reactants and products, respectively.222As we are studying CRNs whose output is independent of the reaction rates, we leave the rate constants out of the definition.
In this paper, we assume that , i.e., we have no reactions of the form . For instance, given , the reaction is the pair .
Definition 2**.**
A (finite) chemical reaction network (CRN) is a pair , where is a finite set of chemical species, and is a finite set of reactions over .
Next we map language about chemical reaction networks to formal definitions and notation.
Definition 3**.**
A state of a CRN is a vector .
Definition 4**.**
For any and any , is the concentration of in .
Definition 5**.**
For any , the set of species present in (denoted by ) is .
Definition 6**.**
Given a state and reaction , we say that is applicable in if (i.e., contains positive concentration of all of the reactants).
Definition 7**.**
A reaction produces (consumes) a species if appears as a product (reactant).333Note that typically a catalyst species is not considered consumed nor produced by a catalytic reaction. For simplicity, as our definition suggests, we say it is both produced and consumed.
2.2 Reachability and stable computation
We now follow [4] in defining rate-independent computation in terms of reachability between states (this treatment is in turn based on the notion of “stable computation” in distributed computing [1]). Intuitively, we say a state is “reachable” if some rate law can take the system to this state. For computation to be rate-independent, since unknown rate laws might take the system to any reachable state, the system must be able to reach the correct output from any such reachable state.
To define the notion of reachability, a key insight of [4] allows one to think of reachability via a sequence of straight line segments. This may be unintuitive, since mass-action444Although the formal definition of mass-action kinetics is outside the scope of this paper, we remind the reader that a CRN with rate constants on each reaction define a system of ODEs under mass-action kinetics. For example, the two reactions and correspond to the following ODEs: , , and , where , and are the concentrations of species , and over time and , are the rate constants of the reactions. and other rate laws trace out smooth curves. However, a number of properties are shown which support straight-line reachability as an interpretation which includes mass-action reachability as well as reachability under other rate laws.
Definition 8**.**
*Let be a CRN defined by . The linear transformation that maps from the unit vector representing a reaction to the net change in species caused by that reaction is the stoichiometry matrix for . *
Note that we can intuitively think of being a matrix where the columns represent the net change in species caused by each reaction. Under this representation, observe that entries in will be negative when more of a reactant is consumed than is produced in a reaction. Observe that the image of represents the possible changes in a state that can occur via the reactions in . We will formalize this notion with the next few definitions.
Definition 9**.**
For a CRN with the reactions , we say that any vector is a flux vector. We use to denote the set . We say that is applicable at a state if every reaction in is applicable at .
Definition 10**.**
For a CRN with species and stoichiometry matrix , we say a state is straight-line reachable from , written , or more precisely as , if there is a applicable flux vector such that .
Intuitively, a single segment means running the reactions applicable at at a constant (possibly 0) rate specified by to get from to . Since applying a flux vector can change the set of species present, does not imply that and have the same set of applicable reactions. Therefore there can be a state that is straight-line reachable from but not from . This leads us to our next definition.
Definition 11**.**
We say state is 1-segment reachable from if it is straight line reachable. We say a state is -segment reachable if there is a state that is -segment reachable from such that .
Generalizing to an arbitrary number of segments, we obtain our general notion of reachability below. Note that by the definition of straight-line reachability, only applicable reactions occur in each segment. The definition of reachability is closely related to exploring the “stoichiometric compatibility class” of the initial state [9].
Definition 12**.**
A state is reachable from , written , if such that is -segment reachable from . We denote the set of states reachable from , i.e., , as .
We think of state as being reachable from state if there is a “reasonable” rate law that takes the system from to . As desired, previous work showed that if state is reached from via a mass-action trajectory, it is also segment-reachable.
Lemma 1** (Proven in [4]).**
If is mass-action reachable from , then .
We can now use reachability to formally define rate-independent computation.
Definition 13**.**
A chemical reaction computer (CRC) is a tuple , where is a CRN, , written as , is the set of input species, and is the output species.
For simplicity, assume a canonical ordering of so that a vector (i.e., an input to ) can be viewed equivalently as a state of (i.e., an input to ).
Definition 14**.**
A state is output stable if, for all such that , , i.e., once is reached, no reactions can change the concentration of the output species .
Definition 15**.**
Let be a function and let be a CRC. We say that stably computes if, for all and all such that , there exists an output stable state such that and .
We can intuitively justify the above definition of reachability and stable computation as capturing the class of computation that is independent of the rate law. The output stable states are exactly those in which the output cannot be changed by a rate law chosen by an adversary. If a chemical reaction network does not stably compute a function, then some rate law can take the system to a state from which an output stable state is not reachable (including by mass-action by Lemma 1).
The results herein extend easily to functions , i.e., whose output is a vector of real numbers. This is because such a function is equivalently separate functions .
Also note that initial states contain only the input species ; other species must have initial concentration 0. Section 5 discusses how allowing some initial concentration of non-input species affects computation.
2.3 Composability
In this section we define the composition of CRCs and formally relate composability to a CRC not using its output species as a reactant (output-obliviousness). We show that output-oblivious CRCs are composable, and that any composable CRC can be reduced (simply by removing reactions) to an output-oblivious form.
We define the composition of two CRCs intuitively as the concatenation of their chemical reactions, such that the output species of the first is the input species of the second:
Definition 16**.**
Given two CRCs and , consider constructed by renaming species of such that and . The composition of and is the CRC . In other words, the composition is constructed by concatenating and such that their only interface is the output species of , used as the input for .
We say two CRCs are composable if they stably compute the composition of their functions when composed:
Definition 17**.**
A CRC which stably computes is composable if stably computing , stably computes .
We want to relate composability to the property that a CRC does not use its output species as a reactant:
Definition 18**.**
We call a CRC output-oblivious if does not appear as a reactant in .
For simplicity, we focus on single-input, single-output CRCs, but these results easily generalize to multiple input and output settings.
For the proof that the output-oblivious condition is sufficient to guarantee composability, we formalize the idea that the composed CRCs act independently, and do not interfere with each other’s execution. In Lemmas 2 and 3 we show how this independence can be used to “reorder” the sequence of reactions of a CRC in way that preserves the concentrations in the final state. In Lemma 4, we take an output-oblivious CRC, compose another CRC downstream, and reorder any sequence of reactions of the composed CRC into a sequence which we can easily argue must have stably computed as expected.
Definition 19**.**
A flux vector produces (consumes) a species if there is an such that is a product (reactant) of .
Definition 20**.**
A flux vector is independent of a flux vector if does not consume any species that are produced or consumed by .
Lemma 2**.**
In a CRC if flux vector is independent of flux vector then:
If , then . 2. 2.
If , then there is a state such that . 3. 3.
If and , then there is a state such that .
Proof.
For , since is independent of , we know that cannot produce any of the species necessary to make applicable. Since was applicable at , we know that must be applicable at , so .
For , we need to show that (has nonnegative concentrations) and that is applicable at . Consider any species such that is not produced in . Since and , we know that has nonnegative concentration at . Now consider any species such that is produced in . Since produces , we know that must not consume it because is independent of . Since , we can conclude that must have nonnegative concentration at . Therefore we can conclude that . To see that is applicable at , first observe that is applicable at . Then, since is independent of , it follows that must also be applicable at .
For , we want to show that is still applicable at and that is in (has nonnegative concentrations). is still applicable at since does not consume species involved in . If had negative concentration on species , that species must have been consumed by since has nonnegative concentrations. Since does not consume any species consumed by and , then negative implies negative , which contradicts that , so .
∎
Lemma 3**.**
Given two output-oblivious CRCs and , consider the composition CRC . If then there is such that , where only uses reactions from and only uses reactions from .
Proof.
Let be the flux vectors such that . We can write , where corresponds to the reactions in and corresponds to the reactions in . Since is output-oblivious, we know that every is independent of every and thus we can apply Lemma 2 item to see that . By repeatedly applying Lemma 2 items and , we can then rearrange the sequence of reactions so that each precedes each to get . ∎
Lemma 4**.**
Output-oblivious CRCs are composable.
Proof.
Consider the composition of two CRCs and that stably compute and respectively, and consider an input . Consider some state reached from in . Let be as in Lemma 3, so , where is a sequence of flux vectors with . Since stably computes , we know that there is some -output stable state reachable from using a series of flux vectors such that . Since only uses reactions from and is output-oblivious, every flux vector in is independent of every flux vector in , so by Lemma 2 item we know the sequence of flux vectors is applicable starting at . Let be such that . Then applying Lemma 2 items and repeatedly to the flux vectors in and , we see that . Since stably computes , since , and since is reachable from only using reactions in , there must be some that is -output stable such that and . We know that is reachable from since . Finally, since is -output stable, reactions from cannot change the concentrations of species in , so if , then restricting to we find . Since is -output stable we see that , so is -output stable. ∎
Next we show that the output-oblivious condition is effectively necessary for composition. Technically, there are CRCs which are not output-oblivious but are composable. However, we show that for such CRCs, we can remove reactions until they are output-oblivious, resulting in a CRC which is still composable and computes the same function. Thus, characterizing what is computable by output-oblivious CRCs does characterize the class of functions computable by composable CRCs.
To prove this, we will want to reach a state that has used up its capacity to produce more of some species . Intuitively this can be done by producing the maximum amount of possible by the CRC. However, in general this notion is ill-defined.555In the CRN , from an initial state consisting of only species , note that is not well-defined. To see this, note that some amount of must convert to to catalyze the second reaction; we can always choose a smaller to produce more .
Lemma 5 proves that there is a state with maximal amount of . In other words, from any state we can always reach a state where afterwards it is impossible to increase the amount of . The proof of Lemma 5 is left to the appendix.
Lemma 5**.**
For any state and any species , if the amount of present in any state reachable from is bounded above, there is a state reachable from such that for any state reachable from , we know that .
Lemma 6**.**
If a CRC stably computes and is composable, then we can remove all reactions where the output species appears as a reactant, and the resulting output-oblivious CRC will still stably compute .
Proof.
Let be a composable CRC stably computing some function . Let be the CRN obtained by removing all of the reactions that consume from . We would like to show that stably computes . Suppose we compose with consisting of only the reaction with input species and output species . Since is composable and stably computes the identity function, the resulting CRN must stably compute . For any input vector consider a state reachable from .
Assume that could reach a state from where . Then would not be composable because can also reach and then applying the reaction in to convert all into gives us a state with . Since there is no reaction in that consumes there is no output stable state reachable from that computes . Therefore there is no state such that and is reachable from via reactions of .
Since this implies that the amount of in any state reachable from is bounded, we can apply Lemma 5 to say that there is a state such that and for any state reachable from we know . Since has no reactions that consume , this is an output stable state of . Now, consider the state in obtained by converting all in into . Observe that if there were a way to produce from , then there would be a state in reachable from that contained more . Since there are no reactions in that consume and no reactions that produce , we know that is an output stable state. Since stably computes , we know . Thus we can conclude that and stably computes . ∎
To allow composition of multiple downstream CRCs, we can use the reaction to generate “copies” of the output species , such that each downstream module uses a different copy as input. Additionally, if the downstream module is output-oblivious, then the composition is also output-oblivious and thus the composition is composable. These observations allow complex compositions of modules, and will be used in our constructions in Section 3.2.
3 Functions Computable by Composable CRNs
Here we give a complete characterization of the functions computable by composable CRNs as superadditive, positive-continuous, and piecewise rational linear.
Definition 21**.**
A function is superadditive iff .
Note that superadditivity implies monotonicity in our case, since the functions computed must be nonnegative. As an example, we show that the function is not superadditive:
Lemma 7**.**
The function is not superadditive.
Proof.
Pick any . Observe that . But since and are both positive, we know that . Thus max is not superadditive and by Lemma 10 there is no composable CRN which stably computes max. ∎
Definition 22**.**
A function is positive-continuous if for all , is continuous on the domain , . I.e., is continuous on any subset that does not have any coordinate that takes both zero and positive values in .
Next we give our definition of piecewise rational linear. One may (and typically does) consider a restriction on the domains selected for the pieces, however this restriction is unneccesary in this work, particularly because the additional constraint of positive-continuity gives enough restriction.
Definition 23**.**
A function is rational linear if there exists such that . A function is piecewise rational linear if there is a finite set of partial rational linear functions with , such that for all and all , . We call the components of .
The following is an example of a superadditive, positive-continuous, piecewise rational linear function:
[TABLE]
The function is superadditive since for all input vectors , , there are three cases: (1) , in which case both input vectors compute which is a superadditive function; (2) , in which case both input vectors compute , which is a superadditive function; (3) without loss of generality, and , in which case . The function is positive-continuous, since the only points of discontinuity are when changes from zero to positive. The function is piecewise rational linear, since is piecewise rational linear.
Theorem 1**.**
A function is computable by a composable CRC if and only if it is superadditive positive-continuous piecewise rational linear.
We prove each direction of the theorem independently in Sections 3.1 and 3.2.
3.1 Computable Functions are Superadditive Positive-Continuous Piecewise Rational Linear
Here, we prove that a stably computable function must be superadditive positive-continuous piecewise rational linear. The constraints of positive-continuity and piecewise rational linearity stem from previous work:
Lemma 8**.**
[Proven in [4]] If a function is stably computable by a CRC, then is positive-continuous piecewise rational linear.
In addition to the constraints in the above lemma, we show in Lemma 10 that a function must be superadditive if it is stably computed by a CRC. To prove this, we first note a useful property of reachability in CRNs.
Lemma 9**.**
Given states , if then .
Proof.
Adding species cannot prevent reactions from occurring. Thus, we can consider the series of reactions where doesn’t react to reach the state from the state . ∎
We now utilize this lemma to prove that composably computable functions must be superadditive.
Lemma 10**.**
If a function is stably computable by a composable CRC, then is superadditive.
Proof.
Assume stably computes . By definition of stably computing , initial states , such that with and with . Consider on input . By Lemma 9, , and again by Lemma 9, . Looking at the concentration of output species , we have . Since stably computes , there exists an output stable state reachable from initial state and reachable from state , with . Since is composable, we can assume that species does not appear as a reactant without loss of generality by Lemma 6. Thus the concentration of in any state reachable from state cannot be reduced from , implying . This holds for all input states , , and thus is superadditive. ∎
Corollary 1**.**
No composable CRC computes .
3.2 Superadditive Positive-Continuous Piecewise Rational Linear Functions are Computable
It was shown in [11] that every piecewise linear function can be written as a of s of linear functions. This fact was exploited in [4] to construct a CRN that dual-rail computed continuous piecewise rational linear functions. To directly compute a positive-continuous piecewise rational linear function, dual-rail networks were used to compute the function on each domain, take the appropriate of s, and then the reaction was used to convert the dual-rail output into a direct output where the output species is . However, this technique is not usable in our case: by Corollary 1, we cannot compute the function, and the technique of converting dual-rail output to a direct output is not output-oblivious. In fact, computing is not superadditive, and so by Lemma 10, there is no composable CRC which computes this conversion.
Since our functions are positive-continuous, we first consider domains where the function is continuous, and show that it can be computed by composing rational linear functions with . Since rational linear functions and can be computed without using the output species as a reactant, we achieve composability. We then extend this argument to handle discontinuities between domains.
Definition 24**.**
An open ray in from the origin through a point is the set . Note that is strictly positive, so the origin is not contained in .
Definition 25**.**
We call a subset a cone if for all , we know that implies the open ray from the origin through is contained in .
Lemma 11**.**
Suppose we are given a continuous piecewise rational linear function . Then we can choose domains for which are cones which contain an open ball of non-zero radius.
Intuitively, we can consider any open ray from the origin and look at the domains for along this ray. If the ray traveled through different domains, then there must be boundary points where the function switches domains. But we know that is continuous, so the domains must agree on their boundaries. Since there is only one line that passes through the origin and any given point, the domains must share the same linear function to be continuous. Thus we can place the ray into one domain corresponding to its linear function. Applying this argument to all rays gives these domains as cones. This argument is formalized in a proof in the appendix.
Lemma 12**.**
Any superadditive continuous piecewise rational linear function can be written as the minimum of a finite number of rational linear functions .
Proof.
Since is a continuous piecewise rational linear function, by Lemma 11, we can choose domains for which are cones and contain an open ball of non-zero radius, such that , where is a rational linear function. Now pick any and any . Then because is a cone containing an open ball of finite radius, it contains open balls with arbitrarily large radii. In particular, it contains a ball with radius greater than , so there exist points such that . By the superadditivity of , the linearity of , and the fact that , we see:
[TABLE]
so that . Since this is true for all , and since we know that for some , we see that , as desired. ∎
Lemma 12 is particularly useful for us since, as seen in the introduction, CRCs computing are easy to construct, and rational linear functions are relatively straightforward as well. The next lemma gives details on constructing a CRC to compute by piecing together CRCs which compute the components (rational linear functions) of and then computing the across their outputs. However, since Lemma 12 as given applies to continuous functions with domain , so does this lemma; we handle the domain later on.
Lemma 13**.**
We can construct a composable CRC that stably computes any superadditive continuous piecewise rational linear function .
Proof.
By Lemma 12, we know that can be written as the minimum of a finite number of rational linear functions . Observe that a general rational linear function is stably computed by the reactions
[TABLE]
where is a positive integer such that is also a positive integer. Since is the minimum of a number of ’s, we can make a chemical reaction network where we compute each using a copy of the input species, calling the output (the reaction produces five species with concentrations equal to ’s initial concentration, effectively copying the input species so that the input may be a reactant in several modules without those modules competing). Next, we use the chemical reaction
[TABLE]
to get the minimum of the ’s. Since each obtains the count of the corresponding , this CRN will produce the minimum of the ’s quantity of Y’s. Thus, according to Lemma 12, the described CRC stably computes . Note that each sub-CRC described in this construction is output-oblivious, and thus composable, so the composition of these modules maintains correctness. ∎
The above construction only handles the domain , where we know our functions are continuous by positive-continuity. However, when extended to the domain , positive-continuity of our functions allows discontinuity where inputs change from zero to positive. The challenge, then, is to compute the superadditive continuous piecewise rational linear function corresponding to which inputs are nonzero.
Surprisingly, Lemma 15 below shows that we can express a superadditive positive-continuous piecewise rational linear function as a of superadditive continuous piecewise rational linear functions. The first step towards this expression is to see that, given two subspaces of inputs wherein the species present in one subspace are a superset of the species present in a subspace , the function as defined on the subspace must be greater than the function as defined on the subspace ; otherwise, the function would disobey monotonicity and thus superadditivity, as proven below:
Lemma 14**.**
Consider any superadditive positive-continuous piecewise rational linear function . Write , and for each , let be the superadditive continuous piecewise rational linear function that is equal to on . If and , then for all we know .
Proof.
Write for the vector of length 1 pointing in the positive direction of the th coordinate axis. Define the vector . Then for any and any , we know that . Since is superadditive, it is also monotonic. Suppose that . Because is continuous, taking , there is some small enough such that
[TABLE]
contradicting the monotonicity of . Our assumption must be false, so . ∎
Next we define a predicate for each subset of inputs which is true if all inputs in that subset are nonzero. Intuitively, in the CRC construction to follow, this predicate is used by the CRC to determine which inputs are present:
Definition 26**.**
For any set , define the -predicate to be the function given by:
[TABLE]
A naïve approach might be the following: for each subdomain , the function is continuous, so compute it by CRC according to Lemma 13, producing an output . Then compute the predicate by CRC, and if the predicate is true (e.g., a species representing has nonzero concentration), use that species to catalyze a reaction which changes the to , the final output of the system. However, note that if is a subset of , and and are both true, so this technique will overproduce .
The following technique solves this issue by identifying a min which can be taken over the intermediate outputs . In particular, for each , we compute , and then take the min of these terms. When corresponds to the set of input species with initially nonzero concentrations, then the summation term in this expression is [math], since for all . When does not correspond to the set of input species with initially nonzero concentration, then either (1) it is a superset of the correct set , in which case Lemma 14 says that (thus the min of these is ) or (2) the summation term added to contains at least , and since , the min of these is . Thus taking the min for all of is exactly , where is the correct set of initially present input species.
Lemma 15**.**
Consider any superadditive positive-continuous piecewise rational linear function . Write , and for each , let be the superadditive continuous piecewise rational linear function that is equal to on . Then, .
Proof.
For , let be given by
[TABLE]
We want to show that . To do this, fix and define the set . First, let’s show that . By the definition of , for all , we know . Thus, , so . Now we must show that for all . There are two cases to consider:
Case 1:
In this case,
[TABLE]
By the definition of , we know , so . Thus we get that .
Case 2:
By Lemma 14, . As a result,
[TABLE]
Since for all , we know for all and for some , it follows that . ∎
Lemma 16 takes the above Lemma 15 along with the construction which stably computes on strictly continuous domains from Lemma 13 to construct a CRC which stably computes on positive-continuous domains.
Lemma 16**.**
Given any superadditive positive-continuous piecewise rational linear function , there exists a composable CRC which stably computes .
Proof.
The proof follows by identifying that the function can be expressed as a composition of functions (via Lemma 15) which are computable by output-oblivious CRCs and are thus composable by Lemma 4. By Lemma 15, we know that . The first subroutine copies the input species, e.g. , in order for each sub-CRC to not compete for input species. This copying is output-oblivious. Then for any , is computed using one set of copies via the reaction:
[TABLE]
noting that although the predicate is defined to be [math] or , it is sufficient in this construction for the concentration of the species representing to be zero or nonzero. This CRC is output-oblivious.
We can also compute each (via Lemma 13) using copies of the input molecules. This construction is output-oblivious. To compute given the concentration species as nonzero iff as shown above, we simply compute the following (assuming is the output of the module computing ):
[TABLE]
which is computed by this output-oblivious CRC:
[TABLE]
The CRC computing min is output-oblivious, as seen in the introduction. The CRC computing the sum of its inputs is output-oblivious (e.g., computes ). Since each CRC shown is output-oblivious and thus composable, we can compose the modules described to construct a CRC stably computing , which is equal to by Lemma 15. ∎
Corollary 2**.**
Given any superadditive positive-continuous piecewise rational linear function , there exists a composable CRC with reactions with at most two reactants and at most two products which stably computes .
To deduce this corollary, note that the reactions with more than two reactants and/or products are used to compute the following functions: computation of a rational linear function, copying inputs, min, and predicate computation. We can decompose such reactions into a set of bimolecular reactions. For example, a reaction can be decomposed into the reactions , , . We can verify that each affected module stably computes correctly with these expanded systems of reactions, and remains composable.
4 Example
In this section, we demonstrate the construction presented in the previous section through an example. Consider the function shown in Equation 15 in Section 3. As shown in that section, the function is superadditive, positive-continuous, and piecewise rational linear. Thus, we can apply our construction to generate a composable CRN stably computing this function. Note that while this CRN is generated from our methodology, we have removed irrelevant species and reactions.
Making copies of input:
[TABLE]
Using to make , which catalyzes reactions for the domain :
[TABLE]
Computing the sum in :
[TABLE]
Computing the min in :
[TABLE]
Making a copy of for use in increasing :
[TABLE]
Increase so that it will not be the min when is present:
[TABLE]
Rename to so that it will be summed with the term created by the previous reaction:
[TABLE]
5 Functions Computable by Composable CRNs with Initial Context
So far, our CRCs restrict the concentrations of non-input species in the initial state to be zero. One may consider some (constant) initial concentration of non-input species, called initial context, and how that may affect computation.
Definition 27**.**
A CRC with initial context is denoted with and defined as in Definition 13, and the initial context species and initial context concentrations . stably computes if, for all and all such that , there exists an output stable state such that and .
We will show that such CRCs can compute exactly what we could already compute when we set one of our inputs to one. Note that this results in a larger class of computable functions than superadditive positive-continuous piecewise rational linear. For example, we can now compute the non superadditive function . To formalize this idea, we will also need the following definition.
Definition 28**.**
Consider a piecewise affine (linear with an offset) function defined by on domain . The linear extension of is constructed as follows: for all with , let .
For example, given the piecewise affine function
[TABLE]
its linear extension would be
[TABLE]
Observe that is just the minimum of and . Intuitively the linear extension replaces all constant terms with a linear term in the new variable . We show that initial context for composable CRCs allows only functions whose linear extensions are superadditive, positive-continuous, piecewise rational linear. Intuitively, this gives us the same class of functions that we would have without initial context when we set one of our inputs to the constant value one.
As defined, we allow an arbitrary number of initial context species with differing initial concentrations, but we will focus on the single species case with an initial concentration of one. This is well motivated: we show one initial context species with concentration one is equivalent in stable computing power to having any number of species with nonnegative rational initial concentrations.
Lemma 17**.**
Given a CRC with initial context with (rational initial concentrations) which stably computes , there exists a CRC with and (one initial species with concentration one) which stably computes .
Proof.
Let for be the initial (rational) concentrations of the initial context in . Observe that the CRN:
[TABLE]
can be used to produce species with concentrations equal to ’s initial concentration. Then the CRN:
[TABLE]
for each produces a concentration of for species . ∎
While this schema cannot be used to generate initial context with irrational concentrations, continued fractions can be used to approximate irrational numbers as rational numbers with arbitrarily small error. Thus our restriction to one initial species with a initial concentration one is reasonable to consider for stable computation in this model. To characterize the functions stably computable with initial context, we first prove some lemmas. Recall is the set of states reachable from , i.e., .
Lemma 18**.**
Given a CRN , for any and , .
Proof.
If , then for any , . This can be verified by taking the straight line segments to get from to and scaling them by .
When , this lemma is trivial, as the only state reachable from the zero state is the zero state and zero times any state yields the zero state. Thus we only need to consider the case where .
Let . By the definition of Post this implies that . This implies that . Therefore and .
Let . By the definition of Post this implies that . This implies that . Which implies that . ∎
Lemma 19**.**
Let with and stably compute . Then for stably computes some function .
Proof.
Consider running with an initial concentration of for the species . Observe that the initial state , where is a state that will stably compute under the definition of . By Lemma 18, we know that the set of reachable states from is equal to the set of reachable states from scaled by . Thus consider some state reached from . Observe that there exists a state reachable from such that . Consider some output stable state reachable from . Observe that by Lemma 18 the state must be reachable from . Likewise by Lemma 18 we know that must be an output stable state. Thus, we know that must stably compute some function regardless of the initial value for . ∎
We thus know that scaling the value of the initial context retains the fact that stably computes a function in the region where that species has a positive concentration. We can then view a single species of initial context as an additional input to and claim that this CRN stably computes some function, using lemmas from the case of no initial context to prove properties of that function.
Lemma 20**.**
Let be output-oblivious with and . stably computes only if is a piecewise affine function whose linear extension is superadditive positive-continuous piecewise rational linear.
Proof.
Intuitively, we treat the initial context as an input species. For , let . By assumption, is output-oblivious, so is output-oblivious. Further, by Lemma 19, stably computes some function for all (positive) initial concentrations of . So must stably compute a superadditive, positive-continuous, piecewise rational linear function on all domains with positive (nonzero) initial concentration of . Since and share the same CRN, output species, and input species other than , we know that for any , . All that remains is to show that is the linear extension of . Pick any , such that . Let be the affine function used by on . Since and the domains of are cones by Lemma 11, . Expanding out the right hand side gives us that . By Definition 28 is the linear extension of . ∎
Theorem 2**.**
Let be output-oblivious with . Then stably computes if and only if is a rational affine function whose linear extension is super-additive, positive-continuous, piecewise rational linear.
Proof.
Lemma 20 gives us the necessary conditions for composable CRCs with initial context. Now all we need to do is show that there is a composable CRC for any rational affine function whose linear extension is superadditive, positive-continuous, piecewise rational linear. Since the linear extension of is superadditive, positive-continuous, piecewise rational linear, Lemma 16 gives a CRC that computes this function. Observe that changing the input in this CRC representing the linear extension () to the initial context species will give us a new CRC that computes . ∎
6 Discussion
Instead of continuous concentrations of species, one may consider discrete counts. This changes which functions are stably computed by CRNs. Without the composability constraint, [3] shows in the discrete model that a function is stably computable by a direct CRN if and only if it is semilinear; i.e., its graph is a semilinear subset of . The proof that composably computable functions must be superadditive (Lemma 10) holds for the discrete model as well. Additionally, there exist functions which are superadditive and semilinear but are not computable in the discrete model by a composable CRN. For example (the proof is omitted):
[TABLE]
so the class of composably computable functions is slightly more restricted.
Three recent works characterized output-oblivious computation in the discrete model. With initial context, the characterization for functions on two inputs () was given by [6], and subsequently extended to arbitrarily many inputs [14]. More recently, [10] showed that without initial context, computable functions must be superadditive in addition to the constraints presented in [14].
Our negative and positive results are proven with respect to stable computation, which formalizes our intuitive notion of rate-independent computation. It is possible to strengthen our positive results to further show that our CRNs converge (as time ) to the correct output from any reachable state under mass-action kinetics (proof omitted). It is interesting to characterize the exact class of rate laws that guarantee similar convergence.
Apart from the dual-rail convention discussed in the introduction, other input/output conventions for computation by CRNs have been studied. For example, [12] considers fractional encoding in the context of rate-dependent computation. As shown by dual-rail, different input and output conventions can affect the class of functions stably computable by CRNs. While using any superadditive positive continuous piecewise rational linear output convention gives us no extra computational power—since the construction in this paper shows how to compute such an output convention directly—it is unclear how these conventions change the power of rate-independent CRNs in general.
Finally we can ask what insights the study of composition of rate-independent modules gives for the more general case of rate-dependent computation. Is there a similar tradeoff between ease of composition and expressiveness for other classes of CRNs?
7 Appendix
Most definitions and lemmas in this section work towards proving Lemma 5. We also include a proof of Lemma 11.
Definition 29**.**
A polyhedron is a subset of of the form for some matrix and some vector .
Definition 30**.**
A convex polytope is the convex hull of a finite set of points in .
Definition 31**.**
A polyhedral cone is a set of the form for some finite set of points in
The following lemma comes from a previous work. Note that this sum is the Minkowski sum.
Lemma 21**.**
[Proven in [13]] A subset is a polyhedron if and only if for some convex polytope and some polyhedral cone .
Lemma 22**.**
For a given state of a CRN , the set of states that are straight-line reachable from is a polyhedron.
Proof.
If is the number of reactions in and is the number of species in , then the stoichiometry matrix can be thought of as a linear transformation from the reaction space to the species space . Let be the set of basis vectors corresponding to reactions applicable at . Then since is a linear transformation, it sends the polyhedral cone defined by to a polyhedral cone in . By Lemma 21, the set is a polyhedron in , and since the set of states that are straight-line reachable from is the intersection of this polyhedron with the set of all vectors with nonnegative components, it is also a polyhedron. ∎
Definition 32**.**
The set of possible species produced from a state is
[TABLE]
Lemma 23**.**
For a CRN the set of reachable states is closed under convex combination.
Proof.
Consider some state and states reachable from . Let where and . By lemma 18 we know that is reachable from . Since , we know that , which is equal to . ∎
Lemma 24**.**
Given a state , there is a state reachable from such that . For such a state, .
Proof.
If is the zero vector, observe that , so setting makes this hold. Otherwise, for each species , there is some state reachable from with . Then the state is reachable from by lemma 23. Since contains a positive contribution from each , . Since we know that . Since and we know that . Thus we can conclude that .
∎
Lemma 25**.**
If is a state such that , then any state that is reachable from is straight-line reachable from .
Proof.
Since , by the definition of we know that the set of applicable reactions from is a superset of those applicable from any state reachable from . Thus we can take the sum of all the straight-line segments used to reach from and apply them all in a single straight-line segment to get . ∎
Lemma 5. For any state and any species , if the amount of present in any state reachable from is bounded above, there is a state reachable from such that for any state reachable from , we know that .
Proof.
By Lemma 24, there is some reachable from such that . By Lemma 22, we know that the states that are straight-line reachable from are a polyhedron . The linear map sending maps to some polyhedral subset of —in particular this is a closed subset. Since we assume that the image of this map is bounded above, we know that this subset attains its maximum , so there is some with . Any state that is reachable from is also reachable from , so by Lemma 25 it is contained in . As a result, . ∎
Lemma 11.
- Suppose we are given a continuous piecewise rational linear function . Then we can choose domains for which are cones which contain an open ball of non-zero radius.*
Proof.
Since is piecewise rational linear, we can pick a finite set of domains for , such that , where is a rational linear function. Fix a domain , and consider any point . Since the open ray from the origin passing through is contained in , it is covered by the domains in . If we write any point in the form , then, for each , the restriction of to is of the form for some . Since , we know that
Now suppose that for some we know that . First consider the case where . Then define the set and define the set . We know that is non-empty since , so exists - call it . From the standard properties of the supremum, we know that there exists a sequence of points such that for all and . As a result, from the continuity of , we see that:
[TABLE]
So . However, by assumption, , so that . Since is an upper bound on , it must then be the case that , so that there exists a sequence of points such that for all and . Since there are only finitely many domains in , but infinitely many , by the pigeonhole principle infinitely many of the must be contained in a single domain . Now write the subsequence of points contained in as . We still know that , so by the continuity of and the fact that , we see that:
[TABLE]
Since , this implies that , so that . However, this contradicts the fact that we were able to choose . As a result, our assumption, that there is some such that , must be false. A similar argument, using the infimum instead of the supremum, shows that there can be no such that . As a result, for every point , we know . In other words, , so we can replace with without issue. Doing this for every , we can replace with a cone. By enlarging every domain in in this way, we can choose domains for which are cones.
Since is continuous, we can replace each by its closure, which is again a cone. Suppose that for any , there is a point not in the interior of . Then is in the closure of the complement of , so there exists a sequence of points in the complement of such that . Since the complement of is covered by the , where , we know that each lies in one of the . Since there are only finitely many but infinitely many , we know that infinitely many must lie in at least one of the . As a result, is in the closure of this , and since is closed, we see that . Because of this, if has no interior points, then it is completely contained in the other , so we can remove it from the set of domains. After doing this for every which contains no interior points, we can ensure that the domains we have chosen for all contain an open ball of non-zero radius. ∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Dana Angluin, James Aspnes, David Eisenstat, and Eric Ruppert. The computational power of population protocols. Distributed Computing , 20(4):279–304, November 2007.
- 2[2] Luca Cardelli. Strand algebras for DNA computing. Natural Computing , 10(1):407–428, 2011.
- 3[3] Ho-Lin Chen, David Doty, and David Soloveichik. Deterministic function computation with chemical reaction networks. Natural computing , 13(4):517–534, 2014.
- 4[4] Ho-Lin Chen, David Doty, and David Soloveichik. Rate-independent computation in continuous chemical reaction networks. In Proceedings of the 5th conference on Innovations in Theoretical Computer Science , pages 313–326. ACM, 2014.
- 5[5] Yuan-Jyue Chen, Neil Dalchau, Niranjan Srinivas, Andrew Phillips, Luca Cardelli, David Soloveichik, and Georg Seelig. Programmable chemical controllers made from DNA. Nature nanotechnology , 8(10):755, 2013.
- 6[6] Ben Chugg, Hooman Hashemi, and Anne Condon. Output-oblivious stochastic chemical reaction networks. In 22nd International Conference on Principles of Distributed Systems, OPODIS 2018, December 17-19, 2018, Hong Kong, China , pages 21:1–21:16, 2018.
- 7[7] Domitilla Del Vecchio, Alexander J Ninfa, and Eduardo D Sontag. Modular cell biology: retroactivity and insulation. Molecular systems biology , 4(1):161, 2008.
- 8[8] François Fages, Guillaume Le Guludec, Olivier Bournez, and Amaury Pouly. Strong turing completeness of continuous chemical reaction networks and compilation of mixed analog-digital programs. In International Conference on Computational Methods in Systems Biology , pages 108–127. Springer, 2017.
