A Novel Methodology to Estimate Metabolic Flux Distributions in Constraint-Based Models

Quite generally, constraint-based metabolic flux analysis describes the space of viable flux configurations for a metabolic network as a high-dimensional polytope defined by the linear constraints that enforce the balancing of production and consumption fluxes for each chemical species in the system. In some cases, the complexity of the solution space can be reduced by performing an additional optimization, while in other cases, knowing the range of variability of fluxes over the polytope provides a sufficient characterization of the allowed configurations. There are cases, however, in which the thorough information encoded in the individual distributions of viable fluxes over the polytope is required. Obtaining such distributions is known to be a highly challenging computational task when the dimensionality of the polytope is sufficiently large, and the problem of developing cost-effective {\it ad hoc} algorithms has recently seen a major surge of interest. Here, we propose a method that allows us to perform the required computation heuristically in a time scaling {\it linearly} with the number of reactions in the network, overcoming some limitations of similar techniques employed in recent years. As a case study, we apply it to the analysis of the human red blood cell metabolic network, whose solution space can be sampled by different exact techniques, like Hit-and-Run Monte Carlo (scaling roughly like the third power of the system size). Remarkably accurate estimates for the true distributions of viable reaction fluxes are obtained, suggesting that, although further improvements are desirable, our method enhances our ability to analyze the space of allowed configurations for large biochemical reaction networks.


