需要先用你自己的模型产出特征嵌入与预测概率 pred_probs 才能检测问题;README 未说明默认端口等运行配置
cleanlab
cleanlabApache-2.0更新放缓自动检测和修复真实数据集中标签错误、异常样本等质量问题,帮你在训练前把脏数据清理干净,提升模型效果。
Cleanlab's open-source library is the standard data-centric AI package for data quality and machine learning with messy, real-world data and labels.
pip install cleanlabREADME 未说明显存或 GPU 要求,仅说明支持 Linux、macOS、Windows 与 Python 3.10+
用现有模型自动检测数据与标签问题,帮你清洗数据集再训练更稳的模型
自动检测和修复真实数据集中标签错误、异常样本等质量问题,帮你在训练前把脏数据清理干净,提升模型效果。
核心能力
- 用 Datalab 一行代码扫描文本、图像、音频、表格数据的问题
- 基于 confident learning 估计标签噪声并找出错标样本
- 支持任意模型与框架,如 PyTorch、XGBoost、scikit-learn
- 覆盖多标签、分词、回归、分割、检测与多标注者场景
- 提供 CleanLearning 训练抗噪声的鲁棒模型
容易踩的坑
- v2.9.0最新正式版2026-01-13 · 2026-01-13 17:39 UTC
v2.9.0- Dependency Modernization and Simplified Maintenance
This release streamlines cleanlab's dependencies by removing TensorFlow/Keras support, reducing maintenance burden and improving compatibility with modern Python ecosystems. This is a breaking release for users relying on cleanlab.models.keras, who will need to migrate to alternative model wrappers, custom implementations or PyTorch instead.
What's Changed
- Remove Tensorflow from docs + code by @ulya-tkch in https://github.com/cleanlab/cleanlab/pull/1289
- Fix stale dependencies + add CI freshness checks by @ulya-tkch in https://github.com/cleanlab/cleanlab/pull/1291
- Make codebase compatible with latest dependencies by @ulya-tkch in https://github.com/cleanlab/cleanlab/pull/1292
- Update docs by @ulya-tkch in https://github.com/cleanlab/cleanlab/pull/1293
Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.8.0...v2.9.0
- v2.8.02026-01-08 · 2026-01-08 18:31 UTC
查看更新说明
v2.8.0 - Python 3.12-3.14 support and compatibility improvements
This release updates Python version support to 3.10-3.14, resolves compatibility issues with Datasets 4.0.0+, relaxes NumPy version constraints for better flexibility, and streamlines documentation. The update ensures cleanlab works with current and future Python releases while maintaining backward compatibility for supported versions.
What's Changed
- Update license by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1263
- Drop Python versions 3.8 & 3.9 that have reached EOL by @elisno in https://github.com/cleanlab/cleanlab/pull/1268
- Extend package support Python 3.10-3.14 by @ulya-tkch in https://github.com/cleanlab/cleanlab/pull/1276
- Handle new Column types from Datasets 4.0.0+ in Datalab by @elisno in https://github.com/cleanlab/cleanlab/pull/1267
- Remove agility chat by @maxbuchan in https://github.com/cleanlab/cleanlab/pull/1250
- Update README.md links to Cleanlab blog by @maxbuchan in https://github.com/cleanlab/cleanlab/pull/1257
- Update documentation to remove Easy Mode sections and simplify README by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1265, https://github.com/cleanlab/cleanlab/pull/1262
- Shorten improving ML tutorial by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1266
- Fix docs for 2.8.0 release by @ulya-tkch in https://github.com/cleanlab/cleanlab/pull/1278
- Update docs landing page to remove pointers we no longer want by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1280
- Shorten FAQ and Update support CTA at end of FAQ by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1264, https://github.com/cleanlab/cleanlab/pull/1281
Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.7.1...v2.8.0
- v2.7.1v2.7.1 -- New issue manager and improved docs 2025-02-27 · 2025-02-27 15:33 UTC
查看更新说明
This release is non-breaking when upgrading from v2.7.0, mostly focused on documentation and testing improvements. The most notable update is a:
- New identifier column issue manager – detects sequential numerical columns that might influence your model. This feature is available as a preview and requires additional setup to use with Datalab.
Other Updates:
- 📖 Docs & Readme: Improved clarity.
- 🛠 Test suite: More stability and consistency.
What's Changed
- Added issue manager for detecting identifier columns by @MaxJoas in https://github.com/cleanlab/cleanlab/pull/1120
- Revised non-IID section in Datalab tutorial to show overall dataset score first before per-example insights by @gordon-lim in https://github.com/cleanlab/cleanlab/pull/1221
- Fixed numpy2 compatibility by @GaetanLepage in https://github.com/cleanlab/cleanlab/pull/1224
- Updated CI to macos-13 instead of 12 by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1219
- Test improvements by @gordon-lim in https://github.com/cleanlab/cleanlab/pull/1218; @jwmueller in https://github.com/cleanlab/cleanlab/pull/1220
- General updates to docs and docs build system by @misteroh in https://github.com/cleanlab/cleanlab/pull/1212, https://github.com/cleanlab/cleanlab/pull/1213, https://github.com/cleanlab/cleanlab/pull/1216; @maxbuchan in https://github.com/cleanlab/cleanlab/pull/1226, https://github.com/cleanlab/cleanlab/pull/1227; @elisno in https://github.com/cleanlab/cleanlab/pull/1208, https://github.com/cleanlab/cleanlab/pull/1231
New Contributors
- @MaxJoas made their first contribution in https://github.com/cleanlab/cleanlab/pull/1120
- @misteroh made their first contribution in https://github.com/cleanlab/cleanlab/pull/1212
- @GaetanLepage made their first contribution in https://github.com/cleanlab/cleanlab/pull/1224
- @maxbuchan made their first contribution in https://github.com/cleanlab/cleanlab/pull/1226
Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.7.0...v2.7.1
- v2.7.0v2.7.0 -- Broadening Data Quality Checks and ML Workflows2024-09-26 · 2024-09-26 16:45 UTC
查看更新说明
This release introduces new features and improvements aimed at helping users detect complex dataset issues and improve their ML models' robustness. As always, we maintain backward compatibility, making this release non-breaking when upgrading from v2.6.6. We continue to support Python 3.8-3.11 in this version, but support for Python 3.8 will be dropped in a future minor release.
Introducing Spurious Correlation Detection in Datalab
With this release,
Datalabnow detects spurious correlations in image datasets by default, helping users identify potentially misleading patterns that may lead to overfitting or reduced model generalization.Spurious correlations occur when models pick up on patterns in the data that are coincidental rather than meaningful. For example, a model might incorrectly associate the background color with a particular label, leading to poor generalization on new data. Identifying these correlations helps ensure more reliable models by minimizing the risk of learning from irrelevant or misleading features.
Detecting spurious correlations in image datasets is straightforward:
from cleanlab import Datalab lab = Datalab(data=image_dataset, label_name="label_column", image_key="image_column") lab.find_issues() lab.report()You can find a more detailed workflow for finding spurious correlations in our documentation.
This new issue type aims to give users deeper insights into their data, enabling more robust model development.
New Tutorial: Improving ML Performance with Train and Test Set Curation
We've introduced a new tutorial that demonstrates how to carefully use cleanlab (via
Datalab) for both training and test data. This approach helps ensure reliable ML model training and evaluation, particularly for noisy datasets.You can find this tutorial in our documentation: Improving ML Performance via Data Curation with Train vs Test Splits.
Other Major Improvements
- Optimized Internal Functions: Several internal optimizations have been made, including updates to
clip_noise_rates,remove_noise_from_class, andclip_valuesfunctions, improving the overall efficiency of cleanlab. - Improved Underperforming Group Detection: Enhanced scoring for all underperforming groups, providing more accurate identification of problematic data subsets.
If you have ideas for new features or notice any bugs, we encourage you to open an Issue or Pull Request on our GitHub repository!
Change Log
Significant changes in this release include:
- Added Spurious Correlation feature by @allincowell in https://github.com/cleanlab/cleanlab/pull/1140, https://github.com/cleanlab/cleanlab/pull/1171, https://github.com/cleanlab/cleanlab/pull/1181, https://github.com/cleanlab/cleanlab/pull/1194; @elisno in https://github.com/cleanlab/cleanlab/pull/1170, https://github.com/cleanlab/cleanlab/pull/1192, https://github.com/cleanlab/cleanlab/pull/1192, https://github.com/cleanlab/cleanlab/pull/1193, https://github.com/cleanlab/cleanlab/pull/1192, https://github.com/cleanlab/cleanlab/pull/1201; @jwmueller in https://github.com/cleanlab/cleanlab/pull/1195, https://github.com/cleanlab/cleanlab/pull/1196
- Added new CLOS train test split tutorial notebook by @mturk24 in https://github.com/cleanlab/cleanlab/pull/1071; @jwmueller in https://github.com/cleanlab/cleanlab/pull/1178
- Update links to Issue Type Guide in workflows tutorials by @elisno in https://github.com/cleanlab/cleanlab/pull/1168
- Optimize internal clip_noise_rates and remove_noise_from_class functions by @gogetron in https://github.com/cleanlab/cleanlab/pull/1105
- Optimize internal clip_values function by @gogetron in https://github.com/cleanlab/cleanlab/pull/1104
- Move models.f
- Optimized Internal Functions: Several internal optimizations have been made, including updates to
- v2.6.62024-06-25 · 2024-06-25 23:10 UTC
查看更新说明
What's Changed
- Improvements in Issue Type guide by @elisno in https://github.com/cleanlab/cleanlab/pull/1100; @jwmueller in https://github.com/cleanlab/cleanlab/pull/1136
- Improve docstrings in token_classification/summary.py by @gogetron in https://github.com/cleanlab/cleanlab/pull/1094
- Update dictionary for deciding on omitting underperforming_group_check by @elisno in https://github.com/cleanlab/cleanlab/pull/1135
- Add notebook with miscellaneous Datalab workflows by @elisno in https://github.com/cleanlab/cleanlab/pull/1125, https://github.com/cleanlab/cleanlab/pull/1137https://github.com/cleanlab/cleanlab/pull/1138
- Update datalab report text by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1134; @elisno in https://github.com/cleanlab/cleanlab/pull/1154
- Update FAQ sections by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1139; @elisno in https://github.com/cleanlab/cleanlab/pull/1152
- Pin fasttext in CI by @elisno in https://github.com/cleanlab/cleanlab/pull/1144
- Improve test setup by @elisno in https://github.com/cleanlab/cleanlab/pull/1146
- Update quickstart links that were outdated by @jwmueller in https://github.com/cleanlab/cleanlab/pull/1148
- Update knn shapely score computation by @elisno in https://github.com/cleanlab/cleanlab/pull/1142
- Refactor KNN graph handling and outlier detection in issue managers by @elisno in https://github.com/cleanlab/cleanlab/pull/1155, https://github.com/cleanlab/cleanlab/pull/1163
Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.6.5...v2.6.6
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Cleanlab’s open-source library helps you clean data and labels by automatically detecting issues in a ML dataset. To facilitate machine learning with messy, real-world data, this data-centric AI package uses your existing models to estimate dataset problems that can be fixed to train even better models.
lab = cleanlab.Datalab(data=dataset, label="column_name_for_labels")
# Fit any ML model, get its feature_embeddings & pred_probs for your data
lab.find_issues(features=feature_embeddings, pred_probs=pred_probs)
lab.report()
- Use cleanlab to automatically check every: text, audio, image, or tabular dataset.
- Use cleanlab to automatically: detect data issues (outliers, duplicates, label errors, etc), train robust models, infer consensus + annotator-quality for multi-annotator data, suggest data to (re)label next (active learning).
Run cleanlab open-source
This cleanlab package runs on Python 3.10+ and supports Linux, macOS, as well as Windows.
- Get started here! Install via
uv,pip, orconda. - Developers who install the bleeding-edge from source should refer to this master branch documentation.
Practicing data-centric AI can look like this:
- Train initial ML model on original dataset.
- Utilize this model to diagnose data issues (via cleanlab methods) and improve the dataset.
- Train the same model on the improved dataset.
- Try various modeling techniques to further improve performance.
Most folks jump from Step 1 → 4, but you may achieve big gains without any change to your modeling code by using cleanlab! Continuously boost performance by iterating Steps 2 → 4 (and try to evaluate with cleaned data).

