## ABSTRACT

Cell motility in response to environmental cues forms the basis of many developmental processes in multicellular organisms. One such environmental cue is an electric field (EF), which induces a form of motility known as electrotaxis. Electrotaxis has evolved in a number of cell types to guide wound healing, and has been associated with different cellular processes, suggesting that observed electrotactic behaviour is likely a combination of multiple distinct effects arising from the presence of an EF. In order to determine the different mechanisms by which observed electrotactic behaviour emerges, and thus to design EFs that can be applied to direct and control electrotaxis, researchers require accurate quantitative predictions of cellular responses to externally-applied fields. Here, we use mathematical modelling to formulate and parametrise a variety of hypothetical descriptions of how cell motility may change in response to an EF. We calibrate our model to observed data using synthetic likelihoods and Bayesian sequential learning techniques, and demonstrate that EFs impact cellular motility in three distinct ways. We also demonstrate how the model allows us to make predictions about cellular motility under different EFs. The resulting model and calibration methodology will thus form the basis for future data-driven and model-based feedback control strategies based on electric actuation.

**SIGNIFICANCE** Electrotaxis is attracting much interest and development as a technique to control cell migration due to the precision of electric fields as actuation signals. However, precise control of electrotactic migration relies on an accurate model of how cell motility changes in response to applied electric fields. We present and calibrate a parametrised stochastic model that accurately replicates experimental single-cell data and enables the prediction of input–output behaviour while quantifying uncertainty and stochasticity. The model allows us to quantify three distinct ways in which electric fields perturb the motile behaviour of the cell. This model and the associated simulation-based calibration methodology will be central to future developments in the control of electrotaxis.

## INTRODUCTION

Cell migration underpins key physiological processes central to developmental biology, as well as wound healing and tissue regeneration, and it plays a crucial role in invasive, metastatic cancers. There are ongoing efforts to intervene in and influence these phenomena to, for example, inhibit metastasis (1) or accelerate wound healing (2). However, the cellular processes driving collective migration are complex and multifaceted, deriving from diverse physical mechanisms and various external stimuli (3), making it challenging for researchers to accurately and robustly direct cell motility. Due to the ease with which electric fields can be controlled and applied to cells, research into the control of cell motility has recently focused on exploiting *electrotaxis* (also known as galvanotaxis) (3–5). However, the precise effects of electric fields on intracellular processes and thus on cell motility are not fully understood, making quantitative predictions and control policy design impractical.

Electrotactic cells have been observed to change their motile behaviour in response to the presence of a direct current (DC) electric field (EF) (3–7). Researchers seeking to control cell motility exploit this phenomenon by applying external electrical cues to cell populations (2, 4–9). The key advantages of using electrical cues to guide cell migration include the ability to exploit endogenous, evolved biological functionality to respond to precisely controllable DC EFs. This compares favourably to using chemoattractants to guide motility, since chemical signals experienced by the cell cannot be so precisely or flexibly controlled, especially dynamically, and chemoattractants are usually highly cell-specific. In contrast, light-directed motility allows for precise actuation signals. However, it requires sophisticated optogenetic manipulations of the cell population under control (10). As such, EFs provide a relatively precise and simply implemented actuation signal to achieve specified motile behaviours.

While an important strength of electrotactic cell control is that applying an EF for actuation is flexible enough to apply to any electrotactic cell type, the precise signal to be applied in order to achieve any specified goal needs to be carefully calibrated. At the most basic level, even the direction of migration within the same DC field has been shown to vary across different cell types, and within one cell type under different experimental conditions (5, 11). More broadly, a large number of biochemical and biophysical mechanisms have been implicated in the electrotactic response across different cell types (3). Each electrotactic mechanism, which may co-exist in combination at unknown relative strengths, may induce distinct observable effects on the dynamics of cellular motility. Overcoming this uncertainty in the observable electrotactic response is a fundamental challenge for designing EFs to control cell motility.

Mathematical models are a vital tool for quantifiably specifying the different ways in which cells can change their motility in response to EFs (12–14). In this paper we describe a parametrised stochastic model of the motile behaviour of a single human corneal epithelial cell, in which the cell’s motility is driven by an internal polarity, in combination with the external influence of a DC EF. We assume that the cell can undergo both spontaneous and electrotactic polarisation. The model allows us to describe mathematically four distinct ways an EF may influence motility. We use experimentally observed trajectories of single cells, both with and without applied EFs, to calibrate the parameters of this model, thereby quantifying the extent to which different aspects of cell motility are impacted by the EF. The resulting calibrated model provides a vital first step towards being able to design feedback control policies and provide robustness guarantees, which are necessary if electrotaxis is to be used to control cell motility in practical applications such as wound healing or tissue engineering.

### Single-cell modelling

The agent-based modelling framework used in this work follows standard modelling assumptions outlined in (13). Specifically, we model the evolution of the velocity of a single cell in the overdamped regime, so that cell velocity is proportional to the sum of non-frictional forces on the cell. We provide full details on the mathematical model in *Materials and Methods* and in the *Supplementary Material*.

In the absence of any EF, the only non-frictional force acting on the cell is assumed to be an active force arising from the internal *polarity* of the cell. Thus, the cell velocity, **v** = **v**_{cell}, is comprised of a single component. Based on qualitative observations of spontaneous cellular motility, we assume that the cell randomly switches between two states, depolarised or polarised. In the depolarised state, the velocity stochastically fluctuates around a zero modal value, such that ||**v**_{cell}|| ≈ 0. In the polarised state, the modal values for the stochastic fluctuations of the velocity component are parametrised by ||**v**_{cell}|| ≈ *v*, where the scalar-valued parameter *v* > 0 has dimensions µm min^{−1}. In addition to the random changes in cell speed between depolarised and polarised states, the direction of cell motion (in the absence of an EF) is assumed to vary according to an unbiased random walk with positive diffusion constant *D* > 0, with dimensions min^{−1}. Eq. (2) in *Materials and Methods* provides the mathematical formulation of this model.

We hypothesise that a vector-valued DC EF, **u**, can affect cell motility in a variety of ways. We use a number of extensions of the model in order to determine how motility is impacted by the EF, specifying, in particular, four distinct ways in which it may affect the dynamics of a motile cell. We parametrise the magnitude of each hypothesised electrotactic effect, observed at a reference EF strength of 200 mV mm^{−1}, by the parameters *γ*_{1}, *γ*_{2}, *γ*_{3} and *γ*_{4}, such that if *γ*_{i} = 0 then the corresponding hypothesised effect is not included in the model. Eq. (3) in *Materials and Methods* provides the mathematical formulation of this model.

The four means by which we model cell motility to be perturbed by the EF are:

**Velocity bias** (*γ*_{1}) The EF imparts an additional component of force on the cell. The resulting velocity, **v** = **v**_{cell} + **v**_{EF}, is thus the sum of two components: the original polarity component, **v**_{cell}, and an EF component, **v**_{EF}. The EF velocity component acts in the direction of the field with magnitude *γ*_{1}*v*.

**Speed increase** (*γ*_{2}) Polarised cells travel more quickly under the influence of an EF in the direction in which they are polarised. The modal magnitude of **v**_{cell} for polarised cells is increased by *γ*_{2}*v*.

