Imagine an attractive person walking toward you. Do you look up and smile? Turn away? Approach but avoid eye contact?
The setup is the same, but the outcomes depend entirely on your “internal state,” which includes your mood, your past experiences, and countless other variables that are invisible to someone watching the scene.
So how can an observer decode internal states by watching outward behaviors? That was the challenge facing a team of Princeton neuroscientists.
Fruit Fly Love Songs
Rather than tackling the intricacies of human brains, they investigated fruit flies with fewer behaviors and, one imagines, fewer internal states. They built on prior work studying the songs and movements of amorous Drosophila melanogaster males.
“Our previous work was able to predict a portion of singing behaviors, but by estimating the fly’s internal state, we can accurately predict what the male will sing over time as he courts a female,“
said Mala Murthy, a professor of neuroscience and the senior author on the paper with co-authors Jonathan Pillow, a professor of psychology and neuroscience, and PNI postdoctoral research fellow Adam Calhoun.
Close, Chasing And Whatever
Their models use observable variables like the speed of the male or his distance to the female. The researchers identified three separate types of songs, generated by wing vibration, plus the choice not to sing.
They then linked the song decisions to the observable variables.
The key was building a machine learning model with a new expectation: animals don’t change their behaviors at random, but based on a combination of feedback that they are getting from the female and the state of their own nervous system. Using their new method, they discovered that males pattern their songs in three distinct ways, each lasting tens to hundreds of milliseconds.
They named each of the three states:
“Close,” when a male is closer than average to a female and approaching her slowly
“Chasing,” when he is approaching quickly
“Whatever,” when he is facing away from her and moving slowly
The researchers showed that these states correspond to distinct strategies, and then they identified neurons that can control how the males switch between strategies.
“This is an important breakthrough. We anticipate that this modeling framework will be widely used for connecting neural activity with natural behavior,“
 Calhoun, A.J., Pillow, J.W. & Murthy, M. Unsupervised identification of the internal states that shape natural behavior. Nat Neurosci (2019) doi:10.1038/s41593-019-0533-x