ExTrack characterizes transition kinetics and diffusion in noisy single-particle tracks

Simon et al. present ExTrack, a tool to characterize single molecules from single-particle tracking. Using a probabilistic approach, ExTrack accurately characterizes different motion states, extracts state-duration histograms, and estimates single-molecule states, even in previously intractable cases of high noise and frequent state transitions.

Molecules often transition between different motion states.If transitions happen rarely and if trajectories are long, different states such as immobile or diffusive states are reliably detected from time-averaged quantities such as the mean-squared displacement (Michalet, 2010;Elliott et al., 2011;Bosch et al., 2014;Hansen et al., 2018).However, molecules often undergo rapid transitions between different states (Martens et al., 2019;Callegari et al., 2019;Pierobon et al., 2009).Furthermore, tracks are often short as particles can bleach or diffuse out of the field of view or focal plane (Hansen et al., 2018).In such situations, probabilistic methods are better suited to determine global parameters such as diffusion coefficients and transition rates (Dempster et al., 1977;Persson et al., 2013;Meent et al., 2013;Calderon, 2014;Slator et al., 2015;Monnier et al., 2015;Smith et al., 2019;Falcao and Coombs, 2020;Karslake et al., 2021;Vink et al., 2020a;Rahm et al., 2021).Some of these methods can also predict the motion states of individual molecules at every time point (Persson et al., 2013;Monnier et al., 2015;Briane et al., 2020;Rahm et al., 2021), which can reveal the locations of binding sites, spatial correlations, and complex, potentially non-Markovian dynamics (Mahmutovic et al., 2012).
Previous probabilistic methods for diffusive models shown to correctly estimate diffusion and transition parameters (Persson et al., 2013;Vink et al., 2020a) are based on absolute distances between subsequent localizations.These methods have been developed for situations where physical displacements are large in comparison with the localization uncertainty for each molecule.However, when molecules transition rapidly between states, high time resolution is needed, which results in small physical displacements, which, in turn, make identifying different motion states hard or impossible (Fig. 1,  a-c).On the contrary, the whole track still allows the distinction of states (Fig. 1 a), simply because subsequent positions of immobile or slowly diffusing molecules fall in the same small area determined by localization error, while subsequent positions of fast-diffusing molecules are nearly uncorrelated.
To account for those spatial correlations, the full sequence of track positions must be taken into account.This approach has been used to characterize a single population of diffusing molecules (Berglund, 2010;Relich et al., 2016).However, if molecules transition between states, this approach becomes computationally demanding because all possible sequences of single-molecule states need to be considered.To avoid this computational complexity, different mean-field approximations (Calderon, 2014;Slator et al., 2015;Bernstein and Fricks, 2016;Lindén et al., 2017;Lindén and Elf, 2018) and machine-learning approaches (Kowalek et al., 2019;Chen et al., 2021) have been proposed.However, their performance across model parameters remains to be investigated.
Here, we propose an alternative probabilistic method to extract diffusive motion states and transitions: We tackle the combinatorial problem of different motion states by introducing a sliding window approximation that maintains the most important spatio-temporal correlations.The method is fast and accurate for a large range of parameters, even if physical displacements are similar to the localization error.The method is also robust with respect to deviations between data and model assumptions.Additionally, the method annotates the state probabilities at the single-molecule level, refines localizations (Lindén and Elf, 2018), and extracts distributions of state durations.We demonstrated its versatility by analyzing two bacterial membrane proteins that diffuse slowly and transition rapidly between immobile and diffusive states.

