BACKGROUND
diffusion and partition of components of the plasma membrane into specialized areas, especially their lateral segregation and organization into micro or nanodomains, are key events in cell function.
different domains involving lipid-protein-protein interactions have been identified at the cell surface and most of them are enriched in specific lipids such as sphingolipids and cholesterol.
it has been proposed that these lipids create peculiar physical properties within membranes, which are known as liquid ordered phase .
proteins anchored to the actin cytoskeleton could also be a barrier confining membrane components in small regions of plasma membrane  <cit> .
in order to better understand the molecular mechanisms underlying this lateral segregation, the diffusive behavior of membrane components has been investigated in living cells using techniques such as fluorescence recovery after photobleaching , fluorescence correlation spectroscopy , and single particle tracking  .
it has been shown that diffusion of membrane proteins in cell membranes is not limited to pure brownian diffusion.
indeed, two other modes of motion have been so far identified within membranes, namely directed and confined, that includes tethered diffusion or diffusion in the presence of obstacles  <cit> .
in addition numerous studies have highlighted that single molecules could present complex behavior, namely switching between the different modes of diffusion described above.
for instance, it was early described by jacobson’s group that the glycosylphosphatidylinositol -anchored protein thy <dig> could be transiently confined  in specific areas identified as raft microdomains  <cit> .
more recently, a similar behavior was observed with another gpi-anchored proteins  that can be transiently trapped in confinement zones named stall   <cit> .
a combination of confined and brownian diffusion modes within a trajectory has also been observed for transmembrane proteins such as tetraspanins  <cit> , the epidermal growth factor  receptor  <cit>  and the cystic fibrosis transmembrane conductance regulator  channel  <cit> .
also transient directed motion was observed for gamma amino butyric acid  receptors in nerve growth cones  <cit> .
spt that consists in visualizing diffusing single molecules and frame-by-frame reconstruction of their trajectories is especially relevant to probe the dynamics of heterogeneous systems such as biological membranes or, more generally, diffusion and transport of molecules or cargos in cells.
spt can locate each particle with sub-diffraction resolution by reshaping the optical point spread function and measure its dynamics, instead of an ensemble average.
nowadays, tracking is mainly performed using fluorescent proteins or chemical dyes.
in the case of single molecule tracking, very stable fluorescent probes are required such as the organic dye atto647n  or quantum dots  <cit> .
labeled molecules are then detected using high numerical aperture objectives and highly sensitive and rapid cameras.
using such strategy, it is now possible to track fluorescent single molecules within membranes of living cells and to analyze their behavior, i.e.
diffusion coefficient, velocity and motion modes.
analysis of diffusion in spt experiments is generally performed by connecting the position of fluorescent dots at different time points into a trajectory and by plotting the mean-square displacement  < r2 > versus time lag.
from this plot, one can discriminate between brownian, confined or directed trajectories .
however, it is also important to identify different modes of diffusion within a trajectory and three main types of methodologies have been developed so far.
the first one is based on msd analysis.
jacobson’s group has early created an algorithm, which is based on the determination of a confinement index that corresponds to the probability that a given protein would stay in a region for a period of time  <cit>  .
an algorithm to detect transient directed motion has also been developed by dahan’s group by calculating a speed correlation index describing the high temporal correlations of the speed in directed motions compared to brownian motion  <cit> .
in both techniques a sliding time window is used to achieve a local analysis.
the second methodology is based on bayesian analysis.
masson’s group developed a bayesian decision tree for the classification of the mode of motion of single molecule trajectories, especially suitable to discriminate between brownian and confined trajectories  <cit>  whereas bathe’s group applied bayesian model selection to hidden markov modeling to infer transient transport states of mrna-protein complexes often displaying trajectories alternating directed and brownian trajectories  <cit> .
the third methodology is based on a supervised support vector classification  suitable to segment a trajectory into different motion modes including directed and confined behaviors, without sliding windows  <cit> .
another way to describe the heterogeneity of plasma membrane is to evaluate the anomalous sub-diffusion, a hindered diffusion in which the hindrances change the actual form of the time dependence, not just the numerical value of the diffusion coefficient  <cit> .
anomalous diffusion is described by the power law < r2 > ~dtα where α equal to  <dig> for brownian diffusion, < <dig> for sub-diffusion and > <dig> for super-diffusion.
the presence of multiple diffusion regimes within a trajectory can also be determined by analyzing the probability distribution of square displacement  .
in this case, pdsd describes the probability that a particle will be found within a circle of radius  at time .
with the two last methods, it is impossible to know when and where the change in the diffusion mode occurs.
in this paper we present a new approach to automatically discriminate between different modes of membrane diffusion within the same trajectory using back-propagation neural network .
bpnn is the most widely used type of artificial neural networks .
it typically consists in many simple processing elements called neurons, which are grouped in layers.
all nodes of a layer are connected to all the nodes in the adjacent layers by interconnections called synapses .
here bpnn was trained using simulated brownian, confined, or directed trajectories to determine the motion modes of single molecule within a trajectory thanks to a sliding window.
validation of the algorithm in identifying different motion modes was achieved using synthetic data.
the algorithm was then tested with trajectories recorded in living cells, especially a transmembrane protein diffusing within the plasma membrane.fig.
<dig> architecture of the neural networks.
a upper panel: schematic view of the three-layer back propagation neural network .
each input value is passed through the neural network.
the output value is compared with the desired target output, an error is computed and this error is propagated backward through the network to each node.
lower panel: graphical representation of the model neuron j or threshold unit.
the threshold unit receives input, called xi, from m other units.
the associated weight is called w
i. the total input a
j is the sum over all inputs.
the activation function f  of the neuron is a sigmoid and y
j is the output of the neuron.
b schematic diagram of the algorithm used to detect 2d diffusion modes within a trajectory.
the trajectory is split in overlapping segments of length s <dig> using a sliding window.
the msd curve is calculated for each segment, normalized, presented to the neural network and classified according to three main diffusion modes .
a score  is obtained for each frame of the movie and attributed to all the frames of the sliding window
RESULTS
a. backpropagation neural networks architecture and algorithm
bpnn was created with one hidden layer between input and output units .
all nodes of a layer were connected to all the nodes in the adjacent layers.
the bpnn included two working phases, the learning and the recall phase.
during the learning phase, known data sets were used as a training signal in input and output layers.
the first operation for the learning phase is the feed-forward operation.
during this operation, each input neuron receives an input signal and broadcasts this signal to the connected neurons in the hidden layer.
each neuron in the hidden layer computes its activation and sends the result to the output neuron.
mathematically, a 3-layer bpnn with m, n, and p, the number of input, hidden and output nodes, respectively, is based on the following equation:  <dig> ok=f∑j=1nwjk×f∑i=1mwijxi
ok is the calculated output of the kth neuron in the output layer, xi the input values of the network, wij the connection weight from node i  to node j , wjk the connection weight from node j  to node k , f is the activation function of the neuron which is classically a sigmoid function as defined in eq.
.
<dig> fx=11+e−x
targeted outputs from each training pattern are compared with the actual activation level of the output units and the difference between the two determines the system error .
<dig> e= <dig> ∑k=1pok−tk <dig>
p is the number of output neurons, ok and tk are the calculated output and the target output, respectively, of the kth neuron in the output layer.
the second operation of the learning phase is the backward pass in which a gradient descent method is used to minimize the error in the training set.
starting from the output layer, the error is backward propagated through the network, layer by layer, by recursively computing the local gradient error of each neuron.
the connection weight is then changed in proportion to the negative of an error derivative using the following equation:  <dig> Δwi,jt+1=−η∂e∂wi,j+αΔwi,jt
Δwi,j is the weight increment minimizing e between the jth neuron and the ith neuron at the  th iteration.
η is the learning rate and α is the momentum parameter.
α is chosen between  <dig> and  <dig>  typically  <dig> , a value allowing high learning rates  <cit> .
using a momentum term is the simplest method to avoid oscillation problems when searching the minimum value of the error surface.
this forward-backward process is repeated for each input signal.
the bpnn is trained by repeatedly presenting a series of input/output pattern sets to minimize the mean squared error  :  <dig> mse=1nxp∑l=1n∑k=1ptlk−olk <dig>
n is the number of input vector and p is the number of output neurons.
olk and tlk respectively denote the calculated output and the desired output of the kth neuron when the input vector l is applied to the network.
the recall phase is performed in one pass using the weight obtained in the learning phase.
the input signal of this bpnn is the normalized mean square displacement  of a trajectory as a function of time.
msd analysis is one of the most widely used approaches to extract reliable values of the diffusion coefficient d and consists in plotting the msd versus time lag  according to the equation:  <dig> msdnδt=1n−1−n∑j=1n−1−nxjδt+nδt−xjδt2+yjδt+nδt−yjδt <dig>
where δt is the time interval between two successive frames, x  and y  are the particle coordinates at time t, n is the total number of frames, and n is the number of time intervals  <cit>  .
for brownian motion, the msd curve increases linearly with time increment δt.
the curve exhibits an upward or downward curvature for directed or confined motions, respectively.
in our system, the  <dig> types of movements described above are discriminated by analyzing the trajectory with the algorithm using a sliding window with a size s <dig> .
a three-layer bpnn with three output nodes was constructed, one for each motion type, namely brownian, directed and confined.
we chose one hidden layer with five hidden nodes .
input variables were normalized and scaled into values in the range of  <dig> – <dig> ).
three output values are assigned to each motion mode and normalized.
training procedure and validation sets
the network was trained using data sets of simulated trajectories.
one thousand trajectories of  <dig>  s duration  were simulated for each type of diffusion mode with a 100 ms time increment.
for confined diffusion, the particle displays a brownian diffusion in a constrained area with a variable diameter value l. for directed diffusion, a term of constant drift velocity v in one direction all along the trajectory is added to the brownian movement.
one part of the data sets is used for training, the other one for cross validating with different parameters .
the performance of a trained bpnn was first evaluated using new naive simulated patterns and by computing the percentage error between calculated output and expected values .
it increased for a given diffusion coefficient when the confinement size decreased for confined trajectories  or when the velocity increases for directed trajectories .
the learning procedure was performed with  <dig> different datasets of trajectories of  <dig> ,  <dig>  and  <dig>  s durations.
under our conditions, a similar probability of detection of directed diffusion modes was obtained for  <dig> and  <dig> frames.
the size of the sliding window was therefore fixed to  <dig> frames , a value at which the probability of detection of 1 μm diameter confinement  is still possible and obviously allows detecting smaller segments as compared to  <dig> frames.
considering  <dig> directed trajectories t <dig> and t <dig> with respective diffusion coefficient d <dig> and d <dig> and velocity v <dig> and v <dig>  the normalized msd curves will be similar if:fig.
<dig> percentage of detection of confined and directed diffusion modes as a function of the size of the sliding window s <dig>  the probability of detection of confinement or directed motion in simulated trajectories was calculated for different length of segment used to calculate the msd ,  <dig>  or  <dig>  frames).
the probability of detection of confinement in trajectories is expressed as a function of the diameter confinement l  whereas the probability of detection of directed motion is expressed as a function of the velocity
<dig> v1=v0d1d <dig>
similarly the normalized msd curves will be similar between  <dig> confined trajectories t <dig> and t <dig> with respective diffusion coefficient d <dig> and d <dig> and confinement diameter l <dig> and l <dig>  if:  <dig> l1=l0d1d <dig>
determination of the detection threshold of confined and directed motion within a trajectory
the  <dig> frames sliding window described above is used to split the trajectory in different segments and is positioned at the point i = / <dig> of the trajectory in order to define a first segment containing the first  <dig> points.
the msd curve is calculated for this  <dig> frames trajectory and is presented as an input to the neural network after normalization.
the  <dig> output values of the neural network ob, oc and od correspond to the probability of the particle to diffuse according to one of the  <dig> diffusion modes .
these  <dig> values are attributed for each frame of the sliding windows.
the sliding window is then translated to the point i +  <dig> in order to analyze the next segment of the trajectory and the procedure is repeated up to the point i + n = n-.
for each frame of the trajectory, the average of output values  corresponding to the probability of assignment of one of the  <dig> diffusion modes of each frame during bpnn analysis, are plotted as a function of time .
however, statistically, some pure brownian trajectories can transiently display a behavior that is similar to confined or directed ones.
therefore, we determined a threshold value in order to distinguish the true confined or directed part of the trajectory from that due to brownian fluctuations.
to do so,  <dig> brownian trajectories of  <dig> frames were generated  and analyzed.
we then plotted the bpnn output values threshold yc  as a function of the number of consecutive frames  for which the percentage of falsely attributed as confined  segments by the neural network did not excess 5 % of the total number of frames of the brownian trajectory  .
these thresholds are used to identify the segments that are confined or directed within a trajectory .fig.
<dig> determination of the detection threshold of confined and directed diffusion modes.
the bpnn output thresholds for confined diffusion mode y
c  and directed diffusion mode y
d  were calculated for confined diffusion  mode  and directed diffusion mode  by plotting as a function of the number of consecutive frames  the bpnn output for which the neural network falsely indicated, in 5 % of the cases, a confined or directed motion for a brownian trajectory
fig.
<dig> analysis of the motion modes within synthetic trajectories.
a detection probability using bpnn.
<dig> trajectories of  <dig> frames including one directed motion segment with  <dig>  μm/s velocity and one confinement segment with 1 μm diameter were analyzed with bppn .
the percentage of decision based on bpnn corresponds to the number of positive decision for a specific motion mode detected for a given frame over  <dig> trajectories and normalized to  <dig> or - <dig> for confined or directed trajectories, respectively .
the algorithm was also tested with a 30 nm localization noise .
b the upper panel shows a synthetic trajectory of 40 s  including a transient confinement  with a diameter of 1 μm  and a transient directed motion  with a velocity v =  <dig>  μm/s .
the brownian part is in black.
the diffusion coefficient d is  <dig>  μm2/s and the integration time 100 ms. scale bar, 1 μm.
c the lower panel is the plot of the probability of detection of motion mode  as a function of the duration time of the trajectory for confined  or directed  motion.
confined  and directed  segments are respectively detected between  <dig>  and  <dig>  s and between  <dig>  and  <dig>  s as shown by grey lines.
the detection threshold values correspond to a probability of detection with a 95 % confidence .
the calculated diameter of confinement is  <dig>  μm
b. validation of the algorithm
the algorithm was first validated using  <dig> synthetic trajectories of  <dig> frames, containing one  <dig> frames segment of both confinement and directed motion , tested with or without a 30 nm localization noise.
the percentage of decision based on bpnn corresponds to the number of positive decision for a specific motion mode detected for a given frame and normalized to  <dig> or - <dig> for confined or directed trajectories, respectively .
confined and directed segments were detected by the bpnn with good accuracy .
an example of trajectory is shown in fig.
4b and c. duration of confinement and directed segments was slightly underestimated by the bpnn, respectively  <dig>  s and  <dig>  s instead of 5 s. data from part of the trajectory identified as directed or confined were respectively fitted with the equations  <dig> and  <dig> described in the methods section.
the confinement diameter and the velocity were estimated to be  <dig>  μm and  <dig>  μm/s, respectively.
these values are in good agreement with the parameters of the simulation.
as expected, apparent diffusion coefficients from brownian segments were estimated around  <dig>  μm2/s.
no changes in the bpnn-based decision were observed when adding 30 nm positioning noise.
we also evaluated the capacity of bpnn to detect small segments within a trajectory.
<dig> simulated trajectories of  <dig> frames containing confined segments of various lengths were created and the probability of detection named decision based on bpnn was calculated as a function of the segment length.
a similar process was used for directed motion mode .
our results indicate that our algorithm is able to detect  <dig> and 90 % of the confined or directed motion modes within a  <dig> frames segment, respectively.
these values dropped down to  <dig> and 72 % for  <dig> frames segments and to  <dig> and 43 % for a  <dig> frames segment.
the percentage of detection dropped below 10 % when the length of the segment is smaller than  <dig> frames.
it is important to indicate that this evaluation has been performed with diffusion parameters close to those often encountered within biological membranes .
the percentage of detection could be largely improved for a higher velocity .
similarly decreasing the sliding window improves the detection accuracy for confined trajectories.
our objective here was to provide as a proof of concept a tool with efficient detection of both directed and confined segments within the same trajectory.
c. comparison with other methods
as mentioned in introduction, several algorithms have been developed to segment different types of motion within trajectories.
we then compared our bpnn-based method to  <dig> freely available algorithms.
two methods are based on bayesian analysis and specialized in the detection of confined  or directed -bayes  <cit> ) segments within a trajectory.
the third method is a machine learning method based on trajectory segmentation using supervised support vector  classification  <cit> .
the comparison was performed using setting parameters and simulated trajectories similar to what is described above, namely trajectories of  <dig> frames including one directed motion segment and one confinement segment always localized at the same position, both with a length of  <dig> frames, the velocity randomly ranging from  <dig> to 3 μm/s for directed motion and one confinement segment with diameters ranging from  <dig>  and  <dig>  μm for confined motion .
under theses conditions, the four methods were found very specific with detection accuracy larger than 95 % .
larger differences were observed in terms of sensitivity and our algorithm was able to respectively detect  <dig>  and  <dig>  % of confined and directed  <dig> frames segments within a  <dig> frames trajectory .
we also evaluated the time of calculation that is important to take into account since spt requires a large sampling to get significant results.
most likely because our algorithm was developed in the visual c++ environment, the computational time was very low, typically less than 1 s for analyzing a  <dig> frames trajectory  using a pc windows  <dig> intel  core 5tm) i7-2640 m cpu  <dig>  ghz .
d. segmentation of real trajectories
the algorithm was then used to segment trajectories reconstructed from movies recorded in living cells.
the bpnn was used in the context of the tracking of yfp-labeled moloney murine leukemia viruses  in human embryonic kidney  cells using total internal reflection fluorescence  microscopy .
the behavior of such a viral particle can be brownian, confined when trapped within membrane of host cells or directed when the particle is exported from the cytoplasm to the plasma membrane  <cit> .
an example of such a complex trajectory alternating between different motion modes is shown in fig.
5a and the analysis by the neural network in fig.
5b.
the algorithm detects three different motion modes within the trajectory.
a confinement was detected during  <dig>  s in a zone of 170 nm diameter, a size in good agreement with a previous report for murine polyoma virus-like particles  <cit> .
directed motion was also observed during 4 s with a velocity of  <dig>  μm/s that compares well with that previously reported for mlv .
the rest of the trajectory was brownian.
we also tested the bpnn algorithm by analyzing a set of trajectories of the tetraspanin cd <dig> recorded in hela cells .
this molecule is a transmembrane protein expressed in the plasma membrane that has been demonstrated to diffuse mostly in a brownian mode but can be transiently or permanently confined in membrane areas enriched in tetraspanins and their partners .
trajectories including transient confinement of cd <dig> molecules are called “mixed trajectories” because of the combination of brownian and confined behavior.
apparent diffusion coefficient of  <dig> cd <dig> molecules was first determined using the first points  of the plot of the msd as a function of time  and the mean value of cd <dig> apparent diffusion coefficient  was similar to that previously reported in the plasma membrane of hela cells  <cit> .
interestingly the bpnn was able to directly detect mixed trajectories , in addition to pure brownian  and pure confined  trajectories .
these percentages also compared well with those described in  <cit> .
similarly to what is described in fig.
<dig>  the bpnn provided the number of frames of each identified segments and the corresponding apparent diffusion coefficient .
the diameter of confinement associated to these segments was calculated from msd analysis and, in agreement with a previous report, the diameter of confinement was smaller for pure confined trajectories as compared to the one of confined segment in mixed trajectories .fig.
<dig> analysis of the motion modes within a real trajectory of a moloney murine leukemia virus  particle in hek cells.
the upper panel shows the trajectory of a mlv particle containing yfp-tagged gag proteins recorded in infected  <dig> hek cells, tracked using tirf microscopy and recorded at a 100 ms integration time.
the confinement area is zoomed in the red circle.
the lower panel is the plot of the probability of detection of motion mode  as a function of the duration time of the trajectory.
a zone of confinement is detected during  <dig>  s  with a diffusion coefficient of  <dig>  μm2/s and a diameter of 170 nm.
directed motion is indicated during 4 s with a diffusion coefficient of  <dig>  μm2/s and a velocity of  <dig>  μm/s.
scale bar, 500 nm
fig.
<dig> single molecule tracking of the tetraspanin cd <dig> in hela cells.
the  panel is a dic image of a single hela cell and the red lines represents some recorded trajectories of single molecules .
the lower panel  represents the scatter plots of cd <dig> apparent diffusion coefficients calculated from the msd analysis of  <dig> trajectories in hela cells.
each point represents one trajectory and the diffusion behavior, which has been determined using the bpnn neural network, is indicated with a color code  green, brownian named  blue, mixed named m).
the upper scatter plot corresponds to the totality of the trajectories .
panel  shows the confinement diameter calculated from the confinement segments identified using bpnn for confined and mixed trajectories
discussion
in this work we propose a new approach to identify and automatically characterize the diffusion behavior of single molecules encountered within biological membranes.
the novel algorithm we have developed is based on artificial neural network analysis that has already been applied in biology, e.g.
to predict protein secondary structures  <cit> .
such a computational approach is especially suitable to solve complex behavior with non-linear relationships between independent and dependent variables.
we demonstrate here that it can be applied to probe the heterogeneity encountered within trajectories of membrane components of eukaryotic cells by segmenting trajectories into different modes of diffusion with a good accuracy.
based on msd analysis, the algorithm is able to accurately discriminate between brownian, confined and directed diffusion over a wide range of confinement areas and velocity and it is therefore possible to detect transition between these  <dig> modes.
this is especially interesting in the light of observations showing that diffusing molecules or particles often display a complex behavior rather than a single motion mode.
such an analysis can provide important information about the mechanisms of membrane partitioning in living cells, especially when combining spt and ensemble labeling .
the new algorithm is based on a bpnn trained with short synthetic trajectories of particles displaying brownian, confined or directed motion modes.
we intentionally chose sets of synthetic trajectories with diffusion parameters close to the values mainly described in the literature for proteins diffusing within biological membranes using single molecule fluorescence microscopy.
the algorithm could be eventually further developed by training the bpnn with a larger range of values for the different modes of diffusion, but could also included new mode of diffusion such as slow and fast drifting motion .
it could probably be extended to the analysis based on anomalous diffusion.
similarly to other trajectory segmentation-based algorithms for analyzing motion modes  <cit> , detection was performed using a sliding window allowing detection of temporal changes in the mode of motion within a trajectory.
here, we applied a sliding window of  <dig> frames corresponding to the length of synthetic trajectories used for bpnn training.
we chose a segment length small enough to measure local behavior but large enough to get sufficiently accurate output values.
under these conditions, it was possible to confidently identify motion modes for segment sizes as short as  <dig> frames.
this value compared well with other algorithms that do not use a sliding window, e.g.
the segmentation of trajectories based on based on supervised support vector classification that requires a minimum segment length of  <dig> frames to get 60 % detection rate  <cit> .
some algorithms are able to detect smaller segments such as the hmm-bayes algorithm that is very accurate in detecting directed diffusion segments of  <dig> frames.
however it requires a minimum number of observed particle displacements within the trajectory to infer the presence of multiple motion states  <cit>  whereas our algorithm does not require prior information, a very important feature since the diffusion-state switching occurrences is a stochastic process and that the trajectories recorded with organic dyes are generally short due to low photo-stability.
under the experimental conditions tested in this paper, which mimic the plasma membrane of eukaryotic cells, our method was found very sensitive, specific and versatile, able to accurately detect both confined and directed segments within trajectories.
it appears to be very competitive in regards to the results obtained with  <dig> other methods already freely available, at least in the conditions tested in this study.
in addition, the computational time required by our algorithm is very low, a very important feature since spt requires the analysis of several hundreds of trajectories.
this is partly due to its implementation in visual c++, which is stable even for high load.
the bpnn algorithm could be applied to high-throughput analysis or screens.
another interesting property lies in its absence of sensitivity to the noise positioning .
CONCLUSIONS
we demonstrated in this study that our algorithm provides a new conceptual, versatile and useful tool in dissecting complex trajectories, identifying different motion modes and providing diffusion-associated parameters of the identified segments.
it requires the adjustment of a minimal set of parameters.
combined with our homemade software named patrack, which is freely available on the website of the laboratory  <cit> , our algorithm can accurately analyze membrane dynamics of single molecules or larger assemblies, such as viruses  <cit> .

 diffusion and partition of components of the plasma membrane into specialized areas, especially their lateral segregation and organization into micro or nanodomains, are key events in cell function. different domains involving lipid-protein-protein interactions have been identified at the cell surface and most of them are enriched in specific lipids such as sphingolipids and cholesterol. it has been proposed that these lipids create peculiar physical properties within membranes, which are known as liquid ordered phase. proteins anchored to the actin cytoskeleton could also be a barrier confining membrane components in small regions of plasma membrane. in order to better understand the molecular mechanisms underlying this lateral segregation, the diffusive behavior of membrane components has been investigated in living cells using techniques such as fluorescence recovery after photobleaching, fluorescence correlation spectroscopy, and single particle tracking. it has been shown that diffusion of membrane proteins in cell membranes is not limited to pure brownian diffusion. indeed, two other modes of motion have been so far identified within membranes, namely directed and confined, that includes tethered diffusion or diffusion in the presence of obstacles. in addition numerous studies have highlighted that single molecules could present complex behavior, namely switching between the different modes of diffusion described above. for instance, it was early described by jacobson’s group that the glycosylphosphatidylinositol -anchored protein thy could be transiently confined in specific areas identified as raft microdomains. more recently, a similar behavior was observed with another gpi-anchored proteins that can be transiently trapped in confinement zones named stall. a combination of confined and brownian diffusion modes within a trajectory has also been observed for transmembrane proteins such as tetraspanins, the epidermal growth factor receptor and the cystic fibrosis transmembrane conductance regulator channel. also transient directed motion was observed for gamma amino butyric acid receptors in nerve growth cones. spt that consists in visualizing diffusing single molecules and frame-by-frame reconstruction of their trajectories is especially relevant to probe the dynamics of heterogeneous systems such as biological membranes or, more generally, diffusion and transport of molecules or cargos in cells. spt can locate each particle with sub-diffraction resolution by reshaping the optical point spread function and measure its dynamics, instead of an ensemble average. nowadays, tracking is mainly performed using fluorescent proteins or chemical dyes. in the case of single molecule tracking, very stable fluorescent probes are required such as the organic dye atto647n or quantum dots. labeled molecules are then detected using high numerical aperture objectives and highly sensitive and rapid cameras. using such strategy, it is now possible to track fluorescent single molecules within membranes of living cells and to analyze their behavior, i.e. diffusion coefficient, velocity and motion modes. analysis of diffusion in spt experiments is generally performed by connecting the position of fluorescent dots at different time points into a trajectory and by plotting the mean-square displacement  < r2 > versus time lag. from this plot, one can discriminate between brownian, confined or directed trajectories. however, it is also important to identify different modes of diffusion within a trajectory and three main types of methodologies have been developed so far. the first one is based on msd analysis. jacobson’s group has early created an algorithm, which is based on the determination of a confinement index that corresponds to the probability that a given protein would stay in a region for a period of time. an algorithm to detect transient directed motion has also been developed by dahan’s group by calculating a speed correlation index describing the high temporal correlations of the speed in directed motions compared to brownian motion. in both techniques a sliding time window is used to achieve a local analysis. the second methodology is based on bayesian analysis. masson’s group developed a bayesian decision tree for the classification of the mode of motion of single molecule trajectories, especially suitable to discriminate between brownian and confined trajectories whereas bathe’s group applied bayesian model selection to hidden markov modeling to infer transient transport states of mrna-protein complexes often displaying trajectories alternating directed and brownian trajectories. the third methodology is based on a supervised support vector classification suitable to segment a trajectory into different motion modes including directed and confined behaviors, without sliding windows. another way to describe the heterogeneity of plasma membrane is to evaluate the anomalous sub-diffusion, a hindered diffusion in which the hindrances change the actual form of the time dependence, not just the numerical value of the diffusion coefficient. anomalous diffusion is described by the power law < r2 > ~dtα where α equal to for brownian diffusion, < for sub-diffusion and > for super-diffusion. the presence of multiple diffusion regimes within a trajectory can also be determined by analyzing the probability distribution of square displacement. in this case, pdsd describes the probability that a particle will be found within a circle of radius at time. with the two last methods, it is impossible to know when and where the change in the diffusion mode occurs. in this paper we present a new approach to automatically discriminate between different modes of membrane diffusion within the same trajectory using back-propagation neural network. bpnn is the most widely used type of artificial neural networks. it typically consists in many simple processing elements called neurons, which are grouped in layers. all nodes of a layer are connected to all the nodes in the adjacent layers by interconnections called synapses. here bpnn was trained using simulated brownian, confined, or directed trajectories to determine the motion modes of single molecule within a trajectory thanks to a sliding window. validation of the algorithm in identifying different motion modes was achieved using synthetic data. the algorithm was then tested with trajectories recorded in living cells, especially a transmembrane protein diffusing within the plasma membrane.fig. architecture of the neural networks. a upper panel: schematic view of the three-layer back propagation neural network. each input value is passed through the neural network. the output value is compared with the desired target output, an error is computed and this error is propagated backward through the network to each node. lower panel: graphical representation of the model neuron j or threshold unit. the threshold unit receives input, called xi, from m other units. the associated weight is called w i. the total input a j is the sum over all inputs. the activation function f of the neuron is a sigmoid and y j is the output of the neuron. b schematic diagram of the algorithm used to detect 2d diffusion modes within a trajectory. the trajectory is split in overlapping segments of length s using a sliding window. the msd curve is calculated for each segment, normalized, presented to the neural network and classified according to three main diffusion modes. a score is obtained for each frame of the movie and attributed to all the frames of the sliding window  a. backpropagation neural networks architecture and algorithm bpnn was created with one hidden layer between input and output units. all nodes of a layer were connected to all the nodes in the adjacent layers. the bpnn included two working phases, the learning and the recall phase. during the learning phase, known data sets were used as a training signal in input and output layers. the first operation for the learning phase is the feed-forward operation. during this operation, each input neuron receives an input signal and broadcasts this signal to the connected neurons in the hidden layer. each neuron in the hidden layer computes its activation and sends the result to the output neuron. mathematically, a 3-layer bpnn with m, n, and p, the number of input, hidden and output nodes, respectively, is based on the following equation: ok=f∑j=1nwjk×f∑i=1mwijxi ok is the calculated output of the kth neuron in the output layer, xi the input values of the network, wij the connection weight from node i to node j, wjk the connection weight from node j to node k, f is the activation function of the neuron which is classically a sigmoid function as defined in eq.. fx=11+e−x targeted outputs from each training pattern are compared with the actual activation level of the output units and the difference between the two determines the system error. e= ∑k=1pok−tk p is the number of output neurons, ok and tk are the calculated output and the target output, respectively, of the kth neuron in the output layer. the second operation of the learning phase is the backward pass in which a gradient descent method is used to minimize the error in the training set. starting from the output layer, the error is backward propagated through the network, layer by layer, by recursively computing the local gradient error of each neuron. the connection weight is then changed in proportion to the negative of an error derivative using the following equation: Δwi,jt+1=−η∂e∂wi,j+αΔwi,jt Δwi,j is the weight increment minimizing e between the jth neuron and the ith neuron at the th iteration. η is the learning rate and α is the momentum parameter. α is chosen between and typically, a value allowing high learning rates. using a momentum term is the simplest method to avoid oscillation problems when searching the minimum value of the error surface. this forward-backward process is repeated for each input signal. the bpnn is trained by repeatedly presenting a series of input/output pattern sets to minimize the mean squared error: mse=1nxp∑l=1n∑k=1ptlk−olk n is the number of input vector and p is the number of output neurons. olk and tlk respectively denote the calculated output and the desired output of the kth neuron when the input vector l is applied to the network. the recall phase is performed in one pass using the weight obtained in the learning phase. the input signal of this bpnn is the normalized mean square displacement of a trajectory as a function of time. msd analysis is one of the most widely used approaches to extract reliable values of the diffusion coefficient d and consists in plotting the msd versus time lag according to the equation: msdnδt=1n−1−n∑j=1n−1−nxjδt+nδt−xjδt2+yjδt+nδt−yjδt where δt is the time interval between two successive frames, x and y are the particle coordinates at time t, n is the total number of frames, and n is the number of time intervals. for brownian motion, the msd curve increases linearly with time increment δt. the curve exhibits an upward or downward curvature for directed or confined motions, respectively. in our system, the types of movements described above are discriminated by analyzing the trajectory with the algorithm using a sliding window with a size s. a three-layer bpnn with three output nodes was constructed, one for each motion type, namely brownian, directed and confined. we chose one hidden layer with five hidden nodes. input variables were normalized and scaled into values in the range of – ). three output values are assigned to each motion mode and normalized. training procedure and validation sets the network was trained using data sets of simulated trajectories. one thousand trajectories of  s duration were simulated for each type of diffusion mode with a 100 ms time increment. for confined diffusion, the particle displays a brownian diffusion in a constrained area with a variable diameter value l. for directed diffusion, a term of constant drift velocity v in one direction all along the trajectory is added to the brownian movement. one part of the data sets is used for training, the other one for cross validating with different parameters. the performance of a trained bpnn was first evaluated using new naive simulated patterns and by computing the percentage error between calculated output and expected values. it increased for a given diffusion coefficient when the confinement size decreased for confined trajectories or when the velocity increases for directed trajectories. the learning procedure was performed with different datasets of trajectories of, and  s durations. under our conditions, a similar probability of detection of directed diffusion modes was obtained for and frames. the size of the sliding window was therefore fixed to frames, a value at which the probability of detection of 1 μm diameter confinement is still possible and obviously allows detecting smaller segments as compared to frames. considering directed trajectories t and t with respective diffusion coefficient d and d and velocity v and v the normalized msd curves will be similar if:fig. percentage of detection of confined and directed diffusion modes as a function of the size of the sliding window s the probability of detection of confinement or directed motion in simulated trajectories was calculated for different length of segment used to calculate the msd, or frames). the probability of detection of confinement in trajectories is expressed as a function of the diameter confinement l whereas the probability of detection of directed motion is expressed as a function of the velocity v1=v0d1d similarly the normalized msd curves will be similar between confined trajectories t and t with respective diffusion coefficient d and d and confinement diameter l and l if: l1=l0d1d determination of the detection threshold of confined and directed motion within a trajectory the frames sliding window described above is used to split the trajectory in different segments and is positioned at the point i = / of the trajectory in order to define a first segment containing the first points. the msd curve is calculated for this frames trajectory and is presented as an input to the neural network after normalization. the output values of the neural network ob, oc and od correspond to the probability of the particle to diffuse according to one of the diffusion modes. these values are attributed for each frame of the sliding windows. the sliding window is then translated to the point i +  in order to analyze the next segment of the trajectory and the procedure is repeated up to the point i + n = n-. for each frame of the trajectory, the average of output values corresponding to the probability of assignment of one of the diffusion modes of each frame during bpnn analysis, are plotted as a function of time. however, statistically, some pure brownian trajectories can transiently display a behavior that is similar to confined or directed ones. therefore, we determined a threshold value in order to distinguish the true confined or directed part of the trajectory from that due to brownian fluctuations. to do so, brownian trajectories of frames were generated and analyzed. we then plotted the bpnn output values threshold yc as a function of the number of consecutive frames for which the percentage of falsely attributed as confined segments by the neural network did not excess 5 % of the total number of frames of the brownian trajectory. these thresholds are used to identify the segments that are confined or directed within a trajectory.fig. determination of the detection threshold of confined and directed diffusion modes. the bpnn output thresholds for confined diffusion mode y c and directed diffusion mode y d were calculated for confined diffusion mode and directed diffusion mode by plotting as a function of the number of consecutive frames the bpnn output for which the neural network falsely indicated, in 5 % of the cases, a confined or directed motion for a brownian trajectory fig. analysis of the motion modes within synthetic trajectories. a detection probability using bpnn. trajectories of frames including one directed motion segment with  μm/s velocity and one confinement segment with 1 μm diameter were analyzed with bppn. the percentage of decision based on bpnn corresponds to the number of positive decision for a specific motion mode detected for a given frame over trajectories and normalized to or - for confined or directed trajectories, respectively. the algorithm was also tested with a 30 nm localization noise. b the upper panel shows a synthetic trajectory of 40 s including a transient confinement with a diameter of 1 μm and a transient directed motion with a velocity v =   μm/s. the brownian part is in black. the diffusion coefficient d is  μm2/s and the integration time 100 ms. scale bar, 1 μm. c the lower panel is the plot of the probability of detection of motion mode as a function of the duration time of the trajectory for confined or directed motion. confined and directed segments are respectively detected between and  s and between and  s as shown by grey lines. the detection threshold values correspond to a probability of detection with a 95 % confidence. the calculated diameter of confinement is  μm b. validation of the algorithm the algorithm was first validated using synthetic trajectories of frames, containing one frames segment of both confinement and directed motion, tested with or without a 30 nm localization noise. the percentage of decision based on bpnn corresponds to the number of positive decision for a specific motion mode detected for a given frame and normalized to or - for confined or directed trajectories, respectively. confined and directed segments were detected by the bpnn with good accuracy. an example of trajectory is shown in fig. 4b and c. duration of confinement and directed segments was slightly underestimated by the bpnn, respectively  s and  s instead of 5 s. data from part of the trajectory identified as directed or confined were respectively fitted with the equations  and described in the methods section. the confinement diameter and the velocity were estimated to be  μm and  μm/s, respectively. these values are in good agreement with the parameters of the simulation. as expected, apparent diffusion coefficients from brownian segments were estimated around  μm2/s. no changes in the bpnn-based decision were observed when adding 30 nm positioning noise. we also evaluated the capacity of bpnn to detect small segments within a trajectory. simulated trajectories of frames containing confined segments of various lengths were created and the probability of detection named decision based on bpnn was calculated as a function of the segment length. a similar process was used for directed motion mode. our results indicate that our algorithm is able to detect and 90 % of the confined or directed motion modes within a frames segment, respectively. these values dropped down to and 72 % for frames segments and to and 43 % for a frames segment. the percentage of detection dropped below 10 % when the length of the segment is smaller than frames. it is important to indicate that this evaluation has been performed with diffusion parameters close to those often encountered within biological membranes. the percentage of detection could be largely improved for a higher velocity. similarly decreasing the sliding window improves the detection accuracy for confined trajectories. our objective here was to provide as a proof of concept a tool with efficient detection of both directed and confined segments within the same trajectory. c. comparison with other methods as mentioned in introduction, several algorithms have been developed to segment different types of motion within trajectories. we then compared our bpnn-based method to freely available algorithms. two methods are based on bayesian analysis and specialized in the detection of confined or directed -bayes ) segments within a trajectory. the third method is a machine learning method based on trajectory segmentation using supervised support vector classification. the comparison was performed using setting parameters and simulated trajectories similar to what is described above, namely trajectories of frames including one directed motion segment and one confinement segment always localized at the same position, both with a length of frames, the velocity randomly ranging from to 3 μm/s for directed motion and one confinement segment with diameters ranging from and  μm for confined motion. under theses conditions, the four methods were found very specific with detection accuracy larger than 95 %. larger differences were observed in terms of sensitivity and our algorithm was able to respectively detect and  % of confined and directed frames segments within a frames trajectory. we also evaluated the time of calculation that is important to take into account since spt requires a large sampling to get significant results. most likely because our algorithm was developed in the visual c++ environment, the computational time was very low, typically less than 1 s for analyzing a frames trajectory using a pc windows intel core 5tm) i7-2640 m cpu  ghz. d. segmentation of real trajectories the algorithm was then used to segment trajectories reconstructed from movies recorded in living cells. the bpnn was used in the context of the tracking of yfp-labeled moloney murine leukemia viruses in human embryonic kidney cells using total internal reflection fluorescence microscopy. the behavior of such a viral particle can be brownian, confined when trapped within membrane of host cells or directed when the particle is exported from the cytoplasm to the plasma membrane. an example of such a complex trajectory alternating between different motion modes is shown in fig. 5a and the analysis by the neural network in fig. 5b. the algorithm detects three different motion modes within the trajectory. a confinement was detected during  s in a zone of 170 nm diameter, a size in good agreement with a previous report for murine polyoma virus-like particles. directed motion was also observed during 4 s with a velocity of  μm/s that compares well with that previously reported for mlv. the rest of the trajectory was brownian. we also tested the bpnn algorithm by analyzing a set of trajectories of the tetraspanin cd recorded in hela cells. this molecule is a transmembrane protein expressed in the plasma membrane that has been demonstrated to diffuse mostly in a brownian mode but can be transiently or permanently confined in membrane areas enriched in tetraspanins and their partners. trajectories including transient confinement of cd molecules are called “mixed trajectories” because of the combination of brownian and confined behavior. apparent diffusion coefficient of cd molecules was first determined using the first points of the plot of the msd as a function of time and the mean value of cd apparent diffusion coefficient was similar to that previously reported in the plasma membrane of hela cells. interestingly the bpnn was able to directly detect mixed trajectories, in addition to pure brownian and pure confined trajectories. these percentages also compared well with those described in. similarly to what is described in fig. the bpnn provided the number of frames of each identified segments and the corresponding apparent diffusion coefficient. the diameter of confinement associated to these segments was calculated from msd analysis and, in agreement with a previous report, the diameter of confinement was smaller for pure confined trajectories as compared to the one of confined segment in mixed trajectories.fig. analysis of the motion modes within a real trajectory of a moloney murine leukemia virus particle in hek cells. the upper panel shows the trajectory of a mlv particle containing yfp-tagged gag proteins recorded in infected hek cells, tracked using tirf microscopy and recorded at a 100 ms integration time. the confinement area is zoomed in the red circle. the lower panel is the plot of the probability of detection of motion mode as a function of the duration time of the trajectory. a zone of confinement is detected during  s with a diffusion coefficient of  μm2/s and a diameter of 170 nm. directed motion is indicated during 4 s with a diffusion coefficient of  μm2/s and a velocity of  μm/s. scale bar, 500 nm fig. single molecule tracking of the tetraspanin cd in hela cells. the panel is a dic image of a single hela cell and the red lines represents some recorded trajectories of single molecules. the lower panel represents the scatter plots of cd apparent diffusion coefficients calculated from the msd analysis of trajectories in hela cells. each point represents one trajectory and the diffusion behavior, which has been determined using the bpnn neural network, is indicated with a color code green, brownian named blue, mixed named m). the upper scatter plot corresponds to the totality of the trajectories. panel shows the confinement diameter calculated from the confinement segments identified using bpnn for confined and mixed trajectories discussion in this work we propose a new approach to identify and automatically characterize the diffusion behavior of single molecules encountered within biological membranes. the novel algorithm we have developed is based on artificial neural network analysis that has already been applied in biology, e.g. to predict protein secondary structures. such a computational approach is especially suitable to solve complex behavior with non-linear relationships between independent and dependent variables. we demonstrate here that it can be applied to probe the heterogeneity encountered within trajectories of membrane components of eukaryotic cells by segmenting trajectories into different modes of diffusion with a good accuracy. based on msd analysis, the algorithm is able to accurately discriminate between brownian, confined and directed diffusion over a wide range of confinement areas and velocity and it is therefore possible to detect transition between these modes. this is especially interesting in the light of observations showing that diffusing molecules or particles often display a complex behavior rather than a single motion mode. such an analysis can provide important information about the mechanisms of membrane partitioning in living cells, especially when combining spt and ensemble labeling. the new algorithm is based on a bpnn trained with short synthetic trajectories of particles displaying brownian, confined or directed motion modes. we intentionally chose sets of synthetic trajectories with diffusion parameters close to the values mainly described in the literature for proteins diffusing within biological membranes using single molecule fluorescence microscopy. the algorithm could be eventually further developed by training the bpnn with a larger range of values for the different modes of diffusion, but could also included new mode of diffusion such as slow and fast drifting motion. it could probably be extended to the analysis based on anomalous diffusion. similarly to other trajectory segmentation-based algorithms for analyzing motion modes, detection was performed using a sliding window allowing detection of temporal changes in the mode of motion within a trajectory. here, we applied a sliding window of frames corresponding to the length of synthetic trajectories used for bpnn training. we chose a segment length small enough to measure local behavior but large enough to get sufficiently accurate output values. under these conditions, it was possible to confidently identify motion modes for segment sizes as short as frames. this value compared well with other algorithms that do not use a sliding window, e.g. the segmentation of trajectories based on based on supervised support vector classification that requires a minimum segment length of frames to get 60 % detection rate. some algorithms are able to detect smaller segments such as the hmm-bayes algorithm that is very accurate in detecting directed diffusion segments of frames. however it requires a minimum number of observed particle displacements within the trajectory to infer the presence of multiple motion states whereas our algorithm does not require prior information, a very important feature since the diffusion-state switching occurrences is a stochastic process and that the trajectories recorded with organic dyes are generally short due to low photo-stability. under the experimental conditions tested in this paper, which mimic the plasma membrane of eukaryotic cells, our method was found very sensitive, specific and versatile, able to accurately detect both confined and directed segments within trajectories. it appears to be very competitive in regards to the results obtained with other methods already freely available, at least in the conditions tested in this study. in addition, the computational time required by our algorithm is very low, a very important feature since spt requires the analysis of several hundreds of trajectories. this is partly due to its implementation in visual c++, which is stable even for high load. the bpnn algorithm could be applied to high-throughput analysis or screens. another interesting property lies in its absence of sensitivity to the noise positioning.  we demonstrated in this study that our algorithm provides a new conceptual, versatile and useful tool in dissecting complex trajectories, identifying different motion modes and providing diffusion-associated parameters of the identified segments. it requires the adjustment of a minimal set of parameters. combined with our homemade software named patrack, which is freely available on the website of the laboratory, our algorithm can accurately analyze membrane dynamics of single molecules or larger assemblies, such as viruses. 
