BACKGROUND
chemical reactions inside cells have long been correctly described as both discrete and stochastic  <cit> , often entailing acute spatial patterns or dependencies  <cit> .
despite the intrinsic uncertainty in the occurrence of these chemical events, and basically against all odds, cells prevail as efficient decision makers.
not only are their fate decisions influenced by stochastic events and embedded within widely fluctuating environments, but they are stochastic themselves  <cit> , the underlying mechanisms of which remain widely unknown.
so, one cannot help but wonder: how do cells process widely varying information from their environment, control their own chemical 'noise', and still manage to produce appropriate responses?
the key to this question lies in signal transduction pathways, a series of interconnected chemical events that lead to highly specific cell responses.
one such mechanism is adaptation, a common term used to represent sets of chemical reactions that generate a transient response in the presence of a sustained stimulus  <cit> .
these transient responses have been shown to affect gene expression and regulatory processes, where the cell decision is determined by the strength and duration of the input signal  <cit> .
adaptive behavior can result from three basic signaling motifs: integral control, negative feedback, and feed-forward regulation  <cit> .
the first is an abstraction of an engineering principle, where regulation is achieved by integrating the differences between a desired response and the state of the system.
a cellular system may proceed in a similar fashion, by comparing 'actual' to 'desired' conditions, as has been found to be the case in bacterial chemotaxis  <cit>  or calcium homeostasis  <cit> .
integral control can be achieved through appropriate combination of negative feedback loops, the latter of which are ubiquitous elements of signaling pathways, allowing for myriads of types of physiological homeostasis.
in a self-regulating gene, a transcriptional repressor negatively regulates its own expression and, within certain network architectures and ranges of feedback strength, noise can be effectively reduced.
in this sense, negative feedback allows a system to respond by decreasing the magnitude of any input perturbation, generally resulting in stabilization of the input signal.
however, while the latter is true in a deterministic setting, several types of non-classic behavior can be observed once considering discrete signals and stochasticity  <cit> .
in contrast, feed-forward architectures let the system respond to known cues  in a predetermined way, independently of the system's response.
this is the essential difference from feedback mechanisms, where the output influences  the system to create a new response.
for feed-forward to produce adaptation, two signal-dependent pathways must affect a third component, in opposite ways, otherwise known as 'incoherent' feed-forward loops  <cit> .
several exhaustive studies have shown that negative feedback regulation rarely yields perfect adaptation, whereas integral control and feed-forward regularly do so  <cit> .
nevertheless, it should be noted that negative feedback can produce adaptation states close to 'perfect', and basically indistinguishable in terms of biological functions  <cit> .
by perfect adaptation it is generally understood that the system will return to the exact state where it was before the input signal was introduced, provided the system was already in equilibrium.
furthermore, in order to consider a system adaptive, certain eligibility criteria in terms of amplitude and duration of the system response have to be met.
it should be noted that no homogeneous criteria exist in the literature, and comparison between different adaptation models can become a daunting task.
quite generally, though, amplitude has been assessed in terms of sensitivity and precision, namely, the difference between maximal response and pre-stimulation values, and the difference between equilibrium values before and after stimulation, respectively  <cit> .
recently, some types of adaptive systems  have been shown to display fold-change detection  properties.
namely, that the system generates a response to fold-changes in the input signal, rather than absolute levels  <cit> .
the latter is related to weber's law, which describes the relationship between a stimulus and its perceived intensity, a widely used concept in perception studies.
in this respect, some experimental studies have shown how important transduction mechanisms  display robust fold-change responses.
from these studies, several hypotheses have already arisen, such as whether cells detect and process information in relative rather than absolute terms, or whether fold-change detection facilitates the production of adjustable noise filters.
proving such hypotheses would greatly aid our understanding of cell signaling pathways, as fcd could rescale meaningful signal changes with respect to the background noise.
with all these points in mind, and in response to some of the open questions posed in  <cit> , we study the effects of stochasticity in a minimalistic adaptation architecture, a 'two-state protein' scheme  <cit> .
for such, we wanted to analyze how stochastic profiles in a single-cell system propagate to population behavior, and what this actually entails in terms of system predictability.
surprisingly, our preliminary simulations highlighted how single cell and population behavior can be completely different, adaptation largely being an emergent property of a large ensemble.
this led us to analyze adaptation in an exact stochastic setting, and understand why one should think of adaptation processes in probability space, rather than in numbers of molecules.
until now, no one had noticed how ergodicity breaks down in simple linear scenarios devoid of cell growth and replication properties.
hence, our results provide key novel insights that need to be considered in any future study of adaptation, as well as any study where biological ergodicity is readily assumed.
an example of the latter is linear and nonlinear signaling pathway studies.
additionally, we also respond to some of the open questions in  <cit>  and show how the simple linear 'two-state protein' scheme in a stochastic setting displays fold-change detection properties, both for consecutive stimulation inputs and separate fold-stimulations.
this is the first study of fcd under stochasticity, the importance of which extrapolates to any cell signaling study.
lastly, we discuss how extensions of the 'two-state protein' scheme  retain many of the properties observed in the purely linear system, including rupture of ergodicity.
RESULTS
in what follows we shall consider the simplest adaptive architecture, previously described in the literature as a single 'two-state protein' scheme  <cit> .
the idea behind this model is to consider a protein in an unmodified and modified state, denoted as p and pm, respectively.
the switch between the two states of the protein has basal rates kf and kr, and is additionally influenced by an input signal a with rate ka.
moreover, the total protein concentration is allowed to vary in time, and neither the synthesis of the unmodified protein , nor the distinct degradation of the two states of the protein , depend directly on the input signal .
the analysis in  <cit>  highlights several key issues.
first, the steady state values of the protein states are proportional to the input signal, one being inversely proportional, the other being directly proportional.
second, when either protein degradation rate is close to zero , the steady state concentration of the other protein is  independent of the signal.
such independence hints at the potential adaptation to changes in the input signal, a feature that can be readily observed when considering several parameter combinations.
furthermore, the choice of parameters will determine the sensitivity with respect to repeated stimulation.
namely, whether the system responds and adapts to consecutive input signals, or not.
the key questions here are:  which of the above mentioned properties hold when discreteness and stochasticity are taken into account,  do these properties only hold at the single-cell level, or extend to multi-cell schemes implying a kind of biological ergodicity, and lastly  does this system display fold-change detection properties?
adaptation in a stochastic setting
the chemical master equation  describes the time evolution of the probability p, for having x =  molecules at time t in a system with r elementary reactions, n molecular species, and volume Ω. namely, it describes the evolution of all possible states of a chemical system in probability space.
if we consider the 'two-state protein' scheme  in a stochastic setting, its time evolution will be described by the following cme:
∂pn,m∂t=  ks+ dp pn+ <dig> m−n pn,m)+ kf pn+ <dig> m−1−n pn,m)+ kaa  pn+ <dig> m−1−npn,m)+ kr pn− <dig> m+1−mpn,m)+ dpm pn,m+1−mpn,m)
where the index n  in pn.m denotes the number of proteins in state p .
additionally, we prescribe an input signal following the step function a= s·fi, where s is in units of μm
s = {0 if t∈[ <dig> )  or t∈ [ <dig> )1 if t∈[ <dig> )   or t∈ [ <dig> )2 if t∈[ <dig> )3 if t∈[ <dig> )4 if t∈[ <dig> )
the factor fi is the ith signal scale parameter of f = , and the macroscopic reaction rate constants are set as follows: ks =  <dig> , ka =  <dig>  kf =  <dig>  kr =  <dig>  dp =  <dig> , dpm =  <dig>  as is usual in a stochastic analysis, concentrations and 0th/2nd order reaction rates have to be scaled by the factor v·av, where v is the volume and av denotes avogadro's constant .
here, we consider a volume of  <dig> femtoliter and selected initial values close to equilibrium.
namely p =  <dig>  and pm =  <dig>  μm, corresponding to  <dig> and  <dig> molecules, respectively.
now, stochastic processes can be studied by trajectory based approaches or by obtaining their underlying probability distribution function , which tracks how the probability of having specific numbers of molecules in the system changes over time.
this is a daunting - many times unfeasible - task, given the combinatorial explosion of the number of coupled differential equations to consider, corresponding to increasing numbers of possible states of the system.
in fact, whenever a system is solely composed of 0th/1st order reactions, exact analytical pdf solutions can be obtained  <cit> .
thus, exact analytical expressions can be derived for the first two moments, which have been shown to match the solution of the system translated to a stochastic differential equation  problem  <cit> .
moreover, in such linear cases the first moment of the sde solution will converge to the ode solution, a consequence of the linearity in the drift term.
hence, in our case, if we compare the mean of  <dig>  stochastic trajectories, the corresponding deterministic solution, and the expectation of the cme reported as the sum over equal numbers of molecules of pm in the exact pdf solution, it comes as no surprise that all solutions nicely match .
as had been previously reported, the time evolution of pm can show near-perfect adaptation when dp≪dpm, while dp =  <dig> yields perfect adaptation.
however, and quite intriguingly, if we focus on individual ssa trajectories, no adaptive behavior can be inferred from single trajectories for certain values of the input signal .
the key behind this issue lies in what the solution of the cme really entails: a set of time dependent values in probability space.
in this sense, computing the expected value masks how often discrepancies from this mean can happen, as well as their potential magnitude, possibly leading to entirely different dynamics.
hence, a more appropriate description of the system lies in describing the evolution of the probability, and not the expectation, in time.
to analyze this further, let us focus on perfect adaptation systems considering fi =  <dig>  p ∈  <cit>  and pm ∈  <cit> , for which we will obtain exact pdf solutions of the cme by using finite state projections  <cit> .
this implies the solution of the cme will be both exact and complete whenever these ranges cover all possible reachable states, portraying the full probability space instead of solely describing single exact trajectories.
one can notice the deterministic adaptation value in our 'two-state' protein scheme lies close to  <dig> molecules of pm.
if we now track the evolution of the probability  in three separate sets:  <dig> to  <dig>   <dig> to  <dig>  and  <dig> to  <dig> molecules of pm it can be observed there is indeed sensitivity to the input signal and relaxation to pre-stimulus values, albeit in a probabilistic context .
to understand what this entails, let us first focus on the system at time t =  <dig> here, the probability of all states containing 0- <dig> molecules of pm will decrease once the signal is introduced , as would be expected by the sudden shift of pm to higher values in the deterministic setting.
in contrast, as we approach t =  <dig>  the probability of all states containing 5- <dig> molecules of pm decreases .
however, one should notice that, at t =  <dig> , the system will revolve around states with  <dig> to  <dig> molecules of pm with a probability of occurrence of roughly 32% .
this leaves 'a lot of room'  for the system to be located elsewhere, as can be readily observed from single cell simulations .
furthermore, of these 32%, only half belong to having  <dig> molecules of pm in the system, which is closest to the deterministic solution.
most importantly, differences in equilibrium values entail wide variations for initial conditions of the next simulation interval, yielding the observed heterogeneity in single cell behavior.
the description above highlights a property of any stochastic description: a system cannot be guaranteed to be in any state, and probabilistic bounds are the maximal level of information.
however, one should notice the signal in this example is at least  <dig> orders of magnitude larger than any other component of the system.
hence, the 'two-state protein' scheme provides for a counter-intuitive example where local noise overrides the effect of a strong external signal, and adaptation behavior can become an emergent property only attained at the  population level.
moreover, as could be expected from the deterministic solution, the probability profile also portrays loss of sensitivity with repeated stimulation.
population behavior
ensemble measurements  display cell characteristics as distributions of values calculated over large samples of cells and, many times, distributions of cells at certain stationary states are used to infer the stochastic behavior of a single cell.
by doing so, a biological version of ergodicity is necessarily implied: the percentage of the cell population in a particular state is identical to the probability to find a single cell in that state  <cit> .
mathematically, the ergodicity of a stochastic process is guaranteed if  the stochastic process is a finite-state markov process and  the stochastic process converges to a stationary state for any initial condition  <cit> .
however, such assumptions have many times been relaxed or misinterpreted and, in such cases, erroneous conclusions with respect to single cell behavior could have been derived from population data  <cit> .
recently, many studies in the literature have addressed this issue.
population distributions have been based on chemical langevin equations  <cit> , and clever solution methods have been developed by noticing a sturm-liouville operator.
for instance, the authors in  <cit>  highlight the potential bias of population measures when cell replication rates are not homogeneous, or depend on the cell state.
similarly, the authors in  <cit>  support the latter findings and further discuss how ergodicity breaks down whenever there are chemical interactions between cells, and when single cells display 'complicated' behavior .
our exact solution of the two- state protein system shows how ergodicity cannot even be assumed in minimalistic linear examples.
our linear system underlies a finite-state markov process, is expected to relax to a stationary state, and is devoid of possible effects via cell replication and chemical interactions between cells.
however, for certain input signal strengths, biological ergodicity still breaks down.
in a nutshell, when the signal tuning parameter is set as fi <  <dig>  no adaptive behavior is observed in either single cells or populations.
in contrast, when considering fi >  <dig>  both single cells and populations exhibit adaptation.
however, when fi =  <dig>  single cells need not display any apparent sensitivity to the input signal, while both sensitivity and adaptive behavior can be observed at the population level .
this brings us back to the arguments presented in the stochastic adaptation section.
namely, that adaptive behavior may not be inferred from single stochastic trajectories, since relaxation states revolving around the mean value do not necessarily represent the weighted majority in terms of probability.
this can be readily observed from the values at the end states, represented as a heat map in figure  <dig> implying large initial condition variations for the computation of each subsequent time interval.
actually, such wide variation can be analytically expected: it has been shown that a system composed of first order reactions that is both 'open'  and has an initial poisson distribution will remain a poisson distribution at any time t >  <dig>  <cit> .
our results are entirely consistent with the theory .
hence, an adequate sample size and any other implications of the model have to be inferred from the underlying properties of this distribution .
lastly, it should be noted there exist analytic results for 'open' and 'closed' systems of first order reactions, with arbitrary initial probability distributions.
hence, one can benefit from extracting an adequate sample size  for arbitrary applications, provided all underlying reactions are unimolecular.
in such cases, an appropriate pdf can be derived by the convolution of poisson and multinomial distributions, for any time t >  <dig>  <cit> .
fold-change detection properties
recent studies have highlighted the peculiar capability of certain systems to respond to fold-changes in the input signal, rather than to absolute differences in numbers of molecules  <cit> .
this is the essence of weber-fechner's law, which states that the maximal response to a change in signal is inversely proportional to the background signal or, in other words, that the ratio of the smallest increment and the background intensity of a signal is constant.
this can be better understood by quoting an analogy used in  <cit> : while it is easy to understand whispered voices  inside a quiet room , it is very hard to notice someone shouting in our ear during a rock concert.
the recently coined term fold-change detection  implies both weber's law and perfect adaptation.
however, simultaneous application of weber's law and perfect adaptation do not necessarily yield fcd  <cit> , and sufficient conditions have been presented to obtain it.
namely, if a system can be described by x˙ = f and y˙ = g, where y corresponds to the output, u to the input signal, and x to the remaining chemical species, fcd can be achieved if the system is stable, shows perfect adaptation, and for λ >  <dig> it can be shown that f = λf and g = g  <cit> .
it can be easily seen that the 'two-state protein' scheme does not satisfy these conditions, since:
f = ks + krpm − λp≠ λ)g = λp − pm≠ p − pm.
perhaps more intuitively, strict fcd properties could not be expected, since the 'two-state protein' scheme shows remarkable loss of sensitivity to repeated stimuli.
nevertheless, the criteria posed in  <cit>  is only sufficient, and not necessary, so two questions are worth considering.
first, to how many repetitions of the stimulus does fcd refer to?
and second, to what extent are consecutive relaxations to a steady state expected to match?
in the analysis published in  <cit> , parameter variations in an incoherent feed-forward loop architecture are explored, and fcd is reported whenever the response to the two step stimuli is identical to within 10% in amplitude.
by using this criteria in the 'two-state protein' scheme with fold-change input signal profiles a <dig> =  and a <dig> = 2*a <dig> introduced at identical time points, fcd properties hold in two perspectives .
both as an absolute ratio or by following the criteria used in  <cit> , fold-stimulation yields responses within 10% of the amplitude not only for any two consecutive inputs, but also for a number of consecutive steps.
so, even when the system looses sensitivity to the input signal, repeated stimulation preserves fold-change detection properties.
moreover, all responses in profile a <dig> are within 10% of the amplitude of those obtained with a <dig> .
most importantly, these results hold in the deterministic regime, and the first moment of the stochastic system.
lastly, in near-perfect adaptation systems, consecutive inputs yield slightly different steady states.
with increasing numbers of input stimuli, the equilibrium values converge to the perfect adaptation case .
this was readily observable from the equilibrium analysis  as the input signal term would dominate, yielding convergence of the steady state solutions.
discussion
our study of the 'two-state protein' in a stochastic setting lead us to simple yet illustrative examples on how biological ergodicity may be invalid, even in simple linear settings devoid of cell replication properties.
a follow-up question could be: what would happen if the transitions between protein states were mediated by other molecular species in the system?
in this case, one could consider discrete mediators  switching back and forth between the two protein states, as depicted in figure 1b.
here, signal changes could refer to varying concentrations of the kinase and/or phosphatase.
preliminary simulations show that all the properties studied for the simple two-state protein model can be achieved by this network topology.
such properties include perfect and near-perfect adaptation, as well as rupture of ergodicity, as exemplified by a varying kinase 'signal' in figure  <dig>  qualitatively similar results can still be obtained by considering variations on the initial kinase and phosphatase concentrations , b ∈  μm) and single parameter values .
the same holds for simultaneous variations of  or  while, interestingly, a completely different profile is obtained by simultaneous key variations of .
for instance, if we set these parameter values to  a response that correlates negatively with changes in the signal is obtained .
the latter can be explained by the high value of the ratio ka1/ka <dig>  effectively 'trapping' p molecules in a bound configuration with the kinase, hence decreasing the numbers of molecules of both p and pm temporarily.
as can be intuitively expected, a similar effect in pm can be obtained by considering key variations of parameters  with a varying phosphatase 'signal' .
nonetheless, the profile of p will differ from the previous case, as the reaction set is not symmetric , while it should be kept in mind a separation of timescales in the protein degradation rates was necessary to achieve adaptation.
additionally, changes in the kinase/phosphatase signal are not equivalent to the minimalistic 'two-state protein' system, since these discrete mediators are treated as molecular species and, as such, their numbers can fluctuate in time.
moreover, changes to the signal intensity only refer to unbound signal molecules and, in contrast to the linear case, the total number of signal molecules within the system can accumulate in time.
the latter can be readily observed in distinct chemical scenarios  where a considerable number of kinase/phosphatase molecules can be 'trapped' in a bound configuration, the molecules of which remain within the system irrespective of changes in the signal.
in our kinase/phosphatase mediated adaptation example, obtaining an exact pdf solution of the cme would be computationally expensive, if not unfeasible, given the explosion in the number of reachable states.
in this case a finite state projection using krylov subspaces, such as  <cit>  would be preferable.
alternatively, if the mediators are highly concentrated, one could 'decouple' them from the rest of the molecular species, yielding sets of unimolecular reactions, which in turn allows for obtaining an analytic closed solution.
we will leave such analysis for a separate publication, given the high discrepancy of parameter values so far encountered and the significant deviation from the main focus of this work.
however, considerations such as this, or deriving alternative closure of moments of the cme to account for non-linear terms, will greatly enhance future adaptation studies.
CONCLUSIONS
in this paper, we have studied the effects of stochasticity in a 'two-state protein' scheme, providing an explanation of what adaptation means and entails in a stochastic setting.
namely, that an adaptation profile can be achieved by calculating the first moment of the cme, but that the underlying probability distribution might be wide enough to prevent one from making definite quick-and-dirty assertions going from a single cell to the population level, or the other way around.
in this sense, adaptation can many times be considered an emergent property of the collective system, restricting modelers/experimentalists to obtain large samples of time courses in order to infer properties of the system as a whole.
the characteristics of such samples , are necessarily described by the underlying probability distribution corresponding to the solution of the chemical master equation.
here, we have presented the overlap of an exact solution , an analytical solution , as well as trajectorial and deterministic solutions.
our analysis highlights the source of variability in single-cell scenarios, explaining the cause for rupture in ergodicity in a simple linear reaction network.
we have also provided a clear perspective on how systems analysis with varying inputs can be addressed.
additionally, we have shown how the minimalistic 'two- state protein' scheme displays fold-change detection properties in a stochastic setting.
the latter refers to consecutive stimulation inputs and independent stimulations, and extends fcd properties to a system with near-perfect adaptation.
moreover, repeated stimulation preserved fold-change detection properties, despite loss of sensitivity to the input signal.
lastly, we discussed extensions of the 'two-state protein' scheme by the consideration of discrete mediators .
our preliminary simulations show how such extensions retain many of the properties observed in the purely linear system, including loss of ergodicity.
to the best of our knowledge, this is the first time biological ergodicity has been shown to break down in a minimalistic linear architecture.
the latter had been readily observed when cell replication rates are not homogeneous, or depend on the cell state, but never before in cell-cycle arrested scenarios composed of solely linear non-delayed terms.
furthermore, this is the first time fold-change detection properties have been studied in a stochastic setting.

 chemical reactions inside cells have long been correctly described as both discrete and stochastic, often entailing acute spatial patterns or dependencies. despite the intrinsic uncertainty in the occurrence of these chemical events, and basically against all odds, cells prevail as efficient decision makers. not only are their fate decisions influenced by stochastic events and embedded within widely fluctuating environments, but they are stochastic themselves, the underlying mechanisms of which remain widely unknown. so, one cannot help but wonder: how do cells process widely varying information from their environment, control their own chemical'noise', and still manage to produce appropriate responses? the key to this question lies in signal transduction pathways, a series of interconnected chemical events that lead to highly specific cell responses. one such mechanism is adaptation, a common term used to represent sets of chemical reactions that generate a transient response in the presence of a sustained stimulus. these transient responses have been shown to affect gene expression and regulatory processes, where the cell decision is determined by the strength and duration of the input signal. adaptive behavior can result from three basic signaling motifs: integral control, negative feedback, and feed-forward regulation. the first is an abstraction of an engineering principle, where regulation is achieved by integrating the differences between a desired response and the state of the system. a cellular system may proceed in a similar fashion, by comparing'actual' to'desired' conditions, as has been found to be the case in bacterial chemotaxis or calcium homeostasis. integral control can be achieved through appropriate combination of negative feedback loops, the latter of which are ubiquitous elements of signaling pathways, allowing for myriads of types of physiological homeostasis. in a self-regulating gene, a transcriptional repressor negatively regulates its own expression and, within certain network architectures and ranges of feedback strength, noise can be effectively reduced. in this sense, negative feedback allows a system to respond by decreasing the magnitude of any input perturbation, generally resulting in stabilization of the input signal. however, while the latter is true in a deterministic setting, several types of non-classic behavior can be observed once considering discrete signals and stochasticity. in contrast, feed-forward architectures let the system respond to known cues in a predetermined way, independently of the system's response. this is the essential difference from feedback mechanisms, where the output influences the system to create a new response. for feed-forward to produce adaptation, two signal-dependent pathways must affect a third component, in opposite ways, otherwise known as'incoherent' feed-forward loops. several exhaustive studies have shown that negative feedback regulation rarely yields perfect adaptation, whereas integral control and feed-forward regularly do so. nevertheless, it should be noted that negative feedback can produce adaptation states close to'perfect', and basically indistinguishable in terms of biological functions. by perfect adaptation it is generally understood that the system will return to the exact state where it was before the input signal was introduced, provided the system was already in equilibrium. furthermore, in order to consider a system adaptive, certain eligibility criteria in terms of amplitude and duration of the system response have to be met. it should be noted that no homogeneous criteria exist in the literature, and comparison between different adaptation models can become a daunting task. quite generally, though, amplitude has been assessed in terms of sensitivity and precision, namely, the difference between maximal response and pre-stimulation values, and the difference between equilibrium values before and after stimulation, respectively. recently, some types of adaptive systems have been shown to display fold-change detection properties. namely, that the system generates a response to fold-changes in the input signal, rather than absolute levels. the latter is related to weber's law, which describes the relationship between a stimulus and its perceived intensity, a widely used concept in perception studies. in this respect, some experimental studies have shown how important transduction mechanisms display robust fold-change responses. from these studies, several hypotheses have already arisen, such as whether cells detect and process information in relative rather than absolute terms, or whether fold-change detection facilitates the production of adjustable noise filters. proving such hypotheses would greatly aid our understanding of cell signaling pathways, as fcd could rescale meaningful signal changes with respect to the background noise. with all these points in mind, and in response to some of the open questions posed in, we study the effects of stochasticity in a minimalistic adaptation architecture, a'two-state protein' scheme. for such, we wanted to analyze how stochastic profiles in a single-cell system propagate to population behavior, and what this actually entails in terms of system predictability. surprisingly, our preliminary simulations highlighted how single cell and population behavior can be completely different, adaptation largely being an emergent property of a large ensemble. this led us to analyze adaptation in an exact stochastic setting, and understand why one should think of adaptation processes in probability space, rather than in numbers of molecules. until now, no one had noticed how ergodicity breaks down in simple linear scenarios devoid of cell growth and replication properties. hence, our results provide key novel insights that need to be considered in any future study of adaptation, as well as any study where biological ergodicity is readily assumed. an example of the latter is linear and nonlinear signaling pathway studies. additionally, we also respond to some of the open questions in and show how the simple linear'two-state protein' scheme in a stochastic setting displays fold-change detection properties, both for consecutive stimulation inputs and separate fold-stimulations. this is the first study of fcd under stochasticity, the importance of which extrapolates to any cell signaling study. lastly, we discuss how extensions of the'two-state protein' scheme retain many of the properties observed in the purely linear system, including rupture of ergodicity.  in what follows we shall consider the simplest adaptive architecture, previously described in the literature as a single'two-state protein' scheme. the idea behind this model is to consider a protein in an unmodified and modified state, denoted as p and pm, respectively. the switch between the two states of the protein has basal rates kf and kr, and is additionally influenced by an input signal a with rate ka. moreover, the total protein concentration is allowed to vary in time, and neither the synthesis of the unmodified protein, nor the distinct degradation of the two states of the protein, depend directly on the input signal. the analysis in highlights several key issues. first, the steady state values of the protein states are proportional to the input signal, one being inversely proportional, the other being directly proportional. second, when either protein degradation rate is close to zero, the steady state concentration of the other protein is independent of the signal. such independence hints at the potential adaptation to changes in the input signal, a feature that can be readily observed when considering several parameter combinations. furthermore, the choice of parameters will determine the sensitivity with respect to repeated stimulation. namely, whether the system responds and adapts to consecutive input signals, or not. the key questions here are: which of the above mentioned properties hold when discreteness and stochasticity are taken into account, do these properties only hold at the single-cell level, or extend to multi-cell schemes implying a kind of biological ergodicity, and lastly does this system display fold-change detection properties? adaptation in a stochastic setting the chemical master equation describes the time evolution of the probability p, for having x = molecules at time t in a system with r elementary reactions, n molecular species, and volume Ω. namely, it describes the evolution of all possible states of a chemical system in probability space. if we consider the'two-state protein' scheme in a stochastic setting, its time evolution will be described by the following cme: ∂pn,m∂t=  ks+ dp pn+ m−n pn,m)+ kf pn+ m−1−n pn,m)+ kaa  pn+ m−1−npn,m)+ kr pn− m+1−mpn,m)+ dpm pn,m+1−mpn,m) where the index n in pn.m denotes the number of proteins in state p. additionally, we prescribe an input signal following the step function a= s·fi, where s is in units of μm s = {0 if t∈[ )  or t∈ [ )1 if t∈[ )   or t∈ [ )2 if t∈[ )3 if t∈[ )4 if t∈[ ) the factor fi is the ith signal scale parameter of f =, and the macroscopic reaction rate constants are set as follows: ks =, ka = kf = kr = dp =, dpm =  as is usual in a stochastic analysis, concentrations and 0th/2nd order reaction rates have to be scaled by the factor v·av, where v is the volume and av denotes avogadro's constant. here, we consider a volume of femtoliter and selected initial values close to equilibrium. namely p = and pm = μm, corresponding to and molecules, respectively. now, stochastic processes can be studied by trajectory based approaches or by obtaining their underlying probability distribution function, which tracks how the probability of having specific numbers of molecules in the system changes over time. this is a daunting - many times unfeasible - task, given the combinatorial explosion of the number of coupled differential equations to consider, corresponding to increasing numbers of possible states of the system. in fact, whenever a system is solely composed of 0th/1st order reactions, exact analytical pdf solutions can be obtained. thus, exact analytical expressions can be derived for the first two moments, which have been shown to match the solution of the system translated to a stochastic differential equation problem. moreover, in such linear cases the first moment of the sde solution will converge to the ode solution, a consequence of the linearity in the drift term. hence, in our case, if we compare the mean of stochastic trajectories, the corresponding deterministic solution, and the expectation of the cme reported as the sum over equal numbers of molecules of pm in the exact pdf solution, it comes as no surprise that all solutions nicely match. as had been previously reported, the time evolution of pm can show near-perfect adaptation when dp≪dpm, while dp = yields perfect adaptation. however, and quite intriguingly, if we focus on individual ssa trajectories, no adaptive behavior can be inferred from single trajectories for certain values of the input signal. the key behind this issue lies in what the solution of the cme really entails: a set of time dependent values in probability space. in this sense, computing the expected value masks how often discrepancies from this mean can happen, as well as their potential magnitude, possibly leading to entirely different dynamics. hence, a more appropriate description of the system lies in describing the evolution of the probability, and not the expectation, in time. to analyze this further, let us focus on perfect adaptation systems considering fi = p ∈ and pm ∈, for which we will obtain exact pdf solutions of the cme by using finite state projections. this implies the solution of the cme will be both exact and complete whenever these ranges cover all possible reachable states, portraying the full probability space instead of solely describing single exact trajectories. one can notice the deterministic adaptation value in our'two-state' protein scheme lies close to molecules of pm. if we now track the evolution of the probability in three separate sets: to to and to molecules of pm it can be observed there is indeed sensitivity to the input signal and relaxation to pre-stimulus values, albeit in a probabilistic context. to understand what this entails, let us first focus on the system at time t = here, the probability of all states containing 0- molecules of pm will decrease once the signal is introduced, as would be expected by the sudden shift of pm to higher values in the deterministic setting. in contrast, as we approach t = the probability of all states containing 5- molecules of pm decreases. however, one should notice that, at t =, the system will revolve around states with to molecules of pm with a probability of occurrence of roughly 32%. this leaves'a lot of room' for the system to be located elsewhere, as can be readily observed from single cell simulations. furthermore, of these 32%, only half belong to having molecules of pm in the system, which is closest to the deterministic solution. most importantly, differences in equilibrium values entail wide variations for initial conditions of the next simulation interval, yielding the observed heterogeneity in single cell behavior. the description above highlights a property of any stochastic description: a system cannot be guaranteed to be in any state, and probabilistic bounds are the maximal level of information. however, one should notice the signal in this example is at least orders of magnitude larger than any other component of the system. hence, the'two-state protein' scheme provides for a counter-intuitive example where local noise overrides the effect of a strong external signal, and adaptation behavior can become an emergent property only attained at the population level. moreover, as could be expected from the deterministic solution, the probability profile also portrays loss of sensitivity with repeated stimulation. population behavior ensemble measurements display cell characteristics as distributions of values calculated over large samples of cells and, many times, distributions of cells at certain stationary states are used to infer the stochastic behavior of a single cell. by doing so, a biological version of ergodicity is necessarily implied: the percentage of the cell population in a particular state is identical to the probability to find a single cell in that state. mathematically, the ergodicity of a stochastic process is guaranteed if the stochastic process is a finite-state markov process and the stochastic process converges to a stationary state for any initial condition. however, such assumptions have many times been relaxed or misinterpreted and, in such cases, erroneous conclusions with respect to single cell behavior could have been derived from population data. recently, many studies in the literature have addressed this issue. population distributions have been based on chemical langevin equations, and clever solution methods have been developed by noticing a sturm-liouville operator. for instance, the authors in highlight the potential bias of population measures when cell replication rates are not homogeneous, or depend on the cell state. similarly, the authors in support the latter findings and further discuss how ergodicity breaks down whenever there are chemical interactions between cells, and when single cells display'complicated' behavior. our exact solution of the two- state protein system shows how ergodicity cannot even be assumed in minimalistic linear examples. our linear system underlies a finite-state markov process, is expected to relax to a stationary state, and is devoid of possible effects via cell replication and chemical interactions between cells. however, for certain input signal strengths, biological ergodicity still breaks down. in a nutshell, when the signal tuning parameter is set as fi < no adaptive behavior is observed in either single cells or populations. in contrast, when considering fi > both single cells and populations exhibit adaptation. however, when fi = single cells need not display any apparent sensitivity to the input signal, while both sensitivity and adaptive behavior can be observed at the population level. this brings us back to the arguments presented in the stochastic adaptation section. namely, that adaptive behavior may not be inferred from single stochastic trajectories, since relaxation states revolving around the mean value do not necessarily represent the weighted majority in terms of probability. this can be readily observed from the values at the end states, represented as a heat map in figure implying large initial condition variations for the computation of each subsequent time interval. actually, such wide variation can be analytically expected: it has been shown that a system composed of first order reactions that is both'open' and has an initial poisson distribution will remain a poisson distribution at any time t >. our results are entirely consistent with the theory. hence, an adequate sample size and any other implications of the model have to be inferred from the underlying properties of this distribution. lastly, it should be noted there exist analytic results for'open' and'closed' systems of first order reactions, with arbitrary initial probability distributions. hence, one can benefit from extracting an adequate sample size for arbitrary applications, provided all underlying reactions are unimolecular. in such cases, an appropriate pdf can be derived by the convolution of poisson and multinomial distributions, for any time t >. fold-change detection properties recent studies have highlighted the peculiar capability of certain systems to respond to fold-changes in the input signal, rather than to absolute differences in numbers of molecules. this is the essence of weber-fechner's law, which states that the maximal response to a change in signal is inversely proportional to the background signal or, in other words, that the ratio of the smallest increment and the background intensity of a signal is constant. this can be better understood by quoting an analogy used in: while it is easy to understand whispered voices inside a quiet room, it is very hard to notice someone shouting in our ear during a rock concert. the recently coined term fold-change detection implies both weber's law and perfect adaptation. however, simultaneous application of weber's law and perfect adaptation do not necessarily yield fcd, and sufficient conditions have been presented to obtain it. namely, if a system can be described by x˙ = f and y˙ = g, where y corresponds to the output, u to the input signal, and x to the remaining chemical species, fcd can be achieved if the system is stable, shows perfect adaptation, and for λ > it can be shown that f = λf and g = g. it can be easily seen that the'two-state protein' scheme does not satisfy these conditions, since: f = ks + krpm − λp≠ λ)g = λp − pm≠ p − pm. perhaps more intuitively, strict fcd properties could not be expected, since the'two-state protein' scheme shows remarkable loss of sensitivity to repeated stimuli. nevertheless, the criteria posed in is only sufficient, and not necessary, so two questions are worth considering. first, to how many repetitions of the stimulus does fcd refer to? and second, to what extent are consecutive relaxations to a steady state expected to match? in the analysis published in, parameter variations in an incoherent feed-forward loop architecture are explored, and fcd is reported whenever the response to the two step stimuli is identical to within 10% in amplitude. by using this criteria in the'two-state protein' scheme with fold-change input signal profiles a = and a = 2*a introduced at identical time points, fcd properties hold in two perspectives. both as an absolute ratio or by following the criteria used in, fold-stimulation yields responses within 10% of the amplitude not only for any two consecutive inputs, but also for a number of consecutive steps. so, even when the system looses sensitivity to the input signal, repeated stimulation preserves fold-change detection properties. moreover, all responses in profile a are within 10% of the amplitude of those obtained with a. most importantly, these results hold in the deterministic regime, and the first moment of the stochastic system. lastly, in near-perfect adaptation systems, consecutive inputs yield slightly different steady states. with increasing numbers of input stimuli, the equilibrium values converge to the perfect adaptation case. this was readily observable from the equilibrium analysis as the input signal term would dominate, yielding convergence of the steady state solutions. discussion our study of the'two-state protein' in a stochastic setting lead us to simple yet illustrative examples on how biological ergodicity may be invalid, even in simple linear settings devoid of cell replication properties. a follow-up question could be: what would happen if the transitions between protein states were mediated by other molecular species in the system? in this case, one could consider discrete mediators switching back and forth between the two protein states, as depicted in figure 1b. here, signal changes could refer to varying concentrations of the kinase and/or phosphatase. preliminary simulations show that all the properties studied for the simple two-state protein model can be achieved by this network topology. such properties include perfect and near-perfect adaptation, as well as rupture of ergodicity, as exemplified by a varying kinase'signal' in figure qualitatively similar results can still be obtained by considering variations on the initial kinase and phosphatase concentrations, b ∈ μm) and single parameter values. the same holds for simultaneous variations of or while, interestingly, a completely different profile is obtained by simultaneous key variations of. for instance, if we set these parameter values to a response that correlates negatively with changes in the signal is obtained. the latter can be explained by the high value of the ratio ka1/ka effectively'trapping' p molecules in a bound configuration with the kinase, hence decreasing the numbers of molecules of both p and pm temporarily. as can be intuitively expected, a similar effect in pm can be obtained by considering key variations of parameters with a varying phosphatase'signal'. nonetheless, the profile of p will differ from the previous case, as the reaction set is not symmetric, while it should be kept in mind a separation of timescales in the protein degradation rates was necessary to achieve adaptation. additionally, changes in the kinase/phosphatase signal are not equivalent to the minimalistic'two-state protein' system, since these discrete mediators are treated as molecular species and, as such, their numbers can fluctuate in time. moreover, changes to the signal intensity only refer to unbound signal molecules and, in contrast to the linear case, the total number of signal molecules within the system can accumulate in time. the latter can be readily observed in distinct chemical scenarios where a considerable number of kinase/phosphatase molecules can be'trapped' in a bound configuration, the molecules of which remain within the system irrespective of changes in the signal. in our kinase/phosphatase mediated adaptation example, obtaining an exact pdf solution of the cme would be computationally expensive, if not unfeasible, given the explosion in the number of reachable states. in this case a finite state projection using krylov subspaces, such as would be preferable. alternatively, if the mediators are highly concentrated, one could'decouple' them from the rest of the molecular species, yielding sets of unimolecular reactions, which in turn allows for obtaining an analytic closed solution. we will leave such analysis for a separate publication, given the high discrepancy of parameter values so far encountered and the significant deviation from the main focus of this work. however, considerations such as this, or deriving alternative closure of moments of the cme to account for non-linear terms, will greatly enhance future adaptation studies.  in this paper, we have studied the effects of stochasticity in a'two-state protein' scheme, providing an explanation of what adaptation means and entails in a stochastic setting. namely, that an adaptation profile can be achieved by calculating the first moment of the cme, but that the underlying probability distribution might be wide enough to prevent one from making definite quick-and-dirty assertions going from a single cell to the population level, or the other way around. in this sense, adaptation can many times be considered an emergent property of the collective system, restricting modelers/experimentalists to obtain large samples of time courses in order to infer properties of the system as a whole. the characteristics of such samples, are necessarily described by the underlying probability distribution corresponding to the solution of the chemical master equation. here, we have presented the overlap of an exact solution, an analytical solution, as well as trajectorial and deterministic solutions. our analysis highlights the source of variability in single-cell scenarios, explaining the cause for rupture in ergodicity in a simple linear reaction network. we have also provided a clear perspective on how systems analysis with varying inputs can be addressed. additionally, we have shown how the minimalistic'two- state protein' scheme displays fold-change detection properties in a stochastic setting. the latter refers to consecutive stimulation inputs and independent stimulations, and extends fcd properties to a system with near-perfect adaptation. moreover, repeated stimulation preserved fold-change detection properties, despite loss of sensitivity to the input signal. lastly, we discussed extensions of the'two-state protein' scheme by the consideration of discrete mediators. our preliminary simulations show how such extensions retain many of the properties observed in the purely linear system, including loss of ergodicity. to the best of our knowledge, this is the first time biological ergodicity has been shown to break down in a minimalistic linear architecture. the latter had been readily observed when cell replication rates are not homogeneous, or depend on the cell state, but never before in cell-cycle arrested scenarios composed of solely linear non-delayed terms. furthermore, this is the first time fold-change detection properties have been studied in a stochastic setting. 
