Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

< Back to Article

Fig 1.

Models of animal motion and inference of model parameters.

(A) The hybrid model consists of stochastic switching between the behavioral states (denoted as A, B, C) combined with the deterministic laws of motion for each state. When the behavioral states, laws of motion for each state, and the transition rates among them are known, the sample trajectories can be obtained by a stochastic simulation algorithm (i.e., the Gillespie algorithm). However, if the measured animal trajectories can be classified into the known behavioral states but the laws of motion and transition rates are unknown, this leads to an inference problem for the unknown transition rates. (B) Standard models, e.g., the zonal models [5] and the force-field models [4], do not capture discrete stereotyped behaviors and assume a single, universal computation carried out by each animal at every instant to determine the animal’s motion. The bottom subpanel of (B) is reproduced from [4], supporting information.

More »

Fig 1 Expand

Table 1.

Abbreviations and notation.

More »

Table 1 Expand

Fig 2.

Dependence of behavioral transition rates on z using different representations of position.

(A) The simplest way to approximate a transition function without any further assumptions on its shape is to discretize it using equidistant binning. This represents the rates using a linear combination of tiling functions φi, which have value 1 in a narrow region of the position space and 0 otherwise. The multiplicative constants αi, that are inferred in our approach, then determine the shape of the transition rate function. We choose non-overlaping tiling regions which cover the whole position space. Smaller size of the tiling regions leads to a more accurate approximation of the transition rate dependence on the position variables but requires more data for inference. (B) In this example, the rates are expanded into a linear combination of Gaussian bump functions that tile the domain. This enforces the smoothness of the rate at the spatial scale that corresponds to the width of the Gaussians. (C) An example of tiling functions for representing the rate on the 2D domain. In contrast to (A), here the bin sizes are not chosen uniformly.

More »

Fig 2 Expand

Fig 3.

Examples of animal motion studied in this paper.

The examples vary in complexity, in the dimension of the physical / behavioral space, and in the number of interacting individuals. (A) Single ant or several interacting ants with three behavioral states moving in 1D. (B) Bacteria climbing a chemical gradient in 2D using a run-and-tumble motion. The position space is three dimensional (two spatial coordinates plus the direction). The “tumble state” in which bacteria perform directional random walk is a compound state constructed from quick random switches between “tumble right” and “tumble left” states with deterministic laws of motion. (C) Two tracked interacting zebrafish moving in 2D in a shallow water tank. The motion can be split into three kinematic states (shown later): the passive state in which fish does not actively contribute to the motion, and two active states (left/right) where the action of fish results in positive acceleration and change of direction to either left or right direction. The rates of switching between the three kinematic states are assumed to depend on up to three kinematic variables.

More »

Fig 3 Expand

Fig 4.

Motion of a single ant on a line.

(A) Animals switch between three behavioral states: STOP (gray), UP (blue), and DOWN (red). The transition rates have a form with , , and . A short segment of a sample stochastic trajectory, following Eq (10), is shown together with instantaneous transition rates from the current state. (B) Because tiling functions are used to represent position, the sufficient statistics for the inference are conditional histograms. The first row shows the histograms of the position given behavioral state during the whole simulation. Second row shows the number of transitions from a given behavioral state in each bin. Since from each state transitions can happen into two other states, each of the panels in the second row shows two (almost identical) histograms that correspond to two different color-coded target states. (C) Inferred transition rates (dots; color denotes the target state) from the simulated stochastic trajectories (100 trajectories for t ∈ [0, 500]), compared with the exact transition rates (solid curves; color denotes the current state). Since each state can transition into two other states, the inference provides separate estimates for each transition, shown as two sets of dots of different color. The true rates for two target states are equal.

More »

Fig 4 Expand

Fig 5.

Two interacting ants.

The ants follow dynamics of Eq (10) where the stochastic switching between the states follows transition rates with and the same as for the single ant in Fig 4 and the interaction strength . The interaction with a kernel ψ(d) = ed2 modulates the rates multiplicatively by a factor which increases all transition rates when ants are close to each other and leaves them unchanged when they are sufficiently distant. (A) Short stochastic simulation of two interacting ants, showing also the instantaneous transition rates from the current state. The interaction modulating factor exp(0.5ψ(d)) is shown together with other transition rates (green) using the same axis. (B) The first and the second rows show the inferred transition rates (dots) for the parameters α(1) and α(2), respectively, compared with the exact rates (solid curves). The inference is based on 500 simulated trajectories, each for T ∈ [0, 500]. We used the tiling functions in the z and Δz = znzn space and a penalization function of the form to enforce vanishing interaction outside of the range |Δz| > 2. Penalization term also avoids a degeneracy of the rates, ensuring existence of a unique solution of the inference problem.

More »

Fig 5 Expand

Fig 6.

Bacterial chemotaxis.