Results
ExTrack is a maximum-likelihood method to detect different diffusion states in single-molecule tracks We developed ExTrack, a maximum-likelihood estimation (MLE) method that contains two main modules: A fitting module fits a multi-state Markovian diffusion model to a data set of noisy single-molecule tracks.This module infers global model parameters including localization error, diffusion lengths, transition rates, and the initial fractions of molecules (at the first time point of all tracks).Part of these global parameters can also be provided by the user, and localization error can even be provided for each peak (Thompson et al., 2002;Quan et al., 2010) if desired.ExTrack is flexible in terms of the number of states and spatial dimensions.Additionally, it can explicitly consider molecules leaving the field of view, which otherwise introduces bias (Hansen et al., 2018).Based on global parameters, a single-molecule annotation module then estimates state probabilities for molecules to reside in each state at each time point.To characterize single-molecule tracks further, we developed two additional modules: A position-refinement module refines molecule positions by taking advantage of spatial correlations between subsequent localizations, conceptually similar to Lindén and Elf (2018).This feature allows to maintain high temporal resolution for state transitions, while attaining high spatial resolution for immobile molecules.A fourth module produces histograms of state durations to reveal potential non-Markovian transitions.
ExTrack is based on a Hidden Markov Model (HMM) that approximates a continuous-time process by a discrete-time Markov model (Das et al., 2009).The method calculates the probability density of observing each track given a set of global parameters (Lindén et al., 2017).In principle, this calculation requires to integrate the joint probability density of states, real positions, and observed positions over all possible sequences of hidden diffusive states and over all sequences of hidden real (physical) molecule positions (see Materials and methods, Ex-Track fitting module).This integration can be performed analytically by computing the sequences μ and s (Eq.6, Materials and methods).However, this problem is computationally intractable for long tracks: Indeed, the computation time scales with the number of possible sequences of states which increase exponentially with the number of time points.To reduce the computation time, we took advantage of the fact that the real position at a given time step is little influenced by the actual state several time points away.This allows us to introduce a sliding-window approximation that greatly limits the computation time of ExTrack.More specifically, when recursively computing the probability density of observing a track, we need to consider all possible combinations of states up to the current time point of the integration.To save computational time, the window method averages over different sequences of states outside of the sliding window, while explicitly considering different combinations of states within the window (see Materials and methods, Using a window...).Choosing the window length is a compromise between accuracy and speed.We suggest using a window length of 3 to 7 depending on the expected diffusion lengths.We will show later that a window length of 3 can be sufficiently large if the ratio between diffusion length and localization precision is greater than about 2.
In many HMMs, it is assumed that state transitions can only occur at the time points of the measurement (Das et al., 2009).However, this approximation introduces a bias toward higher fractions of fast diffusing molecules.Instead, we assume state transitions to occur at the middle of steps (see Materials and methods, Parameter fitting...).Additionally, ExTrack can consider sub-steps to further reduce bias at high transition rates.
ExTrack is available both as a Python library (Simon, 2022) and as a TrackMate module (Ershov et al., 2022) on Fiji.
Performance and comparison to alternative methods First, we tested the performance of the ExTrack fitting module by applying it to computationally simulated noisy tracks of molecules (10,000 tracks of 10 positions each, if not stated otherwise) that transition between an immobile state (state 0) and a slowly diffusive state (state 1).The latter is characterized by a small diffusion length d 1 = 2 σ, where σ is the localization error (Fig. 1 a).The diffusion length is the typical physical displacement: with D 1 the diffusion coefficient and Δt the time step.Here, we assume symmetric binding and unbinding rates k u = k b = 0.1 Δt −1 .Thus, on average, molecules reside in each state for 10 time steps.
The dimensionless parameter d * 1 d 1 /σ can be regarded as a signal-to-noise ratio.For a typical experiment, with σ = 20 nm and a time step of Δt = 20 ms, a rescaled diffusion length of d* = 2 corresponds to a diffusion coefficient of D 1 = 0.04 µm 2 s −1 , which is representative of typical membrane proteins in vivo (Kumar et al., 2010;Oswald et al., 2016).
ExTrack reliably estimates all global model parameters (Fig. 1 d) despite similar observed distances for immobile and diffusive molecules (Fig. 1 c) and despite a low number of 10 localizations per track.These estimates are robust with respect to the initial parameters (for example, if varying the initial d* between 0.3 and 10).Since molecules are considered at steady state in our example, the initial fraction of immobile molecules is given by F 0 Next, we simulated tracks for a three-state model, with d * 0 = 0, d * 1 = 2, and d * 2 = 5, where transition rates are k i,j = 0.1 Δt −1 for all pairs of states.Fig. 1 e demonstrates that ExTrack estimates global model parameters reliably.If the data contain long enough tracks, ExTrack can also correctly predict two immobile states of different lifetimes and their associated transition rates (Table S1).We will revisit more complex data sets below.
Returning to the simpler two-state model, ExTrack is capable of predicting global model parameters reliably for a large range of model parameters (Fig. 1 f).Predictions are accurate for diffusion lengths as low as the localization error and transition rates as high as 0.5 Δt −1 (for independent variations of k b and k u , see Fig. S1 a).To account for rapid transitions and low diffusion lengths, we employed ExTrack considering two sub-steps and a window length of 10.However, the method predicts parameters almost equally reliably without sub-steps (Fig. S1), or with a smaller window size of 3 (Fig. S1 c) while achieving improved computation time (Fig. S1 d).
Next, we compared ExTrack with the two MLE-based methods, vbSPT (Persson et al., 2013) and anaDDA (Vink et al., 2020b) that use absolute distances between localizations for parameter estimation.While vbSPT uses an HMM for the likelihood estimate (Persson et al., 2013), anaDDA is based on an analytical form of the distributions of apparent diffusion coefficients from short tracks (Vink et al., 2020b).Both methods are restricted to a smaller parameter range than ExTrack (Fig. 1, f and g; and Fig. S2 a) in the tested regime.The errors of parameter estimation by vbSPT are largely due to systematic bias, while the error of anaDDA is predominantly stochastic (Fig. S2 d; Vink et al., 2020b).We also tested a mean-field approximation based on track positions and considering hidden particle positions, the variational method UncertainSPT (Lindén et al., 2017).We found that UncertainSPT performs worse and takes more computation time than ExTrack, anaDDA, or vbSPT (Fig. S2 b).
ExTrack is robust with respect to non-ideal motion properties Single-molecule tracks in real cells often deviate from our basic model assumptions.Here, we investigated three different types of such deviations: (i) variations of diffusion coefficients or localization precision, (ii) finite track lengths due to a finite field of view or focal depth, and (iii) physical confinement.
Diffusion coefficients can show intra-or inter-track variations (Stylianidou et al., 2014;Slator et al., 2015;El Beheiry et al., 2015), for example due to local variations of viscosity (Stylianidou et al., 2014), and localization error can vary, for example if molecules are out of focus.We thus simulated tracks of a two-state model with diffusion coefficients or localization precision drawn from a chi-squared distribution with fixed mean and variable coefficient of variation.First, we show that ExTrack gives very accurate predictions when localization error is specified for each peak instead of being treated as a single global fitting parameter (Fig. S3 a).However, even when no prior information on localization error is given, ExTrack reliably predicts the average model parameters for variations up to 30-50% (Fig. 2 a), in contrast to the distance-based methods anaDDA and vbSPT (Fig. S3 c).Track-to-track variations in diffusion coefficient of similar magnitude (up to about 50%) also do not affect predictions of average parameters (Fig. 2 b).
In situations, where the diffusion coefficient is even more broadly distributed, ExTrack can be used assuming a three-state model followed by aggregation of two diffusive states (Fig. S3 b).We tested this aggregation approach with simulations of one immobile and five diffusive states, mimicking a broad distribution of diffusion lengths and jump distances (Fig. S3 b and Table S2).The aggregated three-state approach reliably quantifies transitions between aggregated states and corresponding state fractions, thus providing a practical approach to the often-encountered difficulty of choosing the right number of diffusive states.
Second, molecules can leave the field of view depending on microscopy modality and substrate geometry.For example, cytoplasmic molecules studied by confocal or epi-fluorescence microscopy diffuse in and out of the focal plane, and proteins embedded or attached to a cylindrical membrane (for example, in bacteria) studied by Total Internal Reflection Fluorescence (TIRF) microscopy leave the illumination field (Fig. 2, c and d).Thus, immobile or slowly diffusing molecules are over-represented among long tracks, which have previously been described as "defocalization bias" (Hansen et al., 2018).We alleviate this bias by taking track termination into account explicitly (Materials and methods, Extension of ExTrack...) similarly to previous approaches (Kues and Kubitscheck, 2002;Hansen et al., 2018).In both free 3D diffusion and diffusion along a cylindrical membrane, ExTrack reliably estimates model parameters as long as the typical dimension (focal depth or width of the field of view) is at least twice the diffusion length (Fig. 2, c and d).
Finally, we tested the ability of ExTrack to analyze tracks of spatially confined molecules, as frequently found in membrane domains or small volumes such as bacteria or intracellular compartments.ExTrack performed robustly as long as confining dimensions are at least two to four times larger than the diffusion length (Fig. 2 e).Interestingly, while the diffusion length is underestimated for confining dimensions smaller than about 4 d, the transition rates are predicted reliably even if the confining box size is as small as 2 d.

