Why do animals respond differently to the same social situation? According to new research from the MCB lab of Florian Engert, the answer may depend as much on recent experience as on what’s happening in the moment.
In a study published in Nature Communications (PDF), Engert and colleagues found that larval zebrafish rapidly adapt their social preferences based on the density of the groups in which they have recently lived. Those experiences create lasting internal states that continue shaping how the fish interact with others long after their surroundings change, giving scientists a powerful new model for investigating how the brain integrates past experience into future behavior.
“Our main interest is social behavior—or social and collective behavior with fish,” said Roy Harpaz, a postdoctoral researcher in the Engert lab and first author of the study. “We’ve had a few papers before where we looked at how they integrate information from many neighbors. In this paper, we wanted to ask not only how they solve this problem right now, but how their previous social experiences shape their future social interactions.”
Early social experiences matter
Schooling fish must constantly decide where to position themselves relative to their neighbors. Although these movements appear effortless, they require animals to continuously process information about the fish around them.
To determine whether past experience influences those decisions, the researchers exposed larval zebrafish to either crowded or sparsely populated environments before moving them into new social groups. Harpaz notes that the exposure was relatively brief – just tens of minutes to an hour was enough to modulate future behaviors.
The fish carried those early experiences with them.
Fish habituated to crowded conditions remained comfortable swimming close to their neighbors after being transferred to less crowded settings. Fish habituated to low-density groups, meanwhile, continued trying to maintain larger distances even when surrounded by many other fish.
“The best way of putting it is to ask how the population density that you’re used to affects your future social interactions,” Harpaz said. “If you expose fish to very high densities, they get used to living much closer to their neighbors. Then, if you move them to a less dense environment, they’ll keep behaving like that.”
Engert compares the phenomenon to people adapting to different cities. “They actually get imprinted and adapt and habituate to either high density or low density, and they carry that information with them,” he said. “If you get used to New York, you don’t mind being immersed in a crowd. The loners of Montana stay sensitive to crowds.”
Seeing a crowd
The researchers next asked a deceptively simple question: How does a fish know when it is living in a crowded environment?
“It’s not that trivial,” Engert said. “What exactly is it that they use to extract the density of other fish?” To find out, the team used virtual reality experiments that allowed them to manipulate what fish experienced without changing the actual number of neighbors around them.
One possibility was that fish simply respond to movement. Another was that they respond specifically to “looming” events—objects that appear to grow larger as they approach, a visual cue many animals use to avoid collisions.
The experiments revealed that looming, not movement alone, was the critical signal. Even more surprising, exposing fish to looming visual cues caused them to later behave as though they had lived in a crowded environment.
Rewiring an internal state
The researchers found that these visual experiences did more than trigger an immediate behavioral response. Instead, they altered the animals’ internal state, changing how they behaved during later social interactions.
“The really cool thing is that we didn’t measure whether the fish changed their behavior to the stimulus itself,” Harpaz said. “We measured whether being exposed to that stimulus, and then moving them back to swimming with neighbors, changed their future behavior.” Engert said that distinction is central to the study. “We are changing the emotional state,” he said. “This is not an acute response. We just change how gregarious or how social they are. It’s really a modulation of the internal state of the animal.”
Those altered social preferences persisted for hours before gradually adjusting to the fish’s new surroundings, demonstrating that even very young zebrafish integrate recent experiences into future decisions. “One of the biggest questions we sometimes ask in neuroscience is why sometimes you see exactly the same stimulus and behave differently,” Harpaz said. “More and more we know that it’s not just noise. It’s something about the internal states of these animals or prior experiences.”
Because researchers can now deliberately manipulate those internal states, they have a new opportunity to uncover the neural circuits that link experience to behavior.

