The Nematoduino Model

The current deployment of DeepWorm uses an implementation of the Nematoduino model to simulate the C. elegans' nervous system

Nematoduino is an Arduino-compatible implementation of the Nanotode model to run a robotic simulation of the C. elegans' nervous system. The model uses a simplified leaky integrate-and-fire model to replicate the spiking neural network of a worm. The inter-neuron connection weights are retrieved from the OpenWorm project.

A sneak peek into the worm's nervous system

The model consists of 397 cells, of which, 299 are neurons and 98 are muscles. As can be imagined, environmental stimuli trigger certain sensory neurons, which when activated pass on signals through the nervous systems that eventually cause muscles to flinch, thus making the worm move.

Of particular interest amongst the 299 neurons are 8 chemotaxis neurons that respond to chemical stimulus, 10 nose touch neurons that cause avoidance behavior and 21 Motor A type neurons. Other neurons that are responsible for thermosensation, mechanosensation or proprioception are outside the scope of this simplified model. Similarly, the model simulates 60 body and 16 neck muscles equally distributed between both halves of the body.

These cells are connected to one another with a certain weight. Information on which cell is connected to what others and with what weights (the connectome network) is encoded in the neural_rom.c file which you may refer to for further information.

Simulating the leaky integrate-and-fire model

The simulation assigns every cell an integer state value which is initially assigned the value 0 for every cell. The simulation proceeds in iterations called a tick. Each tick begins with a stimulus where inputs are the ids of a subset of the 8 chemotaxis and 10 nose touch neurons that are to be activated. Worm.c provides two helper functions Worm_chemotaxis(Worm *worm) and Worm_noseTouch(Worm *worm) that individually activate all chemotaxis and nose touch neurons respectively.

Once a subset of neurons are activated, the state value of every neuron connected to those neurons are updated by the corresponding connection weight based on connections and values prescribed by the connectome network. Over multiple ticks, if any neuron's state value crosses a threshold (currently set to 30), it in turn causes the state value of every neuron it is connected with to increase with the corresponding connection's weight. The discharged neuron's state value itself resets to 0.

If a certain neuron's state doesn't change over 10 ticks, its state value resets to 0. This is known as a leaky integrate-and-fire model as the state value either crosses a threshold and triggers its neighboring neurons or leaks charge due to inactivity.

How does the worm move?

At the end of every tick of the simulation above, muscles like neurons have their state values updated whenever neurons neighboring them cross their activation threshold. The distance the worm moves is a combination of the values in neck and body muscles. On the other hand, if the sum of state values in left and right neck muscles differ, the worm changes direction.

Additionally, if sufficient number of Motor A neurons get discharged too soon, the worm flips direction relative to what would be computed by difference in state values of the neck muscles alone.

These behaviours are documented in the Worm_update function in Worm.c.

Last updated