ExTrack computes state probabilities at every time point and refines positions
Next, we tested the performance of the single-molecule probabilistic annotation module of ExTrack, which is based on global model parameters and annotates state probabilities for every time point (Bernstein and Fricks, 2016).
Fig. 3, a and b, shows tracks from the simulation of a twostate model with an immobile and a slowly diffusive state (d* = 2).Despite the small value of d*, motion states are reliably estimated in this example.Then, we estimated the predictive power of the probabilistic annotation module by applying it to large sets of tracks with different values of d* (0.5, 1, or 2).As expected, higher d* values result in higher confidence in predicting states (Fig. 3 c).To demonstrate the accuracy of the probabilistic annotation, we confirmed that among all molecules predicted to reside in the diffusive state with probability p 1 , the fraction of molecules actually diffusive also equals p 1 (Fig. S4 a).
Previous methods often classify molecules categorically into the most likely state (Forney, 1973;Persson et al., 2013;Lindén et al., 2017).We used this approach to measure the performance of ExTrack and compare it to previous methods: First, we estimated the accuracy of categorical state annotations depending on the diffusion length and the transition rates (Fig. S4 b).Increasing transition rates led to worse estimates because states are easier to estimate at time points that are distant from transitions (Fig. S4 c).Second, we found ExTrack annotations to be robust with respect to wrongly chosen global parameters (Fig. S4 d).Finally, we found that the ExTrack state annotation module performs better than vbSPT (Fig. S4 e).
Next, we tested the capacity of ExTrack to refine positions by calculating the most likely physical position for each time point., where N is the number of localizations in the immobile segment.This feature allows to obtain accurate positions of molecular binding sites inside cells, while still resolving state transitions dynamics.

