Training the connectome with a GA

84 views
Skip to first unread message

Tom Portegys

unread,
Nov 1, 2013, 5:48:13 PM11/1/13
to openworm...@googlegroups.com
Hello all. First time poster, although I ran across OpenWorm a few months ago and was inspired
by it, although I know about C Elegans previously. I have some results that might be interesting to the group.
 
I am an organizer for an AI meetup near Seattle and as an example of a genetic algorithm
I thought I'd try the very ambitious task of training the C Elegans connectome.
Probably not a good choice but C Elegans is a bewitching critter, isn't it?
 
I did also find some results from Japan around 2004 doing a GA on a subset of the connectome that worked.
 
Goal: knowing the morphology of the network, but not knowing the synapse weights, can a randomly
generated set of weights be trained to perform a sensory-motor sequence successfully. So start with a
black-box of random weights, pump a sequence of random sensor inputs into it, measure the motor
outputs. Now you have a sequence of sensory-motor values. Now take another randomly-weighted
network and try to train its weights so that it produces the same sensory-motor sequence. Of course
these might not be the same as the original weights.
 
Since I'm not a neuroscientist and just wanted a decent representation I did take some shortcuts:
1. No multiple connections between two neurons.
2. GABA was the only inhibitory transmitter that I was sure of (thanks Wikipedia).
3. No gap junction vs. non gap junction distinction.
4. Neurons use a straightforward logistic activation; weights are 0-1
5. The terminal muscle cells are considered the motors.
 
So here is what I loaded into a network from the connectome spreadsheet:
Neurons: total=396, sensors=86, motors=97
Synapses: total=3680
Synapses per neuron: minimum=1, maximum=57, median=11, mean=12.31
Sensor to motor path lengths: minimum=1, maximum=7, median=4, mean=4.38, mean shortest=3.30
Hopefully I understood the spreadsheet correctly.
 
After a lot of expected failures I came up with a scheme that was a concoction of crossover, mutation and
hill-climbing optimization:
 
For optimization, you pick a neuron then follow a random synapse path of random length from or to the
neuron. You then try combinations of tweaking the weights and see if it affects the error of the network.
Since C Elegans has pretty short minimal synapse paths from sensors to motors, the hope is that some
of these optimizations will produce measureable changes. Nature also likes neural paths that are short
and thus faster.
 
For crossover, when you pick up a neuron from a parent to put in the child, the synapses probabilistically
cling to it so that you might end up putting a cluster of neurons into the child from the parent.
The hope is that these synapses have been optimized together.
 
GA parameters: population of 500 networks, random pairing for crossover. Crossover rate of .5, mutation rate of .05,
elite survival, 250 offspring per generation, 3000 generations.
The goal is to learn a sequence of 10 sensory-motor value vectors.
The result is that it gets down to single digit errors (less than 1% of motor outputs), where an error is defined
as > 5% difference from the expected.
 
I also tried doing two 10-length sequences but haven't had the same success, although that might not
be the way to get multiple trainings done.
 
I was really quite amazed about this and I hope I haven't taken too many liberties, but this indeed seems
interesting. And of course I don't know if a finer grained representation will have the same results.
The code and Readme are at https://github.com/portegys/bionet.
 
 
 

 

Tom Portegys

unread,
Nov 4, 2013, 7:23:39 PM11/4/13
to openworm...@googlegroups.com
Here is the tentative title and abstract:
 
Training sensory-motor behavior sequences in the connectome of an artificial C. elegans

The C. elegans nematode is a small well-known creature, intensely studied for decades. Its entire morphology has been mapped cell-by-cell, including its 302 neuron connectome. The connectome is a synaptic wiring diagram that also specifies neurotransmitters and junction types. It does not however specify the synaptic connection strengths. It is believed that measuring these must be done in live specimens, requiring yet to be developed techniques. Without the connection strengths, it is not fully known how the nematode's nervous system produces sensory-motor behaviors. From a computing point of view, "programming" the unknown connection weights is a challenging and important problem in its own right. An artificial worm embodying the connectome and programmed to perform a set of sensory-motor sequences taken from measurements of the actual C. elegans would behave realistically in an artificial environment. This is a crucial step toward creating a fully functional artificial creature. Indeed, knowing the artificial weights might cast light on the actual ones. In this project a special genetic algorithm is used to train a large space of 3680 synapse weights to perform given sensory-motor sequences.