this is a clear example where biological ergodicity cannot be assumed, just as is also the case when cell replication rates are not homogeneous, or depend on the cell state. we also show how a simple linear adaptation scheme displays fold-change detection properties, and how rupture of ergodicity prevails in scenarios where transitions between protein states are mediated by other molecular species in the system, such as phosphatases and kinases. in cell signaling terminology, adaptation refers to a system's capability of returning to its equilibrium upon a transient response. by consequence, adaptation can many times be considered a purely emergent property of the collective system. we present models of the simplest adaptation architecture, a two-state protein system, in a stochastic setting. single cell behavior cannot be inferred from population measurements and, sometimes, collective behavior cannot be determined from the individuals.
 in cell signaling terminology, adaptation refers to a system's capability of returning to its equilibrium upon a transient response. to achieve this, a network has to be both sensitive and precise. namely, the system must display a significant output response upon stimulation, and later on return to pre-stimulation levels. if the system settles at the exact same equilibrium, adaptation is said to be'perfect'. examples of adaptation mechanisms include temperature regulation, calcium regulation and bacterial chemotaxis.  we present models of the simplest adaptation architecture, a two-state protein system, in a stochastic setting. furthermore, we consider differences between individual and collective adaptive behavior, and show how our system displays fold-change detection properties. our analysis and simulations highlight why adaptation needs to be understood in terms of probability, and not in strict numbers of molecules. most importantly, selection of appropriate parameters in this simple linear setting may yield populations of cells displaying adaptation, while single cells do not.  single cell behavior cannot be inferred from population measurements and, sometimes, collective behavior cannot be determined from the individuals. by consequence, adaptation can many times be considered a purely emergent property of the collective system. this is a clear example where biological ergodicity cannot be assumed, just as is also the case when cell replication rates are not homogeneous, or depend on the cell state. our analysis shows, for the first time, how ergodicity cannot be taken for granted in simple linear examples either. the latter holds even when cells are considered isolated and devoid of replication capabilities. we also show how a simple linear adaptation scheme displays fold-change detection properties, and how rupture of ergodicity prevails in scenarios where transitions between protein states are mediated by other molecular species in the system, such as phosphatases and kinases. 