NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Slower Generalization, Faster Memorization: A Sweet Spot in Algorithmic Learning

Shin So, Kyelim Lee, Albert No

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Interpretability & Model Adaptation › Generalization-Memorization Trade-offs · Type: empirical study · Keywords: algorithmic learning, generalization vs memorization, dataset size effects, Needleman-Wunsch, Transformer, empirical study

Summary

The study reveals that small Transformers achieve optimal validation accuracy at an intermediate dataset size in Needleman-Wunsch matrix generation, showing a sweet spot where larger datasets slow down generalization but speed up memorization.

Explained to a 5-year-old

We gave a little computer program a puzzle to solve. It learned the puzzle best when we gave it a medium number of puzzle pieces, not too few and not too many. When we gave it many pieces, it could still solve the puzzle but needed more tries. The program also got really good at copying the right answers quickly when it saw many examples, even if it didn't fully understand the rule. A simpler puzzle didn't show this strange behavior.

Explained to a 5-year-old, longer

We built a tiny computer that tries to solve a puzzle. The puzzle is about making a special matrix using a method called Needleman-Wunsch. We gave the computer different amounts of puzzle examples to learn from. Sometimes the computer learned the puzzle fastest when we gave it a few examples, and sometimes it learned fastest when we gave it many examples. We noticed that when we gave it a lot of examples, the computer could still get the right answers, but it needed more practice steps to understand the rule. At the same time, the computer could memorize the answers quickly when there were many examples, even if it didn’t fully grasp why the answers were correct. We also tried a simpler puzzle where the computer just multiplied numbers, and that puzzle didn’t show the same strange behavior. This tells us that learning is not always helped by more data, especially for complicated puzzles. The findings help us understand when more information helps and when it might slow down true understanding.

For a technical reader

The paper investigates how dataset size affects learning dynamics in small Transformer models on a structured-output task. It shows that validation performance peaks at an intermediate data size, with larger datasets requiring more updates for generalization. Meanwhile, training accuracy can improve faster with more data due to emerging rule structure. A simple multiplication baseline does not exhibit this behavior, highlighting the unique characteristics of structured outputs.

Problem

Understanding how the amount of training data influences the trade-off between a model learning the underlying rule and simply memorizing examples is a key open question. This is especially important for structured-output tasks where exact fitting may not align with true generalization.

Method

The approach evaluates small Transformer models on a Needleman-Wunsch matrix generation task across a range of dataset sizes, tracking both validation exact-match accuracy and training accuracy to identify the dataset size that yields the fastest convergence. A simple multiplication baseline is used for comparison to isolate the effect of structured output. Results are analyzed to separate the critical data size for rule emergence from the size that optimizes update-based convergence.

Results

The approach finds that small Transformers achieve peak validation exact-match accuracy at an intermediate dataset size, with larger datasets requiring more updates for generalization, while larger datasets accelerate training accuracy once partial competence emerges; a simple multiplication baseline does not exhibit this post-threshold slowdown.

Contributions

It separates the critical data size for the onset of generalization from the dataset size that optimizes update-based convergence, and demonstrates that structured-output tasks can exhibit a sweet spot where learning the rule and exact fitting diverge. It also shows that this behavior is not present in a simpler multiplication baseline.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction