Deep neural networks (DNNs) are notoriously opaque "black boxes." To trust them in critical applications, researchers and practitioners need to understand why they make certain decisions. One popular approach to this problem is data attribution: identifying which specific training examples most influenced a particular prediction.
The empirical Neural Tangent Kernel (eNTK) is a theoretically grounded tool for data attribution, as it describes how a network's outputs change as its parameters are updated during training. However, computing the full eNTK is prohibitively expensive for modern architectures, scaling poorly with the number of training points, output classes, and parameters. Previous attempts to approximate the eNTK have often sacrificed "faithfulness"—the degree to which the surrogate model accurately reflects the original network's internal logic.
This paper introduces the trace Neural Tangent Kernel (trNTK) and its random projection variants as a way to create faithful and highly efficient surrogate models, reducing computational costs by orders of magnitude.
Methodology: The Trace-NTK and Random Projections
The authors propose several key innovations to make eNTK computation tractable without losing fidelity:
- The "Trace" Trick: Instead of computing the massive full eNTK matrix, the authors perform a "block-trace" operation. This reduces the kernel to a much more manageable size while preserving essential information about the model's gradients.
- Cosine Normalization: They apply cosine normalization to the kernel, providing a geometric interpretation where the kernel measures the angle between the network's Jacobians (gradients of the output with respect to parameters) for different inputs.
- Random Projections (proj-trNTK): To further boost efficiency, the authors utilize the Johnson-Lindenstrauss lemma to project high-dimensional Jacobians into a lower-dimensional space before computing the kernel. This allows users to explicitly tune the trade-off between computational speed and approximation accuracy.
These kernels are then used to build Kernel Generalized Linear Models (kGLMs). If the kGLM's behavior closely matches the original neural network, it serves as a faithful surrogate that can be easily decomposed to extract data attributions.
Key Insights and Results
The researchers evaluated their methods across a variety of tasks and architectures, including image classification (MLPs, CNNs, ResNets, MobileNetV2 on MNIST, CIFAR-10) and natural language processing (BERT-base on CoLA).
Measuring Faithfulness
The authors argue that simply matching test accuracy is insufficient for a surrogate to be considered "faithful." Instead, they use Kendall-$\tau$ rank correlation to measure how well the surrogate's confidence scores correlate with the original network's softmax probabilities.
As shown in the results, the trNTK consistently produced highly faithful surrogates. The models maintained a Kendall-$\tau$ correlation $> 0.7$ across all experiments, significantly outperforming simpler baselines like the Conjugate Kernel (CK). Furthermore, the random projection variant (proj-trNTK) delivered massive speedups: for a BERT-base model, a computation that would normally take an estimated 1200 hours was finished in just 22 minutes while maintaining a strong 0.80 correlation.
The Distribution of Attribution
A major "aha" moment in the paper challenges the common assumption that only a few "sparse" training examples drive a model's decision.
By decomposing the surrogate models, the authors found that attribution mass is typically distributed across the entire training class rather than being isolated to a handful of points.
Forensics and Security
These surrogate models also proved remarkably adept at data forensics. In an experiment using a "poisoned" version of CIFAR-10 (BadNet)—where specific training images were subtly altered to trigger misclassifications—the trNTK-based models successfully identified the poisoned training samples with nearly 100% precision and recall.
Limitations and Future Work
While trNTK provides a massive leap forward in efficient data attribution, the authors note a few limitations:
- Scalar Bottleneck: The current Kendall-$\tau$ faithfulness metric requires reducing the network's vector output to a single scalar (the logit of the correct class), which may discard nuanced information about how the model relates different classes.
- Static vs. Dynamic: This work focuses on the "empirical" NTK at the end of training. Future research could explore "path kernels" that integrate the NTK over the entire training trajectory.
- Human Utility: Finally, while the surrogates are mathematically faithful, human-subject testing is still needed to determine if these specific "by-example" explanations practically assist end-users in understanding and debugging models.
Summary updated