Quantifying Homosexuality: A Critique

Social values and technical systems of quantification are entangled in the construction of deviance and pathology. Although the means of quantification and of categorisation are now computational, they are no less vulnerable to misjudgment or misuse as labels and pathologies of the past have been. This article examines a few moments related to the history of homosexuality and its categorisation. It starts with recent facial recognition algorithms to distinguish straight and gay faces and ends with Alan Turing’s questions about gender and The Imitation Game. Ultimately, this piece suggests that while the mechanics of categorisation have changed, its purpose and impact have not.

Part I: Facial Recognition Algorithms for Sexual Orientation

A single low-resolution photo of two men each, one homosexual and one heterosexual, is all an algorithm needs to correctly classify the subjects' sexual orientation over 80% of the time, according to psychometrician and prolific academic Michal Kosinski. The algorithm outperforms human judges and improves to over 90% identification with just five photos.1 A controversial figure and author of the algorithm, Kosinski claims to sound a warning against the abuse of sensitive information ascertainable from facial recognition technology, which governments, police departments, and companies are already leveraging.2 His research emerged from studies of photos and facial analysis tools (e.g., distance between eyes, lip curvature, forehead size) to determine whether individuals suffer from disorders like Down Syndrome. Having been trained to distinguish between faces with and without the disorder, a computer model can predict how likely a new face is to have the condition. In their recent study, Kosinski and his co-author Yilun Wang applied similar logic to differentiating sexual orientation, exposing a classifier to nearly 18,000 facial images of straight and gay men.3 The algorithm learned the characteristics that distinguished the two groups. In addition to transient features like grooming styles, Wang and Kosinski found that subtle differences in fixed features like nose shape can be used to discern heterosexuals from homosexuals. While this method of classification is a recent development, homosexuality has long been categorized, pathologised, and quantified, and modern manifestations of homosexuality’s classification are an extension of this history.4

resizedKosinksi1 resizedKosinski2
These computer-generated faces are intended to illustrate archetypical straight and gay faces, visually amplifying the signals the algorithm deems useful in differentiation. In this talk, Kosinski never identifies which face belongs to which group, leaving the question open for the audience.

The medicalisation of homosexuality started in early 1800s France, where doctors studied people accused of criminal sexual behaviour; it was thought they were guilty or, perhaps, just inherently flawed due to congenital defects. As the 20th century progressed, German physicians started forming etiological (i.e., causal) theories of homosexuality. Though Germany had started to adopt a clinical focus on homosexuality and had led global psychiatric thought up until the war, World War II and the Holocaust delegitimised Germany and German thought on the global postwar stage, and the language of psychiatry switched from German to English. Shortly into its tenure as the world’s leader in psychiatric thought, the American Psychiatric Association labelled homosexuality a mental illness.5

What makes modern practices highlighted by Kosinski’s research novel is their application of a new medium (computing) to an old practice (classification). Unlike old methods, modern classifications are not mediated not through German or English but through black box neural networks capable of discerning patterns that “fall below the threshold of [human] perception.” They live in a language not understood, not negotiated and not challenged by those it affects. Under the hood, these classifications can become part of profiles of real people, purchased and exchanged by data brokers, and they are just as susceptible to bias as other forms of classification.6 Moreover, the outputs of these algorithms operate at scale; one million people can be classified just as easily as one hundred. Alarmingly, Kosinski acknowledges that such information is likely to be of interest to the political leaders of dozens of primarily Asian and African countries where homosexuality is criminalised, and sometimes punishable by death. 7

Part II: “Making People Up”: Labels and Pathologies as Social Control

"There is something that causes me the greatest difficulty, and continues to do so without relief: unspeakably more depends on what things are called than on what they are." -Friedrich Nietzsche, The Joyful Wisdom

When homosexuality was first investigated for its biological and criminal basis in 19th century France, governments created official statistics from the resulting reports, in turn influencing homosexuality itself, according to philosopher Ian Hacking.

Hacking claims that classifications and their language have the power to design previously unimaginable social realities, comprising a sort of “semantic contagion”. To illustrate this point, Hacking contends that it was precisely the introduction of suicide as a phenomenon to be counted, discussed and combated that inadvertently legitimised it and led to its spread.8 Medics documented suicides, statisticians collected suicide reports and created forms for doctors and police officers.9 The scale of the problem was measured and communicated, its costs estimated. Better reporting of suicide inevitably led to more cases recorded over time, but the crux of Hacking’s argument is that the mere act of reporting indirectly created a social reality in which suicide was an option, a recognisable and established decision all the way “down to the suicide note.”10 The breadth of possibilities formalised and engendered by vocabulary effectively invents new ways of living (“making people up”). In this way, Hacking believes that the categories, labels and pathologies we impose upon ourselves may be “a particular medico-forensic political language of individual and social control.”11

The Institute for Sexual Science founded in 1919 by Dr. Magnus Hirschfeld, who was Jewish and gay, conducted research on sexual practices, venereal diseases and sex education. On May 6, 1933, Nazi youth troops marched in front of the Institute (left) before ransacking it and burning its books (right) along with other texts considered ‘un-German’ in a public bonfire four days later in Berlin’s Opernplatz.

History has shown that studies on those labelled as homosexual have consistently accompanied—and, arguably, invited—attempts to exercise control over them.12 Indeed, the act of designating any group separate from the rest, and reinforcing this distinction with language, prompts questions about where the newly-formed category stands in relation to the ‘rest’ (the non-group or status quo). Homosexuality’s distinctive association with stigma and criminality shaped its evolution. Hacking and Foucault would be quick to point out that simply calling something a disorder can turn it into one. Research has firmly established that gays suffer from stress, addictive behavior, depression and anxiety at higher rates than their straight counterparts, and they commit suicide more often as well.13,14 At the same time, it’s possible to imagine a scenario in which homosexuals and heterosexuals weren’t actively distinguished. In this world, "homosexuality" would have no pathologised currency, and the concept of homophobia would not exist.

Part III: The DSM and Classification of Homosexuality as Mental Disorder

The American Psychiatric Association’s (APA) Diagnostic and Statistical Manual of Mental Disorders (DSM) dictates mental illness and psychiatric law in American courts, prisons, juvenile detention centres, regulatory agencies and schools, as well as for a host of social services and drug companies. The DSM’s classification directly influences government funding of mental health research, government-supplied mental health treatments, and private research subsidies. Private insurance patients need a DSM-approved mental illness for their insurance companies to cover their treatments. Drug companies cannot simply engineer drugs for generic symptoms associated with mental illness: The Food and Drug Administration mandates that drugs be specifically designed to treat to disorders in the DSM. For all of these reasons, the content of the DSM matters. Even when behaviours are declassified as mental disorders and removed from the manual, the residual stigma can be damning. What’s more, the DSM’s reach extends far beyond the USA, as it also informs the World Health Organization’s international standards on mental health. Together, the DSM and WHO standards are key references, used by mental health practitioners around the world.

In the first edition of the DSM, published 65 years ago, homosexuality was codified as a veritable mental disorder, a “sociopathic personality disturbance.” It wasn’t until 1987, 35 years later, that homosexuality was expunged from the manual.15 Both the introduction and subsequent declassification of homosexuality as a mental illness were not the result of scientific study but of social forces.

The inclusion of homosexuality in the DSM-I in 1952, less than a decade after World War II, was a partisan decision linked to its long-standing connection to criminality. The decision won support from many scholars at the time, including Edmund Bergler, one of the most influential. He wrote, “I have no bias against homosexuals; for me they are sick people requiring medical help…Still though I have no bias, I would say: Homosexuals are essentially disagreeable people, regardless of their pleasant or unpleasant outward manner.” 16,17

Following the publication of DSM-I, psychologist Evelyn Hooker published a study in which an anonymous battery of psychological test results of gay and straight men was presented to experts who were tasked with identifying the homosexuals and assessing their—ostensibly inferior—mental health. The experts were unable to distinguish heterosexuals from the homosexuals, suggesting that the two groups of men exhibited no discernible differences in their mental health adjustments.18,19

Hooker’s study aided to effort to declassify homosexuality from the DSM. The year after the publication of DSM-II in 1968, in which homosexuality was relabelled a “sexual deviation”, the Stonewall riots attracted national attention, and gay activists doggedly stormed and protested the APA’s annual meetings from 1970 to1972 to oppose their mentally ill classification.20,21 In 1972, gay psychiatrist Dr. John Fryer dressed as a clown in an oversized tuxedo and described the difficulty of being a gay psychiatrist in a profession that considered gays mentally ill.22


Gay activists Barbara Gittings and Frank Kameny with Dr. H. Anonymous, a homosexual psychiatrist, later identified as Dr. John Fryer. Dr. Freyer addressed his audience of fellow psychiatrists disguised as a clown to protect his identity in light of the professional repercussions if outed. He spoke about the discrimination gay psychiatrists experienced within their own profession.

After three years of relentless gay rights campaigning at annual meetings, the APA Task Force on Nomenclature and Statistics agreed to meet activists and review the evidence they presented, eventually leading the task force to propose that homosexuality be removed from the DSM. The Board of Trustees agreed, but several APA members opposed the removal and pushed for a referendum. In 1974, 10,000 APA members voted to approve declassification with a 58% majority.23,24

That a vote, a political process par excellence, determined the outcome of a diagnostic classification illustrates the role of social and political norms in defining disease, in drawing the line between health and illness, order and disorder. Though medical diagnoses are trusted to be grounded in robust scientific review, “the most significant catalyst for diagnostic change was gay activism.”25 It was only with the publication of the DSM-III-R in 1987 that homosexuality was fully removed from the manual and cleared of its formal association with mental disorder.26,27 Following the DSM’s lead, the WHO largely followed suit, transplanting sociopolitical, medical language from a distinctly American context to the rest of the world.28

Part IV: From Turing to Algorithmic Contagion

Best known for leading the British effort to decrypt Nazi military communications during World War II, Alan Turing is believed to have shortened the war by two years, saving an estimated 14 million lives.29

In his landmark 1950 publication, Computing Machinery and Intelligence, Turing describes The Imitation Game, a precursor to what many know today as the Turing Test. Its original formulation involves a man (A) and woman (B) hidden from a human interrogator, who communicates with them via text. The interrogator’s task is to identify which of the two people (A or B) is the man, and which is the woman. The man, meanwhile, aims to mimic the woman, hoping to lead the interrogator astray. Turing’s original test asked if the interrogator would be wrong just as often if a machine were to replace the man. From this angle, Turing approached a longer-standing question—“Can machines think?”—and outlined various definitions of ‘thinking’.

Turing’s contributions explore relations between machines, human minds and logical instruction. The Turing Machine presented the theoretical framework for computation and computability now known as algorithms, and The Universal Turing Machine led to the modern computer. Turing’s Abbreviated Code Instructions were predecessors to modern programming languages, and his interest in physiology and neurology gave rise to the precursors of neural networks (the family of algorithms employed in Kosinski’s sexual orientation classification). Inspired by the nature and state of the mind, Turing published the first articles on artificial intelligence.

In March 1952, Turing was sent to trial having committed “gross indecency,” a sexual relationship with another man. He was stripped of his security clearance and expelled from GCHQ. Just two years after the trial and less than a decade after the war, Turing committed suicide by eating an apple laced with cyanide partway through his chemical castration treatment, a punishment for his transgression. He was 41 years old.

The philosophical heart of The Imitation Game probes judgement and expectation against the backdrop of what is deemed natural, human and performative. It also questions the degree to which gender—and perhaps by extension, gender representation and sexuality more broadly—can be imitated. Most importantly, however, Turing appears to be probing a deeper philosophical question about what it means to think and to know. Several variations of the Turing Test exist, and it’s not hard to imagine one in which, for instance, a gay man impersonates a straight man or vice versa. In this scenario, what does it mean to think, to judge, and to know the difference?

Turing’s meta exploration of imitation and inherence recalls the popular acceptance of homosexuality as a born-this-way phenomenon, and calls into question how gay rights might have unfolded had homosexuality been deemed a choice.30 Pathologisation, diagnostic tools, and corrective therapies would likely have gained more steam given the manner in which homosexuality was medicalised and criminalised. But why does social acceptance depend on the relative merits of biological determinism and choice?

All of these phenomena—performance, biology, acceptance, human judgement, machine intelligence, changing norms and the fundamental nature of knowing—all co-exist in a tangled web that prompts far more questions and ambiguities than it does clean and satisfactory answers. The need to simplify these complexities is, at its core, the root of classification.

As computation evolved beyond simple mechanical operations, Turing maintained that computers had the potential to herald real progress by emulating human intelligence. In an ironic twist, however, the computational advancements Turing established decades ago risk abetting modern incarnations of the same discrimination to which he fell victim.

In 2013, almost 60 years after his death, Alan Turing received a posthumous pardon from Queen Elizabeth II for his conviction of a crime which can be said to not exist at all.

Modern classification occurs via algorithms, which are just as susceptible to bias as their predecessors, but more esoteric because they’re relatively inaccessible, opaque because they can be uninterpretable, and pervasive because they operate at scale. Just as semantic contagion invents or nullifies possibilities and shapes the trajectories of people and their realities, so does algorithmic contagion.31 Both algorithms and language are, ultimately, simply levels of abstraction over some perceived reality. Words themselves are their own sorts of classifications, often thoughtful but inherently inexact translations of experiences—sensations, thoughts, influences—into a series phrases and sentences. Algorithms constructed from generalised patterns serve a similar, approximate classificatory function.

The power and danger of these systems are their potential to transform what is deemed healthy and disorderly, natural and grotesque, praiseworthy and stigmatised into a language operating at scale and hidden from those directly shaped by it. As algorithms increasingly inform classification, they risk bypassing critical examination while strengthening deeply-rooted structures of inequality. The psychiatric classification of homosexuality as a mental disorder was not the result of medical study but of sociopolitical forces, a fact that highlights how medical definitions serve as instruments of the social and political zeitgeist. Kosinski’s work evokes questions about how numbers can be similarly misappropriated to advance biased ideas and how conceptions of normality and biology interrelate in social acceptance of homosexuality. Conventional trains of thought assert that if it’s genetic, it must be normal; if it’s normal, it should be accepted. Turing’s life and work lead one to ask why. They also force observers to acknowledge that many definitions of disorder and criminality are fleeting. Ultimately, what is normal and what is aberrational? And moreover, how can these be known, and what purpose do they serve?

Today, systems of classification and the definitions of normality associated with them rely on a logic and infrastructure of quantification to ascertain, establish and perpetuate what is considered normal. Although the mechanism of modern categorisation has transformed, these moments from the North American and European history of homosexuality suggest that its dynamics remain unchanged.

Varoon Bashyakarla is a data scientist and researcher at the Tactical Technology Collective. His past statistical undertakings led him to a variety of domains: public health, public safety, sports, finance, and cybersecurity. After working as a data scientist in Silicon Valley, he is now living in Berlin and exploring how personal information is used for political influence.


Thank you to Cathy O’Neil, Michal Kosinski, Tyler Lau, Mike Jin, Ila Nimgaonkar, Tony Wu, Sean Skyllingstad, Marlena Vasquez, Zahra Ashkotrab, Gabi Sobliye, Stephanie Hankey, Natalie Holmes, Maya Ganesh, and Arikia Millikan for their assistance and feedback in writing and researching this piece.


1 A draft of the paper's manuscript was shared with me in confidence prior to conclusion of the submission's ethical review and subsequent publication.

2 Kosinski's motives are hotly contested. One critic has likened his construction of this 'gaydar' algorithm and accompanying warnings to "complaining about the dangers of war while building bombs." Kosinski has been covered in the press extensively because he developed the psychometric methods purportedly adopted by Cambridge Analytica. He also serves as an advisor to Faception, an Israeli startup that claims to predict how likely individuals are to be terrorists, pedophiles and more by applying deep learning to facial images.

3 Kosinski’s present-day differentiation of straight and gay faces has historical roots, as do other modes of classification based on facial features. Modern efforts to distinguish criminal faces from non-criminal faces, for example, have roots in physiognomy dating back to the late 19th century.

4 Because this piece involved conducting historical research, I have made a deliberate decision to refrain from imposing the language of now (as it pertains to LGBTQIA+ references) onto the historical ideas and subjects explored here.

5 The Association of LGBTQ Psychiatrists, “The History of Psychiatry and Homosexuality."

