#11 · Primary category: Privacy-Preserving & Federated Data Science
opacus
Training PyTorch models with differential privacy
Project last updated:07/13/26
GitHub Stars
2.0K
Forks
397
Contributors
91
License
Apache-2.0
Why we included this project
Opacus is the practical way to add differential privacy to a PyTorch project. Instead of rewriting your training code, you pass your existing model, optimizer, and dataloader to a PrivacyEngine, which clips gradients and adds calibrated noise, so a DP-SGD loop takes only a few extra lines. The library also tracks the cumulative privacy budget as training runs, which gives you a concrete answer to the question regulators and users care about: how much privacy has this run consumed before the model ships. Fast per-sample gradient computation and clipping methods such as Fast Gradient Clipping and Ghost Clipping keep the memory cost far below naive microbatching. The modular internals are easy to tinker with, which suits DP researchers, while the tutorials offer practitioners a solid starting point for image classifiers, text classifiers, and LSTM-based models.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
watermarks-remover
A privacy-first app that strips AI watermarks from content you own.
PySyft
Perform data science on data that remains in someone else's server
presidio
An open-source framework for detecting, redacting, masking, and anonymizing sensitive data (PII) across text, images, and structured data. Supports NLP, pattern matching, and customizable pipelines.
flower
Flower: A Friendly Federated AI Framework
ai.robots.txt
A list of AI agents and robots to block.