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.

v2.9.0发布于 2026-01-13 17:39 UTC11,739star +2 / 7 天940fork同步于 2026-11-10 05:28 UTC

怎么上手

由 README 提炼,执行前请确认
pip install cleanlab
硬件要求按 README 说明

README 未说明显存或 GPU 要求,仅说明支持 Linux、macOS、Windows 与 Python 3.10+

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用现有模型自动检测数据与标签问题,帮你清洗数据集再训练更稳的模型

自动检测和修复真实数据集中标签错误、异常样本等质量问题,帮你在训练前把脏数据清理干净,提升模型效果。

核心能力

  • 用 Datalab 一行代码扫描文本、图像、音频、表格数据的问题
  • 基于 confident learning 估计标签噪声并找出错标样本
  • 支持任意模型与框架,如 PyTorch、XGBoost、scikit-learn
  • 覆盖多标签、分词、回归、分割、检测与多标注者场景
  • 提供 CleanLearning 训练抗噪声的鲁棒模型

容易踩的坑

需要先用你自己的模型产出特征嵌入与预测概率 pred_probs 才能检测问题;README 未说明默认端口等运行配置

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.9.0
  1. 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

    Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.8.0...v2.9.0

  2. 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

    Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.7.1...v2.8.0

  3. 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

    New Contributors

    Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.7.0...v2.7.1

  4. 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, Datalab now 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, and clip_values functions, 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:

  5. v2.6.62024-06-25 · 2024-06-25 23:10 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/cleanlab/cleanlab/compare/v2.6.5...v2.6.6

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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()
    

    Run cleanlab open-source

    This cleanlab package runs on Python 3.10+ and supports Linux, macOS, as well as Windows.

    Practicing data-centric AI can look like this:

    1. Train initial ML model on original dataset.
    2. Utilize this model to diagnose data issues (via cleanlab methods) and improve the dataset.
    3. Train the same model on the improved dataset.
    4. 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:

    1. Binary and multi-class classification
    2. Multi-label classification (e.g. image/document tagging)
    3. Token classification (e.g. entity recognition in text)
    4. Regression (predicting numerical column in a dataset)
    5. Image segmentation (images with per-pixel annotations)
    6. Object detection (images with bounding box annotations)
    7. Classification with data labeled by multiple annotators
    8. Active learning with multiple annotators (suggest which data to label or re-label to improve model most)
    9. 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:

    1. backed by theory -- with provable guarantees of exact label noise estimation, even with imperfect models.
    2. fast -- code is parallelized and scalable.
    3. easy to use -- one line of code to find mislabeled data, bad annotators, outliers, or train noise-robust models.
    4. 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

    Interested in contributing? See the contributing guide, development guide, and ideas on useful contributions.

    Have questions? Check out our FAQ and Github Issues.