This repository contains the official implementation of our AAAI 2026 paper: Héber H. Arcolezi. "Private Frequency Estimation via Residue Number Systems." Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 40. No. 42. 2026.
We introduce a new Local Differential Privacy (LDP) protocol called Modular Subset Selection (MSS), which combines the structure of Residue Number Systems (RNS) with the Subset Selection mechanism. MSS achieves: Improved estimation accuracy, lower communication cost, faster server-side decoding, and higher robustness to reconstruction attacks.
If our codes and work are useful to you, we would appreciate a citation to:
@inproceedings{arcolezi2026private,
title={Private Frequency Estimation via Residue Number Systems},
author={Arcolezi, H{\'e}ber Hwang},
doi={10.1609/aaai.v40i42.40862},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={40},
number={42},
pages={35518--35526},
year={2026}
}.
├── experiments/ # All experiment scripts (utility, runtime, ASR, MSE, ablations)
│ ├── build_mss_cache.py # Precomputes and caches MSS moduli (must run once)
│ ├── exp_utility.py
│ ├── exp_bit_cost.py
│ ├── exp_attackability.py
│ ├── exp_attackability_pgr_k.py
│ ├── exp_runtime.py
│ ├── exp_emp_vs_theory_mse.py
│ └── exp_sens_l_analysis.py
│
├── ldp_protocols/ # Protocol implementations (MSS, SS, OUE, GRR, PGR)
│ ├── mss.py
│ ├── ss.py
│ ├── ue.py
│ ├── grr.py
│ ├── pgr.py
│ └── base.py
│
├── utils/ # Utilities used by the protocols & experiments
│ ├── data_generation.py
│ ├── util_mss.py
│ ├── util.py
│ ├── cache.py
│ └── message.py
│
├── third_party/ # BSD-licensed Projective Geometry Response (PGR)
│ └── PGR/ # (Translated from Jelani Nelson's C++ implementation)
│
├── figures/ # Figures in pdf after running jupyter notebook
│ └── .gitkeep
│
├── results/ # Output CSVs generated by experiments
│ └── .gitkeep
│
├── logs/ # Experiment logs
│ └── .gitkeep
│
├── config_experiments.py # Global experimental settings (ε, k, seeds, etc.)
├── run_all_experiments.py # Master script: runs all experiments sequentially
├── Results_Visualization.ipynb # Jupyter notebook to generate all figures
├── requirements.txt # Python dependencies
├── LICENSE
└── README.md
We recommend using a virtual environment (e.g., via conda or venv):
# Create environment
conda create -n ldp_rns python=3.11
conda activate ldp_rns
# Install dependencies
pip install -r requirements.txt
Experiment parameters (ε range, k values, #seeds, distributions, etc.) are set in config_experiments.py.
python run_all_experiments.pyThis script sequentially runs:
- MSS cache precomputation
- MSE experiments
- Bit cost experiments
- Attackability experiments
- Runtime benchmarks
- Ablations (ℓ sensitivity and PGR geometry alignment)
Before running any experiments for the first time, you must precompute MSS moduli:
python experiments/build_mss_cache.pyThen, to run a specific experiment in the experiments/ folder, execute any script starting with exp_*:
python experiments/exp_<name>.pyAll experiments write CSV outputs to the 'results/' directory.
Open:
Results_Visualization.ipynbRun Kernel → Restart & Run All.
Figures are saved automatically under figures/.
All protocol implementations are deterministic given a fixed seed.
Each experiment script:
- Creates
logs/andresults/if missing - Records seed,
k,ε, protocol name, and empirical/analytical metrics - Writes structured CSVs for figure generation
The code has been tested on Python 3.11 under Windows environments.
This repository includes a Python adaptation of the Projective Geometry Response (PGR) protocol, whose original implementation was provided in C++ by Jelani Nelson et al. under the BSD 3-Clause License.
The original PGR license is included at: third_party/PGR/LICENSE.
For any question, please contact Héber H. Arcolezi.
This project is licensed under the MIT License. See the LICENSE file for details.