Introduction

The survival and function of cells and organisms crucially depend on precise sensing of the environment1,2,3. When searching for nutrients or avoiding toxins the bacterium Escherichia coli can detect differences in concentration as low as 3 nM4, amounting to approximately 3 molecules per cell volume. T cells can detect single copies of foreign antigen5 to quickly launch an immune response, while axonal growth cones accurately detect very few molecules of guidance cues (e.g. netrins, slits and ephrins) to follow molecular gradients while seeking their synaptic target6. Such high precision appears to be remarkable since sensing and signalling in a cell is affected by many sources of noise2,7,8. However, what level of precision do we expect from theory?

Take, for instance, Dictyostelium discoideum, which is a well-studied organism both in its unicellular (amoeba) and aggregate state (slug)9,10. Under starvation these amoebae are known to chemotax over a wide range of cyclic adenosine monophosphate (cAMP) concentrations, ranging from 0.1 nM to 10 μM, with corresponding concentration differences of only 1–5% across the cell length11,12. Surprisingly, estimates of the receptor-occupancy difference between cell front and back (signal) are dwarfed by occupancy fluctuations (noise)11. Consequently, the chemotactic ability of these amoebae to aggregate during starvation is better than what should be possible theoretically. This is particularly puzzling as cells use internal directional biases13, which increase persistence and migration speed, but may distract cells from sensing the direction of a gradient. This raises the question if cells employ some sort of memory14,15 as a form of active sensing strategy, in order to increase their sensing precision (similar to active membrane transport, which improves transport, compared to passive transport). While memory is expected to improve precision in static environments, its benefit in changing natural environments is unclear.

Cell sensing is performed through trans-membrane receptors which bind and unbind ligand molecules in the environment. At low ligand concentration, the precision is ultimately limited by the random arrival of ligand molecules on the cell surface by diffusion. An expression for this fundamental physical limit was first estimated by Berg and Purcell16 and was subsequently revisited17,18,19, considering a cell that tries to estimate the average occupancy of the receptor in a time interval Δt (determined by slower downstream processes such as cytoskeletal remodelling or rotary motor switching). All these estimates include, in the single-receptor limit, the uncertainty due to ligand-receptor unbinding, which does not convey information about the ligand concentration. Instead, if a cell only registers binding events, it can further reduce the limit by a factor two20, e.g. as potentially implemented by G-protein-coupled receptors with regulated signalling duration21, by endocytosis22 or receptor diffusion23. A lower limit of the relative uncertainty (variance over mean) is estimated from the Cramér-Rao bound of estimation theory

where I(c) is the Fisher information. In the limit of large Δt the right side of Eq. (1) is obtained, with c the concentration, D the diffusion coefficient, a the receptor's linear dimension and n the number of binding/unbinding events within Δt. The result was then extended to time-dependent concentrations, i.e. ramp sensing for a static cell or spatial gradient sensing for a moving cell24. While more sophisticated than the above mentioned estimate of the signal-to-noise ratio in Dictyostelium11, all these approaches neglect the receptor's history and hence memory.

Experimental evidence for memory at the molecular level is widespread in biology and goes way beyond receptor methylation in bacterial chemotaxis25. During lactose uptake in E. coli the slow changes in the number of permease LacY lead to hysteresis26, evidence for a system's dependence on its past environment. Other examples include receptors during cell adhesion27, as well as neuronal plasticity and long-term potentiation, which can persist over days or even months28. Common to all these mechanisms is that they consume energy, e.g. in form of hydrolysis of adenosine triphosphate (ATP) or S-adenosyl methionine (SAM)29.

How does memory improve the precision of sensing? We start from considering the simple case of two consecutive measurements. The information from the first measurement is stored by the cell (e.g. via slow kinetic processes triggered by ligand binding27) and is mathematically expressed by a prior distribution of the concentration values. Such prior information leads to a lower uncertainty in concentration sensing in the next measurement. Using the Bayesian Cramér-Rao bound, the uncertainty is

