{"id":13472849,"url":"https://github.com/cleanlab/cleanlab","last_synced_at":"2026-01-08T08:18:52.831Z","repository":{"id":36993669,"uuid":"132975485","full_name":"cleanlab/cleanlab","owner":"cleanlab","description":"The standard data-centric AI package for data quality and machine learning with messy, real-world data and labels.","archived":false,"fork":false,"pushed_at":"2025-04-10T06:03:37.000Z","size":12105,"stargazers_count":10518,"open_issues_count":99,"forks_count":825,"subscribers_count":87,"default_branch":"master","last_synced_at":"2025-05-12T02:43:19.411Z","etag":null,"topics":["active-learning","annotation","data-centric-ai","data-cleaning","data-curation","data-labeling","data-profiling","data-quality","data-science","data-validation","dataops","dataquality","datasets","exploratory-data-analysis","labeling","llms","noisy-labels","out-of-distribution-detection","outlier-detection","weak-supervision"],"latest_commit_sha":null,"homepage":"https://cleanlab.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cleanlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-11T01:55:21.000Z","updated_at":"2025-05-11T20:32:07.000Z","dependencies_parsed_at":"2023-11-28T16:43:58.736Z","dependency_job_id":"c6cc67d1-8a47-4adc-86b4-a00705551829","html_url":"https://github.com/cleanlab/cleanlab","commit_stats":{"total_commits":1192,"total_committers":33,"mean_commits":"36.121212121212125","dds":"0.40268456375838924","last_synced_commit":"6353e5473de6234dbcba00c525d01cf8bd75609b"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleanlab%2Fcleanlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleanlab","download_url":"https://codeload.github.com/cleanlab/cleanlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672676,"owners_count":21945479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["active-learning","annotation","data-centric-ai","data-cleaning","data-curation","data-labeling","data-profiling","data-quality","data-science","data-validation","dataops","dataquality","datasets","exploratory-data-analysis","labeling","llms","noisy-labels","out-of-distribution-detection","outlier-detection","weak-supervision"],"created_at":"2024-07-31T16:00:58.477Z","updated_at":"2026-01-08T08:18:52.822Z","avatar_url":"https://github.com/cleanlab.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/cleanlab_logo_open_source.png\" width=60%\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://pypi.org/pypi/cleanlab/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/cleanlab.svg\" alt=\"pypi_versions\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/pypi/cleanlab/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-3.10%2B-blue\" alt=\"py_versions\"\u003e\u003c/a\u003e\n\u003ca href=\"https://app.codecov.io/gh/cleanlab/cleanlab\" target=\"_blank\"\u003e\u003cimg src=\"https://codecov.io/gh/cleanlab/cleanlab/branch/master/graph/badge.svg\" alt=\"coverage\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/cleanlab/cleanlab/stargazers/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/cleanlab/cleanlab?style=social\u0026maxAge=2592000\" alt=\"Github Stars\"\u003e\u003c/a\u003e\n\u003ca href=\"https://twitter.com/CleanlabAI\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/CleanlabAI?style=social\" alt=\"Twitter\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003ch4 align=\"center\"\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://docs.cleanlab.ai/\"\u003eDocumentation\u003c/a\u003e |\n        \u003ca href=\"https://github.com/cleanlab/examples\"\u003eExamples\u003c/a\u003e |\n        \u003ca href=\"https://cleanlab.ai/blog/learn/\"\u003eBlog\u003c/a\u003e |\n        \u003ca href=\"#citation-and-related-publications\"\u003eResearch\u003c/a\u003e\n    \u003cp\u003e\n\u003c/h4\u003e\n\nCleanlab’s open-source library helps you **clean** data and **lab**els 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.\n \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/datalab_issues.png\" width=74%\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    Examples of various issues in Cat/Dog dataset \u003cb\u003eautomatically detected\u003c/b\u003e by cleanlab via this code:    \n\u003c/p\u003e\n\n```python\n        lab = cleanlab.Datalab(data=dataset, label=\"column_name_for_labels\")\n        # Fit any ML model, get its feature_embeddings \u0026 pred_probs for your data\n        lab.find_issues(features=feature_embeddings, pred_probs=pred_probs)\n        lab.report()\n```\n\n- Use cleanlab to automatically check every: [text](https://docs.cleanlab.ai/stable/tutorials/datalab/text.html), [audio](https://docs.cleanlab.ai/stable/tutorials/datalab/audio.html), [image](https://docs.cleanlab.ai/stable/tutorials/datalab/image.html), or [tabular](https://docs.cleanlab.ai/stable/tutorials/datalab/tabular.html) dataset.\n- Use cleanlab to automatically: [detect data issues (outliers, duplicates, label errors, etc)](https://docs.cleanlab.ai/stable/tutorials/datalab/datalab_quickstart.html), [train robust models](https://docs.cleanlab.ai/stable/tutorials/indepth_overview.html), [infer consensus + annotator-quality for multi-annotator data](https://docs.cleanlab.ai/stable/tutorials/multiannotator.html), [suggest data to (re)label next (active learning)](https://github.com/cleanlab/examples/blob/master/active_learning_multiannotator/active_learning.ipynb).\n\n\n---\n\n\n## Run cleanlab open-source\n\nThis cleanlab package runs on Python 3.10+ and supports Linux, macOS, as well as Windows.\n\n- Get started [here](https://docs.cleanlab.ai/)! Install via `pip` or `conda`.\n- Developers who install the bleeding-edge from source should refer to [this master branch documentation](https://docs.cleanlab.ai/master/index.html).\n\n**Practicing data-centric AI can look like this:**\n1. Train initial ML model on original dataset.\n2. Utilize this model to diagnose data issues (via cleanlab methods) and improve the dataset.\n3. Train the same model on the improved dataset. \n4. Try various modeling techniques to further improve performance.\n\nMost folks jump from Step 1 → 4, but you may achieve big gains without *any* change to your modeling code by using cleanlab!\nContinuously boost performance by iterating Steps 2 → 4 (and try to evaluate with *cleaned* data).\n\n![](https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/flowchart.png)\n\n\n## Use cleanlab with any model and in most ML tasks\n\nAll features of cleanlab work with **any dataset** and **any model**. Yes, any model: PyTorch, Tensorflow, Keras, JAX, HuggingFace, OpenAI, XGBoost, scikit-learn, etc.\n\ncleanlab is useful across a wide variety of Machine Learning tasks. Specific tasks this data-centric AI package offers dedicated functionality for include:\n1. [Binary and multi-class classification](https://docs.cleanlab.ai/stable/tutorials/indepth_overview.html)\n2. [Multi-label classification](https://docs.cleanlab.ai/stable/tutorials/multilabel_classification.html) (e.g. image/document tagging)\n3. [Token classification](https://docs.cleanlab.ai/stable/tutorials/token_classification.html) (e.g. entity recognition in text)\n4. [Regression](https://docs.cleanlab.ai/stable/tutorials/regression.html) (predicting numerical column in a dataset)\n5. [Image segmentation](https://docs.cleanlab.ai/stable/tutorials/segmentation.html) (images with per-pixel annotations)\n6. [Object detection](https://docs.cleanlab.ai/stable/tutorials/object_detection.html) (images with bounding box annotations)\n7. [Classification with data labeled by multiple annotators](https://docs.cleanlab.ai/stable/tutorials/multiannotator.html)\n8. [Active learning with multiple annotators](https://github.com/cleanlab/examples/blob/master/active_learning_multiannotator/active_learning.ipynb) (suggest which data to label or re-label to improve model most)\n9. [Outlier detection](https://docs.cleanlab.ai/stable/tutorials/outliers.html) (identify atypical data that appears out of distribution)\n\nFor other ML tasks, cleanlab can still help you improve your dataset if appropriately applied.\nSee our [Example Notebooks](https://github.com/cleanlab/examples) and [Blog](https://cleanlab.ai/blog/learn/).\n\n\n## So fresh, so cleanlab\n\nBeyond automatically catching [all sorts of issues](https://docs.cleanlab.ai/stable/cleanlab/datalab/guide/issue_type_description.html) lurking in your data, this data-centric AI package helps you deal with **noisy labels** and train more **robust ML models**.\nHere's an example:\n\n```python\n\n# cleanlab works with **any classifier**. Yup, you can use PyTorch/TensorFlow/OpenAI/XGBoost/etc.\ncl = cleanlab.classification.CleanLearning(sklearn.YourFavoriteClassifier())\n\n# cleanlab finds data and label issues in **any dataset**... in ONE line of code!\nlabel_issues = cl.find_label_issues(data, labels)\n\n# cleanlab trains a robust version of your model that works more reliably with noisy data.\ncl.fit(data, labels)\n\n# cleanlab estimates the predictions you would have gotten if you had trained with *no* label issues.\ncl.predict(test_data)\n\n# A universal data-centric AI tool, cleanlab quantifies class-level issues and overall data quality, for any dataset.\ncleanlab.dataset.health_summary(labels, confident_joint=cl.confident_joint)\n```\n\ncleanlab **clean**s your data's **lab**els via state-of-the-art *confident learning* algorithms, published in this [paper](https://jair.org/index.php/jair/article/view/12125) and [blog](https://l7.curtisnorthcutt.com/confident-learning). See some of the datasets cleaned with cleanlab at [labelerrors.com](https://labelerrors.com).\n\ncleanlab is:\n\n1. **backed by theory** -- with [provable guarantees](https://arxiv.org/abs/1911.00068) of exact label noise estimation, even with imperfect models.\n2. **fast** -- code is parallelized and scalable.\n4. **easy to use** -- one line of code to find mislabeled data, bad annotators, outliers, or train noise-robust models.\n6. **general** -- works with **[any dataset](https://labelerrors.com/)** (text, image, tabular, audio,...) + **any model** (PyTorch, OpenAI, XGBoost,...)\n\u003cbr/\u003e\n\n![](https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/label-errors-examples.png)\n\u003cp align=\"center\"\u003e\nExamples of incorrect given labels in various image datasets \u003ca href=\"https://l7.curtisnorthcutt.com/label-errors\"\u003efound and corrected\u003c/a\u003e using cleanlab. \nWhile these examples are from image datasets, this also works for text, audio, tabular data.\n\u003c/p\u003e\n\n\n## Citation and related publications\n\ncleanlab is based on peer-reviewed research. Here are relevant papers to cite if you use this package:\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/1911.00068\"\u003eConfident Learning (JAIR '21)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @article{northcutt2021confidentlearning,\n        title={Confident Learning: Estimating Uncertainty in Dataset Labels},\n        author={Curtis G. Northcutt and Lu Jiang and Isaac L. Chuang},\n        journal={Journal of Artificial Intelligence Research (JAIR)},\n        volume={70},\n        pages={1373--1411},\n        year={2021}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/1705.01936\"\u003eRank Pruning (UAI '17)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{northcutt2017rankpruning,\n        author={Northcutt, Curtis G. and Wu, Tailin and Chuang, Isaac L.},\n        title={Learning with Confident Examples: Rank Pruning for Robust Classification with Noisy Labels},\n        booktitle = {Proceedings of the Thirty-Third Conference on Uncertainty in Artificial Intelligence},\n        series = {UAI'17},\n        year = {2017},\n        location = {Sydney, Australia},\n        numpages = {10},\n        url = {http://auai.org/uai2017/proceedings/papers/35.pdf},\n        publisher = {AUAI Press},\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://jonasmueller.org/info/LabelQuality_icml.pdf\"\u003e Label Quality Scoring (ICML '22)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{kuan2022labelquality,\n        title={Model-agnostic label quality scoring to detect real-world label errors},\n        author={Kuan, Johnson and Mueller, Jonas},\n        booktitle={ICML DataPerf Workshop},\n        year={2022}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2210.03920\"\u003e Label Errors in Token Classification / Entity Recognition (NeurIPS '22)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{wang2022tokenerrors,\n        title={Detecting label errors in token classification data},\n        author={Wang, Wei-Chen and Mueller, Jonas},\n        booktitle={NeurIPS Workshop on Interactive Learning for Natural Language Processing (InterNLP)},\n        year={2022}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2211.13895\"\u003e Label Errors in Multi-Label Classification (ICLR '23)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{thyagarajan2023multilabel,\n        title={Identifying Incorrect Annotations in Multi-Label Classification Data},\n        author={Thyagarajan, Aditya and Snorrason, Elías and Northcutt, Curtis and Mueller, Jonas},\n        booktitle={ICLR Workshop on Trustworthy ML},\n        year={2023}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2309.00832\"\u003e Label Errors in Object Detection (ICML '23)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{tkachenko2023objectlab,\n        title={ObjectLab: Automated Diagnosis of Mislabeled Images in Object Detection Data},\n        author={Tkachenko, Ulyana and Thyagarajan, Aditya and Mueller, Jonas},\n        booktitle={ICML Workshop on Data-centric Machine Learning Research},\n        year={2023}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2307.05080\"\u003e Label Errors in Image Segmentation (ICML '23)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{lad2023segmentation,\n        title={Estimating label quality and errors in semantic segmentation data via any model},\n        author={Lad, Vedang and Mueller, Jonas},\n        booktitle={ICML Workshop on Data-centric Machine Learning Research},\n        year={2023}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2305.16583\"\u003e Detecting Errors in Numerical Data (DMLR '24)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{zhou2023errors,\n        title={Detecting Errors in a Numerical Response via any Regression Model},\n        author={Zhou, Hang and Mueller, Jonas and Kumar, Mayank and Wang, Jane-Ling and Lei, Jing},\n        booktitle={Journal of Data-centric Machine Learning Research},\n        year={2024}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2207.03061\"\u003e Out-of-Distribution Detection (ICML '22)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{kuan2022ood,\n        title={Back to the Basics: Revisiting Out-of-Distribution Detection Baselines},\n        author={Kuan, Johnson and Mueller, Jonas},\n        booktitle={ICML Workshop on Principles of Distribution Shift},\n        year={2022}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2210.06812\"\u003e CROWDLAB for Data with Multiple Annotators (NeurIPS '22)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{goh2022crowdlab,\n        title={CROWDLAB: Supervised learning to infer consensus labels and quality scores for data with multiple annotators},\n        author={Goh, Hui Wen and Tkachenko, Ulyana and Mueller, Jonas},\n        booktitle={NeurIPS Human in the Loop Learning Workshop},\n        year={2022}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2301.11856\"\u003e ActiveLab: Active learning with data re-labeling (ICLR '23)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{goh2023activelab,\n        title={ActiveLab: Active Learning with Re-Labeling by Multiple Annotators},\n        author={Goh, Hui Wen and Mueller, Jonas},\n        booktitle={ICLR Workshop on Trustworthy ML},\n        year={2023}\n    }\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ca href=\"https://arxiv.org/abs/2305.15696\"\u003e Detecting Dataset Drift and Non-IID Sampling (ICML '23)\u003c/a\u003e (\u003cb\u003eclick to show bibtex\u003c/b\u003e) \u003c/summary\u003e\n\n    @inproceedings{cummings2023drift,\n        title={Detecting Dataset Drift and Non-IID Sampling via k-Nearest Neighbors},\n        author={Cummings, Jesse and Snorrason, Elías and Mueller, Jonas},\n        booktitle={ICML Workshop on Data-centric Machine Learning Research},\n        year={2023}\n    }\n\n\u003c/details\u003e\n\nTo understand/cite other cleanlab functionality not described above, check out our [Blog](https://cleanlab.ai/blog/learn).\n\n\n## Other resources\n\n- [Example Notebooks demonstrating practical applications of this package](https://github.com/cleanlab/examples)\n\n- [Cleanlab Blog](https://cleanlab.ai/blog/learn)\n\n- [Blog post: Introduction to Confident Learning](https://l7.curtisnorthcutt.com/confident-learning)\n\n- [NeurIPS 2021 paper: Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks](https://arxiv.org/abs/2103.14749)\n\n- [Introduction to Data-centric AI (MIT IAP Course)](https://dcai.csail.mit.edu/)\n\n- [Release notes for past versions](https://github.com/cleanlab/cleanlab/releases)\n\n**Interested in contributing?**  See the [contributing guide](CONTRIBUTING.md), [development guide](DEVELOPMENT.md), and [ideas on useful contributions](https://github.com/cleanlab/cleanlab/wiki#ideas-for-contributing-to-cleanlab).\n\n**Have questions?**  Check out [our FAQ](https://docs.cleanlab.ai/stable/tutorials/faq.html) and [Github Issues](https://github.com/cleanlab/cleanlab/issues?q=is%3Aissue).\n","funding_links":[],"categories":["Python","The Data Science Toolbox","Data Manipulation","Data Security \u0026 Poisoning","Data Annotation and Synthesis","其他_机器学习与深度学习","Data Quality","\u003ca id=\"tools\"\u003e\u003c/a\u003e🛠️ Tools","data-science","Data Validation","📋 Contents","Tools 🛠️","Quality Assurance","Outlier and noise detection"],"sub_categories":["Miscellaneous Tools","Data-centric AI","General-Purpose Machine Learning","Data Management","📈 9. Evaluation, Benchmarks \u0026 Datasets"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleanlab%2Fcleanlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleanlab%2Fcleanlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleanlab%2Fcleanlab/lists"}