If anyone is interested I'll post a pointer to the paper when it is ready. 
 

 

Stephen Larson

unread,
Nov 4, 2013, 7:25:08 PM11/4/13
to openworm-discuss
Hi Tom,

  This is a tremendous exploration into optimization of the c. elegans connectome -- I really commend you for this.  This is exactly the kind of exploration OpenWorm was created to foster.  What I like in particular is that your assumptions are practical ways to make progress with the system.    
 
  Responses inlined below:

On Fri, Nov 1, 2013 at 2:48 PM, Tom Portegys <port...@gmail.com> wrote:
Hello all. First time poster, although I ran across OpenWorm a few months ago and was inspired
by it, although I know about C Elegans previously. I have some results that might be interesting to the group.
 
I am an organizer for an AI meetup near Seattle and as an example of a genetic algorithm
I thought I'd try the very ambitious task of training the C Elegans connectome.
Probably not a good choice but C Elegans is a bewitching critter, isn't it?

Love the meetup you have organized -- perhaps some of the Seattle-based folks on the list will check it out. 
 
I did also find some results from Japan around 2004 doing a GA on a subset of the connectome that worked.

I'd be interested in what specific references you found for this. 
 
Goal: knowing the morphology of the network, but not knowing the synapse weights, can a randomly
generated set of weights be trained to perform a sensory-motor sequence successfully. So start with a
black-box of random weights, pump a sequence of random sensor inputs into it, measure the motor
outputs. Now you have a sequence of sensory-motor values. Now take another randomly-weighted
network and try to train its weights so that it produces the same sensory-motor sequence. Of course
these might not be the same as the original weights.

You should check out the attached paper by Izquierdo and Beer 2013.  They've stared with a minimal network (Fig 2.) but their methodology is similar.  If you like, we could reach out to the authors and see if they would share their code.
 
 
Since I'm not a neuroscientist and just wanted a decent representation I did take some shortcuts:
1. No multiple connections between two neurons.
2. GABA was the only inhibitory transmitter that I was sure of (thanks Wikipedia).
3. No gap junction vs. non gap junction distinction.
4. Neurons use a straightforward logistic activation; weights are 0-1
5. The terminal muscle cells are considered the motors.

These are a reasonable first approximation for AI purposes -- except be careful with the gap junctions.  The major difference is that gap junctions are bi-directional, whereas chemical synapses are uni-directional.  That's a pretty significant difference...

 
So here is what I loaded into a network from the connectome spreadsheet:
Neurons: total=396, sensors=86, motors=97
Synapses: total=3680
Synapses per neuron: minimum=1, maximum=57, median=11, mean=12.31
Sensor to motor path lengths: minimum=1, maximum=7, median=4, mean=4.38, mean shortest=3.30
Hopefully I understood the spreadsheet correctly.

Should be 302 neurons total -- how did you get 396?  Maybe we have a bug somewhere in our data?
 
 
After a lot of expected failures I came up with a scheme that was a concoction of crossover, mutation and
hill-climbing optimization:
 
For optimization, you pick a neuron then follow a random synapse path of random length from or to the
neuron. You then try combinations of tweaking the weights and see if it affects the error of the network.
Since C Elegans has pretty short minimal synapse paths from sensors to motors, the hope is that some
of these optimizations will produce measureable changes. Nature also likes neural paths that are short
and thus faster.
 
For crossover, when you pick up a neuron from a parent to put in the child, the synapses probabilistically
cling to it so that you might end up putting a cluster of neurons into the child from the parent.
The hope is that these synapses have been optimized together.
 
GA parameters: population of 500 networks, random pairing for crossover. Crossover rate of .5, mutation rate of .05,
elite survival, 250 offspring per generation, 3000 generations.
The goal is to learn a sequence of 10 sensory-motor value vectors.
The result is that it gets down to single digit errors (less than 1% of motor outputs), where an error is defined
as > 5% difference from the expected.

That's really great!
 
 
I also tried doing two 10-length sequences but haven't had the same success, although that might not
be the way to get multiple trainings done.
 
