Universal High-Performance Differential Privacy Accounting Engine
Project description
DP Accelerator
Universal High-Performance Differential Privacy Accounting Engine
A framework-agnostic Rust-accelerated library for computing differential privacy guarantees with 3000x+ speedup over pure Python implementations.
Features
- 🚀 3000x faster than pure Python DP accounting
- 🔧 Framework-agnostic: Works with JAX, PyTorch, TensorFlow
- 🦀 Rust-powered: Zero-cost abstractions with memory safety
- 📦 Easy installation:
pip install dp-accelerator - 🎯 Drop-in replacement: Compatible APIs for existing libraries
Quick Start
from dp_accelerator import DPSGDAccountant
# Initialize accountant
accountant = DPSGDAccountant(
noise_multiplier=1.0,
batch_size=600,
dataset_size=60000
)
# Compute privacy guarantee
epsilon = accountant.get_epsilon(steps=10000, delta=1e-5)
print(f"Privacy guarantee: ε = {epsilon:.2f}")
Framework Adapters
JAX Privacy
from dp_accelerator.jax_adapter import compute_dpsgd_epsilon
epsilon = compute_dpsgd_epsilon(
noise_multiplier=1.0,
batch_size=600,
dataset_size=60000,
num_steps=10000,
delta=1e-5
)
Performance
| Implementation | Time | Speedup |
|---|---|---|
| Pure Python | 0.613s | 1x |
| DP Accelerator | 0.0002s | 3000x |
Installation
pip install dp-accelerator
Development
git clone https://github.com/yourusername/dp-accelerator
cd dp-accelerator
maturin develop
Contributing
Contributions welcome! Please see our contributing guide.
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dp_accelerator-0.1.0.tar.gz.
File metadata
- Download URL: dp_accelerator-0.1.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
888b1df9b2364ad1be2dc317c5931e4107dd237f8ca96c6ffe65747f91ba1883
|
|
| MD5 |
996fc35c98956bf86116c9d50f2fb429
|
|
| BLAKE2b-256 |
3b64032287486d3cb3e4a7996e4135baf305e1e3792fadaedf5e91baa4e0fc9e
|
File details
Details for the file dp_accelerator-0.1.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: dp_accelerator-0.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 110.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a79629ec75cd99c474df04f5483b01ed75f0438974c8f2d4e1b3f19e252b6037
|
|
| MD5 |
25c050e9fbe8ea61cefdbb80ce7fdf3c
|
|
| BLAKE2b-256 |
379b04f6b3cddf9d1e5a5135bb8b643f3591bb2fad41ed0ba3f3707063c108b2
|
File details
Details for the file dp_accelerator-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: dp_accelerator-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 250.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61381aef9e733fe508c1d19141e6d703587e02319583a0f213dcbff202b68919
|
|
| MD5 |
0f6aa3ceef9bf49ae778b7adac2da42c
|
|
| BLAKE2b-256 |
dda039a7a43da757301a45a40861a1430b440717dd52fdfa7ef355959196d755
|
File details
Details for the file dp_accelerator-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: dp_accelerator-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 216.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cbd6355600ff7d64a1afa0bcefd216c2220a483719c5d63ad7081fdee246ba4
|
|
| MD5 |
c249f6cb3c4b2bf5c77ec8dc2ff228af
|
|
| BLAKE2b-256 |
999342554cceb41c4a77edb949ec444a92a0bd5b357ee10e28ef5552c3df2cd2
|