where I(λ) is the Fisher information of the prior contribution, with λ(c) a known prior distribution of the concentration c. Applying this inequality to a static environment, we find that memory of previous measurements allows an estimate with precision equivalent to a memory-less process with a correspondingly longer single-measurement time (see section S2C of Supplementary Information (SI)). The resulting precision therefore exceeds the physical limit for the single-measurement in Eq. (1). Similar results have been obtained by others in static gradients30,31,32. However, cells in realistic environments may encounter concentrations which vary strongly in time e.g. by diffusion, flow, degradation by competing species, or variable chemical sources33,34,35.

Does memory still help in fluctuating environments? As indefinite storage of past information and its analysis is impossible in cells, we anticipate an iterative sensing scheme at best. Our hypothesis is that the correlations of the environment should be important when considering memory since long-range correlations resemble static environments. In Fig. 1 we consider a fluctuating environment, with a changing concentration slope (ramp or gradient) at each time point, characterised by either correlated or uncorrelated fluctuations (depending on parameter α). We propose two alternative schemes for sensing by a receptor using memory, known from control engineering. In each scheme the receptor performs a measurement of both concentration and slope in each time interval. This measurement is stored and the likelihood of subsequent concentration values is iteratively updated based on each new measurement. In one scheme, the receptor uses memory to predict the current environment, while in the other, the receptor carefully weighs past and current measurements to come up with an optimal estimate. We finally provide preliminary evidence for our predictions. Using chemotaxis experiments on Dictyostelium amoeba in a microfluidic chamber and spatio-temporal cell simulations, we find signatures of filtering in cell behaviour.

Figure 1
figure 1

Fluctuating environments of chemical concentration and single-receptor measurement.

(top left) Exemplar concentration profiles for two different values of the slope correlation, α = 0.1 (green continuous lines) and α = 0.9 (green dotted lines), corresponding to small and high correlations, respectively. (Orange continuous and dotted lines) Corresponding sequences of measurements, performed by the cell in each interval of time Δt, for the two concentration profiles. (top right, green equation box) Iterative dynamics generating the concentration profiles. At each time step the concentration c0 and slope c1 are updated. Parameter α (0 < α < 1) represents the correlation strength of the slope fluctuations wt, a Gaussian variable with zero mean and variance . For α = 0 the profile is a fluctuating slope with totally uncorrelated fluctuations. For α = 1 the fluctuations vanish and the profile becomes a constant slope. (bottom left, orange box) Illustration of the single-measurement performed by a cell-surface receptor in the time interval Δt. The receptor records ligand binding and unbinding events occurring with respectively rates k+c(t) and k and estimates the average concentration from the time series of receptor occupancy (cloud in illustration represents memory). (bottom right, orange equation box) y0 and y1 are estimates of concentration and slope in time interval Δt. ξ0 and ξ1 are stochastic Gaussian variables with zero mean and variances and given respectively by (c0)2/n and 12(c0t)2/n24, the limits for the precision of concentration and slope sensing in time interval Δt with n binding/unbinding events (Eq. (S37) in SI).

Models and Results

Prediction and filtering schemes

For sensing strategies with memory in fluctuating environments we use two iterative schemes: (i) The prediction scheme (Fig. 2a), in which the concentration is estimated a priori, without the current measurement and only based on the history of previous measurements. This strategy might allow a cell to avoid toxins before encountering high harmful levels. (ii) The filtering scheme, in which the current concentration is optimally estimated based on previous and current measurements (Fig. 3a). This results in what is known as an a posteriori estimate. Such schemes are successfully adopted in control theory and in engineering applications (see36 for an overview). For instance, the prediction scheme is used in weather and market forecast, as well as missile guidance. The filtering scheme is applied in navigation systems, where continuous update of the position based both on measurements and the system dynamics is of primary importance (known as Kalman Filter). Famously, the navigation system of the landing lunar module of the Apollo 11 mission heavily relied on filtering-based software in the flight control system37. We first explain how the schemes work and derive analytical results, then consider how they might be implemented biochemically in cells. Finally, we discuss explicit biological examples, supporting our proposed schemes.

Figure 2
figure 2

Iterative prediction scheme for receptor sensing with memory.

