ResMem: Learn what you can and memorize the rest
Not on the map. Why?
Abstract (arXiv)
The impressive generalization performance of modern neural networks is attributed in part to their ability to implicitly memorize complex training patterns. Inspired by this, we explore a novel mechanism to improve model generalization via explicit memorization. Specifically, we propose the residual-memorization (ResMem) algorithm, a new method that augments an existing prediction model (e.g. a neural network) by fitting the model's residuals with a k-nearest neighbor based regressor. The final prediction is then the sum of the original model and the fitted residual regressor. By construction, ResMem can explicitly memorize the training labels. Empirically, we show that ResMem consistently improves the test set generalization of the original prediction model across various standard vision and natural language processing benchmarks. Theoretically, we formulate a stylized linear regression problem and rigorously show that ResMem results in a more favorable test risk over the base predictor.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 31 of its 61 references that are in the map. First posted on arXiv 3 Feb 2023.
Builds on
31 of 61 references.
References · 31
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,773
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
- 2016Understanding deep learning requires rethinking generalizationcited by 1,657
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2017A Closer Look at Memorization in Deep Networkscited by 936
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2019Large-Scale Long-Tailed Recognition in an Open Worldcited by 704
- 2017Spectrally-normalized margin bounds for neural networkscited by 681
19 more
- 2019Benign Overfitting in Linear Regressioncited by 544
- 2017Computing Nonvacuous Generalization Bounds for Deep (Stochastic) Neural Networks with Many More Parameters than Training Datacited by 527
- 2020What Neural Networks Memorize and Why: Discovering the Long Tail via Influence Estimationcited by 492
- 2019Does Learning Require Memorization? A Short Tale about a Long Tailcited by 452
- 2018Just Interpolate: Kernel "Ridgeless" Regression Can Generalizecited by 190
- 2021Efficient Deep Learning: A Survey on Making Deep Learning Models Smaller, Faster, and Bettercited by 153
- 2019Large Memory Layers with Product Keyscited by 120
- 2020Rethinking Bias-Variance Trade-off for Generalization of Neural Networkscited by 107
- 2018Overfitting or perfect fitting? Risk bounds for classification and regression rules that interpolatecited by 99
- 2020The Interpolation Phase Transition in Neural Networks: Memorization and Generalization under Lazy Trainingcited by 84
- 2017SGD Learns Over-parameterized Networks that Provably Generalize on Linearly Separable Datacited by 79
- 2014Rates of Convergence for Nearest Neighbor Classificationcited by 45
- 2021Benign Overfitting in Multiclass Classification: All Roads Lead to Interpolationcited by 41
- 2022Decoupled Context Processing for Context Augmented Language Modelingcited by 24
- 2018DNN or k-NN: That is the Generalize vs. Memorize Questioncited by 16
- 2022Memorize to Generalize: on the Necessity of Interpolation in High Dimensional Linear Regressioncited by 14
- 2021Exact Gap between Generalization Error and Uniform Convergence in Random Feature Modelscited by 13
- 2014A General Framework for Fast Stagewise Algorithmscited by 11
- 2022Generalization-Memorization Machinescited by 2
Built on by
Citing papers per year: 2023: 2; 2024: 4; 2025: 3; 2026: 4.
13 papers.
Sort:
By area:
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-trainingcited by 655
- 2024Synthetic continued pretrainingcited by 56
- 2024The Pitfalls of Memorization: When Memorization Hurts Generalizationcited by 16
- 2024Learning Equi-angular Representations for Online Continual Learningcited by 15
- 2024Continual Memorization of Factoids in Language Modelscited by 8
- 2023What do larger image classifiers memorise?cited by 6
- 2025Synthetic bootstrapped pretrainingcited by 4
- 2025CLAP-S: Support Set Based Adaptation for Downstream Fiber-optic Acoustic Recognitioncited by 1
- 2023Least Squares Maximum and Weighted Generalization-Memorization Machinescited by 0
- 2026Memorize Theorems, Not Instances: Probing SFT Generalization through Mathematical Reasoningcited by 0
- 2026Conditional KRR: Injecting Unpenalized Features into Kernel Methods with Applications to Kernel Thresholdingcited by 0
- 2026Periodic Topological Deep Learning for Polymer Design and Discoverycited by 0
- 2026RATL: Learning from Retrieved Residuals for Robust Multivariate Time-Series Forecasting3 Sep 2026
- 2026Periodic Topological Deep Learning for Polymer Design and Discovery26 May 2026
- 2026Conditional KRR: Injecting Unpenalized Features into Kernel Methods with Applications to Kernel Thresholding25 May 2026
- 2026Memorize Theorems, Not Instances: Probing SFT Generalization through Mathematical Reasoning10 May 2026
- 2025Synthetic bootstrapped pretraining17 Sep 2025
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-training28 Jan 2025
- 2025CLAP-S: Support Set Based Adaptation for Downstream Fiber-optic Acoustic Recognition16 Jan 2025
- 2024The Pitfalls of Memorization: When Memorization Hurts Generalization10 Dec 2024
- 2024Continual Memorization of Factoids in Language Models11 Nov 2024
- 2024Synthetic continued pretraining11 Sep 2024
- 2024Learning Equi-angular Representations for Online Continual Learning2 Apr 2024
- 2023What do larger image classifiers memorise?9 Oct 2023
1 more
- 2025Synthetic bootstrapped pretrainingcited by 4
- 2025Synthetic bootstrapped pretraining17 Sep 2025
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-trainingcited by 655
- 2024Synthetic continued pretrainingcited by 56
- 2024The Pitfalls of Memorization: When Memorization Hurts Generalizationcited by 16
- 2024Learning Equi-angular Representations for Online Continual Learningcited by 15
- 2024Continual Memorization of Factoids in Language Modelscited by 8
- 2023What do larger image classifiers memorise?cited by 6
- 2025CLAP-S: Support Set Based Adaptation for Downstream Fiber-optic Acoustic Recognitioncited by 1
- 2023Least Squares Maximum and Weighted Generalization-Memorization Machinescited by 0
- 2026Conditional KRR: Injecting Unpenalized Features into Kernel Methods with Applications to Kernel Thresholdingcited by 0
- 2026Periodic Topological Deep Learning for Polymer Design and Discoverycited by 0
- 2026Periodic Topological Deep Learning for Polymer Design and Discovery26 May 2026
- 2026Conditional KRR: Injecting Unpenalized Features into Kernel Methods with Applications to Kernel Thresholding25 May 2026
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-training28 Jan 2025
- 2025CLAP-S: Support Set Based Adaptation for Downstream Fiber-optic Acoustic Recognition16 Jan 2025
- 2024The Pitfalls of Memorization: When Memorization Hurts Generalization10 Dec 2024
- 2024Continual Memorization of Factoids in Language Models11 Nov 2024
- 2024Synthetic continued pretraining11 Sep 2024
- 2024Learning Equi-angular Representations for Online Continual Learning2 Apr 2024
- 2023What do larger image classifiers memorise?9 Oct 2023
- 2023Least Squares Maximum and Weighted Generalization-Memorization Machines31 Aug 2023