**Speed alignment** (*γ*_{3}) Polarised cells travel more quickly when the direction of their polarisation aligns with the EF, but slower if opposed to the EF. The modal magnitude of **v**_{cell} for polarised cells is increased by *γ*_{3}*v* cos(*0*), where *0* is the angle between **v**_{cell} (i.e. the polarity direction) and the EF direction.

**Polarity bias** (*γ*_{4}) The random walk determining cell polarity is biased so that cells preferentially polarise in the direction of the EF. The strength of this bias is parametrised by *γ*_{4}.

Two models can be distinguished: the *autonomous* model, where no EF is applied, and the *electrotactic* model, where a reference strength EF is applied. In each of these models, the cell velocity at time *t*, denoted **v**(*t*), undergoes a random walk. Figure 1 characterises each of these models by depicting the stationary probability distribution of this random walk. The top plot shows that, without an EF, the cell speed is most likely to be near zero or near *v*, with direction chosen uniformly at random. The bottom plot of this figure demonstrates how each electrotactic effect, quantified by the value of *γ* for *i* = 1, 2, 3, 4, can be interpreted in terms of the probability distribution of the cell velocity: *γ*_{1} translates the velocity distribution uniformly in the direction of the field; *γ*_{2} rescales the domain of the distribution; *γ*_{3} parametrises asymmetry in the shape of the velocity distribution; and *γ*_{4} parametrises asymmetry in the density of the velocity distribution.

### Outline

The primary goal of this work is to use single-cell experimental data to calibrate the parametrised mathematical model of spontaneous polarisation and electrotaxis. The model calibration process enables the identification of which of the four hypothesised electrotactic effects of EFs on cell motility can be observed in the experimental data. Importantly, the calibrated model also quantifies the relative contribution of each of these identified effects. In addition to the quantitative understanding of how electrotactic motility arises in cells, the calibrated model also allows us to simulate and predict the single-cell response to dynamic EFs.

The data used for model calibration is gathered from two experiments in which the trajectories of motile human corneal epithelial cells are recorded (a) without any EF applied, and (b) with a DC EF at a reference strength of 200 mV mm^{−1}, directed from left to right. These experiments are termed the *autonomous* and *electrotactic* experiments, respectively. We use these experiments in turn to first calibrate the parameters of the autonomous model and then the electrotactic model. To calibrate the electrotactic model, we first identify which of the four hypothesised electrotactic effects are supported by the data. Out of these identified electrotactic effects, we then proceed to quantify the relative contribution of each of them to the observed electrotaxis induced by the EF.

After formulating and calibrating the extended model of electrotaxis, we use simulations of the calibrated model to predict how the position and polarity of single cells evolve under the influence of different, dynamic EF inputs. The ability to make predictions using a calibrated, stochastic, uncertain model is a first step towards the future goal of model-based policy design for the electrotactic control of single-cell and population-level motility.

## MATERIALS AND METHODS

### Data collection

Two experiments were carried out, which we call the *autonomous* and *electrotactic* experiments. In both experiments, time-lapse images of human corneal epithelial cells, seeded at a low density, were acquired at 5 min intervals over 3 h. In the electrotactic experiment, the cells were subjected to a DC EF at a reference strength, 200 mV mm^{−1}, applied across the medium. In the autonomous experiment, no EF was applied. From the two resulting image sets, the positions of fifty cell centroids for each experiment were recorded over the entire time horizon. Visual confirmation from the raw experimental output confirms that cell collisions were rare, due to the low density (100 cells cm^{−2}) at which cells are initially seeded. We thus assume that cell–cell interactions can be neglected in the current model. We denote the resulting cell trajectory data **x**_{NoEF,i}(*t* _{j}) and **x**_{EF,i} (*t* _{j}) for the autonomous and electrotactic experiments, respectively, where each trajectory is translated to begin at the origin, such that **x**_{NoEF,i} (0) = **x**_{EF,i} (0) = 0 for all *i*. For each experiment, the index *i* = 1, …, 50 refers to the cell being traced, and *t* _{j} = 5 min for = 0, 1, …, 36 refers to the snapshot time points. We denote the entire set of data from each experiment as **x**_{NoEF} and **x**_{EF}, respectively.

### Materials

EpiLife culture medium with Ca^{2+} (60 µM), EpiLife defined growth supplement, and penicillin/streptomycin were purchased from ThermoFisher Scientific (Waltham, MA, USA). FNC Coating Mix was purchased from Athena Enzyme Systems (Baltimore, MD, USA). Dow Corning high-vacuum grease was purchased from ThermoFisher. Agar was purchased from MilliporeSigma (Burlington, MA, USA). Silver wires with 99.999% purity were purchased from Advent Research Materials Ltd. (Oxford, United Kingdom).

### Cell culture

Telomerase-immortalized human corneal epithelial cells (hTCEpi) were routinely cultured in EpiLife medium supplemented with EpiLife defined growth supplement and 1% (v/v) penicillin/streptomycin. Cells were incubated at 37 °C with 5% CO_{2} until they reached ∼70% confluence and were used between passages 55 and 65 for all cell migration assays.

### Electrotaxis assay

Electrotaxis experiments were performed as previously described (15, 16) with minor changes. Briefly, electrotaxis chambers (2 cm x 1 cm) were constructed in 100 mm petri dishes with glass strips and high-vacuum grease. Chambers were coated with FNC Coating Mix, following the manufacturer’s instructions to facilitate cell attachment. Cells were seeded at a low density (100 cells cm^{−2}) and cultured overnight (12 h to 18 h) in the chambers to allow sufficient attachment. Chambers were covered with glass coverslips and sealed with high-vacuum grease. Electric currents were applied to the chamber through agar-salt bridges connecting with silver–silver chloride electrodes in Steinberg’s solution (58 mM NaCl, 0.67 mM KCl and 0.44 mM Ca(NO_{3})_{2}, 1.3 mM MgSO_{4} and 4.6 mM Tris base, pH 7.4). Fresh cell culture medium (Epilife) was added into reservoirs to ensure good salt bridge contact and to support cell viability during electric stimulation. An EF strength of 200 mV mm^{−1} was used, and field strengths were monitored at the beginning of the experiment and every 30 min afterwards to ensure consistent EF application.

### Time-lapse imaging and quantification of cell migration

