Differentially Private Heavy Hitter Detection using Federated Analytics

Karan N. Chadha, Junye Chen, John C. Duchi, Vitaly Feldman, Hanieh Hashemi, Omid Javidbakht, Audra McMillan, Kunal Talwar

TL;DR

This paper introduces OptPrefixTree, a suite of practical heuristics that significantly boost the performance of prefix-tree algorithms for detecting "heavy hitters" (popular data points) in federated analytics. By adaptively tuning segment lengths and thresholds while incorporating "deny lists," the authors achieve up to a 3.2x improvement in discovery rates over previous state-of-the-art methods while maintaining strict user-level differential privacy.

What Problem Does This Paper Address?

In large-scale systems, data analysts often want to know what's popular—for example, which "out-of-vocabulary" words are being typed on keyboards to improve auto-correct models. These popular items are called heavy hitters.

However, two major hurdles exist:

  1. Privacy: User data is sensitive. We need Differential Privacy (DP) to ensure that an analyst can learn population trends without being able to identify any individual's specific data.
  2. Scale: When the "universe" of possible items is massive (like every possible string of characters), standard privacy techniques require too much memory or bandwidth.

Iterative prefix-tree algorithms solve the scale problem by discovering items character-by-character (or segment-by-segment). But these algorithms are notoriously difficult to tune. If you pick a segment length that's too short, the algorithm takes too many rounds (consuming the privacy budget); if it's too long, the computation explodes. This paper aims to make these algorithms practical and efficient through automation and smarter data selection.

Methods

The authors propose OptPrefixTree, which improves upon standard iterative heavy-hitter detection through several novel components:

  • Adaptive Segmentation: Instead of using a fixed segment length (e.g., always adding 2 characters at a time), the algorithm looks at the results of the previous round and chooses the largest possible segment length that still fits within the system's computational and communication limits.
  • Adaptive Thresholding (PruneHH): To decide which prefixes are "heavy" enough to keep for the next round, the algorithm dynamically calculates a threshold based on a target False Positive Rate (FPR). This accounts for the noise added for privacy.
  • On-Device Data Selection: The researchers compared two ways for a device to pick which of its many data points to report:
  • Weighted: Picking based on how often the user actually used the word.
  • Unweighted/Uniform: Picking randomly from the set of unique words the user has that match the current prefix.
  • Deny Lists: The algorithm can be told to ignore items it already knows are heavy hitters (perhaps from a previous run or a public dataset). This "clears the field" to find the next tier of popular items.

The privacy model used is Aggregate DP (where noise is added to the sum of reports) enhanced by shuffling amplification, which provides a stronger privacy guarantee for a given amount of noise.

Datasets

The primary evaluation was performed on the Reddit public dataset, containing comments from 1.6 million users. The task was to learn the most frequent words used across the platform. For experiments involving "warm starts" and deny lists, the authors also utilized the Twitter Sentiment140 dataset as an auxiliary data source.

Key Insights and Ideas

  • Unweighted Sampling is King: Surprisingly, when a user has multiple data points, sampling uniformly from their unique words (unweighted) works better than sampling based on frequency (weighted). This is because weighted sampling causes everyone to report the same "super-heavy" hitters, whereas unweighted sampling allows the algorithm to explore the "tail" of the distribution more effectively.
  • Adaptivity Beats Manual Tuning: Manually setting hyperparameters for DP algorithms is a nightmare because you can't "peek" at the data without spending your privacy budget. By making the segmentation and thresholding adaptive based on the noisy aggregate results, the algorithm self-optimizes on the fly.
  • The Power of "Knowing What You Know": Using a deny list—even when the privacy budget must be shared across multiple rounds—significantly improves utility. It prevents the most popular items from "drowning out" the signal of other important heavy hitters.

Key Results

  • Efficiency Gains: The adaptive segmentation scheme discovered 40% more heavy hitters than versions using fixed segment lengths.
  • Outperforming Prior Work: Compared to TrieHH (a prominent existing algorithm), OptPrefixTree discovered 3.2x more heavy hitters under the same system and privacy constraints.
  • Deny List Impact: Incorporating a "warm start" deny list from an auxiliary dataset led to discovering 2.1x more unique heavy hitters from the target dataset.
  • Privacy Balance: The algorithm successfully satisfies both local DP (on-device) and aggregate DP (at the server), making it robust for real-world federated deployments.

Limitations and Future Work

  • Central vs. Federated Gap: While OptPrefixTree is a major step forward for federated settings, the authors note that "Central DP" (where a trusted server sees all raw data and adds noise once) still provides higher utility. Closing this gap further remains a challenge.
  • Single Point Constraint: Most of the analysis focused on users contributing a single data point per round. The authors suggest that exploring the optimal number of data points a user should contribute in an aggregate DP setting is a promising area for future research.
  • System Heterogeneity: The paper assumes a somewhat stable set of participating devices, though it notes the algorithm is "well-suited" for cases where users drop in and out. Further stress-testing in highly unstable network environments would be valuable.

Summary updated

BibTeX
@inproceedings{chadha2024differentially,
  author = {Karan N. Chadha and Junye Chen and John C. Duchi and Vitaly Feldman and Hanieh Hashemi and Omid Javidbakht and Audra McMillan and Kunal Talwar},
  title = {{Differentially Private Heavy Hitter Detection using Federated Analytics}},
  booktitle = {SaTML},
  year = {2024},
  url = {https://openreview.net/forum?id=KTLmpj4vIH},
}
Figure