As long as natural selection has been an accepted scientific theory, homosexuality has been a riddle for scientists. If a person is attracted to people of the same gender, he or she cannot have biological children with their chosen partner. For most of history, before in vitro fertilization, that meant that homosexuality could not be carried out genetically. In addition, because homosexuality makes it more difficult to have biological children, researchers could not understand how it was possible that the trait would survive across genetics. However, scientists believe that they may have cracked the code, and the answer does lie slightly in genetics.

Genes are spelled out by DNA and are entirely hereditary from one family member to another. However, genes do not explain everything about who a person is. After all, recent research shows that the average person has 400 genetic errors that could lead to a disease - and yet, the overwhelming majority of human beings do not have debilitating illnesses. Epigenetics, or environment influences on the genes, are almost as important as the genes themselves.

Epi-marks are a form of epigenetics. They are sex-specific and dictate how the instructions coded in the genes are carried out. The sex-specific epi-marks are created during early fetal development to help protect the fetus from environmental influences during later development. For example, specific epi-marks can help protect a female fetus from becoming excessively masculine if there is a rush of testosterone later in the pregnancy. They can affect the genitals, sexual identity, and even sexual partner preference.

Normally, they are erased after a single generation. However, sometimes "sexually antagonistic" epi-marks can carry over across generations, passed on from father to daughter or from mother to son, causing homosexuality in children. These epi-marks can spread easily over the population because they cause the parent to be extremely fit, even if they reduce fitness of their children.

The theory also explains why homosexuality runs in families. Because epi-marks can carry over across generations, they can create similarities among relatives - closely resembling genes.

The paper will be published in an upcoming issue of The Quarterly Review of Biology.