TL;DR
ExPLAIND is a unified interpretability framework that decomposes a neural network's predictions into fine-grained influence scores across three dimensions: model components, training data, and training steps. By extending gradient path kernels to modern optimizers like AdamW, it allows researchers to track how specific layers and data points interact over time, revealing new insights into complex phenomena like grokking and LLM pretraining.
What Problem Does This Paper Address?
Deep neural networks are notoriously difficult to inspect. Existing post-hoc interpretability methods usually focus on just one piece of the puzzle in isolation: feature attribution (which inputs matter), data attribution (which training examples matter), or training dynamics (how the model changes over time).
This siloed approach misses the crucial interactions between these dimensions—for instance, how a specific training example influences a particular layer at a specific step in training. Furthermore, existing tools are often locked into a single level of granularity (either very local or very global). ExPLAIND addresses this fragmentation by providing a theoretically grounded, unified framework that spans all three dimensions across arbitrary granularities.
Methods
The core of ExPLAIND is a theoretical extension of the Exact Path Kernel (EPK). While previous path kernel methods were limited to simple gradient descent, the authors generalize the mathematics to handle modern training regimes, including AdamW, gradient descent with momentum, mini-batching, weight decay, and dynamic learning rates.
By tracking the optimization trajectory, ExPLAIND constructs a multi-dimensional tensor of influences. This tensor maps out the atomic contributions of every parameter, training sample, and training step to the final model predictions. Researchers can flexibly slice and dice this tensor—summing over certain dimensions while keeping others—to view the model through different lenses (e.g., tracking layer-wise importance over time, or analyzing data-level similarities).
Datasets
The authors validate ExPLAIND across several architectures and datasets:
- MNIST: Used with a standard 4-layer CNN for parameter pruning and step-subsampling sensitivity analysis.
- CIFAR-2: A dog-vs-cat subset of CIFAR-10, used to train a ResNet-9 model for exact equivalence validation.
- Modulo Addition (MOD-113): An algorithmic dataset ($a + b \pmod{113}$) used to train a Transformer model to study the phenomenon of "grokking."
- EuroLLM-1.7B Pretraining Data: A massive natural language dataset spanning 35 languages (4 trillion tokens total), used to demonstrate ExPLAIND's scalability to large language models.
Key Insights and Ideas
- Grokking is an "Alignment" Phase: Previous theories divided grokking (sudden generalization long after overfitting) into memorization, circuit formation, and cleanup. ExPLAIND refines this narrative: it shows that intermediate attention layers form a robust "representation pipeline" first. Generalization occurs when the outer layers (embeddings and decoder) suddenly align around this pre-established pipeline, driven heavily by regularization.
- Two-Phase LLM Dynamics: When applied to EuroLLM-1.7B, ExPLAIND uncovers a clear phase transition around step 60k. Phase 1 is dominated by MLP layers building representations (moving from input-proximal to output-proximal layers). Phase 2 shifts to intermediate attention layers, which take over to handle context integration and distributed refinement.
- The Oscillatory Nature of AdamW: ExPLAIND reveals that the first-moment (momentum) updates in AdamW oscillate wildly in sign from step to step. This mathematically explains why local loss trajectories in LLM training are often non-smooth and noisy, even when the global trend is steadily downward.
Key Results
- Exact Mathematical Equivalence: With 100 integration steps, the ExPLAIND framework perfectly reproduces 100% of the classification decisions of the original trained models (ResNet-9, CNN, and Transformer), achieving a KL divergence of 0.0 compared to the true model outputs.
- Effective Parameter Pruning: Using ExPLAIND's influence scores to prune parameters on a CNN yielded test accuracies competitive with state-of-the-art iterative pruning methods, while maintaining a significantly lower KL divergence to the unpruned model's output distribution.
- Computational Efficiency via Subsampling: The authors demonstrated that by ranking training steps by their impact on loss and keeping only the top 60% of steps, they could accurately reconstruct global model behavior, cutting the required temporal data nearly in half.
Limitations and Future Work
- Attribution vs. Causality: ExPLAIND provides statistical weight-level attributions rather than direct causal guarantees, though the authors' layer-swapping and pruning experiments show strong predictive power for counterfactual behavior.
- Computational Overhead: Materializing the full influence tensor is highly memory- and compute-intensive. While early accumulation and step-subsampling make it feasible for a 1.7B parameter LLM, further optimization or learned approximations are needed for wider adoption.
- Data Attribution Performance: When evaluated on standard causal data attribution benchmarks (like Linear Data Modeling Score / LDS), naive data scores derived from ExPLAIND performed on par with TracIn but were slightly outperformed by TRAK, indicating that specialized aggregation techniques for the data dimension are still required.
Summary updated