Researchers have developed an algorithm that they say can crudely predict homosexuality in men based on certain chemical tags in their DNA.

These controversial results, which have not yet been published in a scientific journal, will be presented Thursday afternoon at a genetics conference in Baltimore.

By analyzing five “epigenetic” tags — chemicals that latch onto DNA and help turn genes on or off — the algorithm can reportedly predict a man’s sexual orientation with 67% accuracy, according to Tuck Ngun, who led the work as a postdoctoral fellow at UCLA.

Several experts who were not involved in the research told BuzzFeed News that they were skeptical of the veracity of these results, particularly because the study was based on a relatively small sample of men.

“All predictive models need replication with larger samples, and this one certainly does,” J. Michael Bailey, a professor of psychology at Northwestern University, told BuzzFeed News by email.

Ngun, who is gay, agrees that this research is in its infancy, and says he has no intention of making a commercial test to predict sexuality. Still, he’s worried about the potentially ominous implications of his work — so much so, in fact, that he has decided to leave the field. He left academia last week, and plans to do research in industry that has nothing to do with the biology of sexual orientation.

“It kind of, honestly, became a little bit troubling to me, what I was actually doing,” Ngun told BuzzFeed News. “Having done this now, I could sort of foresee a not-so-happy outcome.”

Ngun first got into this line of research because he wanted to better understand himself. “I was kind of curious about myself — why I turned out like I did,” he said.

Ngun knew he was gay at a young age. “I didn’t necessarily have a word for it at the time, but I knew from like 5 years old that I was not quite the same as my other guy friends,” he said.

This is a common experience among gay people, and one of the reasons why scientists believe that sexual orientation has a strong biological component.

Another reason: Identical male twins, who share 100% of their DNA, are more likely to share the same sexual orientation than are fraternal male twins, who only share about half of their DNA.

Still, some identical twins do not share the same sexual orientation, illustrating that a DNA sequence can’t explain everything.

That’s where epigenetics comes in. Chemical markers, such as methyl groups, attach to certain parts of the DNA sequence and help turn genes on and off. So Ngun and his colleagues set out to find if there are certain DNA methylation marks that correlate with sexuality.

They screened saliva samples collected years ago from male twin pairs. For 37 pairs, one of the twins was gay and the other straight, and for another 10 pairs, both twins were gay. These sorts of twin studies are useful in genetic research because twins generally share many of the same environmental influences and cultural upbringing.

Ngun looked at 400,000 methylation marks, and ultimately found five that were significantly different between gay and straight twins. “Those five seem to be the most informative,” he said. “They seem to be able to best tell you whether someone is likely to be gay or straight.”

Based on those five marks, the algorithm can predict a straight man’s orientation with about 50% accuracy, and a gay man’s orientation with about 83% accuracy, netting an overall accuracy of 67%. The researchers don’t understand why the model is more accurate for gay men, Ngun said.

“So clearly, we’re not capturing everything, right? They’re not predicting at 100% accuracy,” Ngun said. One reason for this, he added, is that there are other types of epigenetic marks besides DNA methylation that could play a role.

Other researchers agree that epigenetics is likely to play a role in sexual orientation. But they are skeptical about whether these particular epigenetic marks will be strongly informative.

“The sample size is very small,” Peng Jin, a professor of human genetics at Emory University, told BuzzFeed News. For a study of this kind, he added, you’d need a lot more twin pairs to ensure that the epigenetic differences observed between straight and gay twins were not just due to chance.

Jin’s own research studies epigenetic markers involved in autism. Because genes are regulated differently in different parts of the body, he said, it’s difficult to use epigenetic marks in blood or saliva to glean insights about complex behaviors rooted in the brain.

The epigenetic marks identified in the new study affect two genes, in particular: CIITA, which is involved in the immune system, and KIF1A, which codes for a protein in brain cells. But it’s not clear how or why the regulation of these genes would influence sexual preferences, Sergey Gavrilets, a professor of evolutionary biology at the University of Tennessee in Knoxville, told BuzzFeed News.

“The approach overall is quite legit, but how statistically powerful it is, it’s very difficult to tell,” Gavrilets said.

In 2012, Gavrilets and his colleagues published a theoretical model hypothesizing that, in the womb, epigenetic marks influence how sensitive a fetus is to testosterone, ultimately affecting its sexuality.

“People have been looking for gay genes for 20 years and haven’t been really able to identify them, in spite of the fact that there’s interest,” Gavrilets said. “The existing evidence that we have now does point very strongly towards the significant role of epigenetics in homosexual orientation.”