The Pitfalls of Memorization: When Memorization Hurts Generalization
Reza Bayat, Mohammad Pezeshki, Elvis Dohmatob, David Lopez-Paz, Pascal Vincent
TL;DR
This work addresses how memorization interacts with spurious correlations to undermine generalization under distribution shifts. It formalizes the ERM setting and shows that memorization can cause models to rely on spurious features, leading to poor held-out performance even with zero training error. To mitigate this, the authors propose Memorization-Aware Training (MAT), which shifts logits using calibrated held-out predictions (via a per-example logit adjustment) and leverages Cross-Risk Minimization (XRM) to obtain held-out signals. MAT aims to promote invariant, distribution-generalizable features and demonstrates improved worst-group performance with reduced memorization, across multiple datasets and annotation regimes. The findings highlight that memorization is not universally harmful, but can be managed and harnessed to improve robustness in real-world, distribution-shifted settings, with potential implications for scalable, group-robust learning in diverse domains.
Abstract
Neural networks often learn simple explanations that fit the majority of the data while memorizing exceptions that deviate from these explanations.This behavior leads to poor generalization when the learned explanations rely on spurious correlations. In this work, we formalize the interplay between memorization and generalization, showing that spurious correlations would particularly lead to poor generalization when are combined with memorization. Memorization can reduce training loss to zero, leaving no incentive to learn robust, generalizable patterns. To address this, we propose memorization-aware training (MAT), which uses held-out predictions as a signal of memorization to shift a model's logits. MAT encourages learning robust patterns invariant across distributions, improving generalization under distribution shifts.
