Past works have suggested that memorization is typically confined to the final few model layers:
“early layers generalize while later layers memorize”
“memorization predominantly occurs in deeper layers”
"generalization can be restored by reverting the final few layer weights”
Our work challenges this belief with three different probes revealing that memorization is dispersed across model layers.
Gradient norm contribution from noisy examples closely follows that for clean examples even when they constitute only 10% of the dataset. Results depicted for epochs 15-20 for ResNet-9 trained on CIFAR-10 with 10% label noise.
Cosine similarity between the average gradients of clean and mislabeled examples per layer, per epoch for ResNet9 on CIFAR10 with 10% label noise. The memorization of mislabeled examples happens between epochs 10–30
Change in model accuracy on rewinding individual layers to a previous training epoch for clean examples (left) and mislabeled examples (right). The dataset has 10% random label noise. Epoch 0 represents the model weights at initialization.
Layer retraining for CIFAR-10 (left) and MNIST (right). We see that layers 4 and 5 are more important for memorization because all other layers can be trained to 100% accuracy on memorized examples, when only trained on clean examples.
For each example in a subset of 1000 clean and 1000 noisy examples, we iteratively remove the most important neurons from a ResNet-9 model trained on the CIFAR-10 dataset with 10% random label noise, until the example’s prediction flips.
A schematic diagram explaining the difference between the generalization and memorization neurons. At test time, we dropout all the memorization neurons.
Forward propagation for input tied to the ith memorization neuron. The neuron is activated only when the corresponding input is in the training batch.
Example-Tied Dropout is a simple and effective method to localize memorization in a model.
Dropping out memorization neurons leads to a sharp drop in accuracy on mislabeled examples with a minor impact on prediction on clean and unseen examples.
Most of the clean examples that are forgotten when dropping out the neurons responsible for memorization in the case of Exampletied dropout were either mislabeled or inherently ambiguous and unique requiring memorization for correct classification.