(a) At each time step the concentration profile is measured and updated (see also green and orange equation boxes in Fig. 1). Receptor sensing is based only on past measurements to make an a priori estimate (prediction) for both concentration and slope with accuracy limited by the Cramér-Rao bound. (b) Simplest implementation of the scheme in a cell-signalling network. Upon binding and unbinding of external ligand, the receptor activity u(t) induces production of molecule species y. For slow reaction rate, the production of y mirrors the input with a delay, reproducing the condition of the prediction scheme in which the current time measurement is not accessible. For details see sections S4A and S5A in SI.

Figure 3
figure 3

Iterative filtering scheme for receptor sensing with memory.

(a) The a priori estimate is corrected by including the current time measurement yt with a weight Mt that minimises the a posteriori covariance matrix . (b) Simplest implementation of the scheme in a cell-signalling network. In the incoherent feedforward loop species y is inhibited by x. The combined monitoring by the two species allows accurate tracking of c while filtering measurement error in u. For details see sections S4D and S5B in SI.

Adopting a vectorial notation and indicating with ct = (c0t, c1t) the concentration and slope, the concentration update at each time step can conveniently be expressed as (see Fig. 1 for further details)

with

the matrix implementing the deterministic part of the evolution, α the slope correlation and wt = (0, wt) the fluctuation term with wt a random Gaussian variable with zero mean and variance . It is important to note that the concentration ct0 is unbounded. The advantage of this implementation is that for α = 1 the limit of a constant gradient is regained (slope fluctuations are perfectly correlated at all times), while for α = 0 the slope fluctuations are completely uncorrelated. In contrast, any imposed limit on the concentration would induce correlations.

In both schemes the iteration step coincides with the single-measurement averaging time Δt. In this interval of time, measurement yt = (y0t, y1t) with errors ξt = (ξ0t, ξ1t) is performed of both concentration and slope, which are therefore assumed stationary in this interval. We follow the protocol of24 to connect the precision of the measurement to the number of binding events occurring in that interval (for concentration measurements, this is given by Eq. (1)). ξ0 and ξ1 are Gaussian random variables with zero mean and variances and (see also Fig. 1 and section S4B of SI).

A key parameter characterising the environment is α, which correlates the slope values at two consecutive times, i.e. . As a result, the autocorrelation of the concentration c0 is given by

valid in the limit of long time t and large time separation (note also that , for details see Eqs. (S62–65) in SI). Equation (4) shows that the environmental dynamics introduce a correlation in the concentration values that increases with α. From Eq. (3) we can also evaluate the concentration variance at any time

which increases with increasing α. Importantly, the concentration variance is asymptotically independent of α, thus allowing us to compare fluctuating environments with different correlation but same variance.

Figure 2a summarises the steps leading to the iterative update of the covariance matrix with memory in the prediction scheme. At any given time one can define the a priori and a posteriori covariance matrices as follows:

where and indicate the estimates of the concentration and slope performed before (a priori) and after (a posteriori) making a measurement, respectively and and are the differences of these estimates from the true values ct. From Eq. (3) it follows:

and therefore, by Eq. (3) and the definitions Eqs. (6a) and (6b)

where Qt is a diagonal matrix carrying the variance of the slope fluctuations (see also Eq. (S61e) in SI). Due to the Cramér-Rao bound,

where Rt is a diagonal matrix carrying the variances and of the single-measurement errors on concentration and slope (see for details section S4 and Eq. (S61b) in SI). Replacing Eq. (9) into Eq. (8) leads to the following recursive relation for the a priori covariance matrix:

which can be solved analytically at steady state.

The filtering scheme is summarised in Fig. 3a. In this scheme an a posteriori estimate of the concentration is obtained as a linear combination of the a priori estimate and the direct measurement yt

in which the weight Mt is chosen so as to minimise the covariance a posteriori matrix (see Eq. (S93) in SI). With such choice for Mt from Eq. (11) it follows

Inserting Eq. (8) into (12) leads to the following recursive relation for the a posteriori covariance matrix in the filtering scheme