Introduction
The development of high throughput techniques now makes available a considerable number of high quality reconstructions of the metabolism of a variety of organisms, which include the stoichiometry of the biochemical reactions in the network and the underlying enzyme-gene associations [1][2][3][4]. Ideally, this information may be employed for kinetic modeling approaches that could shed light on issues, like the organization of a cell's metabolic phenotype and its robustness to perturbations (internal or exogenous) in a fully dynamical setting. Indeed, consider a metabolic network of N coupled chemical reactions transforming M metabolites and let ξ = {ξ µ i } (i = 1, . . . , N ; µ = 1, . . . , M ) denote the stoichiometric coefficients, with the standard sign convention to distinguish substrates (ξ µ i < 0) from products (ξ µ i > 0) in each reaction, i. If one denotes by γ µ the rate of change of the intracellular level of species µ, due to exchanges between the cell's interior and the environment, then, under mass action kinetics, the intracellular concentration, c µ , of metabolite µ obeys the equation: where γ µ > 0 (resp.γ µ < 0) if there is a net out-take (resp. in-take) of species µ. Unluckily, addressing the above system in full generality requires knowledge about reaction mechanisms and kinetic constants (which specify how rates depend on concentrations), which is at best only partially available. (Besides, it is not entirely clear to us that, were that information fully at our disposal, simulating (1) for a genome-scale reconstruction involving thousands of reactions and metabolites would be a sensible thing to do).
Computational studies of metabolic networks therefore generally assume that the cell operates at non-equilibrium steady-state (NESS) conditions, where the concentration of the metabolites is constant [5,6], with the rationale that as long as one is interested in the behaviour for time scales shorter than genetic ones (minutes), the much faster equilibrating biochemistry can be assumed to be "frozen" in an NESS. Under this assumption, computing NESS fluxes more modestly requires the prescription of bounds for flux variability, i.e., x i ∈ [m i , M i ] (which also encode for reaction reversibility assumptions), and for exchange rates, i.e., γ µ ∈ [m µ , M µ ], with which conditions (1) can be written as: This set of inequalities is fairly general, since it may include metabolites involved only in internal reactions (for which γ µ = 0), as well as exchanged species (i.e., with γ µ = 0). The solution space of Equation (2) is, in turn, given by: The problem we address here concerns computational methods to sample S, in order to retrieve information on quantities like the distribution of the allowed values of each flux over the entire solution space. While most studies aiming at developing predictive power on metabolic phenotypes (especially for microbes) have been thus far based on coupling (2) with a phenotypic optimization principle (the solving of which requires no sampling of S), it is being increasingly recognized that the information entailed by the structure of S might provide key insight into different aspects of metabolic network analysis, from flux-flux correlations, to robustness, to perturbations, to (more subtly) optimal experiment design [7]. The task, however, presents many challenges, especially from the viewpoint of CPU costs. The running time of the paradigmatic algorithm to sample high-dimensional polytopes, such as S, namely Hit-and-Run Monte Carlo, is known to scale, in the best case, as the third power of the number of variables in the system [8], making it impractical for large enough networks. On the other hand, it has recently been shown that the heuristics of message-passing (MP) algorithms may provide a powerful alternative [9]. In brief, MP-based protocols are designed to compute solutions to statistical inference problems, like estimating marginals of random variables, exploiting peculiar topological properties of the underlying graphs that describe the interdependence of variables (reactions in our case) and constraints (metabolites in our case). Indeed, when such a graph is locally tree-like, i.e., it lacks short loops, statistical inference can be performed accurately by MP in linear time with the number of variables [10]. This property has been used in [9] to devise a highly efficient MP method to sample sets like S. Yet more recently [11], a second MP algorithm has been proposed to overcome some of the limitations of the method of [9], most notably, the inapplicability of the latter to real valued stoichiometry and, perhaps more importantly, the accuracy problems that may arise when (some) fluxes are allowed to span several orders of magnitude.
Here, we build on the work presented in [11] and apply a MP methodology, which we call weighted Belief Propagation (wBP), to the analysis of the solution space of metabolic reaction networks. In particular, we focus on the metabolism of the human red blood cell (hRBC), a major benchmark for sampling tools, as its size (N = 46, M = 34) makes it possible to characterize its solution space S by various methods and to compare the results. Specifically, we have evaluated results retrieved by wBP against those obtained by Hit-and-Run Monte Carlo to sample the polytope S for the hRBC (A note of caution here is needed regarding the words Monte Carlo, which are used throughout the text, as well as in some of the references in a somewhat unspecific way. As is well-known, Monte Carlo techniques generically rely on repeated random sampling. Thus, Hit-and-Run is a Monte Carlo algorithm. The method used in [12] to sample a volume is also a Monte Carlo algorithm, albeit a different one, based on a rejection method. Methods to perform statistical inference by directly computing high-dimensional integrals, or sums, are often also Monte Carlo methods, as long as the integrals involved are evaluated by Monte Carlo integration. Therefore, by itself, Monte Carlo is perhaps too generic a term and does not reveal the specifics of an algorithm. The reader is advised to check the references carefully when comparing the various techniques). Because of the importance of Hit-and-Run as a mathematically controlled procedure with broad applicability, we have tried to devise a Monte Carlo method with computing times reduced as much as possible (the limit of standard Hit-and-Run techniques lying in their mixing time, known to scale cubically with the number of variables). The modified Hit-and-Run algorithm we have devised, based on a projection method, appears to be indeed optimized from this viewpoint with respect to, e.g., what was done in [13]. We call the resulting method the Kernel Hit-and-Run algorithm (KHR). As we will see, results obtained by wBP and KHR are in remarkable agreement among themselves (and with previous studies of the same problem by other, more costly, computational methods).

