• 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

Illustration of a coral reef ecosystem

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

This image shows a large white, traditional, old building. The top half of the building represents the humanities (which is symbolised by the embedded text from classic literature which is faintly shown ontop the building). The bottom section of the building is embossed with mathematical formulas to represent the sciences. The middle layer of the image is heavily pixelated. On the steps at the front of the building there is a group of scholars, wearing formal suits and tie attire, who are standing around at the enternace talking and some of them are sitting on the steps. There are two stone, statute-like hands that are stretching the building apart from the left side. In the forefront of the image, there are 8 students - which can only be seen from the back. Their graduation gowns have bright blue hoods and they all look as though they are walking towards the old building which is in the background at a distance. There are a mix of students in the foreground.

Tech Futures: Co-opting Research and Education

Agentic AI systems and algorithmic accountability: a new era of e-commerce

ALL IN Conference 2025: Four Key Takeaways from Montreal

Beyond Dependency: The Hidden Risk of Social Comparison in Chatbot Companionship

related posts

  • Choices, Risks, and Reward Reports: Charting Public Policy for Reinforcement Learning Systems

    Choices, Risks, and Reward Reports: Charting Public Policy for Reinforcement Learning Systems

  • AI agents for facilitating social interactions and wellbeing

    AI agents for facilitating social interactions and wellbeing

  • Research summary: Beyond a Human Rights Based Approach To AI Governance: Promise, Pitfalls and Plea

    Research summary: Beyond a Human Rights Based Approach To AI Governance: Promise, Pitfalls and Plea

  • NATO Artificial Intelligence Strategy

    NATO Artificial Intelligence Strategy

  • Research summary: Appendix C: Model Benefit-Risk Analysis

    Research summary: Appendix C: Model Benefit-Risk Analysis

  • GAM(e) changer or not? An evaluation of interpretable machine learning models

    GAM(e) changer or not? An evaluation of interpretable machine learning models

  • Response to Mila’s Proposal for a Contact Tracing App

    Response to Mila’s Proposal for a Contact Tracing App

  • Montreal AI Ethics Institute Hosts a TechAIDE CafĂ© Session

    Montreal AI Ethics Institute Hosts a TechAIDE Café Session

  • Conversational Swarm Intelligence (CSI) Enhances Groupwise Deliberation

    Conversational Swarm Intelligence (CSI) Enhances Groupwise Deliberation

  • The Grand Illusion: The Myth of Software Portability and Implications for ML Progress

    The Grand Illusion: The Myth of Software Portability and Implications for ML Progress

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.