It could be a handy riposte for the stalwart commitment-phobe. When challenged on their reluctance to be tied down, half-hearted partners could shrug and claim their neural gene expression profiles made them that way.

That is, at least, if research on smaller animals holds true in humans. Researchers who compared the DNA of 10 different species found a common genetic formula which marked out males that stayed with their mates and lent a hand from their less-than-committed cousins.

The work suggests evolution hit on the same biological trick to make certain species monogamous, by turning up the activity of some genes in their brains, and turning down the activity of others.

“We show that very similar gene expression mechanisms are involved in the transition from a non-monogamous species to a monogamous species,” said Rebecca Young, a biologist at the University of Texas at Austin. “It is utilised over and over again.”

Monogamy can be defined in many ways, but in the latest research the scientists focused on animals that paired up for at least one mating season, shared at least some parental care duties and joined forces to defend their offspring against predators.

They identified five monogamous species and for each found a close relative with a far more promiscuous lifestyle. The monogamous animals included California mice, prairie voles, water pipits, mimic poison frogs and a cichlid fish from Lake Tanganyika in Africa. The promiscuous cousins were deer mice, meadow voles, dunnocks, strawberry poison frogs and a similar species of African cichlid.

The animals are separated by 450m years of evolution and developed their monogamous behaviour independently on distinct branches of the evolutionary tree.

Writing in the Proceedings of the National Academy of Sciences, the researchers describe how they analysed brain tissue from the animals and found 24 genes whose activity was consistently ramped up or dampened down in the monogamous species. The two dozen genes are those most strongly linked to monogamy, with the total number potentially being in the hundreds, Young said.

The study found that genes involved in neural development, cell signalling, learning, memory and cognitive function were all more active in monogamous males compared with more promiscuous ones. The ramped up genes might help animals recognise their partners and offspring, or the home they share.

While the research cannot pinpoint monogamy genes with certainty – the animals in question differ in more ways than their reproductive habits – the scientists believe they have taken a useful first step. Future studies can now tweak gene expression in animals to see if it makes monogamous species promiscuous and vice versa.

It takes complex forces of evolution to shape an animal’s reproductive strategy. And while monogamy has clear advantages for some species, it has downsides too. “You have to tolerate another animal next to you for an extended period of time and that is not easy,” said Hans Hoffman, a senior author on the paper. “They may take away your food, they may take away your shelter, they may make you sick with their germs, or hurt you.”

And then there is the burden of caring for young. “Offspring are parasites. They eat you, they take your resources, they make your life more dangerous because it is easier for a predator to find you,” Hoffman said.

All of which makes it a wonder that any species makes monogamy work. But this is where evolution played its best trick of all. “What evolution came up with is brilliant,” Hoffman said. “When we enter into a pair bond, or have offspring we must take care of, we find it rewarding. The reward system gets hijacked. It says, ‘Hey, I love this shit.’”

It is not known whether the same genes have any bearing on monogamous behaviour in humans. If they do, could a genetic test for monogamy be on the cards? “Monogamy is a complex trait with many, many genes involved,” said Young. “There are differences among individuals and a test may have to be very individualised to be effective. Is it impossible? I’d never say that.”

But she cautioned that monogamy was not the same as faithfulness. “Whether the societal definition of human monogamy agrees with our operational definition is a can of worms,” she said.

“There are some really cool implications of this,” said David Westneat, who studies the biology of social behaviour at the University of Kentucky. “One is that the switch between monogamy and non-monogamy is employing the same general system across all vertebrates.”

Another is that the switch between monogamous and non-monogamous behaviour is “ecologically sensitive”. He said: “This would suggest that one could take the subject species in this study and make them express the opposite pattern by shifting the ecology in which they live.”