Mathematical Statement of the Problem
Suppose that we are interested in estimating the probability distribution functions (PDFs) P i (x) for each reaction flux i = 1, . . . , N . By definition, they are given by: where Vol(S) is the volume of set S. P i (x) can be mathematically written as an integral over all fluxes, but x i , of a set of functions enforcing the constraints that define the polytope, namely (1). Denoting by F µ these functions (µ = 1, . . . , M ), we can write P i (x) for flux i as: is the domain of integration (the set-product of the ranges of variability of all fluxes, except flux i) and Z i ≡ dxP i (x) is a normalisation constant, so that each P i (x) is properly normalised to one. Each indicator function F µ should distinguish between metabolites involved only in internal reactions (µ ∈ I for brevity) and metabolites that are exchanged with the surrounding. A convenient parameterisation is given by: where δ(y) is a Dirac δ-distribution and ρ µ is an a priori distribution for the exchange rate γ µ . Under this choice, for intracellular metabolites, F µ simply enforces the mass-balance constraint (1) with γ µ = 0 in Equation (6) through a δ-function. For exchanged chemical species, the situation is slightly more complex. If the exchange rate takes a fixed value z 0 , then ρ µ (z) = δ(z − z 0 ) and: corresponding, once inserted in Equation (6), to the mass-balance constraint (1) with γ µ = z 0 . If, however, the exchanged rate is known only probabilistically, then ρ µ (z) can be a non-trivial distribution and F µ enforces (1) in (6) by weighing all possible values of γ µ according to the measure ρ µ . For instance, if there is no a priori information about the exchange rate, then ρ µ (z) can be taken to be uniform. Note that when γ µ is a random variable, one can consider it as another unknown rate, so that one could also be interested in estimating its a posteriori distribution P µ (γ). The problem we want to face is that of computing quantities like Equation (6) for all i's.