We obtained analytical expressions for the stationary solution of the covariance matrices by imposing convergence of the iterative relations. From these solutions we extracted the uncertainties for the concentration and slope in both schemes (see also sections S4C and S4E of SI). Importantly, while the dynamics of c0 is diffusive and therefore non-stationary (see Eqs. (4) and (5)), the dynamics of the increments c1 is stationary with correlations decaying as ατ with τ the time difference. This stationarity in the concentration increments ultimately allows the convergence of the iterative schemes. Figures 2b and 3b demonstrate simple biochemical implementations of the two schemes to be discussed later.

Figure 4 shows plots of the total uncertainties for the prediction (a) and for the filtering scheme (b), both defined as the trace of the respective steady-state covariance matrices (for individual uncertainties of concentration and slope sensing see Fig. S3 in SI). Both uncertainties are expressed in units of the total single-measurement error defined as:

with and the errors on concentration and slope, respectively, for a single measurement performed in time Δt.

Figure 4
figure 4

Performance of prediction and filtering schemes.

(a) Prediction scheme. Total uncertainty (defined in the text) as obtained from the trace of the stationary solution for the a priori covariance matrix plotted as a function of the ENR , i.e. the ratio between slope fluctuations with width σw and concentration single-measurement error , for three values of the environment correlation α = 0.1, 0.5 and 0.9 (grey curves are introduced for comparison with the filtering scheme, see (b)). Without a current estimate for the slope, a prediction cannot be more precise than σw and with increasing η the uncertainty necessarily crosses over from a regime which it is smaller than the single-measurement error (green arrow) to a regime in which it is larger (red arrow). (b) Filtering scheme. Analogous plots of given by the trace of the a posteriori covariance matrix. While the uncertainties increase with ENR, they remain always lower than the respective single-measurement errors (green arrow) due to access to the current measurement of the slope (see text and section S4 in SI for details). Parameters: following24 we take with . Ligand concentration c0 = 0.01, and Δt = 1 (arbitrary units). Uncertainties are in units of the total single-measurement error . (c–d) Implementation of the prediction (c) and filtering (d) schemes with the two cell-signalling modules of Figs. 2b and 3b. Total measurement uncertainty , defined in section S5 in SI as a function of the difference between the signal transmitted through the modules including (δσ) and excluding (δσ′) noise, is plotted as a function of the inverse correlation time (equivalent to the amplitude in the input activity δu). The module parameters for δσ and δσ′ are such that input noise is filtered out (slow rates) and the output follows exactly the input (fast rates), respectively. This difference (averaged over noise) measures the accuracy of the two modules in transmitting the input signal and reproduces the prediction and filtering schemes in (a) and (b), respectively. Uncertainties are in units of , defined in section S5 in SI as a function of the difference between δσ″ and δσ, with δσ″ equal to δσ but evaluated with the same module parameters (fast rates) used for δσ′ (no noise filtering). In (c) δσ = δy and in (d) δσ = δx + δy with δx and δy deviations from steady-states values (see section S5 in SI for details). The horizontal thin line in each plot indicates the total uncertainty of the single-measurement.

Both the effects of correlation α and the magnitude of environment-to-noise ratio (ENR) are shown. The latter is defined as the ratio between the to-be-measured amplitude of the slope fluctuations and the single-measurement error without memory. The main noticeable difference between the two schemes is that in the filtering scheme the total uncertainty is always lower than the single-measurement error, while in the prediction scheme the total uncertainty exceeds the corresponding single-measurement error for large ENR, i.e. when the environment fluctuates strongly compared to the single-measurement error. Hence, while predicting an unpredictable environment is impossible, when filtering strongly fluctuating environments one can always rely on single-measurements.

Note that while we set the times of the slope fluctuations and the measurement equal in our derivation, our results can be generalised. In fact, slower fluctuations would allow more measurements to be conducted between changes in the slope, which due to Eq. (2) can be mapped onto a single-measurement with a longer rescaled measurement time. Since the solutions for the uncertainties scale with the single-measurement error (see also Eq. (15) below), this leads to an overall reduction, proportional to the ratio of fluctuations to measurement time. However, when normalised to the total single-measurement error, the plots in Fig. 4 remain unchanged.

