WorksComputer Science
Koopman Operator Inference for the Chemical Master Equation
Abstract
We infer kinetic rates of stochastic reaction networks from molecular-state pairs separated by a fixed time lag, without constructing the large state space of the Chemical Master Equation. Extended dynamic mode decomposition estimates the finite-time evolution of selected functions of the molecular state. A matrix logarithm then gives a projected generator whose species rows determine the rates through the known reaction stoichiometry. A finite set of functions introduces a systematic bias. We construct additional functions from the reaction channels and prove that each level of closure moves the first bias term to higher order. Spectral formulas identify the omitted modes responsible for this bias and show when the logarithm amplifies sampling error. Exact calculations and experiments on five reaction networks confirm the predicted error behavior and show when the added functions improve finite-sample rate recovery.
Introduction
The Chemical Master Equation (CME) governs the probability distribution of molecular copy numbers in a well-mixed stochastic reaction network [8, 18]. On a finite state space, the probability vector satisfies
where the reaction stoichiometry, propensities, and rate vector determine the generator [9]. Our inverse problem is to recover from pairs of molecular states observed at a fixed time separation.
The molecular state space grows rapidly with the number of species and their copy numbers. A likelihood based on the full CME requires a transition model whose dimension is the number of retained states. Finite-state projection reduces this cost by truncation [19]. Moment methods replace the distribution by a finite set of moments, but generally require a closure approximation [6, 23]. We instead pose the inverse problem on selected functions of the molecular state. The number of these observables, which we also call the dictionary, need not grow with the number of molecular states.
Let denote the vector of molecular copy numbers at time , and let denote a possible initial state. An observable is a function of these copy numbers. Its conditional expected value after time is
The operators form the Koopman semigroup. The instantaneous rate of change of an observable is given by
This operator is the Koopman generator. For the CME, . From observations separated by a time , extended dynamic mode decomposition (EDMD) approximates on observables [25]. Its principal matrix logarithm approximates , and the rows associated with the species determine the reaction rates. The fitted matrix has dimension , independent of the number of molecular states.
The estimator has three stages:
Here and contain the selected observables evaluated at the two states in each pair, and extracts rates from the species rows. The fitted square matrices have dimension , the number of selected observables.
Prior work uses Koopman lifting and the logarithm of an EDMD matrix to recover governing equations from snapshot pairs [17, 5]. Other work uses generator EDMD to approximate the infinitesimal operator directly and identify drift and diffusion coefficients [16]. Stochastic-model parameters can also be fitted to an estimated operator [22], while estimates at several observation intervals can be combined to recover a Markov-process generator [24].
For Markov jump processes, Niemann, Klus, and Schütte recover transition-rate combinations from a Koopman-generator model of the large-population diffusion limit [20]. Their construction uses short-time Kramers–Moyal estimates of drift and diffusion. Classical generator-inference methods fit a state-to-state rate matrix from a discretely observed transition matrix [3]. We restrict the exact jump-process generator to selected mass-action observables, so the matrix dimension equals the dictionary dimension rather than the number of molecular states.
Gupta and Khammash approximate the continuous-time Koopman operator of a specified reaction network through its dominant decay modes [10]. They use this representation to predict moments across initial states and compute parameter sensitivities and spectral densities. In our inverse problem, we determine unknown reaction rates from state pairs at one fixed separation through (1). The finite-dimensional projection therefore occurs before logarithmic inversion and can bias the rates even when the projected finite-time operator is known exactly.
Mass-action kinetics provides a natural observable set. If is the propensity monomial for reaction , then
The coefficient of each propensity is therefore a stoichiometric change multiplied by a reaction rate. Once the observable set contains these monomials, identifiable rates can be read from the species rows of the exact Koopman generator.
The same structure gives an observable hierarchy. The generator is affine in the rates,
and every unit-rate channel operator is known once the reaction set is specified. Repeated generator images therefore have the expansion
At any fixed depth, all functions on the right can be generated without the unknown rates. They form a reaction-defined closure hierarchy for the species rows that contain the physical parameters. The falling-factorial basis makes the growth of this hierarchy explicit. If denotes polynomials of degree at most and reaction has order , then
The jump difference lowers degree before multiplication by the propensity. Polynomial spaces are therefore invariant for networks with only zero- and first-order reactions, and the projected logarithm is exact for sufficiently small admissible . For nonlinear reactions, (1.4) bounds the new degrees introduced at each closure depth. This gives exact closure for linear reaction networks and a controlled, rate-independent enlargement for nonlinear networks.
Finite-time data determine a projected operator. If projects onto the selected observable space , then exact finite-time expectations give the generator
in general. We therefore obtain biased species rows even before sampling error enters.
We reduce this error by adding successive generator images of the species counts used for rate extraction. An observable space has closure depth when it contains for every selected species . This definition links the reaction-network identity directly to the finite-time error in the physical rates.
The analysis gives a species-row identifiability condition, a modal-residue description of the omitted Koopman modes, and a rate-bias theorem at every closure depth. We also propagate sampling error through the logarithm. Exact finite-state matrices recover the predicted bias orders, and independent trajectory data measure the effect of the added observables on four further networks. Throughout, the reaction set is known, observations occur in pairs, and the selected species coefficients identify the rates. The unknowns are the rates within this fixed reaction set.
Reaction Networks and the Chemical Master Equation
We first describe the reaction network and its two generators. The forward generator evolves probabilities, while the backward generator evolves the observables used to recover the rates.
Reaction network model
Consider a network of molecular species and reaction channels.
Definition 2.1 (Stochastic reaction network). A stochastic reaction network on species consists of reaction channels indexed by , each specified by:
a stoichiometric vector , where are the reactant and product stoichiometric coefficients for species ; and
a propensity function , where, conditional on state at time , the probability that reaction fires in is .
The state records the molecular copy numbers, and denotes the vector of reaction rates.
Under mass-action kinetics, reaction has propensity
where is the rate constant and the binomial factor counts the possible reactant groups. We call the propensity monomial of reaction . The reactant stoichiometry fixes this monomial, while is unknown. A source reaction has monomial , and a unimolecular reaction in species has monomial . A bimolecular reaction has either or ; trimolecular reactions give the analogous degree-three factors.
Chemical master equation
The reaction channels define a continuous-time Markov chain and its CME generator.
Definition 2.2 (CME generator). The probability mass function satisfies the Chemical Master Equation [7, 9]
On a finite closed state set , let . Then , where has entries
and all columns sum to zero. The state set is closed if every enabled reaction remains in . An FSP truncation adds a sink state for transitions that leave its retained set.
An inverse problem posed directly in terms of uses probability vectors of dimension , which can grow combinatorially with the copy numbers. The Koopman formulation follows selected conditional expectations.
From Koopman Observables to Reaction Rates
The Koopman generator acts on functions of the molecular state rather than on state probabilities. For mass-action networks, its action on a species count is a known linear combination of the reaction rates. This identity places the unknown rates in selected rows of a small generator matrix.
Koopman semigroup and generator
Definition 3.1 (Koopman semigroup). An observable is a measurable function . For bounded observables , let the Koopman semigroup act by
The semigroup satisfies and for all . It is the evolution of observable functions dual to the probability evolution generated by .
Definition 3.2 (Koopman generator). Let the Koopman generator denote the instantaneous rate of change of an observable under the Koopman semigroup:
whenever this limit exists. For a stochastic reaction network, , and we evaluate the limit to obtain
for any bounded observable . It follows that , which describes the evolution of expected observables. For unbounded polynomial observables, these identities require the corresponding moment and generator-domain conditions.
Remark 3.3 (Observable-space restriction). On a finite state space, the forward CME generator and backward Koopman generator are dual:
On a countable state space, the same dual relation holds when the generators and pairing have compatible domains, and both spaces may be infinite dimensional. The finite model used here is the restriction of to the observables needed for rate recovery. Its dimension is the number of retained functions; its approximation error is analyzed in § 4–§ 5.
Mass-action basis
Definition 3.4 (Mass-action basis). For a multi-index , the corresponding mass-action monomial is
For an order at least as large as the largest reaction order, the mass-action dictionary
contains the monomials with , ordered so that the constant and species coordinates appear first. Before dependencies are removed, it contains functions. We retain an independent subset on the state space under study while preserving the constant, the species, and a representation of every propensity monomial.
Before conservation reduction, each reaction propensity has the coordinate representation
where is the dictionary index for . After conservation reduction, the same monomial may instead be represented by a linear combination of dictionary functions. The corresponding extraction formula follows the basic single-coordinate case.
Generator applied to species counts
Let be the subspace spanned by the mass-action basis in Definition 3.4. For each reaction channel, let the unit-rate reaction operator be
The full Koopman generator is therefore . The specified reactions determine every without knowledge of the rates.
The classical mass-action first-moment identity [9] now gives the coefficient rows used for rate identification and for the analysis of the projected matrix logarithm.
Lemma 3.5 (Generator applied to a species count). Let be the mass-action basis of Definition 3.4. Then, for each species ,
Here is the th component of . In particular, , and the expected species evolution satisfies
exactly at the species level.
Proof. A firing of channel changes by . We multiply this increment by its propensity and sum over channels to obtain both identities.
Matrix convention. Let denote projection onto , and let be the coordinate matrix of in the ordered physical dictionary , with coefficients stored by row. Thus is the coefficient of in . The species coordinates are retained explicitly and, by Lemma 3.5, . Hence, the corresponding rows of contain exact linear combinations of the rates. Later applications of the generator can leave , and the resulting projection error is the subject of Section 5.
Species-row structure. With rows labeled by the observable acted upon and columns by the resulting dictionary coordinate, the matrix has the form
The constant row is zero because . For a species row, the generator action can be collected by dictionary column:
Consequently,
Equivalently, each propensity column has the species block
Reaction therefore contributes the scaled stoichiometric vector to its propensity column . The starred rows describe the action on higher observables and need not close in the retained dictionary.
When several reactions share a propensity function, one coefficient no longer determines one rate. The species rows still separate the rates when their stoichiometric changes are linearly independent. The following corollary states this condition and defines the extraction map.
Corollary 3.6 (Rate extraction). Suppose reactions share the propensity observable . Their rates and the corresponding species-column coefficients satisfy
The rates are identifiable from this column if and only if the displayed stoichiometric matrix has full column rank. In that case, we recover the rates by multiplying the species-column vector by the pseudoinverse.
Proof. Collect the coefficients of the shared propensity in (16). The resulting linear system has a unique rate vector exactly when its stoichiometric matrix has full column rank.
Let denote the fixed linear map obtained by collecting all full-rank instances of (22) from the species rows to the rate vector: . This notation also covers conservation-reduced dictionaries, where a propensity is represented by a known linear combination of columns. The rank condition is verified for every numerical experiment; we may use additional observable rows to identify rates that the species rows alone cannot separate.
Species-row closure is weaker than invariance of under . If channel has reaction order , the jump difference lowers the observable degree by at least one, so
where contains polynomials of degree at most . Thus, repeated application of the reaction operators for bimolecular and trimolecular channels can produce functions outside a fixed dictionary. The local expansions are therefore proved on a finite closed state space. Their extension to an unbounded network would require additional domain and moment bounds; the unbounded examples in Section 6 lie outside the stated scope of the theorem.
Estimating the Finite-Time Koopman Operator
Each observation is a pair separated by the same interval . EDMD fits the finite-time Koopman operator from these pairs. We take its principal matrix logarithm, extract the rates, and then propagate the sampling error through these calculations.
For paired observations, arrange the evaluated observables as columns:
When has full row rank, the empirical moment matrices and their induced operator are
The dictionary contains the constant, selected species, and every mass-action propensity required for extraction. Fixed feature scaling is undone before the linear map is applied. Rate estimates require full dictionary rank and a real principal logarithm.
Infinite-sample limit
Let be the law of the current state, possibly a mixture of transient observation laws. The population moment matrices have entries
The infinite-sample, or population, EDMD matrix is . It represents the projection of onto the dictionary span. For independent trajectories, or for one stationary ergodic trajectory, we apply entrywise laws of large numbers to obtain . If is invertible and is admissible, we use continuity of inversion and of the principal logarithm to obtain
Paired data therefore recover and in the infinite-sample limit. Increasing the sample size at fixed removes sampling error but leaves the projection bias . This convergence requires finite expectations for the Gram-matrix entries and applies to independent trajectories or to a stationary ergodic trajectory.
Sampling perturbations.. Let . At fixed invertible , we use first-order matrix perturbation to obtain
Applying the Fréchet derivative of the matrix logarithm and then the rate-extraction map, we obtain
The covariance of the two Gram matrices is therefore propagated jointly through inversion, the matrix logarithm, and stoichiometric extraction. For independent trajectory contributions with finite second moments, the multivariate central limit theorem and delta method make the left side asymptotically normal, with covariance obtained from the displayed linear map. For independently sampled pairs, its short-interval rate variance is ; hence the standard deviation is of order . Whole-trajectory resampling is used below when pairs overlap.
Reducing Finite-Time Bias with Reaction-Generated Observables
Projection introduces bias because an observable can leave the retained space and return before the next observation. We describe these excursions in two ways. A block expansion gives their order in the observation interval, while a resolvent formula identifies the omitted Koopman modes that carry them. Reaction-generated observables remove the shortest excursions from the species rows used for rate extraction.
Projection bias in the species rows
Consider a full-support measure on a finite closed state space and let be the orthogonal projection onto the independent dictionary span . Let
Here is the projected finite-time action, is its logarithmic generator, and is the corresponding infinite-sample rate estimate. A hat marks an empirical quantity. We call a real projected matrix admissible if it has no eigenvalues on , so that its real principal logarithm exists. An observation interval is admissible when its projected matrix is admissible.
Choose bases for and that are orthonormal in this measure. Together, these bases are adapted to . In the row-coefficient convention of EDMD, the full generator has the block form
Let index the retained observables and their complement. The block contains the coefficients outside that appear when the generator acts on a retained observable. The matrix is the row-convention representation of , and the subscript “sp” selects the species rows used by . A change of retained basis is absorbed into , so it does not change the extracted rates.
Lemma 5.1 (Projected Koopman operator). For fixed projection and ,
Proof. We use block multiplication to obtain the required blocks of the second power:
We multiply once more to obtain
Using , its block is
We replace by the expression above to obtain (5.3).
How projection changes the Koopman spectrum
We interpret the projection in (5.2) spectrally. If is invariant under , then and
Thus the fitted Koopman eigenvalues are exponentials of generator eigenvalues. If lies in the open strip , we use the principal logarithm to reverse this mapping and obtain . Outside that strip, generator frequencies separated by cannot be distinguished. These are the matrix-function form of the sampling and branch conditions for Koopman spectral inference [11, 2].
When the retained observable space is not invariant, paths through alter the spectrum. Let be a contour in the common resolvent set that encloses the spectra of and . We use block inversion and the Cauchy functional calculus to obtain
Proposition 5.2 (Modal residues of the omitted space). Suppose is diagonalizable, with right and left eigenvectors and normalized by , and eigenvalues , where denotes conjugate transpose. Then
Consequently, an omitted mode enters the projected Koopman operator through its decay rate and coupling residue . If , that mode is invisible to the retained finite-time operator.
Proof. We substitute the spectral resolution into (5.5) to obtain (5.7). We obtain the final statement from (5.6).
The middle term in (5.5) represents a frequency-dependent return through the omitted observables. It shows how unresolved modes perturb the projected Koopman spectrum. When either coupling block vanishes, (5.4) is recovered. This Schur-complement resolvent is standard in invariant-subspace and matrix-function analysis [12, 11].
Equation (5.7) also connects the analysis with the stochastic Koopman approximation of Gupta and Khammash [10]. They estimate iterated resolvents to recover dominant decay modes of a specified reaction network. Here each pole is paired with a residue that measures how the mode leaves and re-enters the retained observable space. Their method uses dominant modes for prediction. We use the mode–residue pairs to explain bias in an inferred generator. Eigenvalues alone are insufficient because a slowly decaying mode with a small residue can have little effect on the recovered rates.
The same calculus separates the size of the projection defect from the conditioning of the logarithm. Suppose a contour surrounds the spectra of and without crossing , and the strip condition above holds. Then
We take norms in (5.8) to bound the rate error by the projection defect, amplified by the two resolvents and by after applying . The contour can cease to exist when the projected spectrum reaches the principal-logarithm cut. The expansion below complements this global spectral statement by resolving the first small- contribution that survives in the selected species rows.
Added observables and bias order
To remove these paths through a chosen order, we retain for each species used in rate extraction. Only these species rows must close; the full dictionary need not be invariant. The first surviving rate error is determined by one excursion from the retained space into its complement and back.
Definition 5.3 (Species closure depth). The dictionary space has closure depth on a collection of species observables if
for every species used by the rate-extraction map.
Theorem 5.4 (Rate bias from finite-depth closure). Let the state space be finite and closed, and let a full-support measure independent of induce . Suppose that and
for every species used by the extraction map. If , then
where we let denote the Bernoulli numbers satisfying . Consequently,
For odd , the order is exactly if and only if .
Proof. The closure conditions imply
Indeed, after generator applications the selected species rows have no complementary component; after one further application, we obtain the expression in (5.12). Any term that leaves the retained space must later return through . The first such word that can survive in a selected species row is therefore
Insert the exponential expansion of Lemma 5.1 into the ordinary power series for and collect this word. At its first possible degree, terms containing , a retained factor to the right of , or a second excursion cannot contribute. The remaining coefficients are generated by
Hence the coefficient of the word in (42) is . Dividing by and applying gives (39). Under the condition , the logarithm series converges and the remainder is uniform. Finally, for positive even , which proves (40).
Remark 5.5 (Closure as spectral decoupling). Under condition (41), every short block walk vanishes if it starts in an extracted species row and enters the omitted space during the first generator applications. The full Koopman spectrum is unchanged, but the retained–omitted decomposition prevents the modal residues in Proposition 5.2 from reaching the extracted rows along these short paths. Theorem 5.4 gives the resulting delay in the rate bias.
Corollary 5.6 (Depth-one projection bias). If for every species used by the extraction map, then
Proof. Let in Theorem 5.4 and use .
The specified reaction channels generate a space with the closure required by Definition 5.3. Let be a base dictionary that contains the constant, the species, and the propensity functions needed for extraction, and let
Zero functions and linear combinations already present are discarded when the dictionary is assembled.
Corollary 5.7 (Closure under reaction operators). For every rate vector , the space has closure depth on the selected species. Consequently, its rate bias has the order in (40).
Proof. We use repeatedly. For each and each selected species , we expand
Every function on the right belongs to the span in (45). Hence for every , and the space has closure depth . We now apply Theorem 5.4 to obtain the stated bias order.
Remark 5.8 (Partial closure). The order theorem requires the complete space in (45). The Lotka–Volterra and Brusselator comparisons use this complete depth-two space. The Michaelis–Menten and MAPK comparisons retain selected directions from it. Under depth-one
closure, the complementary coefficients of are . The leading bias therefore satisfies
Adding directions from the residuals of reduces the middle factor. A rate-independent partial-closure rule orders the empirical residual directions by singular value and retains the largest observed components first. The final factor and the extraction map also enter the bound, so partial closure need not reduce every rate error monotonically.
Constructing the added observables
We construct the spaces in (5.16) one depth at a time. At each depth, we apply every unit-rate reaction operator to the functions added at the preceding depth and discard zero functions and linear combinations already represented by the dictionary. Before this reduction, there are ordered sequences of reaction operators. Different sequences may produce the same polynomial or a function already represented by the dictionary, so several sequences can collapse to one coordinate.
For the reversible dimerization model used below, let channel 1 be and channel 2 be . Starting from , the functions and already lie in the base dictionary. At length two,
Using the conservation law , the last three functions lie in the base dictionary. We add the component of that is independent of the existing functions. One new coordinate is enough to enforce depth-two closure in this example.
From Theorem 5.4, we obtain orders of at least 2, 4, 4, and 6 at depths one through four. The repeated fourth order has a different explanation at the two middle depths: the depth-two Bernoulli coefficient is zero, while the depth-three coefficient is . The depth-three function can therefore reduce the fourth-order coefficient without raising the order. For polynomial libraries, each additional closure level raises the required degree by at most . The Brusselator has a trimolecular channel, so a full polynomial dictionary that enforces depth two must include terms through degree five.
Numerical Validation
The numerical experiments separate the three errors that govern rate recovery. Exact finite-state matrices isolate projection bias and verify its predicted order. Simulated trajectories then show how sampling error, projection bias, and the logarithm branch condition interact in finite data.
Experimental setup
The dimerization model resolves finite-time bias by closure depth and omitted Koopman mode. A sweep over observation intervals for the Brusselator follows rate recovery to the principal-logarithm branch cut. The final comparison tests complete or selected reaction-generated closure on oscillatory, conserved, higher-order, and multi-tier networks.
The dimerization state space is small enough to enumerate. Lotka–Volterra supplies an oscillatory network; Michaelis–Menten tests conservation reduction and shared propensities; the Brusselator contains a third-order propensity; and a reduced MAPK cascade supplies a signaling network with a large conservation class.
For each network, we fix the species coefficients used to extract its rates and retain the constant, the physical scaling, and the full-rank EDMD fit as we change dictionaries. The Michaelis–Menten conservation class is finite. Lotka–Volterra and the Brusselator have unbounded natural state spaces and therefore test the method beyond the setting of the finite-state bias theorem.
Exact finite-state validation
Consider the reversible dimerization network
Using the conservation law , we reduce the model to 13 states and enumerate them to form the exact Gram matrices from the full matrix exponential. We denote the initial probability of state by and choose these probabilities proportional to in increasing order. The dictionary contains . Repeated generator applications leave this dictionary. No simulated data enter the resulting bias calculation.
Figure 1 resolves the projection error by omitted Koopman mode. We diagonalize the complementary block in the weighted orthogonal decomposition used by the population EDMD calculation. At , the largest residue belongs to . Decoupling this conjugate pair changes the inferred relative-rate vector by . The slower pair has a smaller residue and changes the vector by , while the modes near and have effects below . Decay rate alone therefore does not rank the modes that matter for inference. Their coupling residues are also needed. The leave-one-mode-out changes are diagnostic rather than additive because the matrix logarithm couples all modes.
Figure 1. Omitted Koopman modes in the exact dimerization calculation. (a) Eigenvalues of the complementary generator block plotted against the Frobenius norm of their coupling residues . Conjugate pairs are grouped. (b) Change in the inferred relative-rate vector after decoupling one mode or conjugate pair at . This leave-one-mode-out quantity measures influence through the nonlinear logarithm and is not an additive decomposition of the total bias.
Finite-depth generator closure
We test the order theorem without truncation or Monte Carlo error in the finite dimerization model by adding to the dictionary for successive values of . Starting with , we add the weighted-orthogonal residuals of , , and one at a time. We call the largest retained power the closure depth.
For this network, the same nested spaces are obtained by successively applying the reaction operators in Corollary 5.7 and removing linearly dependent functions.
Order verification. In Figure 2(a), we plot the infinite-sample bias across all four depths, for which the fitted slopes are 1.996, 3.994, 4.084, and 5.994. These values agree with the orders 2, 4, 4, and 6 in Theorem 5.4, so we conclude that its lower bounds are attained in this model. At depth three, we use the theorem to obtain the fourth-order coefficient . For the two rates, its values are and ; by directly evaluating at , we obtain and . The depth-three function therefore changes the fourth-order coefficient, and the depth-four Bernoulli coefficient vanishes.
Figure 2. Finite-depth generator closure in the exactly enumerable dimerization model. (a) Exact relative rate bias, computed with 256-bit arithmetic. The dictionary at depth contains . (b) First-order relative mean squared error after minimizing over the observation interval for each depth and sample size; its bias contribution is evaluated from the exact projected operators.
Bias and sampling error. An enlarged dictionary has lower first-order mean squared error when its reduction in squared projection bias exceeds its increase in sampling variance. We compare closure depths using a common measure of physical rate error. For rates, let be the single-unit asymptotic variance coefficient for rate obtained from the linearized estimator. With independent sampling units, the first-order relative mean squared error is
The first sum is the squared projection bias. The second is the sampling variance, with predicted by the Gram-matrix perturbation calculation in (29) for one sampling unit and then divided by . The sampling unit is an independent pair, an independent triple, or a whole trajectory, according to the estimator and the way observations are collected.
The short-interval variance following (29) explains why closure should be compared after choosing an interval for each dictionary. The following corollary separates this effect from the fixed-interval comparison below.
Corollary 6.1 (Optimized error rate). Suppose that the aggregate relative bias is and the single-pair relative variance coefficient is , where . Then the leading mean squared error is minimized at
and its minimum equals
Thus the ordinary depth-one logarithm has the rate , while depth-two closure has the rate when its fourth-order coefficient is nonzero.
Proof. The leading terms are . We differentiate to obtain and hence (48). At this value, the variance term is times the squared-bias term; their sum is (49).
Optimized observation interval. In Figure 2(b), we minimize the exact first-order mean squared error over separately for each depth and sample size. Depth two first improves on depth one at approximately pairs, because its smaller bias permits an interval near while the depth-one optimum decreases with the sample size. At pairs, the optimized depth-two mean squared error is of the optimized depth-one value. Depths three and four have larger sampling coefficients and do not improve on depth two over the plotted range.
Brusselator over a wide range of observation intervals
Exact enumeration separated projection bias from sampling error in the dimerization study. We now use simulated Brusselator trajectories to examine the practical choice of observation interval. The experiment begins in the accurate short-interval regime, passes through projection-dominated error, and ends where the fitted logarithm is no longer admissible.
The Brusselator [21] combines a constant source, autocatalysis, conversion, and degradation. It tests source-rate recovery and the separation of two reactions with the same linear propensity. The volume-scaled stochastic model with is
which starts from and runs to with , while only are retained as dynamical species. The ten-dimensional mass-action basis retains the constant and contains all factorial monomials through degree three. Let denote the trimolecular propensity feature. The effective stochastic rate constants are , , , and ; any chemostatted factor is absorbed into . Applying Lemma 3.5, we obtain the species-row entries
We add the species actions to cancel both autocatalysis and conversion:
Hence is recovered from the coefficient of . The controlled studies below use this relation together with the individual and autocatalysis coefficients.
The controlled calculation uses 1000 independent direct-SSA trajectories (seed 714) with the stated propensities and initial state. We retain the constant and all ten factorial features through degree three. At , the bootstrap standard deviations for are 0.0696, 0.0188, while the linearized predictions are 0.0697, 0.0187. The estimate differs substantially from the true value 3. We vary and use an independent reference ensemble to separate sampling variation from this systematic error.
The extended calculation covers 14 intervals from to 6.4, with every fit using the same factorial dictionary and rate-extraction formulas. We retain the intercept and all nonzero singular values and require a real principal logarithm. All intervals share current times 0 : 0.1 : 49.6 and 100 paired whole-trajectory bootstrap index sets. Simulation extends to time 56 to supply the longest intervals. The source and autocatalytic rates are now included, with autocatalysis extracted by averaging the two opposite species coefficients.
An independent ensemble of 10,000 trajectories (seed 2718), divided into twenty groups, provides the empirical reference. Variation among the groups gives linearized Monte Carlo standard errors. The reference therefore retains quantified Monte Carlo uncertainty, while every interval in the study uses the same trajectories and sampling mixture. Figure 3 reports all four rates together with the bootstrap and reference uncertainties.
Figure 3. Rate recovery across observation intervals, normalized by each true rate. We plot one bootstrap standard deviation for 1000 trajectories as error bars and two Monte Carlo standard errors for the independent 10,000-trajectory reference as gray bands. The plotted range ends at , the largest tested interval for which the central fitted matrix has a real principal logarithm.
In the figure, we distinguish three regimes. At short intervals, the bootstrap standard deviations for and fall from 0.614 and 0.278 at to 0.112 and 0.0558 at , while the order- projection bias remains below the sampling resolution. At intermediate intervals, bias becomes rate dependent: increasing from 0.02 to 0.1 leaves near one but moves the conversion estimate from 3.177 to 4.443. From the independent reference, we obtain at , confirming that this discrepancy is systematic. At , 1.6, and 3.2, every bootstrap fit and the reference fit fail the real principal-logarithm check. Thus sampling error dominates at short intervals, projection bias dominates selected rates at intermediate intervals, and the fitted logarithm becomes inadmissible at long intervals.
Figure 4 gives the corresponding spectral view. Define the branch margin
Figure 4. Spectral diagnostics for the projected Brusselator Koopman matrices. (a) Eigenvalues of the central 1000-trajectory fit at three observation intervals; the red segment is the principal-logarithm branch cut and the gray circle is the unit circle. (b) The branch margin (6.5) for the central and independent reference ensembles. Values plotted at machine scale are zero to working precision because an eigenvalue lies on the cut.
This quantity measures distance to the negative real axis in a singular-value sense and therefore accounts for nonnormality. For the central fit, falls from at to at
. It vanishes at when an eigenvalue reaches the branch cut. The independent reference gives nearly identical values, so the loss of a real logarithm is reproducible across the two ensembles.
With the current sample sizes, the asymptotic bias slope remains unresolved at the shortest intervals.
Comparison across network classes
The dimerization and Brusselator studies isolate bias order, sampling cost, and interval selection. We next test a small number of added observables on four reaction networks with different structures. The additional functions do not depend on the unknown rates. For every channel pair , we evaluate . A function is discarded if it vanishes on all current observations. We subtract the empirical projection of each remaining function onto the base dictionary and compute an SVD of the residuals. Independent residuals are added in decreasing order of singular value, while the base coordinates remain unchanged. The resulting dictionaries are nested, beginning with the ordinary estimator and ending with full depth-two closure.
Separate exploratory ensembles choose the observation interval and the number of added functions. Among the admissible settings considered, we select the largest paired reduction in mean absolute relative rate error. This criterion uses one common interval for the base and closure estimators. We then fix the interval and number of functions before generating twenty new evaluation datasets for each network. The base and closure fits use identical observations within each dataset.
The largest model in this comparison is a reduced Huang–Ferrell MAPK cascade [13], with one phosphorylation at the upper tier and two at each of the lower tiers. After omitting explicit enzyme–substrate complexes, the model has ten mass-action channels: five phosphorylations catalyzed by the stimulus or the active species in the tier above, and five first-order dephosphorylations. The conserved tier totals are 40, 60, and 60, and twelve initial conditions vary the activity of each tier separately while including several intermediate activation states. After the reduction, the model has six independent dynamical coordinates and a 12-function base dictionary. At a fixed stimulus level, its conservation class still contains states.
Table 1 compares the two dictionaries on the same observations. Within each dataset, we first average the absolute relative errors over all rates. The error columns then report the median and interquartile range across twenty datasets. The condition numbers are the corresponding medians for the scaled empirical Gram matrices. Every projected matrix has a real principal logarithm. The Lotka–Volterra and Brusselator rows use overlapping intervals within each trajectory. Each Michaelis–Menten and MAPK pair comes from an independent short trajectory. We draw an initial condition and a current time from their fixed joint distribution, simulate to that time, and then continue once over the observation interval. Exploratory seeds 8101 and 9101–9501 select the intervals and added functions. The reported seeds 10101–12001, in increments of 100, are reserved for evaluation.
| Network | Pairs | Base error | Closure error | Condition numbers | ||
| Lotka–Volterra | 0.2 | 100,000 | 6/7/7 | 0.936 (0.653, 1.05) | 0.767 (0.378, 1.02) | |
| Michaelis–Menten | 6.0 | 64,000 | 4/5/6 | 5.56 (5.22, 6.13) | 2.79 (1.50, 4.19) | |
| Brusselator | 0.04 | 248,500 | 10/11/11 | 15.9 (13.7, 17.9) | 4.88 (2.61, 6.04) | |
| MAPK cascade | 1.6 | 96,000 | 12/15/21 | 4.90 (3.92, 5.60) | 2.90 (2.59, 3.67) |
Table 1. Independent comparison of observable sets using the same observations. Errors are percentages. The dimension column lists the base, selected, and complete depth-two dimensions. Added coordinates are orthogonalized against the scaled base dictionary. Their Gram eigenvalues lie within the extremal eigenvalues of the base Gram matrix, so the displayed condition numbers are unchanged. Intervals and selected dimensions were fixed on exploratory data before the twenty evaluation datasets were generated.
Figure 5 reports the paired comparison at the selected observation intervals and sample sizes. The median errors decrease from 0.936% to 0.767% for Lotka–Volterra, 5.56% to 2.79% for Michaelis–Menten, 15.9% to 4.88% for the Brusselator, and 4.90% to 2.90% for MAPK. With closure, we lower the paired error in 13, 19, 19, and 17 of the twenty datasets, respectively. Exact two-sided paired Wilcoxon tests yield , , , and in the same order. Thus the Lotka–Volterra reduction is modest and unresolved at this sample size, while we observe clear paired reductions in the other three comparisons. We estimate one and three added functions for the Michaelis–Menten and MAPK calculations, respectively.
Figure 5. Independent comparison after adding selected reaction-generated observables. (a) Median mean absolute relative rate error across twenty datasets; bars span the interquartile range. (b) Base, selected, and complete depth-two dictionary dimensions. (c) Paired ratio of the closure error to the base error for each dataset; diamonds mark medians and the dashed line marks equal error. Each base and closure fit uses the same observations. All four networks use evaluation seeds that were excluded from interval and dimension selection.
The finite Michaelis–Menten conservation class also permits a comparison without sampling error. At , the mean absolute relative error is 5.23% with the base dictionary and 0.484% with full depth-two closure. The infinite-sample calculation therefore agrees with the predicted bias reduction. The new trajectory data show how much of this reduction remains when one additional function must be estimated from a finite sample.
The MAPK conservation class contains 146,611,121 molecular states. We fit a Koopman matrix whose observables retain the species and propensity coefficients needed to identify all ten rates.
Discussion and Conclusions
The method recovers reaction rates from paired molecular states without constructing the full CME transition matrix. Mass-action structure places the rates in selected rows of the Koopman generator. EDMD and a matrix logarithm estimate these rows from finite-time data.
Generator paths that leave the retained observable space and return to the species rows describe the finite-time projection error. Closure through depth represents these paths through the order stated in Theorem 5.4. The first remaining coefficient is , which gives order at odd depth and at least order at even depth. The block-resolvent formula describes the same error spectrally. Each omitted mode contributes a pole and a coupling residue . In the dimerization calculation, the residues, rather than the decay rates alone, rank the modes by their effect on the inferred rates. Closure suppresses their shortest paths into the extracted species rows, while the resolvents in (37) quantify the remaining amplification near the logarithm branch cut.
The finite dimerization calculation verifies these orders without state-space truncation or Monte Carlo error. It also shows why the observation interval and closure depth must be selected together. After optimizing the interval, depth-two closure first improves on the ordinary logarithm at about 1.00e6 pairs. At 1.00e10 pairs, its predicted mean squared error is 26.0% as large.
The Brusselator sweep reaches the complementary spectral boundary. The branch margin collapses at , where both the central fit and the independent reference lose a real principal logarithm. At shorter intervals, we use the same calculation to separate sampling-dominated and projection-dominated rate error.
Independent evaluation datasets test the added observables when they must be estimated from trajectories. Median errors decrease in all four networks, with clear paired reductions for Michaelis–Menten, the Brusselator, and MAPK. For Lotka–Volterra, the median gap is smaller than the variation among datasets, and the paired test is unresolved. This result agrees with the finite-sample error budget. Reducing projection bias gives only a modest gain when sampling variation has comparable size.
The observable formulation exchanges statistical efficiency for a calculation whose dimension equals the number of selected functions. In the 13-state model, the ordinary estimator has a standard deviation 6.05 times the Cramér–Rao limit attained asymptotically by the correctly specified full likelihood. In the MAPK calculation, a observable matrix replaces a state-space matrix with about 1.47e8 rows and columns. These examples show the intended trade-off. The method avoids enumeration of the molecular state space while retaining a quantitative account of its bias and sampling error.
Future work. Extending the finite-state remainder bound to unbounded networks will require generator-domain conditions and moment estimates. Finite-data applications would also benefit from automatic selection or regularization of the generated candidate functions in place of the present exploratory selection. Such extensions should account explicitly for the covariance of overlapping intervals. Long observation intervals require a separate treatment of logarithm branches and admissibility, closely related to the classical embedding problem [15, 14, 4, 1]. We leave measurement error, discovery of missing reactions, and matrix-free logarithm calculations to future work.
Code and data availability. The code and data used to reproduce every table and figure are available at https://github.com/AdityaDendukuri/cme_koopman.
References
- [1]M. Casanellas, J. Fernández-Sánchez, and J. Roca-Lacostena, The embedding problem for Markov matrices, Publicacions Matemàtiques, 67 (2023), pp. 411–445, https://doi.org/10.5565/PUBLMAT6712308.
- [2]Chandrasekaran, S. (2016). Core matrix analysis. In Lecture notes.
- [3]D. T. Crommelin and E. Vanden-Eijnden, Fitting timeseries by continuous-time Markov chains: A quadratic programming approach, Journal of Computational Physics, 217 (2006), pp. 782–805, https://doi.org/10.1016/j.jcp.2006.01.045.
- [4]E. B. Davies, Embeddable Markov matrices, Electronic Journal of Probability, 15 (2010), pp. 1474–1486, https://doi.org/10.1214/EJP.v15-733.
- [5]Z. Drmač, I. Mezić, and R. Mohr, Identification of nonlinear systems using the infinitesimal generator of the Koopman semigroup: A numerical implementation of the Mauroy–Goncalves method, Mathematics, 9 (2021), p. 2075, https://doi.org/10.3390/math9172075.
- [6]S. Engblom, Computing the moments of high dimensional solutions of the master equation, Applied Mathematics and Computation, 180 (2006), pp. 498–515, https://doi.org/10.1016/j.amc.2005.12.032.
- [7]S. N. Ethier and T. G. Kurtz, Markov Processes: Characterization and Convergence, Wiley, New York, 1986, https://doi.org/10.1002/9780470316658.
- [8]D. T. Gillespie, Exact stochastic simulation of coupled chemical reactions, The Journal of Physical Chemistry, 81 (1977), pp. 2340–2361, https://doi.org/10.1021/j100540a008.
- [9]D. T. Gillespie, A rigorous derivation of the chemical master equation, Physica A: Statistical Mechanics and its Applications, 188 (1992), pp. 404–425, https://doi.org/10.1016/0378-4371(92)90283-V.
- [10]A. Gupta and M. Khammash, A spectral Koopman approximation framework for stochastic reaction networks, 2025, https://arxiv.org/abs/2511.23114.
- [11]N. J. Higham, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, 2008, https://doi.org/10.1137/1.9780898717778.
- [12]R. A. Horn and C. R. Johnson, Matrix Analysis, Cambridge University Press, second ed., 2013, https://doi.org/10.1017/CBO9781139020411.
- [13]C.-Y. F. Huang and J. Ferrell, James E., Ultrasensitivity in the mitogen-activated protein kinase cascade, Proceedings of the National Academy of Sciences of the United States of America, 93 (1996), pp. 10078–10083, https://doi.org/10.1073/pnas.93.19.10078.
- [14]Israel, R. B., Rosenthal, J. S., & Z. W. Wei, J. (2001). Finding generators for Markov chains via empirical transition matrices, with applications to credit ratings. Mathematical Finance, 11, 245–265. https://doi.org/10.1111/1467-9965.00114
- [15]J. F. C. Kingman, The imbedding problem for finite Markov chains, Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete, 1 (1962), pp. 14–24, https://doi.org/10.1007/BF00531768.
- [16]S. Klus, F. Nüske, S. Peitz, J.-H. Niemann, C. Clementi, and C. Schütte, Data-driven approximation of the Koopman generator: Model reduction, system identification, and control, Physica D: Nonlinear Phenomena, 406 (2020), p. 132416, https://doi.org/10.1016/j.physd.2020.132416.
- [17]A. Mauroy and J. Gonçalves, Koopman-based lifting techniques for nonlinear systems identification, IEEE Transactions on Automatic Control, 65 (2020), pp. 2550–2565, https://doi.org/10.1109/TAC.2019.2941433.
- [18]D. A. McQuarrie, Stochastic approach to chemical kinetics, Journal of Applied Probability, 4 (1967), pp. 413–478, https://doi.org/10.2307/3212214.
- [19]B. Munsky and M. Khammash, The finite state projection algorithm for the solution of the chemical master equation, The Journal of Chemical Physics, 124 (2006), p. 044104, https://doi.org/10.1063/1.2145882.
- [20]J.-H. Niemann, S. Klus, and C. Schütte, Data-driven model reduction of agent-based systems using the Koopman generator, PLOS ONE, 16 (2021), p. e0250970, https://doi.org/10.1371/journal.pone.0250970.
- [21]I. Prigogine and R. Lefever, Symmetry breaking instabilities in dissipative systems. II, The Journal of Chemical Physics, 48 (1968), pp. 1695–1700, https://doi.org/10.1063/1.1668896.
- [22]A. N. Riseth and J. P. Taylor-King, Operator fitting for parameter estimation of stochastic differential equations, 2018, https://doi.org/10.48550/arXiv.1709.05153, https://arxiv.org/abs/1709.05153.
- [23]D. Schnoerr, G. Sanguinetti, and R. Grima, Approximation and inference methods for stochastic biochemical kinetics—a tutorial review, Journal of Physics A: Mathematical and Theoretical, 50 (2017), p. 093001, https://doi.org/10.1088/1751-8121/aa54d9.
- [24]R. Sechi, A. Sikorski, and M. Weber, Estimation of the Koopman generator by Newton’s extrapolation, Multiscale Modeling & Simulation, 19 (2021), pp. 758–774, https://doi.org/10.1137/20M1333006.
- [25]M. O. Williams, I. G. Kevrekidis, and C. W. Rowley, A data-driven approximation of the Koopman operator: Extending dynamic mode decomposition, Journal of Nonlinear Science, 25 (2015), pp. 1307–1346, https://doi.org/10.1007/s00332-015-9258-5.