6 While lagging legal precedents of technological developments allow algorithmic systems to circumvent regulations intended to prevent discrimination, algorithms can – and have been found to in many cases – perversely reinforce discriminatory practices. Google searches have been shown to preferentially display ads for high-paying jobs to men over women. The statistical models that judges in some US states use to determine prison sentences penalize blacks more heavily than whites. Scholars suspect numerous credit scoring startups of engaging in discriminatory lending practices. Racial bias has plagued the field of image and facial analysis that Kosinski’s work emerges from – equating lighter skin with beauty and classifying black people as gorillas.

7 Yilun Wang and Michael Kosinski, “Deep Neural Networks Are More Accurate than Humans at Detecting Sexual Orientation from Facial Images”, Open Science Framework, 2017.

8 Hacking writes, “Suicide sounds like a timeless option. It is not…There have been cultures, including some in recent European history, that knew no suicide.”

9 Example fields in these forms include the time and location of death, the weapon of choice, what objects were found with the corpse, any apparent rationale.

10 Ibid.

11 Ibid.

12 Author of the first text on sexual perversions, Richard von Krafft-Ebing argued against sodomy laws but maintained that homosexuality was an illness. Magnus Hirschfeld, an openly gay German Jewish physician, fought for the decriminalization of homosexual acts. His Berlin Institute for Sexual Science was shut down by the National Socialist German Workers' Party (Nazis) in 1933. Sigmund Freud did not regard homosexuality as a religious sin but maintained that only sexually stunted people became homosexuals. Hungarian-American psychiatrist Sandor Rado, who rose to prominence after Freud, concluded that homosexuality was a “phobic avoidance.” Alfred Kinsey argued that “Only the human mind invents categories and tries to force facts into separated pigeonholes.”

13 Theo Sandfort, Lesbian and Gay Studies: An Introductory, Interdisciplinary Approach, Sage Publications, 2000.

14 Relatedly, aversive conditioning, electrical shocks, and even lobotomy were all reparative therapies sought by gay men hoping to rid themselves of mental illness and studied in publications as late as 1973.

15 The Association of LGBTQ Psychiatrists

16 Jack Drescher, “Out of DSM: Depathologizing Homosexuality”, Behavioral Sciences, 2015.

17 One vocal critic of the APA and DSM commented “It’s the universal paranoia of psychiatry that everybody who disagrees with them is pathological. You can’t disagree with a psychiatrist without getting a diagnosis…To repel the criticism in the strongest possible way, from their point of view, you diagnose the critic.”

18 Ibid.

19 That Hooker’s 1957 study demonstrated no difference in mental health adjustments of straight and gay men is remarkable given the stigma, shame and self-loathing gay men endured at the time. Some gays had even accepted the classification of a homosexuality as a mental illness not because they felt ill but because they hoped doing so would spare them the backlash of religious sin and engender soft responses from their communities. To observers, their concurrence validated homosexuality’s diagnosis as a result of its inherent defectiveness.

20 Jack Drescher

21 The Association of LGBTQ Psychiatrists

22 Jack Drescher

23 Ibid.

24 Jay Neugeboren, “The Consolation of a Psych Diagnosis", The Atlantic, 2013.

25 Jack Drescher

26 The Association of LGBTQ Psychiatrists

27 Homosexuality’s post-declassification progress provides a glimpse into the gravity of medical misappropriation and the social cost of its inclusion in the DSM: state-wise dismantling of sodomy laws, general and employment protections, repeal of Don’t-Ask-Don’t-Tell and the right to serve in the military, sanctioning of openly gay clergymen, adoption support, marriage equality in a steadily increasing number of countries.

28 Jack Drescher

29 From the linked sources, a conservative estimate of lives Turing saves yields 14 million—two years at 7 million lives each year.

30 Lady Gaga’s “Born This Way” and Macklemore & Ryan Lewis’s “Same Love” are two examples of biological justifications of gay identity in American pop culture. The lyrics of the latter’s refrain are “And I can’t change / Even if I tried / Even if I wanted to.”

31 The term “algorithmic contagion” came to me while writing this piece. I like the term because it’s relevant to this essay's historically-grounded themes as well as to present times. Expounding on the term is beyond the scope of this piece, but I intend for it to have several interpretations, encompassing the ontological, the epistemological and the rhetorical.