Subsampling transformations and utilities for Privacy Loss Distribution (PLD) PMFs
Project description
PLD_subsampling
Implements and evaluates privacy amplification by subsampling for Privacy Loss Distribution (PLD) probability mass functions (PMFs). Generates CDF plots and epsilon ratio plots comparing analytical ground truth, dp-accounting, and our direct subsampling implementation.
Package layout
PLD_subsampling/PLD_subsampling.py: Core subsampling primitivesstable_subsampling_loss: numerically stable loss mappingexclusive_ccdf_from_pdf: CCDF helper (exclusive tail)subsample_losses: transforms a PMF on a uniform loss grid
wrappers/dp_accounting_wrappers.py: Thin wrappers around dp-accounting (construct PLDs, amplify PLDs separately for remove/add), plus PMF bridge utilitiestesting/analytic_Gaussian.py: Analytical PLD and epsilon(δ) formulas for Gaussian mechanismtest_utils.py: Builds method variants for experiments, parameterizedrun_all_experimentsplot_utils.py: Plotting (CDF with focused x-range, epsilon ratio)
main.py: Runs experiments and saves figures toplots/
Quickstart
- Create a virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
- Run experiments and generate plots
python -m PLD_subsampling.main
Figures are written to plots/ (treat this directory as build output).
Notes
- CDF plots automatically focus the main x-axis on the transition region and add slight y-padding to show the 0 and 1 limits clearly.
- Epsilon-ratio plots show method/GT vs analytical epsilon over log-scale epsilon.
- All heavy computations use vectorized NumPy operations with careful numerical handling in tail regions.
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
Built Distribution
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 pld_subsampling-0.1.0.tar.gz.
File metadata
- Download URL: pld_subsampling-0.1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17e313716866b402312a02bff1a4a8f1d55127b8b65eacd681479141792344d1
|
|
| MD5 |
4ff2a11a86371978d972984f66f3cfe8
|
|
| BLAKE2b-256 |
51812cc64b2872542587c58d09609a51fdd700f6936f9a58624666e4892c9f16
|
File details
Details for the file pld_subsampling-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pld_subsampling-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e94d4d71f9c5044b97c8dfa11f324c1c15375ddf7576025444a36a0194887e37
|
|
| MD5 |
59659b8af9dfcf48908e7aa3f114f776
|
|
| BLAKE2b-256 |
aee9a15d1cf0e606cae4e9775615238d45dab91434506b67d0860e0b5ae114f4
|