Skip to main content

Prototype Model


The development of a prototype model was aimed at simulating a very simple blebbing procedure (in which there is an underlying Markovian process dictating the position of the bleb ). Implementing the HMM on the developed model gave an insight into the effectiveness of the HMM in detecting the hidden process and a format template for the actual data. The prototype model made it clear that in order for the HMM to produce viable results, a substantial number of events need to occur at each pixel, suggesting that the HMM is better suited to work with larger data sets .

The basis of the prototype model was an initial image of a circle, modelling the undeformed cell. Smaller circles were then superimposed on the boundary of the initial circle, to act as a very primitive model of bleb formation. Once a substantial amount of data was simulated, the HMM was then implemented on the simulated dataset to verify whether the underlying blebbing process could be detected.

Model Outline

Original Model

The original model initialises with a circle (whose radius is defined by the user) at the centre of a user-defined grid. A matrix representation of this grid is then constructed (i.e the matrix and grid have the same dimensions), with the value 1 being assigned to a position if it is within the circle's interior or boundary, 0 otherwise. This is illustrated in Figure \ref{fig:original1}.

Subsequently, the boundary of the cell/circle is located, and the positions in the matrix are stored as a vector. These boundary values are replaced with values between 1 and 6, which are assigned uniformly at random. After assigning values along the boundary, local averaging was implemented, by averaging over a local 5 \times 5 matrix around the given position in the matrix. So for the matrix shown below there would be a local averaging around \mathbf{a_{2,2}}, thus giving a local smoothing of the boundary values. The local smoothing was implemented to ensure that the assigned values do not change drastically when moving from a pixel to its neighbour.

\begin{bmatrix} a_{0,0} & a_{0,1} & a_{0,2} & a_{0,3} & a_{0,4} \\ a_{1,0} & a_{1,1} & a_{1,2} & a_{1,3} & a_{1,4} \\ a_{2,0} & a_{2,1} & \mathbf{a_{2,2}} & a_{2,3} & a_{2,4} \\ a_{3,0} & a_{3,1} & a_{3,2} & a_{3,3} & a_{3,4} \\ a_{4,0} & a_{4,1} & a_{4,2} & a_{4,3} & a_{4,4} \end{bmatrix}

After generating locally smoothed integers in the range [1,6], bleb positions were then selected. The maximum values in the matrix were then selected to be the positions where a bleb may form. In the event that multiple maxima were present, one of the maxima was selected at random. After selecting the bleb position, a circle of a smaller radius (which is again defined by the user) is centred at this position, thus producing a bleb. The mechanism of selecting maximum values acts as an underlying process, which was to be detected by the HMM. The above procedure was repeated until a data set large enough to be used in the HMM is generated. An example of this model can be seen in Figure \ref{orginal}, demonstrating progressive bleb formation.

 oricirc1 oricirc2 

 oricirc3 oricirc4

Pictures above show the evolution of the original model over 4 time-steps. The larger circle represents an initial cell, with the smaller circles modelling blebs.

Alternative Model

The alternative model adopts the same procedure as the original model, except for the fact that it no longer stores the superimposed blebs, but rather ''resets" the bleb at each iteration to its original undeformed shape. The alternative model places a bleb on the boundary in one time-step, then chooses another position on the boundary of the original circle for the position of the next bleb . This is shown in Figure \ref{fig:alternate}, which explicitly demonstrates that there is only one bleb in each frame as opposed to the numerous blebs seen in the original model.

originalcircle1-1.jpg alternativecircle2.png

 altpic3 altcirc4

Pictures above show the evolution of the alternative model over 4 time-steps. The larger circle represents an initial cell, with the smaller circles modelling blebs. Note that each time-step only contains one bleb.


Implementation of the HMM

The HMM operates by taking some observed data alongside some unobserved data, and then estimating the transitional relationship between time-steps of the hidden data and the correlation between the hidden and observed data. To implement the HMM on the alternative model, hidden data was required to represent the blebbing state.

To this end, the hidden data was represented as a matrix of zeros except for the intersection of the bleb and the outline of the previous time-step. The purpose of this was to signify that the pixel intensity in this region was where the underlying hidden property lay. The bleb region then had weightings assigned in accordance with the proximity to the midpoint, giving the HMM more states for the hidden data. For example, if the hidden data was binary then the transitional probabilities would only be a 2 \times 2 matrix representing all possible transitions between the states no bleb (state 0) and bleb (state 1). On the other hand, by weighting the endpoints we obtain a 3 \times 3 matrix which would offer more insight into bleb formation rather than a simple bleb or no bleb scenario.

hid2 alternativecircle2.png

hid4 alternativecircle4.png

The hidden data alongside it's equivalent observed data. The larger circle represents an initial cell, with the smaller circles modelling blebs. The left hand-side shows the corresponding hidden data for given observed data.


After implementing the HMM, we obtain a transition and emission matrix, representing the probabilities of going from one hidden state to another and the probabilities of observing a particular pixel intensity given a particular state in the hidden variable. The transition and emission matrices obtained are unique to each pixel, but collectively give an idea of what influences where blebs tend to form.

Below is an example of the transition (hidden to hidden) and emission (hidden to observed) matrices for a given pixel. The simulated data generating these results had a grid size of 5\times 5, a circle radius of 3, a bleb radius of \frac{3/2}, and ran for 10 000 iterations. The transition matrix shows the probabilities of going from a 0, 1, or 2 hidden pixel intensity to another. Note that due to the size of the data, there was no hidden pixel intensity having value 1, which explains why the central values are all 0. The emission matrix shows the probabilities of observing either of the 6 observable pixel intensities, given the 3 hidden values. Recall that these 6 pixel intensities come from the smoothed assigned values which were placed on the boundary of the circle.

Hidden state to hidden state matrix on the left and Hidden state to observed state on the right.

 T =\begin{bmatrix} 0.8 & 0 & 0.2 \\ 0 & 0 & 0 \\ 0.8 & 0 & 0.2 \end{bmatrix}, \qquad E=\begin{bmatrix} 0 & 0 & 0.08 & 0.5 & 0.4 & 0.02 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0.01 & 0.2 & 0.6 & 0.14 \end{bmatrix}

The two matrices above show that the HMM has produced the expected results as they reflect the underlying hidden process and the hidden to observed process. For the transitional behaviour, the boundary values were randomly assigned at each time-step, so one would expect that the behaviour for each state to be independent and identical. The key indicator of the success of the method comes from the emission probabilities, as we see that the hidden state 2 is more likely to be associated with higher observable pixel states, reflecting the method implemented to select the bleb site.

Model Limitations

Despite the success of the HMM in detecting the hidden and observable process, there were some limitations to the modelling. These limitations had to do with the accuracy with which the simulated process mimiced cell behaviour and the necessity for a considerable number of events to occur at each pixel.

The prototype model was designed to be a simple process with a hidden process and observable process dictating blebbing. The model does not accurately depict actual blebbing behaviour, but this was not the goal of the prototype model. The aim was to verify that the HMM is a suitable candidate to detect these mechanisms, so that when extended to the experimental data there is some confidence that it can detect the underlying processes. The model may then be extended to include movement or use a more sophisticated blebbing process, to better reflect cell behaviour, once initial results are obtained and analysed.

The necessity of multiple blebs occurring at each pixel is a limitation of the effectiveness of the HMM in detecting the underlying behaviour. For much of the actual data, we may only see one bleb occur at most pixels, so the HMM may fail to produce reliable results in such cases.