{"id":31292339,"url":"https://github.com/meta-pytorch/opacus","last_synced_at":"2026-03-11T10:05:07.859Z","repository":{"id":37082539,"uuid":"226441159","full_name":"meta-pytorch/opacus","owner":"meta-pytorch","description":"Training PyTorch models with differential privacy","archived":false,"fork":false,"pushed_at":"2026-03-06T19:09:13.000Z","size":9725,"stargazers_count":1909,"open_issues_count":71,"forks_count":390,"subscribers_count":43,"default_branch":"main","last_synced_at":"2026-03-07T23:42:49.613Z","etag":null,"topics":["deep-learning","differential-privacy","machine-learning","neural-network","privacy-preserving-machine-learning","pytorch"],"latest_commit_sha":null,"homepage":"https://opacus.ai","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meta-pytorch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-07T01:58:09.000Z","updated_at":"2026-03-07T09:59:55.000Z","dependencies_parsed_at":"2023-07-13T00:10:27.863Z","dependency_job_id":"48eefad6-e057-4505-b9ca-34e9b46f8c74","html_url":"https://github.com/meta-pytorch/opacus","commit_stats":{"total_commits":653,"total_committers":84,"mean_commits":7.773809523809524,"dds":0.7182235834609494,"last_synced_commit":"9eed06a2fc785e94abc05e5eb7ef3ed0a5a5a909"},"previous_names":["facebookresearch/pytorch-dp","meta-pytorch/opacus","pytorch/opacus"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/meta-pytorch/opacus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-pytorch%2Fopacus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-pytorch%2Fopacus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-pytorch%2Fopacus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-pytorch%2Fopacus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meta-pytorch","download_url":"https://codeload.github.com/meta-pytorch/opacus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-pytorch%2Fopacus/sbom","scorecard":{"id":390970,"data":{"date":"2025-08-11","repo":{"name":"github.com/pytorch/opacus","commit":"42b0e7275c394f08544bcc58040a7c2630b28c18"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Maintained","score":8,"reason":"10 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci_cpu.yml:1","Warn: no topLevel permission defined: .github/workflows/ci_gpu.yml:1","Warn: no topLevel permission defined: .github/workflows/deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test-deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/test-installation.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Info: Possibly incomplete results: error parsing shell code: \"foo(\" must be followed by ): scripts/pytorch_install.ps1:0","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:150: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:152: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:169: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:174: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:186: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:188: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:125: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_cpu.yml:140: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_cpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_gpu.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_gpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_gpu.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_gpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_gpu.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_gpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_gpu.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_gpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_gpu.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_gpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_gpu.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/ci_gpu.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-deploy.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/test-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-installation.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/test-installation.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-installation.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/pytorch/opacus/test-installation.yml/main?enable=pin","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:47","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:50","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:55","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:57","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:62","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:64","Warn: pipCommand not pinned by hash: scripts/install_via_pip.sh:70","Warn: pipCommand not pinned by hash: scripts/pytorch_install.sh:24","Warn: pipCommand not pinned by hash: scripts/pytorch_install.sh:25","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:157","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:158","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:50","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:82","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:83","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:113","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:132","Warn: pipCommand not pinned by hash: .github/workflows/ci_cpu.yml:133","Warn: pipCommand not pinned by hash: .github/workflows/ci_gpu.yml:52","Warn: pipCommand not pinned by hash: .github/workflows/ci_gpu.yml:72","Warn: pipCommand not pinned by hash: .github/workflows/ci_gpu.yml:73","Warn: pipCommand not pinned by hash: .github/workflows/ci_gpu.yml:107","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/test-deploy.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/test-deploy.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/test-installation.yml:42","Info:   0 out of  29 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of  31 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: branch 'main' does not require approvers","Warn: codeowners review is not required on branch 'main'","Warn: 'up-to-date branches' is disabled on branch 'main'","Info: status check found to merge onto on branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"43 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2021-874 / GHSA-2vj5-px25-gjrp","Warn: Project is vulnerable to: GHSA-4cv3-v7pv-rfhf","Warn: Project is vulnerable to: GHSA-98fp-7v67-4v3q","Warn: Project is vulnerable to: PYSEC-2022-181 / GHSA-r5qj-cvf9-p85h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2020-107 / GHSA-jjw5-xxj6-pcv5","Warn: Project is vulnerable to: PYSEC-2024-110 / GHSA-jw8x-6495-233v","Warn: Project is vulnerable to: PYSEC-2020-108","Warn: Project is vulnerable to: GHSA-3749-ghw9-m3mg","Warn: Project is vulnerable to: PYSEC-2022-43015 / GHSA-47fc-vmwq-366v","Warn: Project is vulnerable to: PYSEC-2025-41 / GHSA-53q9-r3pm-6pq6","Warn: Project is vulnerable to: PYSEC-2024-252 / GHSA-5pcm-hx3q-hm94","Warn: Project is vulnerable to: GHSA-887c-mr87-cxwp","Warn: Project is vulnerable to: PYSEC-2024-251 / GHSA-pg7h-5qx3-wjr3","Warn: Project is vulnerable to: PYSEC-2024-250","Warn: Project is vulnerable to: PYSEC-2024-259","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: PYSEC-2023-299 / GHSA-282v-666c-3fvg","Warn: Project is vulnerable to: GHSA-37mw-44qp-f5jm","Warn: Project is vulnerable to: GHSA-37q5-v5qm-c9v8","Warn: Project is vulnerable to: PYSEC-2023-300 / GHSA-3863-2447-669p","Warn: Project is vulnerable to: GHSA-6rvg-6v2m-4j46","Warn: Project is vulnerable to: GHSA-9356-575x-2w9m","Warn: Project is vulnerable to: GHSA-fpwr-67px-3qhx","Warn: Project is vulnerable to: PYSEC-2024-229 / GHSA-hxxf-235m-72v3","Warn: Project is vulnerable to: GHSA-jjph-296x-mrcr","Warn: Project is vulnerable to: GHSA-phhr-52qp-3mj4","Warn: Project is vulnerable to: GHSA-q2wp-rjmx-x6x9","Warn: Project is vulnerable to: PYSEC-2025-40 / GHSA-qq3j-4f4f-9583","Warn: Project is vulnerable to: PYSEC-2024-227 / GHSA-qxrp-vhvm-j765","Warn: Project is vulnerable to: PYSEC-2023-301 / GHSA-v68g-wm8c-6x7j","Warn: Project is vulnerable to: PYSEC-2024-228 / GHSA-wrfc-pvp9-mr9g","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: PYSEC-2022-249 / GHSA-9jmq-rx5f-8jwq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T17:48:09.058Z","repository_id":37082539,"created_at":"2025-08-18T17:48:09.058Z","updated_at":"2025-08-18T17:48:09.058Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30377838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deep-learning","differential-privacy","machine-learning","neural-network","privacy-preserving-machine-learning","pytorch"],"created_at":"2025-09-24T17:00:30.060Z","updated_at":"2026-03-11T10:05:07.840Z","avatar_url":"https://github.com/meta-pytorch.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","Privacy and Safety"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/pytorch/opacus/blob/main/website/static/img/opacus_logo.svg\" alt=\"Opacus\" width=\"500\"/\u003e\u003c/p\u003e\n\n\u003chr/\u003e\n\n[![PyPI Downloads](https://static.pepy.tech/badge/opacus)](https://pepy.tech/projects/opacus)\n[![GitHub Actions](https://github.com/pytorch/opacus/actions/workflows/ci_cpu.yml/badge.svg)](https://github.com/pytorch/opacus/actions/workflows/ci_cpu.yml)\n[![Coverage Status](https://coveralls.io/repos/github/pytorch/opacus/badge.svg?branch=main)](https://coveralls.io/github/pytorch/opacus?branch=main)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![License](https://img.shields.io/badge/license-apache2-green.svg)](LICENSE)\n\n[Opacus](https://opacus.ai) is a library that enables training PyTorch models\nwith differential privacy. It supports training with minimal code changes\nrequired on the client, has little impact on training performance, and allows\nthe client to online track the privacy budget expended at any given moment.\n\n\n## Target audience\n\nThis code release is aimed at two target audiences:\n\n1. ML practitioners will find this to be a gentle introduction to training a\n   model with differential privacy as it requires minimal code changes.\n2. Differential Privacy researchers will find this easy to experiment and tinker\n   with, allowing them to focus on what matters.\n\n\n## Latest updates\n\n2024-12-18: We updated this [tutorial](https://github.com/pytorch/opacus/blob/main/tutorials/building_text_classifier.ipynb) to show how [LoRA](https://arxiv.org/abs/2106.09685) and [peft](https://huggingface.co/docs/peft/en/index) library could be used in conjuncture with DP-SGD.\n\n2024-08-20: We introduced [Fast Gradient Clipping](https://arxiv.org/abs/2009.03106) and Ghost Clipping(https://arxiv.org/abs/2110.05679) to Opacus, significantly reducing the memory requirements of DP-SGD. Please refer to our [blogpost](https://pytorch.org/blog/clipping-in-opacus/) for more information.\n\n## Installation\n\nThe latest release of Opacus can be installed via `pip`:\n\n```bash\npip install opacus\n```\n\nOR, alternatively, via `conda`:\n\n```bash\nconda install -c conda-forge opacus\n```\n\nYou can also install directly from the source for the latest features (along\nwith its quirks and potentially occasional bugs):\n\n```bash\ngit clone https://github.com/pytorch/opacus.git\ncd opacus\npip install -e .\n```\n\n## Getting started\n\nTo train your model with differential privacy, all you need to do is to\ninstantiate a `PrivacyEngine` and pass your model, data_loader, and optimizer to\nthe engine's `make_private()` method to obtain their private counterparts.\n\n```python\n# define your components as usual\nmodel = Net()\noptimizer = SGD(model.parameters(), lr=0.05)\ndata_loader = torch.utils.data.DataLoader(dataset, batch_size=1024)\n\n# enter PrivacyEngine\nprivacy_engine = PrivacyEngine()\nmodel, optimizer, data_loader = privacy_engine.make_private(\n    module=model,\n    optimizer=optimizer,\n    data_loader=data_loader,\n    noise_multiplier=1.1,\n    max_grad_norm=1.0,\n)\n# Now it's business as usual\n```\n\nThe\n[MNIST example](https://github.com/pytorch/opacus/tree/main/examples/mnist.py)\nshows an end-to-end run using Opacus. The\n[examples](https://github.com/pytorch/opacus/tree/main/examples/) folder\ncontains more such examples.\n\n## Learn more\n\n### Interactive tutorials\n\nWe've built a series of IPython-based tutorials as a gentle introduction to\ntraining models with privacy and using various Opacus features.\n\n- [Building text classifier with Differential Privacy on BERT](https://github.com/pytorch/opacus/blob/main/tutorials/building_text_classifier.ipynb)\n- [Building an Image Classifier with Differential Privacy](https://github.com/pytorch/opacus/blob/main/tutorials/building_image_classifier.ipynb)\n- [Training a differentially private LSTM model for name classification](https://github.com/pytorch/opacus/blob/main/tutorials/building_lstm_name_classifier.ipynb)\n- [Opacus Guide: Introduction to advanced features](https://github.com/pytorch/opacus/blob/main/tutorials/intro_to_advanced_features.ipynb)\n- [Opacus Guide: Grad samplers](https://github.com/pytorch/opacus/blob/main/tutorials/guide_to_grad_sampler.ipynb)\n- [Opacus Guide: Module Validator and Fixer](https://github.com/pytorch/opacus/blob/main/tutorials/guide_to_module_validator.ipynb)\n\n## Technical report and citation\n\nThe technical report introducing Opacus, presenting its design principles,\nmathematical foundations, and benchmarks can be found\n[here](https://arxiv.org/abs/2109.12298).\n\nConsider citing the report if you use Opacus in your papers, as follows:\n\n```\n@article{opacus,\n  title={Opacus: {U}ser-Friendly Differential Privacy Library in {PyTorch}},\n  author={Ashkan Yousefpour and Igor Shilov and Alexandre Sablayrolles and Davide Testuggine and Karthik Prasad and Mani Malek and John Nguyen and Sayan Ghosh and Akash Bharadwaj and Jessica Zhao and Graham Cormode and Ilya Mironov},\n  journal={arXiv preprint arXiv:2109.12298},\n  year={2021}\n}\n```\n\n### Blogposts and talks\n\nIf you want to learn more about DP-SGD and related topics, check out our series\nof blogposts and talks:\n\n- [Enabling Fast Gradient Clipping and Ghost Clipping in Opacus](https://pytorch.org/blog/clipping-in-opacus/)\n- [Differential Privacy Series Part 1 | DP-SGD Algorithm Explained](https://medium.com/pytorch/differential-privacy-series-part-1-dp-sgd-algorithm-explained-12512c3959a3)\n- [Differential Privacy Series Part 2 | Efficient Per-Sample Gradient Computation in Opacus](https://medium.com/pytorch/differential-privacy-series-part-2-efficient-per-sample-gradient-computation-in-opacus-5bf4031d9e22)\n- [PriCon 2020 Tutorial: Differentially Private Model Training with Opacus](https://www.youtube.com/watch?v=MWPwofiQMdE\u0026list=PLUNOsx6Az_ZGKQd_p4StdZRFQkCBwnaY6\u0026index=52)\n- [Differential Privacy on PyTorch | PyTorch Developer Day 2020](https://www.youtube.com/watch?v=l6fbl2CBnq0)\n- [Opacus v1.0 Highlights | PyTorch Developer Day 2021](https://www.youtube.com/watch?v=U1mszp8lzUI)\n\n## FAQ\n\nCheck out the [FAQ](https://opacus.ai/docs/faq) page for answers to some of the\nmost frequently asked questions about differential privacy and Opacus.\n\n## Contributing\n\nSee the\n[CONTRIBUTING](https://github.com/pytorch/opacus/tree/main/CONTRIBUTING.md) file\nfor how to help out. Do also check out the README files inside the repo to learn\nhow the code is organized.\n\n## License\n\nThis code is released under Apache 2.0, as found in the\n[LICENSE](https://github.com/pytorch/opacus/tree/main/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeta-pytorch%2Fopacus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeta-pytorch%2Fopacus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeta-pytorch%2Fopacus/lists"}