Weighted Belief Propagation
To push mathematically forward expression (6), we need to do some type of approximation for S. Following [11], we assume the bipartite graph that describes the interdependency of reactions and metabolites to be locally tree-like. In such a case, we are supposing there are no (or only very long) cycles connecting the reactions that process a given metabolite µ. (In the following, we shall write i ∈ µ to indicate that reaction i processes, either as a substrate or as a product, metabolite µ.) Thus, if we imagine removing metabolite µ from the system, all reactions i ∈ µ become (approximately) statistically independent, as they belong to separate branches of the metabolic (tree-like) network, and their joint PDF factorizes. This is explained pictorially in Figure 1a. If we now put metabolite µ back, we see that, at a fixed value, x, of reaction i, the probability L µ→i (x) that mass balance holds for metabolite µ can be expressed, in terms of the factorized PDF computed in absence of µ, as (see Figure 1b): with L µ→i , a normalisation constant. In this formula, we use Latin labels (i, , . . .) for reactions and Greek ones (µ, ν, . . .) for metabolites, while the script, ∈ µ\i, denotes the reactions that process µ except reaction i. Accordingly, we defined the shorthands, dx µ\i = ∈µ\i dx and D µ\i = × ∈µ\i [m , M ]. The quantity, P →µ (x ), is the PDF of flux taking a value x , when metabolite µ is removed. Those PDFs are, in turn, given by the probability, for each reaction i, to satisfy the mass balance conditions for all the metabolites they process, except µ (see Figure 1c), namely: Here, the set ν ∈ i\µ stands for all metabolites ν, processed by reaction i, except µ, and P i→µ is a normalisation constant. Again, the above equations simply state the fact that, on locally tree-like graphs, the contributions to the PDFs coming from each node (reaction or metabolite) nicely factorize.  (9) and (10) for the conditional marginals; we only show the nearest neighbours of what one must imagine to be a large tree-like bipartite graph, where circles are reactions and squares, metabolites.
(a) Metabolite µ and the reactions that process it ( ∈ µ). If we assume removing µ from the system, all reactions connected to it belong to disjoint branches of the metabolic network, highlighted with the dashed lines. As a consequence, their joint probability distribution function (PDF) factorizes in the product of the marginals, P →µ (x), of each reaction . (b) When metabolite µ is put back in the graph, the probability, L µ→i (x), of satisfying its mass balance condition when fixing the flux of reaction i to x depends on the marginals, P →µ (x), of all neighbours, but i, and on the indicator function, F µ . (c) The marginal P i→µ (x), which is computed in absence of µ, expresses the probability that i satisfies the mass balance conditions for all the metabolites it processes (η ∈ i), except µ. On a tree, each mass balance condition is independent, so that the probability of satisfying all of them is given by the product of the various L ν→i (x).
The conceptual step of removing metabolites from the system is the key that allows us to recast the problem in the set of self-consistency Equations (9) and (10), for the conditional probabilities (the reader should keep in mind that this is, however, just a mathematical trick with no biological interpretation whatsoever [10]). Once the fixed point of the system formed by Equations (9) and (10) is known, one can compute the actual PDFs of the fluxes in the metabolic network as: where P i is a normalisation constant. Note that Equation (11) also provides the recipe to evaluate the PDFs, P µ (γ), for the exchange rates, γ µ , once the conditional marginals, P →µ (x ), are known. As discussed in [9,11], the difficulties of the problem lie not so much in the derivation of Equations (9) and (10), but in devising an efficient method to solve them. In wBP, we tackle the issue by representing the marginals (10) through a collection of N variables and associated weights, rather than discretizing them as one would normally do when facing a similar problem. Let us illustrate the idea with a fairly simple example. Consider the integral: with the extra condition that x ≥ 0, where φ y , φ z are known densities normalised in the interval [0, 1], and C is a normalisation constant. To evaluate (12), we could use Monte Carlo integration and draw N pairs of random variables {(y i , z i )} N i=1 according to the distributions, φ y and φ z . Correspondingly, an estimate for φ x (x) can be written as: where the term, Θ(1 − y i − z i ), accounts for draws for which the quantity x = 1 − y i − z i must be rejected due to the condition x ≥ 0. The latter condition indeed defines a feasible triangular region in the integration plane, yz (see Figure 2), such that every extraction (y i , z i ) falling outside this domain must be rejected. This method (basically, naive Monte Carlo integration) is, hence, poised to be rather inefficient. Fortunately, we know precisely where the rejection region is, and we can rewrite Equation (12) as follows: Now, Equation (14) does not contain a rejection region, but we cannot apply Monte Carlo integration just yet, since φ z (z) is not normalised in the interval [0, 1 − y]. Introducing the corresponding weight: we can, however, re-cast Equation (14) in the form: with φ z (z|y) ≡ φ(z)/w(y). The distributions appearing above are now properly normalized. Therefore, to evaluate Equation (16), we can simply draw N pairs {(y i , z i )} N i=1 according to φ y (y) and φ z (z|y), respectively, and estimate φ x (x) by: i.e., by N pairs of variables and weights {( The key point of this method is that the reweighted density, φ z (z|y), has a y-dependent support, such that rejection never occurs. Thus, at a price of computing a weight, w(y), we overcome the whole rejection issue, and the method becomes much more efficient.
The great advantage of using wBP is that, at fixed N , its running time goes as O(2N k), where k is the average number of metabolites processed by each reaction. Thus, as opposed to sampling techniques that have normally super-linear mixing times [14], wBP only scales linearly with the number of reactions (see Figure 3), making it an ideal candidate for application to genome-scale metabolic networks. In the present work, we focus, however, on the relatively small case of the hRBC, so that we are able to compare with sampling methods that yield a uniform exploration of the solution space S [8]. Due to the nature of such methods (see next section), this type of comparison is still not feasible for larger systems. This, and the fact that previous results are available [9], make the metabolic network of the hRBC the ideal testing ground for wBP.

The Kernel Hit-and-Run (KHR) Algorithm
In order to sample the solution space S and obtain exact PDFs of individual fluxes for the hRBC by a controlled method that guarantees uniformity, we have developed an optimized version of Hit-and-Run Monte Carlo, which we call the Kernel Hit-and-Run method. Let us start by re-writing constraints (2) explicitly for metabolites involved in internal reactions and the rest: We note that the set of |I| equations in (18) defines the null-space of ξ, and geometrically corresponds to a family of hyperplanes passing through the origin x = 0. Let us denote the dimension of the null space of ξ as K. Clearly, K would be at least N − |I| (actually K = N − |I| when ξ has full row rank, which can always be made to be the case and which we assume from now on). This means, obviously, that, although the number of variables in the system is N , due to the constraints in the model, the actual dimension of the solution space S is only K. As in real metabolic networks most reactions are internal, the dimension K of the null space will be significantly smaller than the original dimension of the problem N . Additionally, it turns out that the way to implement in practice such a dimensional reduction is quite straightforward: suppose that a basis of the null-space has been found, e.g., through Gaussian elimination or singular value decomposition (SVD), and let us denote as y = (y 1 , . . . , y K ) the system of coordinates with respect to such a basis, so that we can write each flux in this basis as x i = K j=1 Φ i j y j , with Φ an N × K matrix related to the change of basis between the original space and the null subspace. Plugging this into Equations (19) and (20) allows us to write: where we have defined the projected stoichiometric matrix, Ψ, with entries The set of Equations (21) defines a K-dimensional polytope in the null space (see Figure 4), which can be sampled uniformly by using the Hit-and-Run algorithm [8,15,16]. Finally, to go back to the original space, that of the reaction rates, we simply use the fact that x i = K j=1 Φ i j y j . The sampling properties of the Hit-and-Run algorithm under the uniform measure were indeed mathematically proven [8], and in our case, it is very easy to see that the uniform measure in the K-dimensional null space is preserved under a linear transformation, so that the final sample in the full-dimensional space is also uniform by construction.
While the sampling measure of KHR is well controlled, a word needs to be spent on the algorithmic mixing time. For the standard Hit-and-Run algorithm, this scales as the square of the dimensions times the diameter of the polytope, i.e., in practice, cubically with the number of dimensions [8,14]. Yet, as mentioned before, in our approach, the dimension of the polytope is K, rather than N . This can yield a significant reduction in computation times if K is small compared to N , as will quite generally be the case. For the hRBC, for instance, we pass from N = 46 (which can be problematic, e.g., for Monte Carlo rejection [17]), to a much more modest K = 12, which is sampled quite fastly by KHR. Note also that no additional constraints need to be introduced to enclose the polytope (as opposed to [13]). This is due to the fact that the M − |I| metabolites that are exchanged with the environment suffice to bound the polytope in the null space.  Finally, it is worth mentioning that the matrix Φ can be easily obtained with any standard algebra software or by standard SVD algorithms, and that no matrix inversion is required to compute the projected matrix Ψ nor to convert the obtained sample to the original, full dimensional space. Therefore, to sum up, KHR uniformly samples the solution space S, with a mixing time that scales as O(K 3 ).

Results and Discussion
We have applied the wBP and KHR algorithms to the study of the metabolic network of the hRBC. As mentioned in Section 2.2, such a choice is dictated by the fact that the hRBC size allows us to apply HR in a modest time and that previous results are available. We have used the same network considered in [9,12,17], which accounts for 34 metabolites, 32 internal reactions and 14 exchange reactions (see Figure 5). We are able to smoothly apply the method by using the effective reaction domains computed in [17] and used also in [9]. Such domains are derived starting from real enzymatic rates [18,19], so that they are physiologically meaningful, and span several orders of magnitude. Note that this would be a major issue if one were to discretize marginals (10), as it would require dealing with binning functions defined on totally different scales. Thanks to our representation in terms of variables and weights, the fact that the reaction fluxes are of a different order of magnitude does not affect our method at all.
We run the wBP algorithm by representing the marginals, like Equation (10), with sets of variables/weights {(x i , α i )} N i=1 of size N = 500. To solve the fixed point equations (9) and (10), we performed 30 iterations of our method. We started with uniform weights {α } N =1 and, at each iteration t = 1, . . . , 30, and for each fixed value of the variable x i , we applied wBP 10 3 × t times to evaluate the average weight α i . Once convergence was reached, we used the variable/weight sets to compute the final 46 PDFs, P i (x) and P µ (γ), according to Equation (11). In this last step, we averaged the weight values over 10 5 wBP extractions to achieve a higher accuracy. We report the results in Figures 5 and 6, where we compare our method with KHR; the agreement is excellent. The reaction PDFs obtained with both methods have indeed a very similar domain and shape in most of the cases. Notably, wBP does not perfectly capture the profile of reactions involving currency metabolites, such as ATP, ADP, NADP and NADPH. An explanation of this may lie in the fact that these compounds are highly connected in metabolic networks and likely to be involved in small loops that are not considered by the wBP method. Figure 5. Results for human red blood cell. Here, we draw a pictorial representation of the system as a directed bipartite graph. Reaction nodes are plotted with their PDFs and metabolite nodes with green squares. Arrows entering (resp. leaving) a reaction stand for a substrate (resp. a product). We have plotted the marginals, P i (x), for the internal reactions together with the P µ (γ) for the exchange rates (these are the leaves on the bipartite graph). For the densities, we have used the wBP method (red filled plots) and have compared them with the KHR algorithm (blue solid lines).  Figure 6. Results for human red blood cell. The probability density functions of the reaction rates; reaction names are the same as [9]. For the densities, we have used the wBP method (red filled plots) and have compared them with the Kernel Hit-and-Run (KHR) algorithm (blue solid lines). Note that the flux ranges span different orders of magnitude, but still, the profiles are very smooth for both weighted population dynamics and the Kernel Hit-and-Run algorithm.  Concerning the results obtained by KHR, we have been particularly careful to make sure we obtain a uniform distribution of the solution space S. As the uniform measure is guaranteed to be a limiting distribution, the difficulty lies, of course, in deciding when such a limit has practically been reached in the simulations. In this regard, we decided to apply three conservative measures to ensure this: first of all, we checked that the initial conditions did not affect the results and, after that, the simulations were averaged over the initial conditions (the initial points were generated using the MinOver algorithm [20]); secondly, the initial time-window was disregarded in the sampling; and finally, in order to avoid correlation effects in the sampling of the PDFs, we only recorded points at large spacing in time. In Figure 6, we report a panel with all the PDFs for the hRBC network to make the comparison between the methods more straightforward.

Conclusions
In this work, inspired by techniques employed in the statistical mechanics of disordered systems, we have presented a novel method to estimate distributions of reaction fluxes in constraint-based models of metabolic networks. The wBP methodology has, in our view, clear advantages when compared with alternative approaches. If compared to rejection-based Monte Carlo methods [12] or even to more refined sampling approaches [13], our algorithm has the significant advantage of scaling linearly with the system size, a feature that makes it particularly suitable to study genome-scale metabolic reconstructions. Comparing wBP with similar MP-based approaches [9], our method turns out to be unaffected by the flux ranges spanning several orders of magnitude nor by the stoichiometric coefficients taking real values. Note that the former property is particularly important for the study of real metabolic systems in physiologic conditions, as enzymatic rates can vary wildly across the network [12,17].
wBP can also be integrated with optimization-based flux balance analysis (FBA), as it easily allows us to evaluate the PDFs of the enzymatic rates close to optimality (assuming a score function is known) by just injecting a priori to keep fluxes "close" to their optimal value.
We have also compared the performance of wBP against the KHR method. The latter is a controlled Hit-and-Run Monte Carlo taking place in the null space defined by the set of internal reactions, where a considerable effective dimensional reduction can be achieved. Indeed, starting from the original N -dimensional space of solutions, one can wind up into a space that, in the best of cases, has the same number of dimensions as the number of exchange reactions. Given the considerable gains that this observation provides, we believe that this method may be worth being explored further in its own right.
The validation of the wBP algorithm in the hRBC network, which can be considered a benchmark for the sampling problem for constrained metabolic models, opens the door to future applications of the method to more relevant organisms, such as Mycoplasma pneumoniae [21] or Escherichia coli [2]. In our opinion, the fact that its algorithmic complexity scales linearly with the number of reactions, combined with the aforementioned ability to deal with more realistic bounds, makes it a highly promising candidate for effective solutions to this challenging task.