-
Notifications
You must be signed in to change notification settings - Fork 411
Open
Description
I am proposing an optional, high-performance backend for dp-accounting that resolves the computation bottleneck in RDP accounting.
By offloading the exact RDP math (Poisson Subsampled Gaussian) to a vectorized Rust extension, I achieved a 40x-45x speedup on standard workloads while maintaining floating-point accuracy (
Proposed Solution
I have developed dp-accelerator, a drop-in Rust replacement that:
- Implements the exact
_compute_log_a_fraclogic from Google'sdp_accountingusingstatrs. - Vectorizes computation across all
$\alpha$ orders. - Exposes a safe Python interface via
PyO3.
This package is already published on PyPI (pip install dp-accelerator) and uses Apache 2.0.
Benchmarks (Intel Mac i5 8th gen)
| Config | Steps | Python (ms) | Rust (ms) | Speedup |
|---|---|---|---|---|
| MNIST | 1k | 36.5 | 0.86 | 42x |
| ImageNet | 90k | 30.0 | 0.69 | 43x |
| Batch (10 checks) | 1k-60k | 333.4 | 8.8 | 37x |
Integration Plan
I have a working branch where this is implemented as a soft dependency:
dp-accountingdoes not need to compile Rust.- If
dp-acceleratoris installed,analysis.pydetects it and routes the computation to the fast path. - If not installed, it falls back to the existing Python implementation with an alert kind of warning to suggest using the
dp-accelaratorpackage for faster
I have prepared a technical report (submitted to techrxiv) detailed in the repo: https://github.com/AxiomaticLabs/dp-accelerator
Would the team be open to a PR integrating this optional backend?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels