OPINION: When I give talks about the relevance of evolution to modern life, I can count on one regular question interrupting an orderly transition from lecture theatre to bar. Sometimes it comes with a “bet-you-didn’t-think-of-that-one” sneer. Far more often it is asked earnestly and with palpable empathy. The Question?

How do you explain homosexuality?

The very real fact that a large proportion of people across the world are sexually attracted to members of the same biological sex provides a giant obstacle to a Darwinian view of life.

And I am always happy to field this question because it allows me to explore, with the audience, some of the layered complexity of evolution. But a simple, definitive answer remains, for now, beyond reach. That may start to change, however, with a paper published today in The Quarterly Review of Biology.

Born this way

Evolutionary biology can be a bit of a blunt instrument. Especially when it seeks to explain big, categorical differences – like sex differences. Focusing at a broad scale means a lot of nuance and individuality gets ignored or trampled. Which is why so many authors – quite unfairly – write off all biology as determinism.

Fortunately, biological ideas about homosexuality tend to be more welcome than biological ideas about, say, gender. That may be because so many gay people strongly feel they were “born this way”. And because ideas about homosexuality being a choice or a curable condition proliferate in all but the most enlightened places.

But being “born this way” isn’t necessarily the same thing as the traits involved being genetically determined. Genetic claims require genetic evidence. In support of a genetic basis, sexual orientation has a moderate to high heritability. Heritability being the statistic that describes how much of the variation in a trait is due to genetic differences among individuals.

But despite the statistical vapour-trail indicating a substantial genetic basis, the search for major genes involved in homosexuality has been far less fruitful. And then there remains the problem so beloved of seminar questioners. How could any such genes have persisted through millenia of selection if they lead to sexual preferences that do not produce offspring?

The idea that “gay people don’t have children” is simplistic and, historically, wrong. Being gay does not necessarily mean not having a family, and throughout history many – perhaps most – homosexuals spent time in heterosexual unions, having children. And yet even if a small proportion did not, this could have exerted strong evolutionary selection against any genes involved.

But perhaps those genes provided some other kind of evolutionary advantage that outweighed the direct cost of having fewer kids. Here, theories lie thick upon the ground. First, there is the idea that homosexual relatives provide exceptional help to their heterosexual relatives who are raising families. Any genes that raise the chances of homosexuality, then, are passed on through relatives. And the extra help means more nieces and nephews carrying those genes.

The second group of ideas hinges on the idea is that genes that make reproductively successful females can impose costs when they find themselves expressed in males. And the opposite can happen for genes that enhance male fitness. Some support for this idea exists as well, including evidence that families in which females tend to be highly fertile also have a higher proportion of gay men than one might expect by chance.

And Brendan Zietsch has written here about his own work showing that psychologically feminine men and psychologically masculine women who are heterosexual also tend to be more sexually attractive. He argues that genes that raise the chances of an individual being same-sex attracted also massively raise the mating success of heterosexual bearers being reproductively successful.

Each of these ideas has some empirical support, but not such strong support that the case can be closed. It remains likely that there is no single explanation and that several biological influences together shape sexual orientation.

The new idea

But today’s big story is an entirely new idea that hinges not on traditional genetics but instead on epigenetics. The fact that gene expression is modified by molecules that attach to particular genes, but can later be removed, is revolutionising almost every biological field, including evolution.

Genetics defies metaphors, but I’ll try to mangle one for folks who prefer J.K. Rowling over modern molecular genetics. If we think of a person’s DNA as a recipe book – say Advanced Potion Making by Libatius Borage – then the epigenetic marks (or epi-marks) are the annotations and corrections made in pencil by the owner. Epi-marks have many functions, many of them tailoring the DNA instructions to suit the circumstances in which an individual finds him- or herself.

Most epi-marks get erased before the recipe is copied and handed down to an individual’s offspring. But that isn’t always the case. Sometimes there are good adaptive reasons why offspring inherit epi-marks from a parent. And sometimes, like Harry Potter inheriting the Half-Blood Prince’s potions book, they receive annotated instructions that were not intended for them.

Bill Rice, Urban Friberg and Sergey Gavrilets recognised that epi-marks are an essential component of sex differentiation. Males and females share an entire genome and so development is fraught with instructions intended for embryos of one sex but not the other. One class of epi-marks protects female foetuses from the masculinizing effects of fetal testosterone. Another protects male foetuses from being feminized when oestrogen signals would otherwise trigger female development.

Different genes are involved in the development of genitals, reproductive organs, body shape, sexual orientation and every other trait where genes shape sexual differentiation. And so epi-marks to these different genes will have different influences on those traits.

Mostly, these kinds of epi-marks should not be passed from parent to offspring. But occasionally some are. And when the epi-marks on genes that effect sexual orientation get passed from father to daughter then some traits that would normally develop in female-specific ways end up more masculinized. Likewise mother-son transmission of epi-marks can result in the feminization of some traits that would normally develop in a more masculinized fashion.

I should stresss that the new paper is a mathematical model showing that this scenario can work. The authors marshal plenty of circumstantial evidence that it probably does work. But the idea needs to be directly tested.

Apart from the fact that this is one of those rare ideas that completely changes how we look at the evidence, I am most exited by the way this idea reframes how we look at sexual development. I suspect that this idea will, in time, also shake up the science of sex-differences and our understanding of how gender arises.

Rob Brooks is a Professor of Evolutionary Biology at UNSW.

This opinion piece was first published in The Conversation.