Bacteria execute run-and-tumble motion to climb the chemoattractant gradient (here, in the direction φ* = 0), starting at a random position within the red region. We assume the following transition rates: λ(xrunxleft/right) = exp(αR + βf(φ)), λ(xleft/rightxrun) = exp(αL), λ(xleft/rightxright/left) = exp(αLR), where αR = αL = αLR = log(0.3), β = 3, v = 2, ω = 1. The constants β, v, and ω represent the strength of the chemical gradient, the speed of the bacterium in the run phase, and the angular velocity of the bacterium in the tumble state, respectively. The transition rate from the run state depends on the internal angle of the bacteria through a response function f(φ). For simplicity we take f(φ) = 1 + cos(φφ* − π), which is maximal for an angle antiparallalel to φ*, where φ* determines unobserved location of the source of chemoattractant. (A) Individual trajectories of a run-and-tumble bacterial motion in a chemical gradient simulated by a random switching between three deterministic behavioral states (run, tumble left, tumble right), following the dynamics of Eqs (13) and (14). At right, exact transition log-rates are shown for three different cross-sections in the position space: (φ, 10, y), (φ, x, 0) and (0, x, y). (B) Transition (logarithmic) rates inferred from the simulated trajectories (2000 trajectories that start at location x = 0) assuming a model with three deterministic states. (C) Inferred transition (logarithmic) rates for the coarse-grained model of bacterial chemotaxis with one stochastic, compound “tumble” state. Regions poorly sampled by simulated trajectories are shown in white. The colorscale ranges between [αR − 1, αR + 2β + 1], where αR and αR + 2β are the minimum and the maximum of the true log-rates.

More »

Fig 6 Expand

Fig 7.

Motion of two fish in a circular shallow water tank.

(A) Each fish is characterized by a position (x, y), velocity v, orientation θ and acceleration a. (B) Diagram of behavioral state transitions for the two fish with interaction. (C-D) A time window of length 1000 s shows the velocity and orientation of one fish (second fish not shown) from the data in [12]. The trajectory shows alternating regions of acceleration (blue = turning left, red = turning right) or deceleration (no shade), consistent with the states marked in B. (E) Velocity traces in the accelerating phase (data from C), shifted to the same initial value, have a sigmoidal functional form. Acceleration can be fitted empirically to a quadratic function, d|v|/dt = −a|v|2 + b|v| + c where . This is shown in (F) for data containing 3000 accelerating intervals. Data from each accelerating window (dotted green) is fitted separately and then shifted and rescaled to a normal form |a| = −|v|2 (black). (G) Passive state shows an exponential decay of the velocity due to friction, evident by rescaling decelerating trajectories to the same initial value and plotting them on a log-linear scale.

More »

Fig 7 Expand

Fig 8.

Transition rates inferred from tracked zebrafish data for the model with three kinematic variables.

Transition types are indicated in column headings. For each transition type, λ(ss′), from state s to s′, the rates are shown by color intensity (colorbar on top), as a function of mutual distance u3 (horizontal axis), velocity magnitude u1 (vertical axis) and wall distance u2 (three rows, see legends at left). We used bin centers {1, 3, 5, 7} for the velocity magnitude u1, bin centers {−3, −1, 1, 3} for the mutual distance u3 and the wall distance is split to three bins: u2 ∈ [−2, 0), [0, 2], and |u2| > 2. The rates were inferred jointly from two experiments, each with two fish; the rates were assumed to be the same for all the fish.

More »

Fig 8 Expand

Fig 9.

Model comparison.

Seven models (sorted into the “high complexity” model M7 with 3 variables, three “medium complexity” models (M4–M6) with 2 variables each, and 3 “low complexity” models (M1–M3) with one variable each) are compared in terms of their log-likelihood on training (blue) and testing (red) data. The data used in Fig 8 was split into segments of 10 s, containing on average 35 state transitions, for a total of 180 segments. These segments were then randomly assigned to a training and testing set, with probabilities 0.75 (training set) and 0.25 (testing set). The transition rates were inferred from the training set and tested on the testing set. We generated in total 200 random assignments. Bars are averages over sample sets ± standard error.

More »

Fig 9 Expand

Fig 10.

Accuracy of the inference on sampling frequency.

Two interacting ants are simulated according to the same model as in Fig 5 for t ∈ [0, 10 000]. The numerical integration of the dynamical equations uses an adaptive time step with a mean 〈Δt〉 = 0.0795. The data are re-sampled by taking every k-th datapoint, for the purpose of error sensitivity analysis. The error is defined as the mean difference between the real and inferred coefficient, (analogous for β). The average is taken only for z, dz ∈ [−2, 2], where enough data are available. (region of no regularization). (A) Error in coefficients α and β inferred from the simulation in t ∈ [0, 10 000] and different sampling rates, 〈Δt〉 = 0.0795k. (B) Error in coefficients α and β inferred from the simulation in t ∈ [0, 10 000k] and different sampling rates, 〈Δt〉 = 0.0795k.

More »

Fig 10 Expand

Fig 11.

The solution of the system (20) and (21) at times t = 0.25, 0.5, 1, 20 for parameters ω = 1, γ = 2, φ0 = 3π/4.

We have used an upwind method that replaces the spatial derivatives of u and v using a backward and forward finite differences, respectively and the temporal derivative by a forward difference. This method is stable for that we ensure by choosing .

More »

Fig 11 Expand