Privacy Side Channels in Machine Learning Systems

Edoardo Debenedetti, Giorgio Severi, Milad Nasr, Christopher A. Choquette-Choo, Matthew Jagielski, Eric Wallace, Nicholas Carlini, Florian Tramèr

TL;DR

Most machine learning privacy research assumes models operate in an isolated vacuum. In reality, models are deployed inside complex pipelines featuring data deduplication, tokenizers, output filters, and query detectors. This paper demonstrates that these system-level components introduce subtle dependencies—privacy side channels—that adversaries can exploit to extract private training data, break theoretical differential privacy guarantees, and even spy on other users' test queries.

What Problem Does This Paper Address?

Traditional privacy analyses treat ML models as standalone mathematical functions: training data enters, a model emerges, and inference queries are served independently. But real-world deployments surround models with auxiliary systems to improve safety, utility, and robustness:

  • Filters that remove duplicate training samples or poison attempts.
  • Preprocessors like tokenizers that convert raw strings into input IDs.
  • Output post-processors that block verbatim recitation of training data.
  • Stateful query filters that detect distributed attacks across multiple users.

Because these auxiliary components introduce dependencies between different inputs across time or users, they create side channels. The authors set out to evaluate whether an attacker can exploit these surrounding systems to leak significantly more private information than would be possible against an isolated model.

Methods

The authors classify and construct attacks across four stages of the ML lifecycle:

  1. Training Data Filtering (Deduplication & Poisoning Defenses):
  2. Deduplication: If deduplication drops a sample whenever a duplicate exists, an attacker can poison the dataset with near-duplicates of a target point in a "hub-and-spoke" geometry (close to the target, but far from each other). By testing whether the poisoned points survived training (non-membership inference), the attacker learns whether the target existed.
  3. Poisoning defenses (e.g., FoolsGold in Federated Learning): Sybil defenses downweight similar client updates. A malicious client submits updates matching a victim's distribution; if the victim is present, the attacker's updates get suppressed, revealing the victim's presence through higher training loss.
  4. Input Preprocessing (Tokenizer Extraction):
  5. Exploiting fixed context windows: by padding queries with test tokens until prompt completions fall off the context edge, an adversary can precisely measure token byte-lengths and reconstruct a black-box model’s BPE tokenizer vocabulary.
  6. Output Post-Processing (Memorization Filters):
  7. Systems like GitHub Copilot block outputs matching training sequences. If the system generates an output, it is guaranteed not to be in the training set (a zero-false-negative signal). By repeatedly prompting a model with in-context repetitions or toggling the filter, attackers turn this suppression into near-perfect membership inference and iterative, token-by-token secret extraction.
  8. Query Filtering (Stateful Detectors):
  9. Global cross-user query logs (e.g., for black-box evasion defense) reject queries similar to previously observed ones. An attacker simply re-submits a query; if rejected, another user previously queried that input.

Datasets

The authors evaluated their attacks across several standard vision, text, and code domains:

  • CIFAR-10: Used to benchmark deduplication-based membership inference and DP-SGD auditing.
  • Labeled Faces in the Wild (LFW): Used to simulate non-IID user partitions for federated learning Sybil defense attacks.
  • enwiki8 (Wikipedia): Used to test targeted vocabulary recovery against GPT-2.
  • tqdm GitHub repository: Real-world git commit history used to audit GitHub Copilot’s data cutoff date.
  • OpenSSH Keys & GPT-Neo: 1,000 synthetic 512-byte Base64-encoded private keys injected into a 20-token Bloom filter memorization defense.

Key Insights and Ideas

  • Defenses can harm privacy: Heuristics designed specifically to protect privacy (like deduplication and verbatim memorization-free decoding) paradoxically create the easiest attack vectors. For example, a memorization filter turns hard positive membership inference into a trivial negative-elimination problem (reminiscent of impossible differential cryptanalysis).
  • Differential Privacy (DP) does not compose naively with filters: DP-SGD bounds sensitivity with respect to its direct input dataset. If an un-noised deduplication filter precedes DP-SGD, a single training example can trigger the removal of hundreds of other samples. This inflates true sensitivity, causing nominal guarantees (e.g., $\epsilon = 1$) to fail audits catastrophically (yielding empirical $\epsilon \ge 7.5$).
  • Security vs. privacy tensions: Defending against Sybil attacks (coordinated distributed evasion or model extraction) fundamentally requires tracking behavior across users, which inherently creates a side channel that leaks whether other users made specific queries.

Key Results

  • Deduplication Attacks: On CIFAR-10 with approximate deduplication (imagededup), the hub-and-spoke attack achieved a 96.0% True Positive Rate (TPR) at 0.1% False Positive Rate (FPR), whereas standard poisoning baselines (Truth Serum) dropped to nearly 0% because deduplication stripped exact duplicate poisons.
  • Auditing GitHub Copilot: By testing code commits with Copilot’s duplication filter enabled vs. disabled, the authors identified a sharp cutoff where post-October 2021 commits were never blocked, accurately pinpointing Copilot’s training data collection cutoff date.
  • Private Key Exfiltration: Against GPT-Neo equipped with an exact 20-token Bloom filter memorization blocker, the authors extracted complete OpenSSH private keys token-by-token with a ~90% success rate in ~340,000 queries.
  • Test-Query Leakage: Against the stateful evasion detector Blacklight, attackers achieved 100% TPR at 0% FPR in determining whether another user had previously queried a specific CIFAR-10 image.

Limitations and Future Work

  • Adversarial Capabilities: Some data filtering attacks require data poisoning capabilities (e.g., injecting mislabeled near-duplicates into the initial crawl), which may not be feasible in strictly vetted or internal pipelines.
  • Query Costs: Complete vocabulary extraction or token-by-token key recovery requires significant query budgets (hundreds of thousands to millions of queries), making rate limiting a potential operational barrier.
  • Open Challenges: Simply disabling deduplication is not a solution, as duplicate data drastically increases raw model memorization. The authors emphasize the open theoretical problem of designing end-to-end differentially private pipelines that natively incorporate data-dependent cleaning steps, outlier removal, and query inspection.

Summary updated

BibTeX
@inproceedings{debenedetti2024privacy,
  author = {Edoardo Debenedetti and Giorgio Severi and Milad Nasr and Christopher A. Choquette-Choo and Matthew Jagielski and Eric Wallace and Nicholas Carlini and Florian Tramèr},
  title = {{Privacy Side Channels in Machine Learning Systems}},
  booktitle = {USENIX Security},
  year = {2024},
  url = {https://openreview.net/forum?id=QpZC55H44v},
}
Figure