Skip to main content
QUICK REVIEW

[Paper Review] The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks

Nicholas Carlini, Chang Liu|arXiv (Cornell University)|Feb 22, 2018
Privacy-Preserving Technologies in DataComputer Science504 citations
TL;DR

The paper introduces an exposure-based testing methodology to quantify and limit unintended memorization of rare or secret training data in neural network sequence models, and demonstrates its practicality on real-world systems like Google Smart Compose.

ABSTRACT

This paper describes a testing methodology for quantitatively assessing the risk that rare or unique training-data sequences are unintentionally memorized by generative sequence models---a common type of machine-learning model. Because such models are sometimes trained on sensitive data (e.g., the text of users' private messages), this methodology can benefit privacy by allowing deep-learning practitioners to select means of training that minimize such memorization. In experiments, we show that unintended memorization is a persistent, hard-to-avoid issue that can have serious consequences. Specifically, for models trained without consideration of memorization, we describe new, efficient procedures that can extract unique, secret sequences, such as credit card numbers. We show that our testing strategy is a practical and easy-to-use first line of defense, e.g., by describing its application to quantitatively limit data exposure in Google's Smart Compose, a commercial text-completion neural network trained on millions of users' email messages.

Motivation & Objective

  • Develop a quantitative exposure-based metric to assess memorization of rare or secret training data in generative sequence models.
  • Provide a practical testing methodology to insert canaries into training data and measure their exposure in trained models.
  • Demonstrate the methodology on real-world systems (e.g., Google's Smart Compose) to guide privacy-preserving training choices.
  • Investigate how memorization arises across models and training regimes and evaluate simple defenses versus differential privacy.

Proposed method

  • Define log-perplexity as a sequence likelihood measure and compare perplexities of inserted canaries against random sequences.
  • Introduce an exposure metric derived from the ranking (or guessing entropy) of canaries in the model's perplexity distribution.
  • Insert format-based canaries into training data and train models under identical setups to measure memorization effects.
  • Approximate exposure efficiently via sampling or distribution modeling (e.g., skew-normal) to estimate rank-based exposure.
  • Provide a practical testing pipeline: augment data with canaries, train, and report exposure curves as a function of canary insertion frequency.
  • Apply the methodology to large-scale production models (Smart Compose) to validate utility and privacy trade-offs.

Experimental results

Research questions

  • RQ1Can a neural network memorizes rarely occurring secrets inserted into its training data as measured by an exposure metric?
  • RQ2How does memorization vary with training regime, model size, and data distribution, and can it be mitigated without excessive utility loss?
  • RQ3Is simple regularization (early stopping, dropout) sufficient to prevent unintended memorization, or are privacy-preserving training methods required?
  • RQ4How effective is differential privacy in eliminating memorization compared to other defenses in practice?

Key findings

  • Unintended memorization of rare or secret training data is common and persists across models and training strategies, even when data is very rare.
  • An exposure-based testing strategy can quantify memorization and reveal differences between training approaches with identical accuracy.
  • Canaries inserted into training data can be efficiently extracted or highly exposed by trained models under a black-box query model.
  • Early-stopping and dropout are insufficient to prevent unintended memorization; differential-private training can remove memorization but with utility costs.
  • Applied to Google's Smart Compose, the exposure metric guided privacy considerations and demonstrated practical relevance for limiting data exposure.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.