Use cleanlab with any model and in most ML tasks
All features of cleanlab work with any dataset and any model. Yes, any model: PyTorch, Tensorflow, Keras, JAX, HuggingFace, OpenAI, XGBoost, scikit-learn, etc.
cleanlab is useful across a wide variety of Machine Learning tasks. Specific tasks this data-centric AI package offers dedicated functionality for include:
- Binary and multi-class classification
- Multi-label classification (e.g. image/document tagging)
- Token classification (e.g. entity recognition in text)
- Regression (predicting numerical column in a dataset)
- Image segmentation (images with per-pixel annotations)
- Object detection (images with bounding box annotations)
- Classification with data labeled by multiple annotators
- Active learning with multiple annotators (suggest which data to label or re-label to improve model most)
- Outlier detection (identify atypical data that appears out of distribution)
For other ML tasks, cleanlab can still help you improve your dataset if appropriately applied. See our Example Notebooks and Blog.
So fresh, so cleanlab
Beyond automatically catching all sorts of issues lurking in your data, this data-centric AI package helps you deal with noisy labels and train more robust ML models. Here's an example:
# cleanlab works with **any classifier**. Yup, you can use PyTorch/TensorFlow/OpenAI/XGBoost/etc.
cl = cleanlab.classification.CleanLearning(sklearn.YourFavoriteClassifier())
# cleanlab finds data and label issues in **any dataset**... in ONE line of code!
label_issues = cl.find_label_issues(data, labels)
# cleanlab trains a robust version of your model that works more reliably with noisy data.
cl.fit(data, labels)
# cleanlab estimates the predictions you would have gotten if you had trained with *no* label issues.
cl.predict(test_data)
# A universal data-centric AI tool, cleanlab quantifies class-level issues and overall data quality, for any dataset.
cleanlab.dataset.health_summary(labels, confident_joint=cl.confident_joint)
cleanlab cleans your data's labels via state-of-the-art confident learning algorithms, published in this paper and blog. See some of the datasets cleaned with cleanlab at labelerrors.com.
cleanlab is:
- backed by theory -- with provable guarantees of exact label noise estimation, even with imperfect models.
- fast -- code is parallelized and scalable.
- easy to use -- one line of code to find mislabeled data, bad annotators, outliers, or train noise-robust models.
- general -- works with any dataset (text, image, tabular, audio,...) + any model (PyTorch, OpenAI, XGBoost,...)