the neural network was trained and cross validated with short synthetic trajectories. for simulated and experimental data, the algorithm was shown to accurately discriminate between brownian, confined and directed diffusion modes within one trajectory, the main of diffusion encountered for proteins diffusing within biological membranes. it does not require a minimum number of observed particle displacements within the trajectory to infer the presence of multiple motion states. however, to get statistically significant results in tracking experiments, analysis of a large number of trajectories is required and new methods facilitating this analysis are still needed. indeed membrane components of eukaryotic cells are very dynamic molecules and can diffuse according to different motion modes. in this study we developed a new algorithm based on back-propagation neural network and msd analysis using a sliding window. single molecule trackingmembranediffusiontrajectoryneural networkissue-copyright-statement© the author 2016 single particle tracking is nowadays one of the most popular technique to probe spatio-temporal dynamics of proteins diffusing within the plasma membrane. this new algorithm, implemented in powerful and handy software, provides a new conceptual and versatile tool, to accurately analyze the dynamic behavior of membrane components. the size of the sliding window was small enough to measure local behavior and to detect switches between different diffusion modes for segments as short as frames.
 single particle tracking is nowadays one of the most popular technique to probe spatio-temporal dynamics of proteins diffusing within the plasma membrane. indeed membrane components of eukaryotic cells are very dynamic molecules and can diffuse according to different motion modes. trajectories are often reconstructed frame-by-frame and dynamic properties often evaluated using mean square displacement analysis. however, to get statistically significant results in tracking experiments, analysis of a large number of trajectories is required and new methods facilitating this analysis are still needed.  in this study we developed a new algorithm based on back-propagation neural network and msd analysis using a sliding window. the neural network was trained and cross validated with short synthetic trajectories. for simulated and experimental data, the algorithm was shown to accurately discriminate between brownian, confined and directed diffusion modes within one trajectory, the main of diffusion encountered for proteins diffusing within biological membranes. it does not require a minimum number of observed particle displacements within the trajectory to infer the presence of multiple motion states. the size of the sliding window was small enough to measure local behavior and to detect switches between different diffusion modes for segments as short as frames. it also provides quantitative information from each segment of these trajectories. besides its ability to detect switches between modes of diffusion, this algorithm is able to analyze simultaneously hundreds of trajectories with a short computational time.  this new algorithm, implemented in powerful and handy software, provides a new conceptual and versatile tool, to accurately analyze the dynamic behavior of membrane components. electronic supplementary material the online version of this article contains supplementary material, which is available to authorized users. keywords single molecule trackingmembranediffusiontrajectoryneural networkissue-copyright-statement© the author 2016 