Analytical results for uncertainties

A simple illustrative expression of the uncertainties in Figs. 4a and 4b is given by the solution for the uncorrelated case (α = 0) for which the covariance matrix is diagonal in both schemes (for general case see section S4 and Fig. S3 in SI). For the filtering scheme we find that the total uncertainty is

while for the prediction scheme we obtain . Without the current measurement, the uncertainty due to the random slope cannot be eliminated and adds up to the uncertainty in the filtering scheme. κ is the ratio between the measurement errors on c1 and c0, i.e. , in units of Δt.

Equation (15) is best understood in certain limits. For very accurate measurements of the slope (κ → 0), filtering returns a perfectly accurate estimate for the concentration, i.e. with zero uncertainty due to optimal predictions based on the exactly measured slope. The opposite limit (κ → ∞) corresponds to a larger uncertainty, as expected, but always smaller than the single-measurement error. The latter is achieved as an upper limit only in the further limit of large environmental fluctuations, i.e. σw → ∞. This is because, for very large fluctuations of the environment and very inaccurate slope measurements, no more information is collected from past measurements than is obtained in a single-measurement (see also Figs. 4a and 4b). The same behaviour is shown also for correlated environments (α > 0), with the general feature that in this case the iterative filtering scheme always leads to a decreasing total uncertainty for increasing value of the correlation parameter α (Fig. 4b). Therefore, memory always allows the receptor precision to go beyond the physical limit of the single-measurement, with larger improvement for environments with more correlated fluctuations.

When is it better to predict based on memory and when is it better to brute-force measure? For the prediction scheme, the cross-over regime can be estimated from the value at which the slope uncertainty equals the single-measurement error (see Fig. 4a and section S4C in SI). This value is given by , which is exact for an uncorrelated environment (α = 0 and ) and is approximately valid for correlated environments (Fig. S4). This cross-over simply reflects the fact that without the current measurement any prediction will retain the whole uncertainty due to slope fluctuations. When this is of the same order of the single-measurement error in the slope, the final estimate based on past measurements will be less accurate than the total single-measurement. While inferior to the filtering scheme, the prediction scheme could be beneficial when trying to avoid certain environments.

Biochemical implementation in cellular networks

How can the two schemes be implemented biochemically in cell-signalling networks? We propose two simple pathways in the continuous limit, which show qualitatively similar behaviour to the two discrete schemes from above. In Fig. 2b simple production of a species y upon activation of the receptor according to

allows the cell to monitor the input with a “delay”. This produces the prediction scheme, in which the current-time value of the concentration is not accessible. For slowly varying inputs in c, y can follow c while averaging out measurement noise of the activity u. In Fig. 3b an incoherent feedforward loop implements the filtering scheme. In this case, second species x, produced upon activation of the receptor, inhibits y according to

In addition to filtering out measurement noise the combined monitoring of the two species allows the cell to follow the input, even when it rapidly changes.

Figures 4c and 4d show the results of the simple biochemical prediction and filtering schemes from Figs. 2b and 3b, respectively. Here, the input is the ligand concentration, whose dynamics are described by a stochastic Poisson process with correlation time and amplitude 2λs (for details see section S5 in SI). Plots share the same properties as the schemes from Figs. 4a and 4b with the uncertainty decreasing with increasing correlation time/decreasing amplitude. Specifically, Fig. 4c shows that molecule y can follow slowly/weakly fluctuating inputs with a reduction in uncertainty relative to the single-measurement noise due to time averaging by the slow kinetics of y. For rapid/strongly fluctuating inputs y cannot follow anymore, is out of phase and hence becomes worse than the single-measurement error. In contrast, Fig. 4d shows that the incoherent feedforward loop of the two molecular species, x and y, always leads to a reduction in uncertainty (depending on suitable parameter choices, see section S5 in SI for details). If the input fluctuates slowly/weakly, y adapts adiabatically and x tracks the input accurately, with the measurement error in u effectively filtered out. If the input fluctuates fast/strongly, x cannot follow the input anymore. However, y with faster dynamics than x can follow the input now and filter out noise. Hence, this network always leads to a reduction in the measurement error.