Citation and related publications
cleanlab is based on peer-reviewed research. Here are relevant papers to cite if you use this package:
@article{northcutt2021confidentlearning,
title={Confident Learning: Estimating Uncertainty in Dataset Labels},
author={Curtis G. Northcutt and Lu Jiang and Isaac L. Chuang},
journal={Journal of Artificial Intelligence Research (JAIR)},
volume={70},
pages={1373--1411},
year={2021}
}
@inproceedings{northcutt2017rankpruning,
author={Northcutt, Curtis G. and Wu, Tailin and Chuang, Isaac L.},
title={Learning with Confident Examples: Rank Pruning for Robust Classification with Noisy Labels},
booktitle = {Proceedings of the Thirty-Third Conference on Uncertainty in Artificial Intelligence},
series = {UAI'17},
year = {2017},
location = {Sydney, Australia},
numpages = {10},
url = {http://auai.org/uai2017/proceedings/papers/35.pdf},
publisher = {AUAI Press},
}
@inproceedings{kuan2022labelquality,
title={Model-agnostic label quality scoring to detect real-world label errors},
author={Kuan, Johnson and Mueller, Jonas},
booktitle={ICML DataPerf Workshop},
year={2022}
}
@inproceedings{wang2022tokenerrors,
title={Detecting label errors in token classification data},
author={Wang, Wei-Chen and Mueller, Jonas},
booktitle={NeurIPS Workshop on Interactive Learning for Natural Language Processing (InterNLP)},
year={2022}
}
@inproceedings{thyagarajan2023multilabel,
title={Identifying Incorrect Annotations in Multi-Label Classification Data},
author={Thyagarajan, Aditya and Snorrason, Elías and Northcutt, Curtis and Mueller, Jonas},
booktitle={ICLR Workshop on Trustworthy ML},
year={2023}
}
@inproceedings{tkachenko2023objectlab,
title={ObjectLab: Automated Diagnosis of Mislabeled Images in Object Detection Data},
author={Tkachenko, Ulyana and Thyagarajan, Aditya and Mueller, Jonas},
booktitle={ICML Workshop on Data-centric Machine Learning Research},
year={2023}
}
@inproceedings{lad2023segmentation,
title={Estimating label quality and errors in semantic segmentation data via any model},
author={Lad, Vedang and Mueller, Jonas},
booktitle={ICML Workshop on Data-centric Machine Learning Research},
year={2023}
}
@inproceedings{zhou2023errors,
title={Detecting Errors in a Numerical Response via any Regression Model},
author={Zhou, Hang and Mueller, Jonas and Kumar, Mayank and Wang, Jane-Ling and Lei, Jing},
booktitle={Journal of Data-centric Machine Learning Research},
year={2024}
}
@inproceedings{kuan2022ood,
title={Back to the Basics: Revisiting Out-of-Distribution Detection Baselines},
author={Kuan, Johnson and Mueller, Jonas},
booktitle={ICML Workshop on Principles of Distribution Shift},
year={2022}
}
@inproceedings{goh2022crowdlab,
title={CROWDLAB: Supervised learning to infer consensus labels and quality scores for data with multiple annotators},
author={Goh, Hui Wen and Tkachenko, Ulyana and Mueller, Jonas},
booktitle={NeurIPS Human in the Loop Learning Workshop},
year={2022}
}
@inproceedings{goh2023activelab,
title={ActiveLab: Active Learning with Re-Labeling by Multiple Annotators},
author={Goh, Hui Wen and Mueller, Jonas},
booktitle={ICLR Workshop on Trustworthy ML},
year={2023}
}
@inproceedings{cummings2023drift,
title={Detecting Dataset Drift and Non-IID Sampling via k-Nearest Neighbors},
author={Cummings, Jesse and Snorrason, Elías and Mueller, Jonas},
booktitle={ICML Workshop on Data-centric Machine Learning Research},
year={2023}
}
To understand/cite other cleanlab functionality not described above, check out our Blog.
Other resources
-
Example Notebooks demonstrating practical applications of this package
-
NeurIPS 2021 paper: Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks
Interested in contributing? See the contributing guide, development guide, and ideas on useful contributions.
Have questions? Check out our FAQ and Github Issues.