Tuesday, December 29, 2015

Biological Patterns: Turing and Young

The development of living creatures is all about he formation of patterns. Where hairs/feathers/scales grow on the skin; where ribs form; how many limbs grow; what colors develop and how they're organized...  Without patterns in development, none of those familiar details of organisms would exist. Smaller organisms would be vaguely spherical collections of cells, while larger organisms would be more flattened (if living on land, somehow) blobs of larger collections of cells. This is simply what would result from undirected growth and physics and doesn't interest me. Biological patterns, on the other hand, are complicated and interest me a great deal.

Turing 1952, Fig 3.
Our modern understanding of biological patterns started with a mathematical (and theoretical biology) paper by Alan Turing in 1952. In "The Chemical Basis of Morphogenesis", Turing's key observation is that a system of two components with specific interactions will form semi-periodic waves in space. An "activator" encourages the production of itself and an "inhibitor", which... inhibits the production of the activator. A critical aspect of this reaction is the relative diffusion rates of the components. The activator diffuses poorly, while the inhibitor diffuses readily. All of these characteristics can be described by a small set of differential equations.

Graphic edited from paper.
These differential equations indicate there will be no changes if the space being calculated over is entirely uniform, but the slightest irregularity results in dramatic changes. Regions with slightly too much activator grow and induce inhibition in neighboring regions. Regions with slightly too much inhibitor grow and induce activation in neighboring regions. Quickly the system stabilizes into a series of maxima and minima, visually forming spots/stripes of activation (or inhibition).

Young 1984, Fig 1.
Calculating the change of the activator and inhibitor concentrations over time become computationally expensive if we want to simulate a high-resolution system. Young described a simplification of the activation/inhibition system in his 1984 paper. Because the inhibitor diffuses more readily than the activator, we can think of the neighborhood around each active cell to contain two circular regions. The inner region is where the effect of the activator is dominant. The outer region is where the inhibitor is dominant. These regions can be simplified into two distinct circular regions with uniform activation and inhibition, respectively, instead of the continuous curves described by the differential equations. (Young 1984, Fig 1.)

Young 1984, Fig 2 (left) & Fig 3 (right).
This simplified system is much easier to calculate over a large grid, as a cellular automata. For each pixel, any active cells in the inner region are activating neighbors, while those in the outer region are inhibiting neighbors. If a cell has more activating than inhibiting neighbors, the cell becomes active in the next turn. If a cell has more inhibiting than activating neighbors, the cell becomes inactive in the next turn. If a cell has an equal number of activating and inhibiting neighbors, the cell remains in its current state in the next turn. Depending on how you scale the active/inactive counts, you get a range of patterns. (Young 1984, Fig 2.) Applying the same simplification to an activator/inhibitor model with anisotropic (not the same in each direction) diffusion results in stripes. (Young 1984, Fig 3.)

I came across Young's model sometime while I was in high-school, roughly a decade after his paper was published. I was already playing with more conventional cellular automata using software I had written, so I added a module to play around with Young's model.

Fig d1.
One of the first images I produced (Fig d1) illustrates what happens when you bias the ratio of counted active/inactive neighbors. The x-axis biases the active neighbor count (from 0.0 to 1.0), going right. The y-axis biases the inactive neighbor count (from 0.0 to 1.0), going down.

Fig d2.
Next I tried scaling the neighborhood diameters. What I got was seemed to be a random association of diameters to pattern type produced. I didn't clue in to what might be going on until I calculated the effect of smoothly scaled diameters across a single image (Fig d2, top). I realized that the regions I had been using were aliased. Small increases in diameter were resulting in 'random' increases in the number of cells being counted in each region. After rewriting a bunch of code to use pre-defined neighborhood masks, I was able to confirm that using anti-aliased regions produced the pattern I had expected at the start (Fig d2, bottom).

Fig d3.
With the better way to define neighborhood regions, I started adjusting the radius of each region separately. I used some Fourier transforms of the resulting images to help me sort out what was going on, but I didn't save those figures. It turns out that the average feature size in the produced images is the same as the average of the two diameters used in defining the neighborhoods. If the two diameters are further apart, the resulting images show a greater range of feature sizes. By setting the region diameters appropriately, you can design the resulting image to have feature size and feature size variation characteristics of whatever you choose.

Fig d4.
It was also easy at this point to examine the results of anisotropic diffusion in the model. If both regions are squashed in the same direction, the resulting pattern looks more or less normal... only squashed (Fig d4, left). If the regions are squashed in different directions, stripes result (Fig d4, right.). I don't know what happens when anisotropic diffusion is applied to spots vs. stripes. I should explore that.

Fig d5.
Smoothly changing the size of the ellipse neighborhoods produces an appealing network of stripes of different thickness. (Fig d5.) This pattern reminds me of the pattern of stripes [sometimes] seen on the back of cuttlefish.

Fig d6.
Smoothly rotating the ellipses did not produce the results I expected. (Fig d5.) I played around with my code for a while, but never got diagonal stripes to form. I expect the problem is some artifact/bug in the code, rather than something intrinsic about the system, but I still don't know where. It might take rewriting the code from scratch to find my way around it.

Fig d7.
Biological patterns are rarely ever so simple as the outputs of this model have been, so I attempted to simulate added complexity by calculating combinations of Young's model with different factors driving the interaction between one activator/inhibitor pair and another. (Fig d7.) In my example we see two different kinds of spots forming, with interesting interactions between them in the lower middle section.

One of the random interactions I simulated resulted in animated, mobile spots that would wander around the screen and occasionally replicate. Apparently, it doesn't take a very complicated system to start gaining some life-like features. Unfortunately, I hadn't written the program to display the random settings it had chosen. There was no way for me to save them. (I've since then rewritten the code to save any random settings. I will find those amoeba again!)

When I started graduate school, I had to set aside my explorations into theoretical biology like this. I'm now done with graduate school and find myself with sufficient free time to post to this blog, so I know I'll find the time to continue exploring the simulation of biological patterns.

Given the wide range of patterns seen in biology, I strongly suspect there are a great many more interesting results to be found exploring combinations of the simplified activator/inhibitor system described by Young's model.