The findings, published Monday in Nature Neuroscience, come from an fMRI study that tested what very young infants can recognize visually when researchers can measure brain activity rather than rely on how long babies stare at images.

Lead author Cliona O’Doherty, who did the work at Trinity College Dublin in Ireland, said the results indicate that even at 2 months, infants group visual categories in ways that had not been shown as early before. “It really tells us that infants are interacting with the world in a lot more complex of a way than we might imagine,” O’Doherty said. She added that looking at a 2-month-old, “we maybe wouldn’t think that they’re understanding the world to that level.”

According to the study, O’Doherty and colleagues analyzed data from 130 2-month-olds who underwent brain scans while awake. The babies viewed images from a dozen categories that are commonly seen in the first year of life, including categories such as trees and animals. The researchers said they looked for differences in brain activity patterns when an infant looked at an image like a cat compared with activity when the infant looked at an inanimate object.

O’Doherty said the work builds on earlier approaches that often depended on measuring how long infants looked at an object. Those studies can be difficult at younger ages, and some previous findings suggested that infants could distinguish broader categories such as animals and furniture around 3 to 4 months. In the new study, she said the data support grouping categories as early as two months. “What we’re showing is that they really already have this ability to group together categories at two months,” O’Doherty said. “So it’s something much more complex than we would’ve thought before.”

The study also included a follow-up effort later in infancy. In the new study, many of the babies returned at 9 months, and the researchers collected data from 66 of them. O’Doherty said that in the 9-month-olds, the brain distinguished living things from inanimate objects more strongly than it did in the 2-month-olds.

Researchers said the ability to measure visual function more precisely with fMRI could help connect early brain imaging with cognitive outcomes later in life, while also clarifying how perception develops in infancy. Liuba Papeo, a neuroscientist at the National Center for Scientific Research in France, said the small number of infants studied is not the weakness people might expect; she described the study as “impressive and unique,” in part because brain imaging with very young infants presents challenges.

Papeo said one challenge is getting infants to remain still and comfortable in an fMRI scanner while awake. She wrote that “One — perhaps the most obvious — is that the infant needs to (lie) comfortably in the fMRI scanner while awake without moving,” and the team, O’Doherty said, focused on making the experience as comfortable as possible. Inside the scanner, the babies reclined on a bean bag so they were snug, and O’Doherty said the images “appear really big above them while they’re lying down,” adding, “It’s like IMAX for babies.”