The food preferences of toddlers are a mind-boggling enigma. On the one hand, kids under two years old are the most likely age group to accidentally poison themselves—by deciding it’s a great idea to guzzle detergent, for instance. Yet, when parents try to coax them into ingesting nutritious, non-lethal options, tots may cook up a fit.

According to a new study, toddlers may actually have some logic to their apparent dietary madness—at least a little logic, that is. By watching toddlers react to people’s food preferences, researchers found that the little ankle-biters seem to make generalizations about good eats and who will like them based on social identities. Toddlers expected people in the same social groups to like the same foods and appeared puzzled if that wasn’t the case. But if one person expressed a dislike for a food first, toddlers seemed to expect that everyone would follow suit regardless of social identities.

The findings, published Monday in the Proceedings of the National Academy of Sciences, suggest that toddlers soak up social information about food choices and may be particularly sensitive to any signal that a food is bad or perhaps dangerous. Though more study into toddlers’ gut feelings on foods are necessary, the authors speculate that campaigns to improve kids’ diets may be better served by including social aspects of eating rather than just nutrition information.

That broad speculation isn’t wholly new. Researchers have known for some time that toddlers look to those around them to glean information on edibles. Kids make their savviest food decisions in situations that provide context to eating, the authors point out. They eat more when they’re around people eating and learn which foods are safe by watching others. Toddlers may also preferentially eat foods they’ve linked to positive, outgoing people they’ve encountered. These social cues can play out in long-term health, as demonstrated by epidemiological data that suggests obesity spreads through social networks.

All of those bites of data signaled that social aspects of eating were factoring in to kids’ food choices. But the authors of the new study (led by Zoe Liberman, a psychologist at the University of Chicago) wanted to know if those tidbits were part of a system of reasoning in toddlers’ developing noggins.

To try to clarify that suspected system, Liberman and colleagues had 32 toddlers, each around 14 months old, watch movies with two actors in them. The actors were shown either liking or disliking a food or an object, in this case a bowl. The actors marked their preferences with big, obvious gestures, such as smiles, and exclamations of “Ooh, I like that!” Based on the toddlers’ attention to the reactions, the researchers inferred that the toddlers didn’t care if the two actors had differing opinions on the bowl. But if the actors disagreed on the food they were eating, with one liking it and the other disliking it, the toddlers seemed thrown. It appeared that they had tried to form a generalization about the food but not the object.

To see if other social cues affected the toddlers’ assumptions, the researchers showed a different group of 32 toddlers new movies. In these, the two actors were either friendly with each other or turned away from each other before they expressed food opinions. In these movies, the first actor always liked the food. The toddlers seemed unmoved if the feuding couple disagreed on whether the food was good, but the toddlers were stumped when the friendly pair disagreed.

A similar pattern came up when the researchers showed yet another group of toddlers movies with Spanish-speaking and English-speaking actors, again with the first actor always liking the food. Similar to before, the toddlers gawked when actors that spoke the same language disagreed about a food, but not when actors who spoke different languages disagreed. Thus, the authors concluded that, “although infants may learn about edibility by watching people eat, knowing that a food is edible does not lead them to expect all people to like it. Rather, infants generalize food preferences across some people but not across others.”

That wasn’t the case when the researchers flipped the scenarios and showed the first actor being disgusted by a food. In that scenario, the toddler seemed puzzled if the second actor liked the food, even if they seemed to be feuding with the first actor. “Seeing opinions about disgust toward foods as universally shared could be a helpful strategy that allows infants to eventually make their own safe choices,” the authors speculate.

In summary, the authors conclude that the study’s findings “reveal the deeply social nature of human thinking about food, which could have real-world implications.”

Proceedings of the National Academy of Sciences, 2016. DOI: 10.1073/pnas.1605456113 (About DOIs).