Hush! Protecting Secrets During Model Training: An Indistinguishability Approach

Arun Ganesh, Brendan McMahan, Milad Nasr, Thomas Steinke, Abhradeep ThakurtaarXiv 2025 · DOI

Abstract

Researchers from Google have introduced a novel framework for safeguarding specific "secrets" within datasets during machine learning model training. Unlike standard Differential Privacy (DP), which often incurs high utility costs by hiding the presence of any data point, this approach focuses on preventing the reconstruction of sensitive information. By utilizing Linear Programming (LP) for data weighting and KL divergence-based accounting, the framework achieves an 8x reduction in noise and a 7.5% improvement in model accuracy compared to traditional DP-SGD. This method is particularly effective for internal corporate "self-training" scenarios where the goal is to prevent internal information leakage rather than hiding data membership.

Introduction

Standard Differential Privacy (DP) is currently the gold standard for privacy-preserving machine learning. However, it is often considered "overambitious" for internal corporate use. DP is designed for a "curator-user" model where a curator uses external data from third parties, providing a strict, uniform guarantee that hides whether any specific individual's data was used at all (membership inference).

In many practical organizational settings, such as an algorithmic trading firm training models on internal data, the threat model is different. In this "self-training" scenario, the organization already knows the data exists; the primary objective is not to hide the data's existence, but to prevent the model from memorizing and leaking specific secrets—such as proprietary trading algorithms or internal documentation—to employees who lack the necessary clearance. Applying standard DP in these cases often results in a significant "privacy tax," manifesting as a massive drop in model performance that is unnecessary for the actual risk profile.

Methodology

The proposed framework shifts the focus from DP's "indistinguishability of datasets" to a "secret protection" definition based on posterior reconstruction probability. The methodology consists of four key components:

  1. Secret-Specific Privacy Definitions: Instead of applying a uniform epsilon ((\epsilon)) across the entire dataset, the framework assigns different protection levels to different secrets. The goal is to bound the probability that an adversary can reconstruct a specific secret given access to the trained model.
  2. Linear Programming (LP) Preprocessing: To implement these varying protection levels, the authors formulate a Linear Program to assign a weight ((w_i)) to every example in the dataset. The objective is to maximize the amount of data retained for training while ensuring that no secret appears too frequently relative to its required protection level.
  3. Poisson Sampling: These weights are then used to perform Poisson sampling when forming training batches. This ensures that "overrepresented" secrets are downsampled to safe levels before they can be memorized by the model.
  4. Divergence-Based Accounting: The authors found that standard DP accounting tools, such as Privacy Loss Distributions, become numerically unstable when a single secret spans hundreds of examples. To solve this, they utilize KL divergence to bound the reconstruction probability, providing a more robust accounting mechanism.

Non-Uniform Protection and Sensitivity

A core insight of this work is that not all secrets are equally sensitive. For instance, a file containing a core trading algorithm requires significantly more protection than a general utility script for file management. This framework allows for "personalized" privacy budgets within a single training run, optimizing the noise-to-utility ratio.

Example of varying sensitivity in internal codebases: a core investment script versus a general utility file.

Experimental Results

The framework was evaluated using two primary benchmarks: the arXiv dataset (treating rare words as "secrets") and FineWeb-Edu for pre-training a series of Gemma-2 models (ranging from 20M to 2B parameters).

  • 8x Noise Reduction: Compared to a baseline of running standard DP-SGD on the entire dataset without preprocessing, the LP-based algorithm achieved the same protection levels with 8 times less noise.
  • 7.5% Utility Gain: On the arXiv benchmark, this reduction in noise translated directly into a ~7.5% improvement in test loss compared to standard DP-SGD.
  • Memorization Mitigation: In LLM extraction experiments, the authors demonstrated that even tiny amounts of noise—far below what standard DP requires—can drastically reduce the fraction of data a model memorizes. This suggests that "moderate" privacy is a powerful middle ground for practical applications.

Discussion and Limitations

While the framework offers a significant leap in utility for internal privacy, several challenges remain. Defining what constitutes a "secret" in a massive codebase is a subjective and difficult task that currently requires manual identification. Furthermore, the approach assumes the "structure" of secrets (which files contain which secrets) is public information, which is suitable for internal threat models but may not extend to protecting external user privacy. Finally, scaling the Linear Program to datasets with billions of examples and millions of secrets will require further computational optimization.

Summary updated

BibTeX
@misc{ganesh2025hush,
  author = {Arun Ganesh and Brendan McMahan and Milad Nasr and Thomas Steinke and Abhradeep Thakurta},
  title = {{Hush! Protecting Secrets During Model Training: An Indistinguishability Approach}},
  year = {2025},
  eprint = {2506.00201},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.00201},
}
Figure