• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Montreal AI Ethics Institute

Montreal AI Ethics Institute

Democratizing AI ethics literacy

  • Articles
    • Public Policy
    • Privacy & Security
    • Human Rights
      • Ethics
      • JEDI (Justice, Equity, Diversity, Inclusion
    • Climate
    • Design
      • Emerging Technology
    • Application & Adoption
      • Health
      • Education
      • Government
        • Military
        • Public Works
      • Labour
    • Arts & Culture
      • Film & TV
      • Music
      • Pop Culture
      • Digital Art
  • Columns
    • AI Policy Corner
    • Recess
    • Tech Futures
  • The AI Ethics Brief
  • AI Literacy
    • Research Summaries
    • AI Ethics Living Dictionary
    • Learning Community
  • The State of AI Ethics Report
    • Volume 7 (November 2025)
    • Volume 6 (February 2022)
    • Volume 5 (July 2021)
    • Volume 4 (April 2021)
    • Volume 3 (Jan 2021)
    • Volume 2 (Oct 2020)
    • Volume 1 (June 2020)
  • About
    • Our Contributions Policy
    • Our Open Access Policy
    • Contact
    • Donate

Sex Trouble: Sex/Gender Slippage, Sex Confusion, and Sex Obsession in Machine Learning Using Electronic Health Records

July 26, 2023

🔬 Research Summary by Maggie Delano, an Assistant Professor of Engineering at Swarthmore College whose research focuses on developing medical devices for chronic diseases and inclusive engineering design.

[Original paper by Kendra Albert and Maggie Delano]


Overview: Considering sex and gender in medical machine learning research may help improve health outcomes, especially for underrepresented groups such as transgender people. However, medical machine learning research tends to make incorrect assumptions about sex and gender that limit model performance. In this paper, we provide an overview of the use of sex and gender in machine learning models, discuss the limitations of current research through a case study on predicting HIV risk, and provide recommendations for how future research can do better by incorporating richer representations of sex and gender.


Introduction

False assumptions about sex, gender, and their intersections are deeply embedded in society, and medical machine learning is no exception. We reviewed over two dozen medical machine learning papers in our recent paper. We found that sex and gender are almost universally considered binary variables, with frequent substitution of sex for gender and vice versa. Not only are sex and gender not binary, but their use in machine learning is indirect: they serve as proxies for variables that may have more direct clinical relevance, such as hormone status, diet, or genetics. However, without a better understanding of what sex and gender are proxies for, models trained using these data will perform worse for anyone who deviates from the average. We encourage any researchers developing or using models incorporating sex and/or gender to educate themselves about sex/gender, work in teams with a range of competencies, and focus on untangling the variables most predictive for their work. 

Key Insights

Sex Is Not A Binary Variable

While the binary sex variable in a machine learning model might seem straightforward, it is more complex. Sex acts as a proxy for a variety of biological and sociocultural variables. This includes not only biological attributes commonly associated with a given sex, like hormone status or chromosomes, but also gendered practices, such as diet or exercise patterns that imprint on the body. With sex as a “stand-in” for so many different variables, the predictive power of a machine learning model is reduced, especially for individuals that deviate from the average individual in the training set. This exacerbates existing issues with model transferability and means performance will be especially worse for historically marginalized populations such as transgender people.

As transgender people have become more accepted in society, there’s been increasing recognition that sex and gender are distinct, though entwined, concepts. However, this acceptance has not yet translated to improvements in how sex and gender are used in medical machine learning models. We reviewed over two dozen medical machine learning papers published since 2016 and found that these papers overwhelmingly continue to use binary sex variables. In some cases, authors use the word “gender” to refer to this variable, even though the labels are “M” and “F.” This is a phenomenon we call sex/gender slippage, where the presumed concordance of sex and gender leads to the frequent substitution for one variable with the other.

Sex Confusion

The trouble with relying on a binary sex variable is apparent when one considers the confusion that can result when using it in a medical context. Many transgender people choose to update their identifying documents to match their gender. This is not only affirming but may also be necessary for safety reasons. When a transgender person receives medical care, it may not be clear from their medical records whether the listed sex is the sex they were assigned at birth or a sex that reflects their current gender identity. This is what we call “sex confusion.” EHRs introduced a gender identity field to try to address this issue. However, our research suggests that in many cases, the gender identity field is used more for avoiding misgendering patients, not necessarily to consider it for delivering medical care. Many clinicians consider sex assigned at birth more important than gender identity, even when it may not be relevant for care in a given context. We call this “sex obsession.”

Doing Better

When machine learning models use sex and/or gender variables, they must reconcile not only with sex confusion (knowing whether something is sex assigned at birth or not) but also with sex obsession (the idea that what really “matters” is sex assigned at birth). We advocate for researchers to approach model development with a mindset of designing from the margins by focusing on increasing data richness. 

A design from the margins approach centers on people historically decentered. One way to do this in a machine learning context is data richness. Rather than only using a binary variable for sex or gender, consider using a variety of variables that might be relevant to the research question and include additional information such as disease onset, phenotype, etc. By focusing on data richness, researchers can build more predictive models and have a deeper understanding of which variables improve model performance, thereby potentially improving performance for groups not served by a binary approach. This improves outcomes for underrepresented groups and everyone, as there is a more foundational understanding of the predictive variables.  

Between the lines

Funding institutions and journals have called for increased consideration of sex and gender in clinical research. However, without avoiding the pitfalls we describe in our paper, this research may have a limited impact, especially for the marginalized groups this consideration is intended to help. Designing from the margins and focusing on data richness take time but can positively impact everyone.

Moving beyond binary sex variables requires a mindset shift and new clinical research and research methods. Researchers must be willing to take things slow and consider which variables to incorporate into their models. Unfortunately, which variables to include might not be clear as medical research has historically held many of the same false assumptions that medical machine learning research has. More support for basic research will be needed to help researchers investigate further rather than falling back on existing approaches. Funding institutions and journals will need to weigh the costs of continuing to support work that relies on binary sex variables and how to support the development of new models and datasets while recognizing that all research has limitations.

Want quick summaries of the latest research & reporting in AI ethics delivered to your inbox? Subscribe to the AI Ethics Brief. We publish bi-weekly.

Primary Sidebar

🔍 SEARCH

Spotlight

A brightly coloured illustration which can be viewed in any direction. It has many elements to it working together: men in suits around a table, someone in a data centre, big hands controlling the scenes and holding a phone, people in a production line. Motifs such as network diagrams and melting emojis are placed throughout the busy vignettes.

Tech Futures: The Fossil Fuels Playbook for Big Tech: Part II

A rock embedded with intricate circuit board patterns, held delicately by pale hands drawn in a ghostly style. The contrast between the rough, metallic mineral and the sleek, artificial circuit board illustrates the relationship between raw natural resources and modern technological development. The hands evoke human involvement in the extraction and manufacturing processes.

Tech Futures: The Fossil Fuels Playbook for Big Tech: Part I

Close-up of a cat sleeping on a computer keyboard

Tech Futures: The threat of AI-generated code to the world’s digital infrastructure

The undying sun hangs in the sky, as people gather around signal towers, working through their digital devices.

Dreams and Realities in Modi’s AI Impact Summit

Illustration of a coral reef ecosystem

Tech Futures: Diversity of Thought and Experience: The UN’s Scientific Panel on AI

related posts

  • AI Framework for Healthy Built Environments

    AI Framework for Healthy Built Environments

  • A Matrix for Selecting Responsible AI Frameworks

    A Matrix for Selecting Responsible AI Frameworks

  • Never trust, always verify: a roadmap for Trustworthy AI?

    Never trust, always verify: a roadmap for Trustworthy AI?

  • Humans, AI, and Context: Understanding End-Users’ Trust in a Real-World Computer Vision Application

    Humans, AI, and Context: Understanding End-Users’ Trust in a Real-World Computer Vision Application

  • Code Work: Thinking with the System in Mexico

    Code Work: Thinking with the System in Mexico

  • 3 activism lessons from Jane Goodall you can apply in AI Ethics

    3 activism lessons from Jane Goodall you can apply in AI Ethics

  • Online public discourse on artificial intelligence and ethics in China: context, content, and implic...

    Online public discourse on artificial intelligence and ethics in China: context, content, and implic...

  • A Sequentially Fair Mechanism for Multiple Sensitive Attributes

    A Sequentially Fair Mechanism for Multiple Sensitive Attributes

  • Outsourced & Automated: How AI Companies Have Taken Over Government Decision-Making

    Outsourced & Automated: How AI Companies Have Taken Over Government Decision-Making

  • Artificial Intelligence: the global landscape of ethics guidelines

    Artificial Intelligence: the global landscape of ethics guidelines

Partners

  •  
    U.S. Artificial Intelligence Safety Institute Consortium (AISIC) at NIST

  • Partnership on AI

  • The LF AI & Data Foundation

  • The AI Alliance

Footer


Articles

Columns

AI Literacy

The State of AI Ethics Report


 

About Us


Founded in 2018, the Montreal AI Ethics Institute (MAIEI) is an international non-profit organization equipping citizens concerned about artificial intelligence and its impact on society to take action.

Contact

Donate


  • © 2025 MONTREAL AI ETHICS INSTITUTE.
  • This work is licensed under a Creative Commons Attribution 4.0 International License.
  • Learn more about our open access policy here.
  • Creative Commons License

    Save hours of work and stay on top of Responsible AI research and reporting with our bi-weekly email newsletter.