Multi-Freq-LDPy: Multiple Frequency Estimation Under Local Differential Privacy in Python

Héber Hwang Arcolezi, Jean-François Couchot, Sébastien Gambs, Catuscia Palamidessi, Majid Zolfaghari · DOI

TL;DR

This paper introduces multi-freq-ldpy, a Python package that simplifies the complex task of estimating data frequencies while preserving local differential privacy (LDP). It offers a user-friendly interface to state-of-the-art LDP protocols, making advanced privacy-preserving data analysis accessible to a wider range of researchers and developers.

What Problem Does This Paper Address?

In today's data-driven world, organizations collect vast amounts of user data. However, sharing this data for analysis often raises privacy concerns. Local Differential Privacy (LDP) is a robust privacy framework where data is randomized before it leaves the user's device, ensuring that even the data collector cannot link specific data points back to individuals. A fundamental task in LDP is frequency estimation – determining how often each value appears in a dataset. This is crucial for tasks like building user profiles, understanding trends, and performing statistical analysis.

While LDP offers strong privacy guarantees, implementing LDP protocols for frequency estimation, especially for complex data structures like multiple attributes or time-series data, can be technically challenging and computationally intensive. Researchers and developers often face a steep learning curve and the need to implement intricate algorithms from scratch. This paper addresses this gap by providing a unified, easy-to-use, and efficient Python package that encapsulates these complex LDP techniques.

Methods

The core contribution of this paper is the multi-freq-ldpy Python package. This package provides implementations of various state-of-the-art Local Differential Privacy (LDP) protocols for frequency estimation. The package is built upon the widely-used numpy library for numerical computation and numba for fast execution, making it both powerful and efficient.

The package is structured to handle different types of frequency estimation tasks:

  • Single Frequency Estimation: This is the foundational task, implemented in the pure_frequency_oracles module. It includes protocols like Generalized Randomized Response (GRR), Binary Local Hashing (BLH), Optimal Local Hashing (OLH), Subset Selection (SS), Symmetric Unary Encoding (SUE), and Optimal Unary Encoding (OUE).
  • Multidimensional Frequency Estimation: This module (mdim_freq_est) addresses scenarios where data has multiple attributes. It implements solutions like SPL (splitting the privacy budget across attributes), SMP (sampling a single attribute), and RS+FD (sampling an attribute and adding fake data).
  • Longitudinal Frequency Estimation: For data collected over time, the long_freq_est module offers protocols like Microsoft's dBitFlipPM and those based on Google's RAPPOR memoization framework, including L-GRR and various L-UE protocols.
  • Longitudinal Multidimensional Frequency Estimation: This module (long_mdim_freq_est) combines the complexities of both multidimensional and longitudinal data.

The package is designed for ease of use, typically requiring only two lines of code to simulate the LDP data collection and aggregation pipeline for a given protocol.

Datasets

Not discussed in the paper. The paper focuses on demonstrating the functionality of the multi-freq-ldpy package using simulated data generated with uniform distributions for various attribute domains.

Key Insights and Ideas

  • Democratizing LDP: The most significant insight is the creation of a tool that lowers the barrier to entry for using LDP. By abstracting away the low-level implementation details of complex privacy protocols, multi-freq-ldpy empowers researchers and practitioners to focus on their data analysis goals rather than the intricacies of privacy mechanisms.
  • Unified Interface for Diverse LDP Tasks: The package's strength lies in its ability to handle a wide spectrum of LDP frequency estimation tasks – from simple single attributes to complex multidimensional and longitudinal data – under a consistent API. This avoids the need to integrate multiple disparate libraries.
  • Performance through Standard Libraries: Leveraging numpy and numba is a smart choice, ensuring that the package is not only functional but also performant, which is crucial for handling large datasets in privacy-sensitive applications.

Key Results

The paper demonstrates the functionality and ease of use of multi-freq-ldpy through four worked examples covering single, longitudinal, multidimensional, and longitudinal multidimensional frequency estimation. While specific quantitative performance metrics (e.g., accuracy improvements, speedups) are not the primary focus of this introductory paper, the examples showcase how the package can be used to obtain estimated frequencies with minimal code. The package is open-source and available on GitHub and PyPI, indicating a commitment to community adoption and contribution.

Limitations and Future Work

The authors acknowledge that multi-freq-ldpy currently implements a selection of state-of-the-art LDP protocols. For future work, they aim to incorporate additional LDP protocols for longitudinal data (from references [8, 10, 15, 21]) and multidimensional data (from reference [16]). This suggests that the package is intended to be a continuously evolving resource, expanding its coverage of LDP techniques over time. The focus on simulated data in the examples also implies that real-world dataset evaluations might be a future direction.

Summary updated

BibTeX
@inproceedings{arcolezi2022multi,
  author = {Héber Hwang Arcolezi and Jean-François Couchot and Sébastien Gambs and Catuscia Palamidessi and Majid Zolfaghari},
  title = {{Multi-Freq-LDPy: Multiple Frequency Estimation Under Local Differential Privacy in Python}},
  booktitle = {ESORICS},
  year = {2022},
  doi = {10.1007/978-3-031-17143-7\_40},
}
Figure