ExTrack computes distributions of state durations to characterize transition kinetics beyond the Markov transitions assumption
ExTrack provides a histogram module that generates probability distributions of state durations.Instead of considering only the most likely set of states, ExTrack considers a large number of potential state vectors and weighs them with their corresponding probabilities.To test the histogram module, we first simulated a two-state model with Markovian transitions.The predicted diffusive and immobile state durations are distributed exponentially, as expected, and in agreement with the simulated data (Fig. 3 f).Therefore, any deviation from exponential decay can reveal more complex transition behavior: As an example, we simulated molecules that transition between two immobile states and one diffusive state (Fig. 3  reveals two sub-populations, even though ExTrack considers a two-state HMM model.Our approach thus indicates the presence of a third state, as confirmed by the exponential distributions of state durations after fitting the data to a three-state model (Fig. 3

g).
The histogram approach is also relevant when the transitions are non-Markovian, for example if transition rates are spatially dependent (Mahmutovic et al., 2012;Laurent et al., 2019) or if states have minimum durations.In summary, the histogram module can help identify hidden states or states with non-Markovian transitions and thus guide model choice.

Application of ExTrack to experimental tracks of bacterial envelope proteins
To test our approach on experimental data, we used TIRF microscopy to track single GFP (monomeric super-folder-GFP) fusions to two bacterial membrane proteins in Escherichia coli, each involved in one of the two major pathways of cell-wall synthesis.
First, we studied the cell-wall-inserting penicillin-binding protein PBP1b (Video 1), which was previously described to reside in immobile or diffusive states (Cho et al., 2016;Vigouroux et al., 2020).However, transition rates and potentially hidden  (Vigouroux et al., 2020).However, distributions of state durations obtained through the histogram module suggest the presence of at least two immobile populations with distinct unbinding rates (Fig. 4 c).Since applying ExTrack assuming a three-state model revealed one immobile and two diffusive states (rather than two immobile states, Fig. S5 a), we also applied ExTrack with a four-state model (Fig. 4, d and e; and Fig. S5 a).The four-state model confirmed two diffusive states and two immobile states: Among the immobile states we found a longlived state (lifetime of around 0.5 s) that is highly dependent on expression level (Fig. 4 e), likely reflecting enzymatically active PBP1b, and a short-lived state with a lifetime of about 50 ms, likely reflecting non-specific associations with the cell wall.Thus, PBP1b displays rapid transitions between at least four different states.
Next, we investigated the motion of RodZ, a trans-membrane protein that physically links cytoplasmic MreB-actin filaments to a multi-enzyme complex that inserts new peptidoglycan while continuously moving around the cell circumference over minutes (Van Teeffelen et al., 2011;Morgenstein et al., 2015;Van Den Ent et al., 2010).Here, we studied the motion of GFP-RodZ on short time scales of seconds, where continuously moving complexes appear as immobile (Video 2).Assuming a two-state model, the fitting module reveals that 75% of RodZ molecules are immobile (Fig. S5 b based on rates), with a lifetime of about 0.7 s.This time scale is much shorter than the minute-long lifetime of the rod complex ( Özbaykal et al., 2020;Cho et al., 2016;Van Teeffelen et al., 2011) demonstrating that a majority of immobile RodZ molecules is not stably associated.Instead, these molecules might transiently bind the MreB-actin cytoskeleton.Interestingly, RodZ molecules seem to often unbind and rebind in very close vicinity from the initial binding site (Fig. 4 f).Such behavior would be expected if RodZ could bind anywhere along extended MreB filaments, since filaments constrain diffusion in two dimensions (Fig. 4 g).To test whether proximal rebinding occurs more often than randomly, we compared tracks that were initially bound, then diffusive for four steps, and then either rebound or remained diffusive (Fig. 4 g).Short distances were indeed over-represented among rebinding molecules compared to molecules that remained diffusive (Fig. 4 h).This behavior contrasts with PBP1b, which appears to bind to random sites (Fig. S5 e).The annotation module of ExTrack thus allows us to identify spatial patterns of molecule binding that can be responsible for non-Markovian binding (Mahmutovic et al., 2012).

Discussion
In summary, ExTrack provides a suite of robust tools to characterize single-particle tracks, extracting global model parameters, state probabilities at every time point, refined positions, and histograms of state durations, even if tracks are noisy, transitions are rapid, and tracks deviate from idealized model assumptions.
In tracking experiments, a major challenge is to identify the relevant number of immobile and diffusive states.Multiple previous methods obtain this number automatically (Persson et al., 2013;Meent et al., 2013;Smith et al., 2019;Lindén and Elf, 2018;Karslake et al., 2021).However, at least some of these approaches have been reported to overestimate the number of states (Lindén and Elf, 2018;Vink et al., 2020a;Smith et al., 2019).In more recent approaches, a high number of states are fixed, followed by aggregation into one aggregated immobile state and one aggregated diffusive state, based on a user-defined diffusion-coefficient threshold (Metelev et al., 2022).Here, we propose an alternative and iterative approach to complex tracking data: Data are initially fit to a coarse-grained two-or three-state model that can subsequently be expanded depending on desired variables and fitting results.For example, if one is predominantly interested in the exchange between immobile and diffusive molecules but not in the presence of multiple diffusive states, we propose a coarse-grained two-state or an aggregated three-state model that reliably predicts immobilediffusive transitions, even if diffusion coefficient is variable or if molecules transition between different diffusive states (Fig. 2 b and Fig. S3 b).At the same time, ExTrack can also distinguish multiple diffusive states explicitly (Fig. 1 e).Additionally, the distribution of immobile state durations can reveal the presence of multiple immobile fractions, which can then motivate the increase of the number of states.
The capacity of ExTrack to work with noisy singlemolecule tracks is based on the explicit consideration of all sequences of states within a sliding window when computing the probability of every track, while states outside the sliding window are taken into account through averaging to limit computation time.In the future, this versatile principle can be extended to capture different and more complex dynamics, for example by considering persistent motion (Pierobon et al., 2009;Monnier et al., 2015), anomalous diffusion (Chen et al., 2021), and spatial maps of diffusion coefficients or states (El Beheiry et al., 2015).

Materials and methods
In the following sections, we will describe the ExTrack method with its four different modules: the fitting module, the annotation module, the position-refinement module, and the histogram module.Subsequently, we will describe implementation and computational time, the generation of computationally simulated data sets, the interpretation of results by vbSPT, and the experimental methods.

ExTrack fitting module Introduction
ExTrack fits a multi-state diffusion model to noisy singleparticle tracking data.We assume that tracks come about according to a continuous-time Markov model, where molecules transition randomly between N diffusive states at rates k i .As long as molecules reside in state i, they undergo Brownian diffusion with diffusion coefficient D i .Additionally, observed positions c i are displaced from real positions r i according to a Gaussian distribution f σ (k ir i ), where the SD equals the localization error σ.Here and in the following, f x (y) generally denotes a Gaussian distribution of SD x.The N-state diffusion model is thus characterized by the parameters θ = (σ, D i , F i , k i,j ) for all states i, j 2 (1, …, N).Here, F i are the fractions of molecules residing in state i at the first position of the track.Later, we will introduce additional parameters for additional spatial dimensions and for the treatment of non-constant track lengths.
Parameters are estimated based on an MLE approach, which, in turn, is based on accurately computing f C (C | θ), the probability density of observing a track of positions C = (c 1 , c 2 , ..., c n ).The likelihood of the parameters given the data (θ | all C) then equals the product of f C (C | θ) for all tracks C. By maximizing this function, we can find θ p , the optimal estimator of the underlying parameters.Optimal parameters θ p are found by MLE using the Powell method.ExTrack also allows to fix individual or multiple parameters.This generally speeds up the fitting process and reduces variations in the remaining parameters.In this realm, we also found that fixing the localization error to a slightly wrong value has little impact on the fitting of the other parameters as long as it does not deviate by more than about 20-30%.Here and in the following, we treat localization error as a model parameter, but the user can also provide spot-specific localization errors based on photon counts (Thompson et al., 2002).
In the following sections, we will first compute f C .This calculation is presented in one spatial dimension (1D).However, the model is easily extendable to 2D or 3D due to the independence of the displacements and localization error in each axis, as we will see below.
where we defined the joint probability density function f C,B (C, B | θ) of having C and B given θ.The joint probability density f C,B,R can be decomposed into a product of three terms: the a priori probability of B, the probability density of the physical displacements f R|B , and the probability density of the distances between real position and observed positions f C|R , respectively: Here, the a priori probability of the sequence of states P (B | θ), which we refer to as β for brevity, results from the Markovian processes of transitioning between states (Cox and Miller, 2017).β is obtained as where F b1 indicates the fraction of molecules in state b 1 at time point 1, and where p bi,bi+1 indicates the probability to transition from state b i at time point i to b i+1 at time point i+1.The transition probabilities can be computed from the continuous-time transition rates (see Approximating continuous transitions...).The initial fraction F b1 can either be an independent parameter or constrained by transition rates at steady state (for a two-state model, F 0 k 10 / k 10 + k 01 ( ) ). f R|B is the probability density function of real positions R given the sequence of states B and θ. f C|R is the probability density function of the sequence of observed positions C given the real positions R and θ.
f C|R can be expressed as a product of Gaussian distributions with SD equal to σ: Next, we express f R|B (R | B, θ) as a product of Gaussians: Here, l is the length of the space of real positions.Without any prior on R, we consider the limit l → ∞.However, since l only appears as a constant prefactor, we can ignore it in the calculation of the log likelihood.According to previous suggestions, the width of the distribution δ i should equal the diffusion length corresponding to the current state b i (Das et al., 2009).However, this discretization of the continuous-time Markov process introduces a bias toward diffusive motion.This is easily illustrated in case of an immobile-diffusive model: There, a particle initially immobile starts moving before the first measured time point where the particle is observed to be diffusive.Similarly, it stops moving after the last time point, where it is observed to be diffusive.Then, a model assuming diffusion to only be dependent on the current hidden state will overestimate the time spent in the diffusive state by up to half a step in case of high diffusion.Logically, this results in underestimating the binding rate (Fig. S2 c), immobile fraction, and diffusion length when transitions are frequent.To alleviate this issue, we assume transitions to occur at the middle of two time points.The SD of the probability density function f δ then equally depends on states at each of the two subsequent time points, with This assumption effectively decreases the bias inherent to the discrete approximation of continuous tracks (Fig. S2 c).Later, we will also introduce sub-steps between time points that improve the approximation (see Approximating continuous transitions...).
Taking advantage of the expressions of f C|R, and f R|B, , Eq. 2 becomes Inserting this expression into Eq. 1, we then integrate stepwise over all real positions R = (r 1 , ..., r n ).This allows us to use the recursion principle (Relich et al., 2016) to compute f C,B (C, B | θ): The first step consists in integrating the two Gaussian distributions dependent on r 1 (displacement and localization error terms).This integration results in a Gaussian (constituting a convolution of two independent random variables with Gaussian distributions).For each of the next integrals over r i , we integrate the product of three Gaussian distributions (for the random displacement r i+1 − r i , the localization error r i − c i , and the previous term of the distribution f si−1 ).The result of this integration can be expressed by a scalar K i times a Gaussian distribution f si according to where f si is a Gaussian distribution of SD s i and mean 0. The SD s i and mean μ i can be expressed depending on s i-1 and μ i-1 : The recursion process can then be summarized by the sequences s 1 : s n-1 and μ 1 : μ n-1 which depend on C, B, and θ.At the last step (integration over r n ), we integrate the product of the two remaining Gaussian distributions: the previous term

Extension to 2D and 3D
Since diffusive motion is independent in each spatial dimension, the principle described above for one dimension can simply be extended to two or three dimensions by multiplication of independent distribution functions.For example, in 2D, the function In principle, each axis can have a different localization error and different diffusion lengths for each state.This is especially true for localization in the direction of the optical axis compared to the lateral axes.ExTrack, therefore, allows independent localization errors for each axis.
Alternatively, the user can also provide localization error for each peak, for example using the Cramer-Rao lower bound estimate (Ober et al., 2004;Lindén et al., 2017).Since these and other estimators might underestimate the true localization error, peak-wise localization estimates can also be implemented as scaling factors that are then assumed to be linearly related to the true localization error estimated by ExTrack.assumption that transitions can only occur at the middle of steps, contrary to the continuous-time nature of the underlying physical process.We found that this error could be compensated for by using a slightly different approximation for state transitions p i,j 1 − exp −k i,j Δt À Á .In the limit of small k i, Δt, this approximation asymptotically equals the exact expression P = e GΔt , which also asymptotically equals p i,j = k i,j Δt.We found that ExTrack using the approximate relationship performs better in the case of two-state and three-state models for a large range of transition rates.However, ExTrack (Python version) also allows using the generator-matrix-based relationship if the user desires.
When transition rates are high (when k Δt > 0.4 for the twostate model), our method allows to sub-divide time steps into a number of u sub-steps (where u = 2 corresponds to dividing each step into two).This allows ExTrack to account for multiple transitions and transition times that are different from the midpoints of time steps Δt.To take states at sub-steps into account, we introduce a new state vector ) and new physical positions, that require integration according to Eq. 1.This integration is straightforward: The probability β (Eq.2) is simply replaced by the product of all state transitions between subsequent sub-positions.The probability distribution of real positions (Eq.4) is replaced by the corresponding distribution of sub-positions.Since the physical displacement during Δt is the sum of Gaussian random variables (the sub-displacements), the functional form of Eq. 4 (a product of n−1 Gaussians) can be maintained while replacing the SDs δ i ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi where δ i,k are the corresponding diffusion lengths for the sub-steps.The use of a window length m will allow the user to do accurate computations for m sub-steps.Thus, at a given m, the number of observed positions c considered within the window equals floor(m,u).To consider the same number of observed positions per window, one thus needs to increase the window length.A trade-off between number of states, window length, and number of sub-steps has to be found (see Implementation and computation time).