Experimental support for filtering in Dictyostelium chemotaxis

As filtering is the more advanced scheme of the two, is there any evidence of cells using this strategy? In filtering the weight Mt of the current measurement in the final estimate of the concentration and slope is a key feature (cf. Eqs. (11–13)). In particular, the weight of the current measurement for the slope, defined as the second diagonal element of the matrix Mt at stationarity given by (see Eq. (S115)), is close to one for large fluctuations in the environment and close to zero for small fluctuations. In the latter case, more accurate predictions can be made based on memory of previous values of concentration and slope.

Figure 5a shows the weight of the current slope measurement in the filtering scheme (for details see section S6 in SI). For small environmental fluctuations the weight of current measurement is small, since in this regime the cell can rely on memory to improve the concentration estimation, while for large environment fluctuations the prediction based on memory of previous measurements becomes unreliable and the weight shifts toward the current measurement. The weight of the current measurement contributes therefore significantly for large fluctuations with little correlation (large ENR and small α, respectively).

Figure 5
figure 5

Amoebae may use filtering in fluctuating environments.

(a) The weight of the cell to favour the current slope measurement over their prediction based on memory is plotted for α = 0.1 (dashed line) and α = 0.9 (solid line) with . The weight equals to one, corresponding to relying only on current single-measurement (no memory), is shown for reference (solid horizontal line). (b) Recovery of measured chemotactic index (ΔCI) for live cells (solid grey circles and error bars) and simulations (black circles, dashed error bars) after a gradient-direction switch as a function of environment-to-noise ratio (ENR), defined here as the gradient squared over the concentration. To obtain ΔCI, the CI of cells migrating in a stable cAMP gradient is subtracted from the CI after the gradient direction is switched (see Materials). A decaying exponential is fitted to average live-cell (solid black line) and simulated data (dashed black line). Error bars show the standard error. Arbitrary threshold separating slow and fast turns is shown by the horizontal red line. (c) Representative movement of live cells in response to low- (left) and high-ENR (right) gradient-direction switches, classified as slow and fast turns, respectively. Cell outlines in blue show the cell prior to the switch in gradient direction. Cell outlines in red show the cell after the switch. Outlines in grey are outside the time windows used for determining CI. Outlines are evenly spaced in time. (d) Representative cell movement from simulations in response to low- (left) and high- (right) ENR gradient-direction switches, classified as slow and fast turns, respectively. Outlines are colour-coded as in (c) and are evenly spaced in time. (Insets) Incoherent feedforward loop processes external signals before passing them to the activator of the Meinhardt model (left), characterised by the competition between local, self-promoting activator patches via long-range inhibition (right, see Methods for details). (e) Percentage of turns that are fast for live-cell data (left) and simulations (right) for low and high ENRs. Distributions of turning speeds were significantly different for data (Mann-Whitney U, p = 0.0067) and for simulations (Mann-Whitney U, p = 0.000096).

Testing these predictions of filtering in cell sensing is difficult for individual receptors, in particular since chemotaxis is an emergent phenomenon arising from a large number of biophysical and biochemical details38. Instead, we approached this problem by conducting chemotaxis experiments on starved Dictyostelium discoideum cells in a microfluidic chamber as described in39. In this setting with a left and right inflow, it is possible to study the turning behaviour of the migrating cells when the gradient in cAMP concentration is instantaneously switched in direction from left to right and vice versa. Specifically, we use the recovery of the chemotactic index (ΔCI), with CI a measure of the alignment of the cell movement with the gradient, as an indicator for turning speed and a cell's reliance on its current measurement (see Materials and Methods for details). Considering multiple cells in different concentration gradients, Fig. 5b (solid line) shows that this recovery is directly correlated with gradient steepness (i.e. amplitude of fluctuations or ENR). Exemplar turning behaviours are shown in Figs. 5c for slow (left) and fast (right) turning cells, respectively. In line with our prediction from filtering, the fraction of fast turning cells indeed increases with ENR, indicative of cells trusting their current measurement in strongly fluctuating environments (Fig. 5e, left). While this observation is not sole proof of filtering, numerous other observations point in the same direction (see Discussion section).

