Is Memorization Actually Necessary for Generalization

Hadi Abdullah

TL;DR

For years, a widely accepted view in deep learning has been that models must memorize rare, quirky training examples to generalize well on unseen data—making privacy leaks and brittleness seem like unavoidable "necessary evils." This paper uncovers four methodological flaws in the landmark study behind that claim. Once these issues are corrected, removing memorized data doesn't hurt test accuracy at all—in fact, it usually improves it, meaning we don't have to sacrifice privacy for performance.

What Problem Does This Paper Address?

Imagine studying for a math exam. Generalization is learning the underlying rules of calculus; memorization is memorizing that the answer to question #4 on the practice sheet is "7." Intuitively, rote memorization shouldn't help you on a new exam, and in deep learning, it actively causes problems like private data leakage and vulnerability to adversarial attacks.

Yet, a highly influential 2020 paper by Feldman and Zhang argued that memorization is actually necessary for generalization. They showed that if you calculate which training points a neural network has memorized and remove them, the model's test accuracy drops. This created a frustrating dilemma: can we never have both strong privacy and high accuracy? Author Hadi Abdullah revisits this foundational experiment to ask whether memorization truly drives generalization, or if that accuracy drop was an illusion caused by experimental quirks.

Methods

To measure memorization, you ideally want a "leave-one-out" test: train models with point $x$ ($P_{in}$) and without point $x$ ($P_{out}$), and see how much $x$'s accuracy drops. Because doing this for every single data point is computationally impossible, Feldman and Zhang used an approximation algorithm. Abdullah identifies four flaws in their pipeline and introduces principled fixes:

  1. Higher Sampling Rates: The original study trained models on random 70% subsets of data. Training on smaller subsets causes models to overfit, inflating memorization errors by up to 10%. The author increases the sampling rate to 95% to closely mimic true leave-one-out behavior.
  2. Fractional Difference Scoring: Originally, memorization was defined by absolute difference: $P_{in} - P_{out}$. Under this math, a true outlier ($25\% - 0\% = 25\%$) gets the exact same score as a well-generalized inlier ($100\% - 75\% = 25\%$). The author introduces a fractional difference metric: $(P_{in} - P_{out}) / (P_{in} + P_{out})$. Now, the outlier scores 100%, while the generalizable point scores ~14.3%.
  3. Principled Thresholding: Instead of picking an arbitrary score cutoff (like 0.25) to label data as "memorized," the author injects 5% randomly labeled data—which can only be learned via pure memorization—and sets the threshold at the 95th percentile of those random-label scores.
Figure 3: Illustration of our proposed null-based mem- orization threshold.
  1. Eliminating Data Leakage: Standard datasets contain near-duplicates between train and test splits. Removing a "memorized" training point often just meant deleting the cheat-sheet for an identical test image! The author evaluates models on strictly de-duplicated test sets.
Figure 4: Data leakage: training points with high mem- orization scores that have near-duplicate counterparts in the test set.

Datasets

The experiments are conducted on CIFAR-10, CIFAR-100, and ImageNet across four architectures (MobileNet, VGG19, ResNet-18, and ResNet-50). No new datasets are introduced, but crucially, the author evaluates models using existing de-duplicated versions of these test sets from prior literature—accounting for the ~8% and ~10% duplicate rates present in standard CIFAR-10 and CIFAR-100, respectively.

Key Insights and Ideas

  • No single culprit, but a compounding illusion: An ablation study reveals that no single flaw broke the original 2020 study on its own. Rather, all four subtle shortcuts compounded to completely reverse the sign of the final conclusion, with test-set de-duplication and principled thresholding doing the heaviest lifting.
  • Memorized doesn't just mean "mislabeled": A fair skeptic might ask: Did accuracy improve simply because you filtered out noisy, mislabeled data? Using a CLIP-based audit on ImageNet and checking known label errors in CIFAR-10, the author shows that mislabeled images make up a small fraction (3%–24%) of the memorized set. Even after explicitly removing likely mislabeled points, cutting out genuinely memorized points still boosts accuracy.
  • Privacy and generalization are not at odds: Because memorization isn't required for generalization, researchers don't need to treat data memorization as a sacred feature—we can aggressively mitigate it to build private, secure models without fearing a performance penalty.

Key Results

  • Drastically fewer false positives: Using the fractional difference score slashes the False Positive Rate (at 95% True Positive Rate) compared to the original absolute difference metric, which previously misclassified non-memorized points at rates up to 60% (and consistently >25% across datasets).
  • Removing memorized data helps accuracy: When comparing models with memorized points removed against a control group with an equal number of random points removed, test accuracy significantly improved in 9 out of 12 model-dataset combinations (and showed no statistically significant change in the remaining 3, all on CIFAR-10).
Figure 5: Change in accuracy when removing memorized points vs an equal number of random ones. * indicates that the change is not statistically significant (via a two-sided t-test), meaning the distributions are identical. Our results show the impact of removing memorized points: performance is unchanged at worst and significantly improved at best, especially on CIFAR-100 and ImageNet. between the two conditions (test accuracy when memorized points removed vs. test accuracy when random points removed). To assess statistical reliability, we conducted paired t-tests across multiple training runs for each dataset, reporting the two-sided p-values. We conduct our experiments over four different models to validate our results.
  • Growing gains with complexity: On ResNet-50, applying all four methodological fixes flipped the marginal utility of removing memorized points from Feldman and Zhang's negative baselines (-1.71% on CIFAR-10, -1.06% on CIFAR-100, and -4.98% on ImageNet) to neutral or positive territory (-0.11% statistically insignificant on CIFAR-10, +1.15% on CIFAR-100, and +1.97% on ImageNet).

Limitations and Future Work

The primary bottleneck of this methodology is compute: accurately approximating leave-one-out scores at a 95% sampling rate requires training roughly 1,000 models per dataset. While cheaper alternatives like influence functions exist, they are estimates that lack the precision needed for this type of study. Furthermore, this work focuses exclusively on image classification; extending this rigorous audit to Large Language Models—where memorization poses severe privacy and copyright risks—remains a vital next step.

Summary updated

Abstract

Deep learning models are known for their ability to memorize training data. While memorization is often linked to risks such as privacy leakage and poor robustness, a highly influential claim by~\citet{feldman2020longtail} argues that memorization is actually \textit{necessary} for generalization. Their conclusion is based on the observation that removing points with high memorization scores reduces test accuracy. Upon closer inspection of their work, we uncover four critical flaws in the underlying methodology: \textbf{(1) sampling bias} in their approximation algorithm inflates memorization scores; \textbf{(2) high false positive rate} in their definition of memorization, leads to misclassification of non-memorized points as memorized; \textbf{(3) unprincipled thresholding} that resulting in an ill-posed problem; and \textbf{(4) data leakage} skews the test accuracy results. To address these limitations, we introduce a modifications for correctly identifying and evaluating memorization, including higher sampling rates, modifying the original memorization definition to reduce the false positive rates, proposing a method to identify a principled score threshold, and employing test datasets especially designed to avoid data leakage. Having accounted for these errors, our results show that, in contradiction to the original work, removing truly memorized points does not cause a drop in accuracy, and in most cases, improves test performance. These findings call into question the necessity of memorization in deep learning and highlight the importance of mitigating its risks.
BibTeX
@inproceedings{abdullah2026is,
  author = {Hadi Abdullah},
  title = {{Is Memorization Actually Necessary for Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=14Cuwh2N4C},
}
Figure