Measuring and Controlling Memorization in Machine Learning
COM3 Level 2
SR21, COM3 02-60

Abstract:
What should a machine learning model remember from its training data? Retaining sensitive details about individual training records can create privacy risks, while retaining useful knowledge (such as atomic facts and distributional patterns) supports prediction and generalization. This thesis develops methods to measure, and ultimately control what a model memorizes, so as to reduce harmful memorization and boost useful memorization.
I first develop tools for measuring memorization in neural networks. To more accurately audit per-record memorization, I develop a unified hypothesis-testing framework that enables stronger, more instance-specific membership inference attacks. The strongest resulting attack performs leave-one-out retraining, trading additional training computation for more powerful per-record audits. To further reduce the computation cost of measuring memorization, I then propose an analytical estimation framework that approximates retraining via a neural network Gaussian process. This training-free method boosts efficiency by more than two orders of magnitude while closely matching memorization estimates obtained through retraining.
I then design algorithms for controlling memorization. To provably limit harmful memorization while preserving utility, I developed an instance-optimal differentially private algorithm for distribution estimation in KL divergence error. Its performance at each data distribution is provably competitive to the best private algorithm tailored to a local neighborhood of that distribution. It also experimentally outperforms prior worst-case-optimal methods on real-world data distributions. To boost useful fact memorization, I propose loss-based data selection that uses an information-theoretic capacity limit to reweight a long-tailed distribution of facts. When pretraining GPT-2 models ranging from 110M to 1.3B parameters, this method improves factual accuracy by up to 30% without degrading natural language understanding.
Together, these contributions demonstrate the benefits of adapting memorization measurement and control to the structure of the data distribution and the information contained in individual records. I conclude with a roadmap for extending these ideas to test-time memorization, where models must decide what to remember, how to store information, and when to consolidate knowledge.

