← Latest papers
🤖 machine learning

Random Label Prediction Heads for Studying Memorization in Deep Neural Networks

This paper introduces Random Label Prediction Heads (RLP-heads) as a novel method to empirically measure memorization and Rademacher complexity across network layers, revealing that reducing memorization does not always improve generalization and challenging the traditional equivalence between overfitting and memorization.

Original authors: Marlon Becker, Jonas Konrad, Luis Garcia Rodriguez, Benjamin Risse

Published 2026-07-14
📖 5 min read🧠 Deep dive

Original authors: Marlon Becker, Jonas Konrad, Luis Garcia Rodriguez, Benjamin Risse

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a super-smart student taking a test. Usually, we worry that this student is just memorizing the answer key instead of actually learning the material. If they memorize the key, they get 100% on the practice test but fail the real exam because the questions are slightly different. This is called "overfitting" or "memorization," and for a long time, scientists thought it was always a bad thing.

But what if memorizing some things actually helps? That's the big question this paper asks.

The Magic "Random Label" Hat

To figure out if the student is memorizing, the researchers gave the student a second, weird hat to wear: a Random Label Prediction Head (RLP-head).

Here's how it works:

  1. The Main Task: The student studies a normal dataset (like pictures of cats and dogs) to learn the real labels.
  2. The Secret Test: At the same time, the researchers secretly assign every single picture a random, made-up number (like "Label 42" for a cat, "Label 7" for a dog).
  3. The Hat's Job: The RLP-head tries to guess these random numbers based on what the student has learned so far.

If the RLP-head can guess the random numbers well, it means the student has memorized the specific details of every single picture. It's like the student remembering that "the cat in photo #5 has a tiny scratch on its ear," which is useless for knowing what a cat is, but perfect for guessing the random number assigned to that specific photo.

The researchers found that this random-guessing accuracy is a great way to measure how much the model is "memorizing" instead of "learning." They suggest this acts like a ruler for the model's complexity, similar to a mathematical concept called Rademacher complexity, which is hard to calculate directly but this method measures it in a practical way.

The Twist: Sometimes Memorizing is Good!

Here is where the story gets interesting. The researchers tried to stop the student from memorizing these random numbers by adding a "punishment" (a regularizer) whenever the RLP-head guessed correctly. They wanted to force the student to ignore the tiny details and focus on the big picture.

The Result on Big Datasets (like ImageNet):
When they tested this on a huge dataset with millions of pictures, the punishment worked perfectly. The student stopped memorizing the random numbers, the gap between their practice score and real test score got smaller, and their test accuracy actually went up by 1.5% (reaching 68.5%).

  • The Lesson: On big, well-sampled datasets, memorizing specific details is usually just noise. Stopping it helps the model generalize better.

The Result on Smaller Datasets (like CIFAR-100):
But when they tried the same punishment on a smaller dataset, things went wrong. The student stopped memorizing the random numbers, but their test accuracy actually got worse.

  • The Lesson: On smaller datasets, the "noise" the student was memorizing might have actually been important! Maybe those specific details were the only way to recognize a rare type of animal in the group. By forcing the student to ignore them, the model lost its ability to recognize those tricky cases.

The authors suggest that memorization isn't always the enemy. If a dataset is "undersampled" (meaning there aren't enough examples of certain things), the model needs to memorize those specific examples to do well. If you stop it from memorizing, it forgets the rare cases and fails.

Where Does the Memorization Go?

The researchers also looked at where in the brain (or network) this memorization happens. They found that if you punish the final layer for memorizing, the memorization doesn't disappear—it just moves to the earlier layers.

It's like if you tell a student, "Don't memorize the final answer," they might start memorizing the steps in the middle of the problem instead. The researchers found that when they punished the final layer, the earlier layers started doing a better job of predicting the real classes, even though the final layer was being forced to be "clean." This suggests the network is flexible and can shift where it stores information.

What They Ruled Out

The paper explicitly argues against the old idea that memorization is always bad. They show that in some cases (like small datasets), stopping memorization hurts performance. They also show that simply making a model smaller or adding standard rules (like dropout) doesn't always fix the problem in the way we expect; sometimes, a little bit of memorization is necessary for the model to work.

How Sure Are They?

The authors are very confident in their measurements. They proved through experiments that:

  • The RLP-head accuracy reliably tracks memorization (they tested this by freezing the network and training only the hat, which confirmed the signal comes from the network's memory, not the hat itself).
  • Punishing memorization on ImageNet improves test scores (a 1.5% gain).
  • Punishing memorization on CIFAR-100 hurts test scores.

However, they suggest (rather than prove with a mathematical theorem) that the reason for these opposite results is due to how the data is sampled. They hypothesize that when data is scarce, memorization acts as a safety net for rare examples, and removing that net causes the model to fall.

The Takeaway

This paper introduces a clever new tool (the RLP-head) to peek inside a neural network and see exactly how much it's memorizing. The big surprise? Memorization isn't a villain; it's a tool. If you have a mountain of data, you should stop the model from memorizing. But if you only have a few examples, you might need the model to remember every single detail to succeed. The key is knowing which situation you are in.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →