Sometimes when we eat something that makes us sick, we lose our craving for that food forever.

C. elegans feels our pain, and a Harvard biology professor has used that fact to map for the first time the complete picture of a neural network involved in learned olfactory behavior in an animal. C. elegans is a tiny roundworm just 1 millimeter long, small enough to enjoy a meal of bacteria now and then. But when it eats bacteria that make it sick, it learns to avoid them.

Harvard Assistant Professor of Biology Yun Zhang led a team of researchers on an effort to train thousands of roundworms in her lab to avoid pathogenic bacteria, Pseudomonas aeruginosa, that made them sick. In collaboration with Physics Professor Aravinthan Samuel’s lab, researchers in the Zhang lab then traced the neural pathways used in both untrained and trained worms to understand the changes that made them avoid a subsequent meal of the same bacteria.

Researchers discovered that two different neural circuits are involved. One is employed when the worms haven’t been exposed to the pathogenic bacteria. Those worms move toward the bacteria and even seem to prefer it to the food on which they were raised, E. coli. After they get sick, however, a different neural circuit kicks in. The second circuit, which Zhang showed is three cells long, is involved in the learned behavior and employed as the worms turn away from the illness-causing food.

“One is a very basic response. [The worm] smells an odor and moves toward or away from it. The second circuit is the modulatory circuit. Learning needs a modulatory circuit to kick in,” Zhang said. “They are the circuits of sense and sensibility.”

Zhang said the work, described in the Dec. 22 issue of the journal Neuron, marks the first time that a complete picture of a neural network involved in olfactory learning has been traced from a stimulus, such as a smell, to a resulting behavior, such as the worm’s movement, at the resolution of individual neurons.

“For us to understand how this [learning] process works, we have to understand how the whole circuit works,” Zhang said.

The research, Zhang said, is part of an effort to understand the physiological mechanisms of learning. Mapping the circuitry is a necessary step in that process, but Zhang said she ultimately wants to understand even more thoroughly the changes that occur.

C. elegans was almost the perfect laboratory animal for this work. It is one of a handful of “model organisms” that grow readily in the lab and have traits that make them particularly ideal for researchers seeking to understand the nervous system and how it functions.

The roundworm’s body is transparent and very basic. Its nervous system is so small and compact — just 302 neurons compared with billions for us — that the physical connections between all of those neurons have been identified. Its behaviors are also strongly driven by smell.

“C. elegans’ olfactory system is very powerful. It cannot see, but it’s able to smell lots of things. It’s really strong, ecologically relevant behavior,” Zhang said. “If you’re looking for learning and if this animal can learn anything, it should be olfactory.”

Training the worms involved putting them together with the pathogenic bacteria, which they moved toward and ate. Instead of breaking down inside the worms’ bodies, the bacteria multiplied, making the worms sick. It took about four hours to fully train the worms and, though they did show that they remembered what they learned, they didn’t remember it for long, losing their knowledge about the pathogenic bacteria gradually over two hours.

Zhang and her colleagues used a technique called “laser ablation” in the work, in which they methodically zapped each nerve cell in the worm’s see-through body and then released the worm to see if its behavior changed. In that painstaking way, they tracked down the two neural circuits — just a handful of cells each — involved in carrying the olfactory stimuli through the nervous system to the muscle cells where they were transmitted into action.

“Now that we understand how this learning network is organized, we want to find out what is changed and how it causes behavior, how the animal turns away, how the animal learns,” Zhang said. “The goal is to correlate neuron activity with behavioral output.”