Spatio-temporal simulations explain observed cell behaviour

Although the filtering observed in the turning behaviour of Dictyostelium cells cannot be attributed to a single pathway or a small number of molecular species14,15,38, it is worth pointing out that the activity of RasG downstream of the cAR1 G-protein-coupled receptor follows an incoherent feedforward loop and helps mediate adaptation to persistent cAMP stimulation41. Hence, to understand if a spatially extended incoherent feedforward loop can reproduce our data, we implemented a minimal biophysical-biochemical model of pseudopod-guided chemotaxis.

Following38,40 we coupled a 2-dimensional membrane with a Meinhardt-like reaction-diffusion system that exerts driving forces on the membrane biased by external cues. This was combined with an incoherent feedforward loop to process sensory inputs42. In analogy with the experiments on Dictyostelium, we then observed the turning behaviour of these simulations in response to a reversal in gradient direction with different ENRs. Similarly to our live-cell experiments, simulated cells quickly reoriented themselves in response to high-ENR switches, with reorientation time increasing as environmental fluctuations became smaller (Fig. 5b, dotted line). Cell turning circles in response to small-ENR switches (Fig. 5d, left) were considerably larger than in response to large-ENR switches (Fig. 5d, right), mirroring the behaviour of live cells (Fig. 5c). Similarly, the fraction of fast-turning cells (Fig. 5e, right) matches the data (Fig. 5e, left).

Discussion

We presented an analytical calculation for two active sensing strategies with memory in fluctuating environments, termed prediction and filtering. Importantly, in correlated environments both strategies would allow cells to sense far more precisely than predicted by current estimates of the fundamental physical limit, thus providing potential explanations for the observed single-molecule precision in chemo-sensing E. coli, neurons and T cells. Filtering, the more elaborate of the two schemes, can improve the precision of sensing even in uncorrelated, difficult-to-predict environments. Through direct observation of the turning behaviour of chemotacting Dictyostelium cells in response to fluctuating cAMP gradients in microfluidic chamber (and through previous evidence provided below), we found support for the adoption of filtering by these cells. Hence, cells do not simply extend a pseudopod in the estimated gradient direction based on their current measurements (traditional compass model). Instead, cells weigh past and current measurements in chemotaxis, resulting in an adjustment of the turning radius. This matches our intuition that a smaller change in the environment requires a longer time for the cell to notice. Biochemically, filtering can be implemented by the incoherent feedforward loop, both at the single-receptor (Figs. 3b and 4c) and whole-cell (Fig. 5d) level. Indeed, recent experiments demonstrate that such a feedback loop is implemented by the small GTPase Ras, which may be responsible for adaptation in Dictyostelium cells41.

While our prediction and filtering schemes have a long history in control engineering36,37,47, their application to fluctuating gradient sensing constitutes a new direction. Recently, prediction was investigated in anticipating oscillations, e.g. as part of the circadian clock, requiring energy dissipation48 in line with our active sensing strategies. Note “active sensing” refers to the need for energy consumption (similar to active transport in cells) and must not be confused with “active learning” in artificial intelligence and machine learning. Such active processes can also be used to time-average noisy signals to enhance the accuracy in sensing49. The Kalman filter was previously applied to adaptation in bacterial chemotaxis50, demonstrating close connection to integral feedback control. This filter was however not considered in the context of the physical limits of sensing. The Kalman filter can be considered the most simple dynamic Bayesian network51. Note the cell's parameters, e.g. rate constants for optimal weighting of past and current measurements, would most likely need to be adjusted by evolution to match typically encountered stimuli.

Our results may provide new insight into previously observed internal directional biases in immobilised latrunculin-treated cells, dynamically stimulated by uncaging cAMP using a circular UV beam13. The precision of directional cell sensing was found to be determined by a combination of external cAMP sensing and internal bias of unidentified origin. Since internal biases not aligned with the external gradient are expected to reduce the sensing precision, as confirmed by theoretical modelling31, the purpose of internal biases remained unclear. While a beneficial increase in cell heterogeneity is a possibility (at the expense of precision)13, our work suggests that in a dynamic environment the internal bias represents memory for filtering, leading to an actual increase in sensing precision.

