Deep neural networks are notorious for memorizing "hard" samples—like mislabeled data or rare outliers—rather than learning generalizable patterns. Because these models are highly over-parameterized, they possess far more capacity than necessary to solve a given task, allowing them to achieve perfect training accuracy even on datasets with completely random labels. This phenomenon, known as brute-force memorization, poses significant challenges for dataset integrity and data privacy.
Identifying which specific samples a model is memorizing is crucial. However, the gold-standard method for measuring memorization—Feldman & Zhang (FZ) scores—requires training thousands of models, each with a different subset of data removed, to observe how a specific point affects the outcome. This is computationally prohibitive for most researchers. In this paper, the authors introduce a novel, computationally efficient metric to detect these samples: the average curvature of the loss function around a data point.
The Curvature Metric
The authors propose using the curvature of the loss function with respect to the input data as a proxy for memorization.
- The Intuition: If a model is forced to memorize a point that contradicts the general trend of the data (such as an image of a cat incorrectly labeled "dog"), it must create a sharp "spike" in its decision boundary to accommodate that specific point. This spike manifests as high curvature in the local loss landscape.
- The Math: To quantify this, the researchers calculate the trace of the square of the Hessian matrix ($Tr(H^2)$). Because calculating a full Hessian is computationally unfeasible for large networks, they employ Hutchinson’s trace estimator alongside a finite-step approximation to keep the metric tractable.
- The "Secret Sauce": Crucially, the authors do not merely measure curvature at the end of training. Instead, they average the curvature over all training epochs. As a model overfits and its confidence grows, the local loss landscape actually flattens out. Capturing the model's "struggle" during the early and middle phases of training is essential for generating a reliable memorization score.
Key Insights and Ideas
The researchers validated their approach across several standard computer vision benchmarks, including MNIST, FashionMNIST, CIFAR-10, CIFAR-100, and ImageNet, as well as synthetic datasets with intentionally flipped labels.
Curvature as a Memorization Proxy: High curvature proved to be a remarkably strong signal for memorization. The proposed metric achieved high cosine similarity (up to 0.90) with the computationally expensive FZ scores, validating its effectiveness as a lightweight alternative.
The "Duplicate Label" Failure Mode: Perhaps the most surprising finding was the discovery of a novel failure mode in established datasets like CIFAR-100 and ImageNet. The curvature metric successfully flagged identical images that had been assigned different labels (e.g., the exact same photo labeled as both "baby" and "girl", or "red_wine" and "corkscrew"). The model was forced to memorize these conflicting points, leading to massive curvature spikes.
Training Dynamics Matter: The study highlights that curvature is not static. It typically rises as the model begins to overfit and then drops once the model becomes overconfident and pushes its logits far apart. This dynamic explains why previous attempts to use curvature solely at the end of training failed to measure memorization accurately.
Key Results and Dataset Auditing
This curvature metric serves as a powerful tool for practitioners to "audit" their datasets. By examining the top 100 highest-curvature samples, researchers can quickly identify mislabeled data, outliers, or conflicting duplicates.
- State-of-the-Art Detection: On an MNIST dataset with 1% label noise, the curvature metric achieved a 100% AUROC for identifying mislabeled samples, outperforming established methods like Confident Learning.
- Efficiency: The method provides memorization insights comparable to FZ scores but is roughly three orders of magnitude (1000x) less compute-intensive, requiring only a single training run.
- Qualitative Success: In CIFAR-100, the metric successfully identified "long-tailed" samples—rare or difficult images that the model had to work harder to incorporate into its internal logic.
Limitations and Future Work
While significantly cheaper than training thousands of models, calculating curvature still introduces a constant factor of computational overhead to a standard training run (the authors note a roughly 10x increase in time per batch when using 10 random directions for the estimator). Additionally, the metric relies on a step-size parameter ($h$) for the finite-difference approximation, which may require tuning for different architectures.
Currently, the paper focuses entirely on image datasets. Future work could explore whether loss curvature serves as a similarly effective memorization signal in Large Language Models (LLMs) or tabular data, potentially broadening the impact of this auditing technique across other domains of machine learning.
Summary updated