Skip to main content

Universal High-Performance Differential Privacy Accounting Engine

Project description

DP Accelerator

Universal High-Performance Differential Privacy Accounting Engine

PyPI version License: Apache 2.0

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dp_accelerator-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dp_accelerator-0.1.0-cp311-cp311-win_amd64.whl (110.6 kB view details)

Uploaded CPython 3.11Windows x86-64

dp_accelerator-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl (250.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

dp_accelerator-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (216.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Hashes for dp_accelerator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 888b1df9b2364ad1be2dc317c5931e4107dd237f8ca96c6ffe65747f91ba1883
MD5 996fc35c98956bf86116c9d50f2fb429
BLAKE2b-256 3b64032287486d3cb3e4a7996e4135baf305e1e3792fadaedf5e91baa4e0fc9e

See more details on using hashes here.

File details

Details for the file dp_accelerator-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for dp_accelerator-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a79629ec75cd99c474df04f5483b01ed75f0438974c8f2d4e1b3f19e252b6037
MD5 25c050e9fbe8ea61cefdbb80ce7fdf3c
BLAKE2b-256 379b04f6b3cddf9d1e5a5135bb8b643f3591bb2fad41ed0ba3f3707063c108b2

See more details on using hashes here.

File details

Details for the file dp_accelerator-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dp_accelerator-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 61381aef9e733fe508c1d19141e6d703587e02319583a0f213dcbff202b68919
MD5 0f6aa3ceef9bf49ae778b7adac2da42c
BLAKE2b-256 dda039a7a43da757301a45a40861a1430b440717dd52fdfa7ef355959196d755

See more details on using hashes here.

File details

Details for the file dp_accelerator-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dp_accelerator-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9cbd6355600ff7d64a1afa0bcefd216c2220a483719c5d63ad7081fdee246ba4
MD5 c249f6cb3c4b2bf5c77ec8dc2ff228af
BLAKE2b-256 999342554cceb41c4a77edb949ec444a92a0bd5b357ee10e28ef5552c3df2cd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page