# humancompatible.detect: a Python Toolkit for Detecting Bias in AI Models

arXiv: https://arxiv.org/abs/2509.24340 · HTML: https://mlsanity.com/paper/2509.24340/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 17 of its 28 references that are in the map.
- First posted on arXiv 29 Sep 2025.

## Builds on (most cited first, 17 of 17)

- [A Survey on Bias and Fairness in Machine Learning](https://mlsanity.com/paper/1908.09635/) (2019)
- [Preventing Fairness Gerrymandering: Auditing and Learning for Subgroup Fairness](https://mlsanity.com/paper/1711.05144/) (2017)
- [AI Fairness 360: An Extensible Toolkit for Detecting, Understanding, and Mitigating Unwanted Algorithmic Bias](https://mlsanity.com/paper/1810.01943/) (2018)
- [Fairlearn: Assessing and Improving Fairness of AI Systems](https://mlsanity.com/paper/2303.16626/) (2023)
- [Facilitating Self-Guided Mental Health Interventions Through Human-Language Model Interaction: A Case Study of Cognitive Restructuring](https://mlsanity.com/paper/2310.15461/) (2023)
- [MAGNET: Improving the Multilingual Fairness of Language Models with Adaptive Gradient-Based Tokenization](https://mlsanity.com/paper/2407.08818/) (2024)
- [Themis-ml: A Fairness-aware Machine Learning Interface for End-to-end Discrimination Discovery and Mitigation](https://mlsanity.com/paper/1710.06921/) (2017)
- [FAT Forensics: A Python Toolbox for Algorithmic Fairness, Accountability and Transparency](https://mlsanity.com/paper/1909.05167/) (2019)
- [Computability of Optimizers](https://mlsanity.com/paper/2301.06148/) (2023)
- [Adultification Bias in LLMs and Text-to-Image Models](https://mlsanity.com/paper/2506.07282/) (2025)
- [Fairness in Forecasting of Observations of Linear Dynamical Systems](https://mlsanity.com/paper/2209.05274/) (2022)
- [Closed-Loop View of the Regulation of AI: Equal Impact across Repeated Interactions](https://mlsanity.com/paper/2209.01410/) (2022)
- [Bias Detection via Maximum Subgroup Discrepancy](https://mlsanity.com/paper/2502.02221/) (2025)
- [When Collaborative Filtering is not Collaborative: Unfairness of PCA for Recommendations](https://mlsanity.com/paper/2310.09687/) (2023)
- [Fairness in Ranking: Robustness through Randomization without the Protected Attribute](https://mlsanity.com/paper/2403.19419/) (2024)
- [Sample Complexity of Bias Detection with Subsampled Point-to-Subspace Distances](https://mlsanity.com/paper/2502.02623/) (2025)
- [Generalizing while preserving monotonicity in comparison-based preference learning models](https://mlsanity.com/paper/2506.08616/) (2025)

## Abstract (arXiv)

There is a strong recent emphasis on trustworthy AI. In particular, international regulations, such as the AI Act, demand that AI practitioners measure data quality on the input and estimate bias on the output of high-risk AI systems. However, there are many challenges involved, including scalability (MMD) and computability (Wasserstein-1) issues of traditional methods for estimating distances on measure spaces. Here, we present humancompatible.detect, a toolkit for bias detection that addresses these challenges. It incorporates two newly developed methods to detect and evaluate bias: maximum subgroup discrepancy (MSD) and subsampled ℓ_∞ distances. It has an easy-to-use API documented with multiple examples. humancompatible.detect is licensed under the Apache License, Version 2.0.