Observations of memory and filtering go back at least four decades43,44,45. In44 neutrophils filtered out temporally-changing concentrations of N-formyl-methionyl-L-leucyl-phenylalanine (fMLP) over a 10 s time scale. Although no connection with sensing precision was made, two cell fractions of turning behaviour were observed – a slowly U-turning and a fast 180°-repolarising fraction. Most recently45Dictyostelium cells responded to ramps (their Fig. 4e), as expected from the incoherent feedforward loop and closely related networks24. Consistently, pulses of high frequency (14 mHz) were filtered out but not pulses of low frequency (7 mHz) (their Fig. 4a). Even E. coli bacteria were observed to filter in response to alternating gradients, producing coherent waves at the population level when stimulated at 0.01 Hz46. Hence, our results integrate a number of apparently distinct observations across different cell types.

Wolpert's “no free lunch theorem”, used as a metaphor here, states that to optimally estimate, search, etc., prior assumptions are necessary52. In effect, there is no “short cut” for a solution and to do better on average a “cost” needs to be paid. Indeed, our two active sensing strategies are based on such priors (memory) updated dynamically and the presence of structure in the environment (correlations) allows one to outperform a simple direct counting algorithm (i.e. single measurement). Active sensing strategies are widespread in biology, including integral feedback control in bacterial chemotaxis53, olfactory- and photo-transduction54, as well as kinetic proofreading55. The latter is a form of “error correction” mechanism for enhancing the specificity in DNA replication, protein synthesis, homologous recombination56 and T-cell signalling57. The striking similarity between our proposed strategies, macroscopic engineering solutions37 and learning by Bayesian inference in humans58 hint toward universal problem solving strategies in nature.

Methods

Chemotaxis experiments and image analysis

The migration of 93 starved AX2 strain Dictyostelium discoideum cells was recorded as described in38,39. Imaging was performed by differential interference contrast (DIC) in a μ-slide 3-in-1 microfluidic chamber (Ibidi) with three 0.4 × 1.0 mm2 inlets that converge at an angle of 32° to the main channel (dimension 0.4 × 3.0 × 23.7 mm3). Two micrometer valves (Upchurch Scientific) reduced the flow velocities from the side inlets. The central inlet was connected to an infusion syringe pump (TSE Systems), which generated a stable flow of 1 ml/h. Inlets contained a mixture of the chemoattractant cyclic adenosine monophosphate (cAMP) and an Alexa Fluor red dye of similar molecular weight (Invitrogen), to allow the characterisation of gradients (for details, see39). Microscopy was performed using an Axiovert 135 TV microscope (Zeiss), with LD Plan-Neofluar objectives 20x/0.50 NA and 40x/0.75 NA (Zeiss) in combination with a DV2 DualView system (Photometrics). Images were taken at a frame rate of 1/3 sec. Cells were given time to adjust to stable chemical gradients for about 20 min before the direction of the gradient was switched. Typical trajectory lengths were 37 min. Cell outlines and centres of mass were extracted using a custom-written plug-in for ImageJ. Chemotactic indices of cells are given by CI = cos(qmqg), where qm is the angle of migration and qg is the angle of the gradient. CIs were measured over a period of 2 min on either side of each switch, with the change in CI being defined as ΔCI = CIafterCIbefore.

Cell simulations

Sensory information is processed by an incoherent feedforward loop41, consisting of a response component and its inhibitor, both driven by the outside stimulus. The response component is passed to a Meinhardt model simulated on a 2-dimensional deformable membrane38,40. The Meinhardt model consists of a self-promoting local activator that inhibits activation elsewhere on the membrane via a global inhibitor. Patches of activator also self-limit by driving the production of a local inhibitor, allowing new patches to form nearby. The membrane moves through the combination of an outward normal force proportional to the local activator concentration, global membrane tension, local bending tension and a normal, area conserving force representing cytosolic pressure. See section S7 in SI for details including differential equations and parameter values.