Extension of ExTrack to consider a finite field of view
Tracks can terminate due to different reasons: photobleaching, diffusive molecules leaving the field of view, or molecules transiently not being detected.The process of leaving the field of view requires diffusive motion.Observation of long-lived molecules within a finite field of view can thus show a bias toward non-moving or slowly moving molecules.An extension of Ex-Track can take this bias into account by explicitly modeling the probability of track termination.We consider two contributions to track termination: first, a constant termination probability p K , which is independently of the motion state.This probability summarizes photobleaching and the probability to not detect a molecule, for example because of low signal-to-noise ratio; second, a probability of leaving the field of view (or observation volume) p L that depends on the diffusion length and the dimensions of the field of view.In the case of a cytoplasmic particle tracked through epi-fluorescence or confocal microscopy, the monitored length is the depth of field (or focal depth).In case of a membrane protein moving around a cylindrical cell imaged in TIRF microscopy, the monitored length is a fraction of the cell diameter (Fig. 2, c and d).
In principle, p L can be calculated depending on the position of the molecule with respect to the boundaries of the field of view.However, we decided to implement an approximate form of p L (δ i ) that does not require this information and instead considers the position of the observed molecule as random inside the field of view.Within this approximation, the probability of leaving the field of view is given by: where F(x) is the cumulative density function of the standard normal law.
We thus modify f C,B,R (C,B,R | θ) in Eq. 2 by multiplication of the left-hand terms with the probability of observing a track of n positions, which is given by:

Annotation module
The annotation module allows to compute the probabilities to be in any state at any time point of all tracks.According to conditional probabilities and results from ExTrack fitting module, we can compute the probability of the sequences of states given the parameters θ for each track C: For a given track C, at each time point i, the probability of the current state b i to be in state s 2 {0, 1} can then be computed by summing over all B with b i = s: The annotation module can also take advantage of the window approximation described in Using a window... to reduce computation time and make the computation tractable in case of long tracks.Since the annotation module does not require parameter fitting and thus many iterations, the window length can be chosen larger than for the fitting module.A large window length is also more important for precise state prediction than for accurate global parameter fitting.

Position-refinement module
ExTrack can improve the estimation of molecule positions based on a track, in particular if molecules move slowly.Positions can be estimated by computing the probability density function of each real positions r i (Lindén et al., 2017).To do so, we compute f C (C | θ) without integrating at position r i .This results in a probability density function f (r i |C, θ) (Fig. 3, d and e), which is a sum of Gaussian functions for each sequence of states.While this probability density can be obtained explicitly, it is much faster to obtain the expected value and SD of the density function.Those values are computed by averaging the parameters of the Gaussian distributions associated with each sequence of states weighted by their respective probability.Like for the fitting method, the window method is applied (see Using a window...).

Histogram module
Computing state-duration histograms allows to assess non-Markovian transition behaviors or to reveal multiple hidden states with different transition rates.For a given state, the resulting rate is then the sum of track-termination rate (bleaching, track termination due to low signal-to-noise ratio, leaving the focal plan) and the transition rates to other states.If the track-termination rate is low, the histogram allows to identify one or multiple transition rates (see, for example, Fig. 3, f and g).Picking only long tracks can help removing the contribution from bleaching.
ExTrack estimates the histograms ℎ s for each state s: with g(i, s | B) the number of sequences of i consecutive time points of state s in the sequence of states B. As long tracks have to be assessed and all states of B kept in memory, the window method cannot be applied.We thus only keep the most likely B (1,000 in Fig. 3, f and g).