I was really quite amazed about this and I hope I haven't taken too many liberties, but this indeed seems
interesting. And of course I don't know if a finer grained representation will have the same results.

What I like about this is that your assumptions about the network, though they throw out biological details, let you make progress in the design of a GA that takes a rational approach to optimizing across the whole network.  The assumptions can later be relaxed down the road as you suggest. 
 
The code and Readme are at https://github.com/portegys/bionet.

Fantastic.  I've added it to my GitHub follow list.

Question for you -- would you be interested in making slides and giving a journal club presentation for OpenWorm (e.g. like this one) on the Izqueirdo and Beer paper and then also presenting on your take on this challenge.  Between the two (and maybe that 2004 paper you mentioned), I think we'd capture an important topic in c. elegans neuronal network modeling that would be interesting to a broader audience.

What are your next desired steps with this project?  Would you want to build your issues roadmap into the OpenWorm issues list to help recruit others to help you?
 
Best,
  Stephen
 
 
 

 

--
Visit us online at:
http://openworm.org
http://blog.openworm.org
http://github.com/openworm
http://twitter.com/openworm
https://plus.google.com/s/openworm
---
You received this message because you are subscribed to the Google Groups "OpenWorm-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openworm-discu...@googlegroups.com.
To post to this group, send email to openworm...@googlegroups.com.
Visit this group at http://groups.google.com/group/openworm-discuss.
To view this discussion on the web visit https://groups.google.com/d/msgid/openworm-discuss/2529308a-088e-42d5-8701-7379a87ba917%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Connecting a Connectome to Behavior An Ensemble of Neuroanatomical Models of C. elegans Klinotaxis - Izquierdo, Beer - 2013.pdf

Tom Portegys

unread,
Nov 4, 2013, 8:18:31 PM11/4/13
to openworm...@googlegroups.com
Thanks, Stephen.
 
I didn't have the Izquierdo, Beer paper. I'll read it forthwith and let you know about the club presentation thing. Sounds interesting!
It looks like they trained a selected subset of the connectome, which is what any sane person would do instead of a multi-thousand dimension space. 
 
The paper I mentioned was the a study by Suzuki et al at the University of Hiroshima. I also found some other references, including one by George Shaw: "A Computational View of C. Elegans Neural Circuit Learning, Utilization and Plasticity".
 
Tom
 


Chris Barnes

unread,
Apr 11, 2014, 10:39:30 AM4/11/14
to openworm...@googlegroups.com
Hi,

This is a bit of a necro, but did you get any further looking into this? I'm starting a PhD in Bill Schafer's lab at the LMB, Cambridge in October and was hoping to work on precisely this (based on Izquierdo and Beer). I'm only there for a year before I go across the pond to work on the fly connectome project at Janelia Farm, but hopefully I can be of some use in that time; if there's anything specific you think is worth investigating, I think contributing to OpenWorm is probably the best thing I can do in that year.

InterIntelligence Research

unread,
Apr 11, 2014, 11:30:44 AM4/11/14
to openworm...@googlegroups.com
Chris:

Please keep in touch with me as I am looking into creating a connectome model for Drosphila as I did for C Elegans and hook it up to a quad copter. Any insight or information you might have would be greatly appreciated.

Thanks

Tim Busbice


Stephen Larson

unread,
Apr 11, 2014, 5:23:30 PM4/11/14
to openworm-discuss
We did do a journal club / data club on the topic here where Tom presented his work:


Are you more on the physiology side or more on the computational side?  Either way there's definitely more help needed to pull together work in this space.  

Best,
  Stephen


Project coordinator
"Talk is cheap, show me the code" - L. Torvalds


On Fri, Apr 11, 2014 at 7:39 AM, Chris Barnes <cluster...@gmail.com> wrote:

Tom Portegys

unread,
Apr 11, 2014, 6:27:20 PM4/11/14
to openworm...@googlegroups.com
Hi Chris,
Glad to hear you are thinking of getting involved with the OpenWorm project.
So as Stephen noted, I'm working on training a model of the connectome, currently seeing if it can produce undulations when stimulated. I just got some training on an XSEDE machine (US NSF supercomputing center) because it will need a lot of cycles to do that. It should be fun!
Tom Portegys
PS: "necro"? as in reviving a dead topic?


Reply all
Reply to author
Forward
0 new messages