“The first day we put the electrode in, it was shocking,” Dr. Tsao said. “Cell after cell responded to faces but not at all to other objects.” Her results were published in October in the journal Science.

Dr. Tsao’s investigation yielded a surprising related finding: areas of the brain she had identified as face-specific occasionally lighted up in response to objects that bore only a passing resemblance to faces.

“Nonface objects may have certain features that are weakly triggering these face cells,” she said. “If you go above a certain threshold, the monkeys might think that they’re seeing a face.” In the same way, she said, objects like cinnamon buns, rocky outcroppings and cloud formations may set off face radar if they bear enough resemblance to actual faces.

Pawan Sinha, a cognitive scientist at the Massachusetts Institute of Technology, has devoted years of research to figuring out just what attributes touch off these face-specific pings. Security software that is being developed for identifying potential terrorists or detecting intruders must be able to reliably recognize faces. In teaching the software to do this, Dr. Sinha and his colleagues have arrived at unexpected insights into the question of why we sometimes see a cinnamon bun as a cinnamon bun, and other times as the earthly incarnation of a sainted nun.

Image A grilled cheese sandwich, top, with an image of what some see as the Virgin Mary sold for $28,000 on eBay. Jesus Christ is seen in an oyster shell, a frying pan and a pirogi. Credit... Golden Palace.com; Oyster shell: Denis Balibouse/Reuters

To develop detector software optimized to pick out any human face, even in less-than-ideal surroundings, Dr. Sinha began by putting into his computer hundreds of faces as varied as those in a Benetton advertisement famous for its diversity.

As the computer amassed the information, it was able to discover relationships that were of great significance to almost all faces, but very few nonfaces. “These turn out to be very simple relationships, things like the eyes are always darker than the forehead, and the mouth is darker than the cheeks,” Dr. Sinha said. “If you put together about 12 of these relationships, you get a template that you can use to locate a face.”