Implementation and computation time
ExTrack is available as a Python (Python 3) package (Simon, 2022).A version with the core functionality is also available as a TrackMate module (Ershov et al., 2022)  As mentioned in Approximating continuous transitions..., a trade-off between number of states N, window length m, and the number of sub-steps u has to be found for reasonable computation time.When running the ExTrack fitting module on a computer with Intel Core i7-9700 processor (10,000 tracks of 10 positions) for 200 iterations using a two-state model, a window length of m = 2, and no sub-step (u = 1) the analysis can be as fast as 20 s.For the dependency of computation time on numbers of states, sub-steps, and window length, see Fig. S1 c.
To save computation time, we recommend to initially run ExTrack with low values of u and m and then to increase u if model predictions suggest high transition rates or m for low predicted diffusion lengths.Specifically, we suggest making the following adjustments: If localization error is negligible, for instance if there is no immobile state and all d i > 2σ, window length m can be set to its minimal value of 1.Similarly, m = 1 should perform well if there is one immobile state and all diffusive states have large d i > 5.In such cases, multiple substeps can be used at little computation cost.More generally, if predicted transition rates are larger than 0.4 Δt −1 but localization error is not negligible, we suggest increasing u to 2 for most accurate estimates (Fig. S1 b vs. Fig. 1 f).In the hardest cases of small d p ( 2 and high transition rates (≥0.4), we recommend using u = 2 and m ≥ 8.

Computational simulation of tracks
To test the predictive power of the different methods, we conducted overdamped Brownian Dynamics simulations of tracks in two or three spatial dimensions with molecules transitioning randomly between the different states at discrete time points.To mimic a continuous-time Markov model for state transitions, we used a small time step τ = Δt/50 1/k i,j , where k i,j are the transition rates.Brownian Dynamics simulations were carried out by randomly drawing physical displacements in each spatial dimension from Gaussian distributions of SD ffiffiffiffiffiffiffiffi 2Dτ √ , where D is the diffusion coefficient corresponding to the diffusive state.An additional Gaussian distributed noise of SD σ was added to simulate localization uncertainty.
Except if specified otherwise, we simulated 10,000 tracks of 10 time points with localization error σ = 0.02 µm, Δt = 0.06 s, d 0 = 0 µm, d 1 = 0.1 µm, bound fraction F 0 = 0.5, transition fractions per steps k 01 = k 10 = 0.1 Δt −1 , with infinite field of view and perfectly stroboscopic tracks.We also assumed that molecules reached steady state, that is, To test the robustness of ExTrack and the other methods to more complex behaviors, we also simulated tracks with variations of localization error or diffusion coefficients, a finite field of view or physical confinement as follows (see Fig. 2 for illustrations): Track-to-track variations of localization error (or diffusion coefficients) were simulated with localization error σ (or diffusion coefficient D) following χ 2 distributions of given coefficients of variation and mean 0.02 µm (or 0.25 µm 2 s −1 for D), Δt = 0.02 s.Models with multiple diffusion states were simulated as continuous-time transitions with model parameters detailed in Table S2.
To simulate a finite field of view in two dimensions, we simulated tracks in a box that is infinite in one spatial dimension (y) and finite in the other dimension (x) with size 3l, where l is the size of the field of view.All tracks or part of tracks that fall into the field of view are considered for further analysis.A single particle can thus result in several tracks if leaving the field of view and coming back.A finite field of view in three spatial dimensions was simulated analogously: The simulation box is infinite in x-and y-directions, while the box has periodic boundary conditions in the z-direction.
To simulate physical confinement, we considered tracks to move within a square area of indicated side length, using reflecting boundary conditions.
We also simulated tracks with one bound state and several intractable diffusive states to determine whether ExTrack could accurately estimate global binding and unbind with a coarse-grained three-state model.In Fig. S3, we show the results obtained from simulations of tracks with one bound state and five diffusive states of d p = [2,3,4,5,6].transition rates (in Δt

Comparison to vbSPT
To compare our results with vbSPT, we fixed the number of states to two so both algorithms performed exactly the same task.vbSPT does not consider localization error but a metric that we will call u.In case of pure diffusion, u = D • Δt but in case of immobile particle with localization error u = σ 2 /2 in principle.We can thus infer σ and D according to σ ffiffiffiffiffiffiffiffiffiffiffi 2 • u 0 √ and D = (u 1 − u 0 )/Δ.

Computational analysis of molecule rebinding
To assess the propensity of RodZ molecules to rebind in close vicinity of their initial binding site, we first annotated tracks using parameters obtained from the ExTrack fitting module (three biological replicates).We considered the 16 first time points of tracks of at least 16 time points (pooling the tracks of the three replicates).Among tracks labeled as initially immobile for at least three time points (p immobile > 0.5) then diffusive for four time points (with at least three time points of probability p diffusive > 0.7), we grouped tracks into two sub-groups, the ones rebinding right after and the ones which continue to diffuse for at least one more time point.The histograms represent the distributions of distances between initially bound position and the position at the fourth time point after unbinding.If molecules were to rebind at random locations, the distributions of the distribution of distances for rebinding particles should be the as for particles, which continue to diffuse.Neither PBP1b (Fig. S5 e) nor tracks obtained from immobile fluorescent beads (of similar signal-to-noise ratio) showed any significant rebinding, which excludes wrong conclusions on RodZ data due to mis-annotations.
Single-particle tracking of msfGFP-PBP1b and GFP-RodZ proteins Cells were all positioned in the same focal plan in between an agar pad (1%) and a coverslip to be imaged in TIRF microscopy.Coverslips were cleaned by 60 min sonication in saturated KOH solution followed by two washing steps (15 min sonication in milli-Q water).Single-particle tracking of GFP-PBP1b was performed with a custom-designed fluorescence microscope based on an ASI Rapid Automated Modular Microscope System, equipped with a 100× TIRF objective (Apo TIRF, 100×, NA 1.49, Nikon), Coherent Sapphire 488-200 laser, and a dichroic beamsplitter (Di03-R488/561-t3-25 × 36, Semrock).Excitation was controlled with an acousto-optic tunable filter (AA Optoelectronics) through an Arduino (15 ms light exposure per frame).Images were acquired using an Andor iXon Ultra EMCCD camera with an effective pixel size of 130 nm.Image acquisition was supervised with MicroManager.
Tracks were built from movies using TrackMate with LoG peak detection (estimated blob diameter of 0.5 µm, quality threshold of 15, with subpixel localization).Then, peaks were linked into tracks using the "Simple LAP Tracker" (max distances of 0.4 µm, and "gap" of 2).
Data analysis with ExTrack was restricted to tracks with at least three positions.For the longest tracks, only the first 50 positions were analyzed.
Online supplemental material Fig. S1 shows ExTrack parameter fitting.Fig. S2 shows error on two-state model parameters for different methods.Fig. S3 shows robustness of ExTrack to biases due to wrong model assumptions.Fig. S4 shows capacity of the annotation module.Fig. S5 shows complementary results for GFP-PBP1b and GFP-RodZ tracks.Video 1 shows msfGFP-PBP1b single-particle tracking.Video 2 shows GFP-RodZ single-particle tracking.Table S1 shows using ExTrack to fit parameters of a three-state model to different simulations of three-state data with qualitatively different types of transitions.Table S2 shows two-state and threestate fits of tracks from simulated particles either in immobile state (state 0) or in one of five diffusive states (states 1-5).
Discovery Grant to S. van Teeffelen, a Fonds de Recherche du Québec -Santé Salary Fellowship to S. van Teeffelen, as well as support from the Volkswagen Foundation to S. van Teeffelen.Open Access funding provided by Université de Montréal.

Figure 1 .
Figure 1.ExTrack permits to assess a wide range of multi-state diffusion models.(a) Example track of a molecule transitioning between immobile and diffusive states with d 1 = 2 σ.Arrows: observed displacements; dots: actual positions of immobile (blue) and diffusive (red) molecules.(b) Consecutive observed distances of the track from a. (c) Density function of observed distances of coefficiently immobile (blue) or diffusive (red) molecules for d 1 = 2 σ. (d and e) Left: Simulated two-state (d) and three-state (e) diffusion models with diffusion length and transition rates as indicated.Right: Model parameters estimated by ExTrack (mean ± SD) assuming a two-state (d) or three-state (e) model (localization error σ, diffusion lengths d 0 and d 1 , initial immobile fraction F 0 , transition rates k).Dotted lines: ground truth.ExTrack settings: two-state data: two sub-steps, window length = 10; three-state data: no sub-steps, window length = 7. (f) Heatmap of the relative errors of d 1 , F 0 , k u , and k b obtained from a two-state model fit to two-state simulations as in d.Error: mean absolute relative errors from 10 replicates per condition.White lines indicate regions of <10% error for model parameters hardest to fit for ExTrack (k u , solid), vbSPT, and anaDDA (k b , dashed, see g).Initial parameters: d 0 = 0 µm, d 1 = 0.1 µm, σ = 0 µm, k = 0.1 Δt −1 , F 0 = 0.4.(g) Error on k b of vbSPT and anaDDA (same protocol and color map as in f, 20 replicates were used for anaDDA to mitigate its variability).See Fig S2 a for errors on the other parameters.
Fig. 3, d and e, demonstrates that the position-refinement module effectively reduces the localization error of immobile molecules by ffiffiffiffi N √

Figure 2 .
Figure 2. Robustness of ExTrack to various sources of bias.Heatmaps of relative errors on d 1 , k u , and k b in case of two-state parameter fits to two-state simulations with one immobile state and one diffusive state, for different sources of bias, as a function of the source of bias (y axis) and transition rates k.(a and b) We simulated track-to-track variations of localization error σ (a) or diffusion coefficient D 1 (b).Varied parameters followed chi-square distributions (white graphs in b) re-scaled so the mean localization error equals 0.02 µm (a) or the mean diffusion coefficient equals 0.25 µm 2 .s−1 , which corresponds to a diffusion length of d * 1 = 5 (b).(c) Membrane proteins diffuse on a cylindrical surface and leave the field of view on the sides (see cartoon).We varied the width w of the field of view as indicated in the cartoon, while maintaining d 1 and σ fixed.(d) Cytoplasmic proteins can leave the focal plane anywhere (see cartoon).We varied the focal depth while maintaining d 1 and σ fixed.(e) Particles confined in a symmetric cube.We varied the box size while maintaining d and σ fixed.10 replicates per condition.If not stated otherwise, d 0 = 0 µm, d 1 = 0.1 µm, and σ = 0.02 µm.ExTrack settings: window length = 7, no sub-steps.CV, coefficient of variation.

Figure 3 .
Figure 3. ExTrack annotates and refines single-molecule positions and extracts state-duration distributions.(a and b) Example tracks from simulations of immobile and diffusive (d * 1 = 2) molecules with symmetric transition rates of 0.1 Δt −1 with short tracks of 10 positions (a) or long tracks of 25 positions (b).Top: real positions with states in colors; bottom: noisy positions with probabilities (color bar), right: state probabilities along time.(c) Distribution of the probability to be diffusive at the time points where the particles are actually diffusive.Similar simulations than in panel a for different d*.(d and e) Position refinement module: Examples of two-state track (d) and three-state track (e).From left to right: Observed track and associated states probabilities; refined positions (colored) and observed positions in gray; probability density map of the consecutive positions.Top right: State probabilities as a function of time.Bottom right: SD of the probability density of refined positions.Simulation parameters: d * 0 = 0, d * 1 = 5, k 01 = k 10 = 0.1 Δt −1 (d); d * 0 = 0, d * 1 = 1.5, d * 2 = 5, all k = 0.05 Δt −1 (e).(f) Histogram module: State-duration histograms of tracks of at least 21 positions for the indicated two-state model.Dashed lines: Distributions from ground truth.(g) Same as f for three-state tracks with two immobile states.Left: ExTrack fit assuming a two-state model; Right: ExTrack fit assuming a threestate model.

Figure 4 .
Figure 4. Characterizing PBP1b and RodZ motion.(a-e) Analysis of GFP-PBP1b tracks (time step 25 ms) using ExTrack with two (a-c) or four states (d and e).(a) GFP-PBP1b track (130% expression level).Color bar: Probability of diffusion.(b) Diffusion lengths and fractions from two-state parameter fitting.(three replicates, each with >17,000 tracks of at least three positions, with average lifetimes from 6.3 to 7.5 positions).(c) State-duration histograms of PBP1b tracks of at least 21 positions (>600 tracks per replicate with average lifetimes from 28.5 to 32 positions), using global parameters from fitting a two-state model (a and Fig. S5).(d) Example PBP1b track (from 130% expression level) with associated state probabilities along time (first position on the left).(e) Fractions from four-state parameter fitting to the same datasets used in a. (f-h) Analysis of GFP-RodZ molecules (40 ms frame times).(f) RodZ tracks with overlapping binding sites.Color bar: Probability of diffusion.(g) Cartoon illustrating the rebinding of diffusive RodZ molecules to extended MreB-actin filaments in two dimensions.Blue solid line indicates distance between initial position and position after four diffusive steps for molecules rebinding (left) or continuing diffusion (right).(h) Histograms of distances between initial bound site and the site after four diffusive steps.Tracks rebind in closer vicinity to the initial binding site 33% more often than expected in case of random motion.Mann-Whitney U test: P value = 1.6e−6.See Materials and methods, Computational analysis... for details.Error bars and shaded regions: SDs between replicates.
Parameter fitting based on the probability distribution of observed positions Tracks are generally described by their sequence of observed positions C = (c 1 , c 2 , ..., c n ).Those positions come about based on the sequence of physical molecule positions R = (r 1 , r 2 , ..., r n ), which, in turn, are the stochastic result of the sequence of diffusive states B = (b 1 , b 2 , ..., b n ).For a given track C, the probability density function f c can be calculated from f C,B,R , the joint probability density function of the observed positions C = (c 1 , ..., c n ), the real (physical) molecule positions R = (r 1 , ..., r n ), and the time-dependent diffusion states B = (b 1 , ..., b n ), by integration over all the possible values of R and by summation over all the possible values of B: f f sn−1( r n − μ n−1 ) and the localization error term f σ( c n − r n) as described for the first step to compute the density function f C,B C, B | θ ( ) .Finally, we compute the value of the probability density function of the observed track f C (C | θ) as the sum of f C,B (C, B | θ) over all possible B.

Figure S1 .
Figure S1.ExTrack parameter fitting.(a) 3D maps of the mean error on extracted parameters from simulations similar to those in Fig. 1, of two-state models with one immobile and one diffusive state as a function of diffusion length d p , unbinding rate k u , and binding rate k b .Errors are obtained from five replicates.Errors are indicated as absolute or relative errors, as indicated.ExTrack settings: no sub-steps, window length = 7. (b and c) Heat maps of mean relative error on extracted parameters from the same simulations as in Fig. 1, but inferred with no sub-steps.ExTrack settings: no sub-steps, window length = 10 (b) or 3 (c).(d) Computation time of ExTrack fitting module applied to 1,000 tracks of 100 positions each with 200 iterations (typical number of iterations needed for the fit of a two-state model) depending on the window length m (without sub-steps or with two sub-steps; left) or depending on the number of states N (without substeps; right), using seven cores of a Intel Core i7-9700 processor.For details see Materials and methods, Implementation and computation time.

Figure S2 .
Figure S2.Error on two-state model parameters for different methods.(a) Heat maps of mean relative error on extracted parameters from the same two-state simulations as in Fig. 1 for vbSPT and anaDDA.In the case of anaDDA, 20 replicates were used to assess its heat maps instead of 10 due to its higher variability.(b and c) Plots of estimated transition rates as a function of the actual rates for a subset of the simulations in a.(b) Results from UncertainSPT for different diffusion lengths.Gray curve: Ideal model.(c) Results from a modified version of ExTrack with a time-discretization approach (labeled Classical), which assumes transitions to occur at time points of molecule observations, and with our approach (labeled ExTrack), which assumes transitions to occur at the middle of each time step (see Materials and methods, Parameter fitting...).Tracks simulated with d * 0 = 0, d * 1 = 5.(d) Error, SD, and bias of parameters predicted by ExTrack, vbSPT, and anaDDA depending on the number of tracks in case of two-state tracks (five positions per track, k u = k b = 0.1 Δt, d * 0 0, and d * 1 5).The error (root mean square error) can be decomposed into bias (absolute value of the difference between the average estimate from all replicates and true parameter) and SD (std) of the estimated parameters.Error = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi bias 2 + std 2 p .Obtained from 100 replicates.Here, all estimated values are relative to their true value.ExTrack settings: number of sub-steps = 2, window length = 10.

Figure S3 .
Figure S3.Robustness of ExTrack to biases due to wrong model assumptions.(a) Predictions of d 1 , k u , and k b in case of two-state parameter fits to twostate simulations with one immobile state and one diffusive state.Position at each time point show variable localization errors σ.Peak-wise localization errors were specified to the model.σ followed a chi-square distributions re-scaled so the mean localization error equals 0.02 µm (for sample distributions, see inset of Fig. 2 b).Simulations with d 1 = 0.1 µm and k = k u = k b = 0.1Δt −1 .10 replicates per condition.ExTrack settings: window length = 7, no sub-steps.(b) We considered tracks from simulated particles with one immobile state (d * 0 = 0) and five diffusive states with similar diffusion lengths of values 0.04, 0.06, 0.08, 0.1, and 0.12 µm (corresponding to d * from 2 to 6), transition rates were set to randomly picked values (See Materials and methods, Computation simulation of tracks for more details on the transition rates values).This model results in indistinguishable diffusive tracks.Left: Distribution of displacements (for each dimension) of the five diffusive states.Right: Bar plots of true and estimated parameters obtained from fitting to a three-state model followed by aggregation of the diffusive states and computation of the resulting parameters.Here, the fractions are the global fractions computed from rates.See Table S2 for other results.(c) Heatmaps of relative errors on d 1 , k u , and k b with variable diffusion coefficient following the same protocol than in Fig. 2 b for vbSPT and anaDDA.

Figure S4 .
Figure S4.Capacity of the annotation module.Assessment of the annotation module accuracy by comparing state estimations (either probabilistic or categorical) with ground truth from simulated tracks.If not stated otherwise, d * 0 = 0, d * 1 = 5, and k u = k b = 0.1 Δt −1 .(a) Fraction of time points actually in diffusive state depending on the probability to be diffusive estimated by ExTrack.More specifically, time points are binned according to their probability to be diffusive (x axis) and for each bin we computed the fraction actually in diffusive state (y axis).Binning of 0.01.(b-d) Categorical state predictions are obtained by picking the state with highest probability for each time point.The fraction of mislabeled time points can thus be computed by comparison to the known true states of the simulated tracks.(b) Heatmap of the fractions of mislabeled time points depending on d * 1 and k (10,000 tracks of 10 time points).(c) Fraction of mislabeled time points depending on (temporal) distance to transition time points.(d) Fractions of mislabeled time points using correct parameters except for one of them specified in the legend.x-axis: Relative error of the varied parameter compared to the true value underlying the simulated tracks.For this particular simulation, we used 10,000 tracks of 20 time points.Window length of 10.(e) Fraction of mislabeled time points depending on d * 1 for ExTrack and vbSPT.The grey dotted curve (annotated as Error dif.) is the relative difference of the fraction of mislabeled time points between vbSPT and ExTrack (error vbSPT -error ExTrack )/error ExTrack (10,000 tracks of 10 time points).