Cell migration was monitored and recorded by phase-contrast microscopy using an inverted microscope (Carl Zeiss, Oberkochen, Germany) equipped with a motorized stage and a regular 10× objective lens. Time-lapse images were acquired at 5 min intervals using Metamorph NX imaging software (Molecular Device, Sunnyvale, CA, USA). To maintain standard cell culture conditions (37 °C, 5% CO_{2}), a Carl Zeiss incubation system was used. Time-lapse images of cell migration were analyzed by using ImageJ software from the National Institutes of Health (http://rsbweb.nih.gov/ij/). Adherent cells in the images were manually tracked, and cells that divided, moved in and out of the field, or merged with other cells during the experiment were excluded from analysis. The position of a cell was defined by its centroid.

### Model construction

We constructed a mathematical model of single-cell dynamics. The model tracks the position of the cell centre in the plane, **x**(*t*) ∈ ℝ^{2}, as a function of time, *t* ≥ 0 min, with initial condition **x**(0) = 0 at the origin. The position is a deterministic integral of cell velocity, **v**, such that
and the stochastic dynamics of **v** are modelled. The key to this modelling task is the non-dimensional internal variable representing the cell polarity, **p**(*t*) ∈ ℝ^{2}. We assume that the polarity imparts a force on the cell that corresponds to its active motility, resulting in a velocity component **v**_{cell}(*t*).

### Modelling spontaneous polarisation and motility

We first describe the model of cellular motility with no biasing EF, which we will term the *autonomous* model. The only velocity component is that due to polarisation, so that we write the cell velocity as a single component,
where the parameter *v* ≥ 0, with dimensions µm min^{−1}, represents the modal magnitude of **v**_{cell} for a polarised cell. Note that Eq. (2a) implies that the polarity variable, **p**, is a non-dimensionalisation of the velocity component **v**_{cell}. We further assume that the polarity, **p**, undergoes a random walk according to a Langevin diffusion, such that
where **B**(*t*) ∈ ℝ^{2} is a two-dimensional Wiener process, and the parameter *D* (in min^{−1}) quantifies the speed at which the random walk approaches stationarity. The initial polarity, denoted **p**_{0} = **p**(0), also needs to be specified.

The *potential function W* (**p**) in Eq. (2b) is defined to capture the intended features of the autonomous model, namely that cells stochastically spontaneously switch between polarised and depolarised states, and that the argument of the polarity is uniformly distributed, at stationarity. It can be shown (17, 18) that the transition rates between the polarised and depolarised states are determined by two non-dimensional *energy barriers*, denoted Δ*W*_{on} and Δ*W*_{off}. For further details on the definition of *W*, see the *Supplementary Material*. We will calibrate the autonomous model in Eq. (2) by identifying the parameters *v* and *D*, and also the two energy barriers, Δ*W*_{on/off}, that are sufficient to determine the potential function, *W*.

### Modelling motility bias due to an EF

We use the vector **u**(*t*) with non-dimensional magnitude ||**u**(*t*) || = *u*(*t*) to describe a (time-varying) DC EF of strength 200*u*(*t*) mV mm^{−1}, directed parallel to **u**(*t*). In particular, the EF used in the electrotactic experiment, with magnitude 200 mV mm^{−1} in the positive *x* direction (left to right), is represented by the constant canonical unit vector, **u**(*t*) ≡ **i**, with constant (non-dimensional) magnitude *u*(*t*) ≡ 1. The autonomous model in Eq. (2) can be extended to include the four hypothesised effects of the EF. The *velocity bias* effect is accounted for by modelling the velocity using two components,
where the EF induces a deterministic velocity component in the direction of the field,
The two hypothesised electrotactic effects of *speed increase* and *speed alignment* are both modelled through adapting the velocity component induced by the cell polarity, originally defined in Eq. (2a), into
where is the unit vector in the direction of the polarity, **p**. Finally, the hypothetical *polarity bias* effect is modelled in the stochastic evolution of the polarity variable **p**. We add a drift term proportional to the EF to the Langevin diffusion equation, such that
where *W* (**p**) is the same potential function as used in Eq. (2b). As for the autonomous model, the initial value for the polarity, denoted **p**_{0} = **p**(0), is also required.

Note that substituting **u** = 0 or setting *γ*_{i} = 0 for all *i* = 1, 2, 3, 4 into Eq. (3) recovers the dynamics of the autonomous model, in Eq. (2). We will term the extended model in Eq. (3) the *electrotactic* model. It is parametrised by the four parameters *v*, Δ*W*_{on}, Δ*W*_{off} and *D*, with the same meaning and dimensions as in the autonomous model, and also by *γ*_{i} for *i* = 1, 2, 3, 4, which, since **u** is non-dimensional, are all non-dimensional.

The models in Eq. (2) and Eq. (3) result in a stochastic path for the velocity, **v**(*t*), with a parametrically determined stationary distribution. Following Eq. (1), each path can be integrated to produce a stochastic trajectory of the cell position over time. The stationary distributions of **v** under the autonomous and electrotactic models are depicted in Figure 1, where the polarised and depolarised regimes in both models can be identified. Furthermore, the effect of each of the parameters *γ*_{i}, and hence each of the hypothesised electrotactic effects, can be identified by comparing the position, scale, and asymmetries of the two stationary distributions.

### Summarising simulations

For any given set of parameter values, *0* = (*v*, Δ*W*_{on}, Δ*W*_{off}, *D, γ*_{1}, *γ*_{2}, *γ*_{3}, *γ*_{4}), together with initial polarity, **p**_{0}, and non-zero EF input, **u**(*t*), the stochastic model in Eq. (3) can be simulated. Note that, if the EF is zero, we simulate the autonomous model in Eq. (2). Each simulation produces a random trajectory, denoted *w* = (**p**(*t*), **x**(*t*))_{t ≥0}. We will use *summary statistics* to analyse the model outputs by mapping each simulated trajectory, *w*, to a number (or small set of numbers) that summarise the trajectory. More details of the summary statistics can be found in the *Supplementary Material*.

We define one set of summary statistics based on simulated cell positions. We consider: (a) the total cell displacement over the time horizon of the experiments, | |**x**(180) | |, denoted *Y*_{1}(*ω*); (b, c) the mean and standard deviation of the displacements, | |**x**(*t* _{j}) − **x**(*t* _{j−1}) | |, between the five-minute sample points, denoted *Y*_{2}(*ω*) and *Y*_{3}(*ω*); and (d) the angle, arg (**x**(180)), between the final cell position and the positive *x* axis (i.e. the direction of the EF under the electrotactic experiment), denoted *Y*_{4}(*ω*). Note that the four summary statistics *Y*_{1}, *Y*_{2}, *Y*_{3} and *Y*_{4} can also be applied to the observed data, **x**_{NoEF,i} and **x**_{EF, i}, in addition to any simulated trajectory, *ω*.

In the models in Eq. (2) and Eq. (3), the polarity, **p**(*t*), evolves randomly from initial value **p**_{0}. We define a further three summary statistics based on the simulated polarity, using a threshold polarity magnitude, . First, the *time to polarise, T*_{1}(*ω*), is defined as the first time *t* ≥ 0 for which , for *ω* generated using parameter value *θ* and initial condition **p**_{0} = 0. The *time to depolarise, T*_{0}(*ω*), is the first time *t* ≥ 0 for which for *ω* generated using parameter value *θ* and initial condition **p**_{0} = **i**. Finally, the binary value Π_{T} (*ω*) for any given *T* ≥ 0 is the indicator function of Given a parameter value, *θ*, the conditional expectations of these statistics are denoted by a bar, so that and so on. Thus, Bayesian uncertainty in parameter values will propagate to the estimated values of , . Note that these summary statistics *cannot* be applied to the observed data, and can only be used to summarise simulated trajectories.

### Model calibration and selection

Given the experimental data sets, **x**_{NoEF} and **x**_{EF}, the autonomous and electrotactic models can be *calibrated* by identifying the values of the parameters,
that are consistent with the observed behaviour. We employ a Bayesian approach to parameter inference, whereby prior beliefs about *θ*, encoded in a *prior distribution, π* (*θ*), are updated in the context of the experimental data according to Bayes’s rule,
where ℒ (**x**_{NoEF}, **x**_{EF} | *θ*) is the *likelihood* of observing the data under the models in Eq. (2) and Eq. (3) with the parameter value *θ*. The resulting *posterior distribution, π* (*θ* | **x**_{NoEF}, **x**_{EF}), represents the remaining uncertainty in the parameter values, given the experimental data (19).

The simulation and inference algorithms used in this work have been developed in Julia 1.5.1 (2θ). The code is publicly available at github.com/tpprescott/electro.

### Bayesian synthetic likelihoods and sequential Monte Carlo

In practice, the likelihood cannot be calculated directly, and so we require a likelihood-free approach. We replace the true likelihood with a *synthetic likelihood*, where for each value of *θ* the likelihood is approximated by the likelihood of summarised data under an empirical Gaussian distribution, which is fit to the sample mean and covariance of a set of *n* = 500 summarised simulations (21–23). The summary statistics we use are *Y*_{1}, *Y*_{2}, *Y*_{3} and *Y*_{4}, as described in *Summarising simulations*, above. To mitigate the computational burden of the large number of model simulations required for parameter inference, we combine a sequential Monte Carlo (SMC) algorithm with synthetic likelihoods (21, 24, 25). This approach is a popular strategy for efficiently sampling from a target distribution, and also allows the exploitation of parallelisation to speed inference (21, 25–27). We provide full details of the SMC inference approach using summary statistics and synthetic likelihoods in the *Supplementary Material*.

### Prior specification and model selection

The space of possible parameter values is defined as the product of intervals,
where the interval bounds were chosen based on a preliminary qualitative, visual analysis of the simulation outputs in comparison to observed data. In order to identify which of the sixteen possible combinations of the four hypothesised electrotactic effects are best supported by the experimental data, we will define sixteen possible priors on Θ. For each of the sixteen subsets, *X* ⊆ {1, 2, 3, 4}, we define a uniform prior distribution *π*_{X} (*θ*) on Θ that takes a constant, positive value for parameter vectors *θ* if and only if *γ*_{i} > 0 for all *i* ∈ *X*, and is zero otherwise. Thus, by performing Bayesian inference using the prior distribution, *π*_{X}, we constrain the electrotactic model in Eq. (3) to model only electrotactic effects included in the subset *X* ⊆ {1, 2, 3, 4}.

We define an optimisation problem that aims to prevent over-fitting, by balancing the closeness of the model fit to data while prioritising smaller parameter dimensions. The optimal subset, *X*, of electrotactic effects is defined as the maximiser of the objective function,
where the regularisation parameter *µ* > 0 controls the cost of over-fitting by penalising the total number of non-zero parameters. This number is four, corresponding to *v*, Δ*W*_{on/off}, and *D*, plus | *X* |, corresponding to the positive *γ*_{i} for *i* ∈ *X*. We use *µ* = 0 and *µ* = 2 in our analysis, although the choice of *µ* is somewhat arbitrary. One interpretation of the value of *µ* is that it effectively imposes a ‘prior’ on the subsets, *X* ⊆ {1, 2, 3, 4}, with probability mass proportional to exp(−*µ*| *X* |).

The first term in *J*_{µ} (*X*) measures the closeness of fit between the data and the model, when constrained to only include the electrotactic effects in *X*. This fit is defined for each *X* ⊆ {1, 2, 3, 4} by the value of the partition function,
As the likelihoods ℒ (**x**_{NoEF}, **x**_{EF} | *θ*) cannot be calculated directly, the partition functions *p*_{X} (**x**_{NoEF}, **x**_{EF}) are estimated for each *X* by Monte Carlo sampling, where again the simulation-based synthetic likelihood is used in place of the true likelihood. More details of the specific sequential Monte Carlo sampling methodology used for this estimate are given in the *Supplementary Material*.

## RESULTS

We initially calibrate the autonomous model, based on the data set **x**_{NoEF} from the autonomous experiment alone, in order to confirm the principle of the modelling framework and its ability to replicate observed behaviours, and to check that the parameters are identifiable from the data. Then, we calibrate the full electrotactic model using the full data set, **x**_{NoEF} and **x**_{EF}, in two stages. We first assess which subset of the four hypothesised electrotactic effects are best supported by the data. After choosing the optimal combination of electrotactic effects, we then calibrate the parameters of the selected electrotactic model.

### Parameters of the autonomous model are identifiable

We begin by confirming that the chosen modelling and inference approaches appropriately capture the autonomous experimental behaviour, **x**_{NoEF}, where no external EF is applied. This scenario is modelled by the autonomous model in Eq. (2), which depends on four parameters, *θ*_{NoEF} = (*v*, Δ*W*_{on}, Δ*W*_{off}, *D*). The Bayesian synthetic likelihood approach was used to generate posterior samples for: the characteristic speed of a polarised cell, *v* µm min^{−1}; the diffusion constant, *D* min^{−1}, which determines the characteristic timescale of the spontaneous polarisation dynamics; and the dimensionless parameters, Δ*W*_{on} and Δ*W*_{off}, which respectively determine the relative rates at which cells switch from depolarised to polarised, and vice versa.

Figure 2(a–d) depicts the marginals of the posterior distribution, *π* (*θ*_{NoEF} | **x**_{NoEF}), for each of the four calibrated parameters. The prior distribution used for Bayesian inference assumed that the parameters were independently uniformly distributed on the intervals 0 *< v* ≤ 5 µm min^{−1}, 0 *<* Δ*W*_{on/off} ≤ 5, and 0 *< D* ≤ 0.5 min^{−1}. Each plot in Figure 2(a–d) demonstrates that the posteriors are concentrated within a small interval of the prior support, implying that the parameters of the autonomous model are identifiable from the experimental data, with quantifiable uncertainty.

The sample mean parameter value, calculated from the sample in Figure 2, can be used as a point estimate for the parameter values, *v* = 1.82 µm min^{−1}, Δ*W*_{on} = 1.59, Δ*W*_{off} = 0.25, and *D* = 0.031 min^{−1}. In Figure 2(e–f), we compare the observed trajectories from the autonomous experiment, **x**_{NoEF}, to trajectories simulated from the autonomous model with parameter values given by this point estimate. A comparison between these plots shows that parameter inference based only on the selected four-dimensional summary statistics produces a close match (for this point estimate) between the visual characteristics of simulations and experimental observations.

Figure 2(a–d) quantifies the uncertainty in each parameter value resulting from the Bayesian approach to parameter inference. In order to make sense of this uncertainty in terms of the model outputs, simulations can be used to interpret how the uncertainty propagates to observable behaviour. Figure 2(g–i) depicts an estimate of the uncertainty in (g) the average time a simulated cell takes to polarise, , (h) the average time a simulated cell takes to depolarise, , and (i) the proportion of simulated cells that are polarised at any time, . Each of these distributions are conditioned on the posterior parameter distribution in Figure 2(a–d). This procedure allows us to map quantified uncertainty in the parameter values to uncertainty in cell behaviour. The calibrated model suggests that the expected time for a cell to spontaneously polarise (i.e. without an EF applied) ranges from 22 min to 75 min (5% to 95% quantiles), with median value of 36 min. Similarly, the expected time for a cell to depolarise is 6 min to 21 min, with median value 10 min. Finally, the probability that a simulated cell is polarised (in any direction) at any one time is 0.29 to 0.40, with median value 0.34.

### Three of the four proposed electrotactic effects are supported by the data

Given that the autonomous model can be calibrated to the data set from the autonomous experiment, we now seek to calibrate the full electrotactic model to the entire data set from both experiments. However, some or all of the hypothesised electrotactic effects used to define the model in Eq. (3) may not be supported by the experimental data. Thus, we first use the data to select which of these proposed effects can be detected in the observed cell behaviours. Recall that the parameters *γ*_{1}, *γ*_{2}, *γ*_{3} and *γ*_{4} correspond to four distinct hypothesised electrotactic effects: velocity bias, speed increase, speed alignment, and polarity bias. Positive values of the parameters *γ*, for *i* = 1, 2, 3, 4, mean that the corresponding effect is included in the model. Conversely, setting any of these parameters to zero excludes the corresponding effect(s) from the model. There are a total of 2^{4} = 16 possible combinations of the four proposed electrotactic effects that the model in Eq. (3) can implement, through combinations of positive and zero parameter values.

Each of the 16 possible combinations of the four electrotactic effects corresponds to a subset *X* ⊆ {1, 2, 3, 4}. We evaluate each combination of electrotactic effects, given by *X*, with respect to the objective function, *J*_{µ} (*X*), given in Eq. (4). This objective quantifies the trade-off between the model fit and the number of non-zero parameters in order to select a suitably accurate model while avoiding overfitting. Figure 3 ranks each of the 16 possible combinations of electrotactic effects, *X* ⊆ {1, 2, 3, 4}, using two different objective functions. The top plot considers *µ* = 0, such that the maximiser of *J*_{0} is the combination that gives the best fit to data, with no consideration given to the dimension of parameter space. The bottom plot uses *µ* = 2, which imposes a marginal cost on increasing the dimension of parameter space. Both objective functions are maximised by the subset *X* = {1, 2, 4}. This provides strong support for including the velocity bias, speed increase, and polarity bias effects of the EF in our model, and neglecting the hypothesised effect of speed alignment.

### The electrotactic effects of the EF on motility can be quantified

Recall that cell motility is modelled as the sum of an active force component, deriving from cell polarisation, and a component comprised of other external forces acting on the cell. In the preceding section, we found that a polarised cell applies a greater active force in the presence of an EF (positive *speed increase, γ*_{2} > 0). However, there is insufficient evidence that the increase in this active force varies with the direction of the EF (zero *speed alignment, γ*_{3} = 0). Instead, the observed directional bias in motility in the electrotactic experimental data, **x**_{EF}, is found to arise from a combination of the cell tending to polarise in alignment with the EF (positive *polarity bias, γ*_{4} > 0) and the EF imparting an additional external force on the cell (positive *velocity bias, γ*_{1} > 0). In this section, we quantify the relative contributions of each of these three non-zero effects to the observed electrotactic behaviour.

Bayesian synthetic likelihoods were used to calibrate the electrotactic model by inferring the posterior distribution, *π* (*θ* | **x**_{NoEF}, **x**_{EF}), for
The chosen prior distribution, *π* _{1,2,4}(*θ*), is the product of independent uniform distributions on the intervals 0 *< v* ≤ 5 µm min^{−1}, 0 *<* Δ*W*_{on/off} ≤ 5, and 0 *< D* ≤ 0.5 min^{−1}, multiplied by independent and uniformly distributed priors for the electrotactic parameters on the intervals 0 *< γ*_{1}, *γ*_{2}, *γ*_{4} ≤ 2. The remaining parameter in *θ* is fixed at *γ*_{3} = 0.

Figure 4(a–c) shows three empirical marginals from the posterior sample from *π* (*θ* | **x**_{NoEF}, **x**_{EF}), constructed using Bayesian synthetic likelihoods and SMC sampling. The three marginals shown correspond to the parameters of the three non-zero electrotactic effects, *γ*_{1}, *γ*_{2}, and *γ*_{4}. The posterior marginal distributions of the other non-zero parameters (*v*, Δ*W*_{on/off} and *D*) closely match those in Figure 2, as depicted in the *Supplementary Material*. Similarly to Figure 2, the posterior distribution is concentrated in a small region of the prior domain, providing evidence that each of the new parameters is identifiable using the chosen summary statistics.

The non-dimensional parameters *γ*_{1}, *γ*_{2}, and *γ*_{4} can be interpreted as follows. For parameter *γ*_{1}, which quantifies *velocity bias*, the external force on the cell induced by the EF has magnitude approximately 39% to 65% that of the active force applied by a polarised cell (5% to 95% quantiles), with median value 51%. Similarly, for parameter *γ*_{2}, quantifying the *speed change*, the EF increases the speed of a polarised cell by approximately 9% to 24%, with median value of 16%. Finally, the field is found to induce a bias in cell polarisation towards alignment with the direction of the EF. Let *ϕ* denote the angle between the cell polarity direction and the EF. At stationarity, *ϕ* is distributed proportionally to exp(*γ*_{4} cos(*ϕ*)), with maximum at *ϕ*= 0 and minimum at *ϕ* = *n*. The parameter *γ*_{4} thus determines the *polarity bias* effect towards *ϕ* = 0, and is inferred to lie from 0.18 to 0.72, with median value of 0.49.

The mean of the SMC sample depicted in Figure 4(a–c) can be used as a point estimate for the parameter values: *v* = 1.84 µm min^{−1}, Δ*W*_{on} = 1.51, Δ*W*_{off} = 0.29, *D* = 0.029 min^{−1}, *γ*_{1} = 0.52, *γ*_{2} = 0.16, *γ*_{3} = 0, and *γ*_{4} = 0.47. Figure 4(d–e) compares the data from the electrotactic experiment, **x**_{EF}, against 50 simulations from the electrotactic model, Eq. (3), using this point estimate. The observed bias in motility towards the direction of the EF is reflected in the stochastically simulated outputs. This provides visual confirmation that parameters inferred by Bayesian synthetic likelihood, based on the chosen summary statistics, produce simulated outputs that share observable characteristics with the experimental data.

## DISCUSSION & CONCLUSION

The primary goal of this work has been to use mathematical modelling to quantitatively tease apart the contributions of multiple hypothesised means by which EFs induce electrotaxis in single cells. We have presented an empirical, parametrised, agent-based model of electrotactic cell motility, and shown that it can be calibrated to single-cell trajectory data using likelihood-free Bayesian inference. To our knowledge, although many models of single-cell and collective motility under environmental cues have been developed (13), there have been few mathematical models of electrotaxis (28, 29), and this work is the first use of detailed mathematical modelling at a single-cell level to quantify motility under electrotaxis. Moreover, the inferred parameter values of the calibrated model provide quantitative, mechanistic insights into experimentally-observed electrotaxis.

Specifically, by calibrating the model to experimental observations of electrotaxis in human corneal epithelial cells, we have concluded that the observed bias in motility is the product of three distinct effects of the EF. First, the presence of the EF directly biases the motility of all cells, independently of their polarisation state, in the direction of the EF. Second, polarised cells are more motile in the presence of the EF. Third, cells preferentially break their symmetry to polarise in alignment with the direction of the EF. By carefully calibrating the parametrised mathematical model to experimental data, we have quantified the relative contributions of each of these distinct effects to electrotaxis.

A key strength of the model presented in Eq. (3) is its flexibility. The parametric design means that the Bayesian calibration methodology used in this work can be recapitulated to calibrate the same model to electrotaxis assays using other cell types or with different experimental conditions. Thus, observed differences in spontaneous and electrotactic motility between different cells and experimental conditions (3, 5) can be modelled and predicted within a common parametric framework. It is also important to acknowledge that we have chosen from only four hypothetical observable effects of electrotaxis. Other electrotactic effects may be reasonably included in the modelling process: for example, the EF may induce changes to the rate of polarisation and depolarisation (3). The electrotaxis model can straightforwardly be extended and recalibrated to account for any alternative hypothetical effects.

We have also considered EFs at a single reference strength, requiring a single parameter to quantify each hypothesised electrotactic effect. However, the characteristics of electrotaxis have been observed to vary nonlinearly with EF strength (5). The model is sufficiently flexible to account for this phenomenon through the replacement of the parameters *γ* with functions Г_{i} (*u*) that vary with the EF strength, *u* mV mm^{−1}. The challenge will then be to use experimental data gathered from assays using EFs of different strengths to infer each of the functions Г_{i} in place of each of the parameters *γ*_{i}.

The model we have presented predicts single-cell electrotactic behaviour. However, there is a wealth of data and analysis on electrotaxis in the context of cell populations (3, 4, 6–9, 13). The electrotaxis model in this paper is a starting point for a comprehensive agent-based model that also incorporates phenomena such as volume exclusion, adhesion, elastic collisions, contact inhibition, and so on (13, 30, 31). Multifidelity approaches (27, 32) that can link experiments and information at the single-cell and multicellular level will be vital to identify and quantify the biasing effects of EFs on the collective motility of cell populations (12, 14, 33).

The seven positive parameter values for the electrotactic model were inferred using data generated using two experimental inputs: a zero EF, and a constant EF of magnitude 200 mV mm^{−1}. A fundamental motivation for developing this model is to allow predictions of observed behaviour under different EF inputs, with the ultimate goal of controlling cell motility by designing and applying dynamic EFs. In the *Supplementary Material* we show, using two examples of dynamic EFs, that the calibrated model can be simulated to produce predictions of single-cell electrotaxis under dynamic inputs. The model considered in this paper, and the Bayesian uncertainty quantification of its parameters, are important tools for enabling stochastic model predictive control designs of such policies based on output feedback and filtering (34). We have therefore provided a significant step towards the real-time model predictive control of populations of electrotactic cells.

## AUTHOR CONTRIBUTIONS

The experiments and image analysis were performed by KZ and MZ. The modelling, simulation and inference were carried out by TPP and REB. All authors contributed to writing the manuscript.

## Supplementary Material

### 1 Mathematical model of electrotaxis

The autonomous model of cellular velocity in Eq. (2) is given by
and the electrotactic model in Eq. (3) is given by
Here, velocity is denoted by **v** and cell polarity is denoted by **p**. The vector **u** is the non-dimensionalised EF with magnitude ‖u‖ = *u*, scaled such that *u* = *α* represents a field of strength 200*α* mV mm^{−1}. The two-dimensional standard Wiener process is denoted by **B**, and is the unit vector in the direction of polarity. Both models depend on the parameters *v*, with units μm min^{−1}, and *D*, with units min^{−1}. Thus **p** is a non-dimensional quantity. The additional parameters, *γ*_{1}, …, *γ*_{4}, in the electrotactic model parametrise the four hypothesised electrotactic effects, as described in the main text.

Also common to both models is the potential function *W* (**p**). This function is defined to capture the intended features of the autonomous model, namely that cells stochastically, spontaneously switch between polarised and depolarised states, and that the direction of the polarity is uniformly distributed at stationarity. Denoting *p* = |**p**|, it follows from the latter requirement that the potential function *W* (**p**) = *W* (*p*) must be radially symmetric. The interpretation of the parameter *v* as the modal speed of a polarised cell also implies that the polarised and depolarised states are characterised by **p** stochastically switching between the regimes *p* ≈ 0 and *p* ≈ 1. We therefore require a potential function with local minima at *p* = 0 and *p* = 1. We also require both a local maximum at for and *W* → ∞ as *p* → ∞, for these two minima to define two ‘wells’ where **p**(*t*) is found with the highest probability. Following [11], this function is implemented as
where the parameter values and *β* > 0 define the local minimum values of the wells at *p* = 0 and *p* = 1. It can be shown [17, 18] that the rates at which the polarity stochastically switches between the two wells are determined solely by the timescale parameter, *D* min^{−1}, and the non-dimensional values of the two *energy barriers* of the potential function,
which represent the changes in potential, *W*, between the minima at *p* = 0 and *p* = 1 and the local maximum at These parameters are sufficient to specify *β* and in Eq. (S1), and thus uniquely determine the potential function, *W*. Hence, we calibrate the models in Eq. (2) and Eq. (3) by inferring the common parameters, *v, D*, and Δ*W*_{on/off}, together with the parameters *γ*_{1}, …, *γ*_{4} specific to the electrotactic model.

#### Note on polarity definition

Our description of the model interprets the variable p as the cell polarity, and treats velocity as the combination of a polarity component and a component due to the EF. Another interpretation of p is available if we specifically define single-cell polarity as the non-dimensionalisation of the velocity by *v*. In the electrotactic model, this alternative definition identifies cell polarity as the variable
The variable **p**, with dynamics (3d), is then interpreted as a slowly-responding component of the cell polarity (in the alternative definition) to the EF input, while *γ*_{1}**u**, identifiable with *velocity bias*, is an instantly-responding component of the cell polarity. However, these definitions are internal to the model, in the sense that they have no effect on the observable position or velocity of simulated cells. Thus, in the current work, we choose to identify ‘cell polarity’ as the modelled variable **p**, while noting that alternative interpretations are possible.

### 2 Likelihood-free Bayesian inference

The Bayesian inference framework uses the experimental data, x_{NoEF} and x_{EF}, to update a prior distribution, *π*(*θ*), into a posterior distribution, *π*(*θ* | x_{NoEF}, x_{EF}), by multiplying by the *likelihood*, ℒ (x_{NoEF}, x_{EF} | *θ*), according to Bayes’ rule,
To define the likelihood, we first consider simulations of the models in Eq. (2) and Eq. (3).

For a given parameter vector, *θ*, initial polarity, **p**_{0}, and non-zero EF input, **u**(*t*), the model in Eq. (3) is simulated and a trajectory, *ω* = (**p**(*t*), x(*t*))_{t≥0}, is produced. This stochastic trajectory has conditional density *p*(*ω* | *θ*, **p**_{0}, **u**(*t*)). We assume that there is a known distribution, *φ*(**p**_{0}), for the initial polarity: for the inference procedure carried out in the main text, we assume that *φ* is a Gaussian distribution with zero mean and diagonal covariance matrix, with component-wise variances of 0.1. For the two specific experimental inputs, **u**(*t*) ≡ 0 and **u**(*t*) ≡ i, we integrate the density *p* with respect to *φ*(**p**_{0}) and thus define two densities,
for trajectories simulated by the autonomous and electrotactic models, respectively. Each observed trajectory in the experimental data set, x_{NoEF,i} and x_{EF,i}, thus defines a set in the simulation space,
of all simulated trajectories that are indistinguishable from the observed data. We thus define the likelihoods of each simulation as
for the cell indices *i* = 1, …, 50. The likelihoods of each trajectory thus combine to give the posterior,
However, it is clear that the likelihood of each of the experimentally observed trajectories cannot easily be calculated. We therefore identified the posterior parameter distribution using a likelihood-free (i.e. simulation-based) Bayesian inference approach, harnessing the concept of *synthetic likelihoods*.

#### 2.1 Synthetic likelihoods

We focus on the autonomous case first; the electrotactic case follows in exactly the same way, albeit with an obvious change of notation. The synthetic likelihood approach approximates the likelihoods, ℒ_{NoEF}(x_{NoEF,i} | *θ*) for *i* = 1, …, 50, in two stages. The first stage is to reduce the dimension of the data space by defining a function of the simulated and observed trajectories that maps the data to a low-dimensional summary statistic. The second stage is to (a) use repeated simulation of the summarised model at the parameter value *θ* to fit an empirical multivariate Gaussian distribution for the summary statistic, and then (b) to approximate the likelihood with the *synthetic likelihood* of the experimental data, defined as the likelihood of the summarised data under the fitted empirical Gaussian distribution.

We define the function *Y* : *ω* ↦ ℝ^{4} as:
for sample time points *t*_{j} = 5*j* min. Thus, the entries of *Y* (*ω*) denote the random values of

the net displacement,

the mean and standard deviation of the displacements over five-minute intervals,

and the angle between the final position and the positive

*x*axis,

for stochastic simulations *ω* of the electrotactic model in Eq. (3), given *θ*, **p**_{0}, and **u**(*t*). Note that we can also calculate the values of the function *Y* in Eq. (S6) for the experimentally observed data, x_{NoEF,i} and x_{EF,i}, for *i* = 1, …, 50. With a slight abuse of notation, we denote the resulting summarised experimental data by *γ*_{NoEF,i} = *Y* (x_{NoEF,i}) and *γ*_{EF,i} = *Y* (x_{EF,i}), respectively.

For a given value of *θ*, the synthetic likelihood approach [21–23] assumes that the random value of *Y* (*ω*) under the density *p*_{NoEF,i}(*ω* | *θ*) is a Gaussian random variable with parameter-dependent mean *µ*_{NoEF}(*θ*) and covariance Σ_{NoEF}(*θ*). We estimate this mean and covariance with the sample mean and covariance of simulated summary statistics *Y* (*ω*_{k}), for *k* = 1, …, *n*, produced by simulating the autonomous model *n* times using the parameter value *θ*. The resulting approximation of each trajectory’s likelihood, , is summarised as
where 𝒩 denotes the Gaussian density and where the chosen number of simulations, *n*, needs to be appropriately large [22]. In our case, we choose *n* = 500.

Finally, with the appropriate adaptation of the procedure above to also apply to the electrotactic model, we can multiply each these trajectory synthetic likelihoods into an overall synthetic likelihood for the experimental data,
each calculation of which requires *n* simulations of the autonomous model and *n* of the the electrotactic model.

#### 2.2 SMC and sequential inference

In order to produce a sample from the posterior distribution, we use sequential Monte Carlo (SMC) with synthetic likelihoods [21-27], as outlined in Algorithm 1. This method is chosen in order to exploit parallelisation, miti-gating the computational burden of MCMC-based approaches that is incurred due to the large numbers of model simulations required for accurate likelihood-free inference. SMC defines a sequence of intermediate importance distributions that evolve towards the target posterior. This approach is particularly useful in comparison to naive rejection sampling: since we will use non-informative priors, rejection sampling is too inefficient, as it proposes parameters in extremely low-likelihood regions of parameter space too frequently.

In Algorithm 1 we produce a weighted sample from the Bayesian synthetic likelihood approximation to the posterior, The intermediate distributions at each iteration are proportional to the tempered distributions

where the sequence of temperatures (*T*_{1}, *T*_{2}) evolves from (0, 0) to (1, 1) such that first *T*_{1} increases to 1 with *T*_{2} held at 0, and then *T*_{2} increases to 1 with *T*_{1} held at 1. In Algorithm 1, we define *K*(· | *θ*) to be a multivariate Gaussian density with mean *θ* and diagonal covariance matrix, with component-wise variances of 0.001. The effective sample size, *ESS*, used to adaptively choose the increment in temperature, is defined as
for any finite set of sample weights, *W*_{i}.

Note that, due to the sequence in which the intermediate distributions are produced, we can terminate Algorithm 1 early, where *T*_{1} = 1 and where *T*_{2} = 0 (i.e. at line 13). The sample resulting from this early termination is a weighted sample from the intermediate distribution,
which approximates the posterior *π*(*θ* | x_{NoEF}) conditioned on the autonomous experiment alone. The results depicted in Figure 2(a–d), in the main text, are the result of such an early termination. The covariance structure of this sample is depicted in Figure S1.

The intermediate sample was used as a common starting point for sixteen subsequent runs of Algorithm 1 for each of the priors *π*_{X}, all starting at line 14 of Algorithm 1 with *T*_{1}= 1 and *T*_{2} = 0 and evolving to *T*_{1} = *T*_{2} = 1. The output of the completed algorithm, for the prior *π*_{X} using the subset *X* = {1, 2, 4}, is depicted in Figure S2. The comparison of the marginals of the common parameter set, *v*, Δ*W*_{on/off}, and *D*, between the early termination and the completed algorithms is given in Figure S3.

### 3 Simulated behaviour from dynamic inputs

#### 3.1 Summary statistics

Recall that the polarity, **p**(*t*), evolves randomly from initial value **p**_{0}. We will use the polarity, **p**(*t*), to define four possible cell states: depolarised, denoted Ω_{0}; polarised in the positive *x* direction, denoted Ω_{+}; polarised in the negative *x* direction, denoted Ω_{−}; and polarised perpendicular to the *x* axis, denoted Ω_{⊥}. We further coarse-grain the polarity by defining a cell as polarised, denoted Ω_{1}, if it is not depolarised. Here, the sets Ω_{⋆} are defined by the following partition of the state space of polarity vectors, **p** = [*p*_{x}, *p*_{y}], such that
where and is the polarity threshold defined by the energy barriers, Δ*W*_{on/off}, according to Eq. (S2). These four coarse-grained states are depicted in Figure S4.

We use the following summary statistics, defined by these coarse-grained polarisation states, to analyse model simulations, *ω* = (x(*t*), **p**(*t*))_{t≥0}. Each summary statistic condenses *ω* into a time or a binary value. We first define the *hitting times, T*_{⋆}(*ω*), as the earliest time *t* ≥ 0 at which **p**(*t*) ∈ Ω_{⋆}, which may be zero if p(0) ∈ Ω_{⋆} for the given *ω*. Thus, *T*_{0} is the first time at which the simulated cell becomes depolarised. Similarly, *T*_{+} is the first time at which the simulated cell becomes polarised in the positive *x* direction, and so on. For the fixed time point, *T*, we also define the binary indicator Π_{T} (*ω*) to take the value 1 if the cell is polarised at time *T* (i.e. if **p**(*T*) ∈ Ω_{1}), and 0 otherwise. Finally, we define the binary indicator *P* _{⊥→−}(*ω*) to take the value 1 if the cell is polarised perpendicular to the *x* axis *before* it is first polarised in the negative *x* direction (i.e. if *T*_{⊥}(*ω*) *< T*_{−}(*ω*)), and 0 otherwise. The resulting summary statistics are given by
Note that, unlike the summary statistics, *Y*, defined in Eq. (S6), we cannot apply these functions to the experimental data since cell polarity cannot be directly measured.

Finally, each of the summary statistics can be averaged across many simulations: the averaged value is notated with a bar, to give the conditional expectation of the summary statistic for a given parameter value and for a given initial condition (or distribution of initial conditions). Thus is the average time a simulated cell takes to depolarise for parameter values *θ* and initial polarity value **p**_{0}, and so on. Note that is then the probability that a simulated cell is polarised at time *T*. Similarly, is the probability that a simulated cell is polarised perpendicular to the *x* axis before first being polarised in the negative *x* direction. Thus, posterior uncertainty in *θ* propagates to uncertainty in the conditional expectations, allowing us to interpret parametric uncertainty in terms of simulated model outputs.

#### 3.2 Simulation results

We simulated the model under two new dynamic inputs: a *switching* field, u_{switch}(*t*), and a *stopping* field, u_{stop}(*t*). For 0 ≤ *t* ≤ 90 min, both inputs apply a DC EF of magnitude 200 mV mm^{−1} in the positive *x* direction. The switching field, **u**_{switch}(*t*), reverses this field over 90 *< t* ≤ 180 min, by applying a 200 mV mm−1 DC EF in the negative *x* direction. In contrast, the stopping field, **u**_{stop}, removes the field over 90 *< t* ≤ 180 min.

##### 3.2.1 Point estimate

Five hundred simulations of the electrotactic model in Eq. (3) were run under each input, **u**_{switch} and **u**_{stop}. The parameters used in these simulations were the point estimates given by the empirical mean of the posterior sample in Figure S2, *v* = 1.84 μm min^{−1}, Δ*W*_{on} = 1.51, Δ*W*_{off} = 0.29, *D* = 0.029 min^{−1}, *γ*_{1} = 0.52, *γ*_{2} = 0.16, *γ*_{3} = 0, and *γ*_{4} = 0.47. The results of these simulations are depicted in Figures S5 and S6. For the switching input, u_{switch}, the ensemble average position in Figure S5 shows clear migration from left to right in the first 90 minutes, which then reverses direction for the second 90 minutes. In contrast, the ensemble average position for the stopping input, u_{stop}, moves much less in the second 90 minutes. Note that the small number of individual trajectories depicted in Figure S5 illustrate that the underlying behaviour of each agent is highly stochastic, and that the ensemble average behaviour is not reflective of each individual cell’s trajectory.

Beyond predicting directly observable behaviour (i.e. cell position), the model also enables us to analyse the internal polarisation state of the cells, which cannot be as easily observed. For the 500 simulations under each dynamic EF, the fraction of simulated cells with polarity in each of the four coarse-grained states shown in Figure S4 was recorded. The trajectories of these proportions are shown in Figure S6 for each of **u**_{switch} and **u**_{stop}. Under the given point estimate of the parameter values, by the switching/stopping time at *t* = 90, over 50% of cells are depolarised. Approximately 20–25% of cells are polarised in alignment with the EF, a similar number are polarised perpendicular to the field, and the remainder are polarised counter to the field.

After the field switches direction for *t* > 90, as shown in the top plot of Figure S6, there is little change in the proportion of cells that are depolarised, or polarised perpendicular to the *x* axis. However, over the subsequent 90 min, the distribution of cells in each state evolves to a new stationary distribution. The proportion of cells polarised in alignment with the new EF (i.e. in the negative *x* direction) increases, and the proportion of cells polarised counter to the new direction decreases. In contrast, for the EF **u**_{stop}, the distribution evolves over the subsequent 90 min horizon to a new symmetric stationary distribution, with roughly equal proportions polarised in the positive and negative *x* directions, with a slightly higher proportion of depolarised cells.

#### 3.2.2 Bayesian parameter uncertainty

The simulated dynamics in Figure S5 and Figure S6 were generated using a point estimate of each of the seven positive parameter values, and setting *γ*_{3} = 0. However, the output of the Bayesian parameter inference procedure is an empirical sample, depicted in Figure S2, which reflects the Bayesian posterior uncertainty in these seven positive parameter values. Similarly to the analysis of the autonomous model, simulations can be used to interpret how this uncertainty propagates to uncertainty in the cell’s simulated behaviour. Figure S7 depicts an estimate of the uncertainty in (a) the average time taken for a cell to depolarise, the average time taken for a cell to be polarised in the negative *x* direction, , and (c) the probability that a cell is polarised perpendicular to the *x* axis before becoming polarised in the negative *x* direction, . These posterior predictive distributions are constructed assuming a cell is initially polarised in the positive *x* direction, and for the value of the EF input over *t* > 90; that is, for **u** = −**i** in the case of **u**_{switch} and **u** = 0 for **u**_{stop}.

We observe that the uncertainty in the expected time taken for cells to depolarise, , is similar under both EFs: from 5.8 min to 25.2 min for the switched input (median value 10.8 min), and from 6.9 min to 28.5 min for the stopped input (median value 12.5 min). However, the distribution of values for shows that cells under the switched field are significantly quicker than under the stopped field to reverse their polarisation to align with the negative *x* axis. The expected time for a cell to reverse its polarisation under the switched field is 51 min to 227 min, with median value 93 min, while under the stopped field the expected time a cell takes to reverse its polarisation is 84 min to 346 min, with median value 147 min.

We observe in Figure S6 that the distribution of cells in each of the coarse-grained polarisation states reaches its new steady state within approximately 30 min. This is notably faster than the timescales, shown in Figure S7, of individual polarised cells switching their direction of polarity. This is likely due to the fact that the majority of cells at *t* = 90 are *not* actually polarised in the positive *x* direction, and these are therefore more able to quickly respond to the switch in the EF. In contrast, those cells that are polarised in the positive *x* direction are relatively slower to reverse the direction of their polarity.

Finally, an important experimental observation is that, in reversing the direction of motility under a switched input, many cells transiently travel perpendicular to the field direction [4, 8]. The value of depicted in Figure S7, gives the probability that a simulated cell is polarised perpendicular to the *x* axis before reversing polarity from the positive to negative *x* direction. Under the switched input, 77% to 88% (median value 82%) of simulated cells demonstrate this behaviour. Thus, simulations from this model replicate a characteristic feature of the cellular response to dynamic EFs, without this feature being explicitly specified in the model’s design or used to calibrate the model’s parameters.

## ACKNOWLEDGMENTS

The experiments in the Zhao lab were supported by the AFOSR-MURI grant FA9550-16-1-0052 and NIH grant 1R01EY019101. TPP and REB are supported by BBSRC through grant BB/R000816/1, and REB is supported by a Royal Society Wolfson Research Merit Award.