Investigating the locality of neural network training dynamics

Soham Dan, Phanideep Gampa, Anirbit MukherjeearXiv 2021

Abstract

In the recent past, a property of neural training trajectories in weight-space had been isolated, that of "local elasticity" (denoted as $S_{\rm rel}$). Local elasticity attempts to quantify the propagation of the influence of a sampled data point on the prediction at another data point. In this work, we embark on a comprehensive study of the existing notion of $S_{\rm rel}$ and also propose a new definition that addresses the limitations that we point out for the original definition in the classification setting. On various state-of-the-art neural network training on SVHN, CIFAR-10 and CIFAR-100 we demonstrate how our new proposal of $S_{\rm rel}$, as opposed to the original definition, much more sharply detects the property of the weight updates preferring to make prediction changes within the same class as the sampled data. In neural regression experiments we demonstrate that the original $S_{\rm rel}$ reveals a $2-$phase behavior—that the training proceeds via an initial elastic phase when $S_{\rm rel}$ changes rapidly and an eventual inelastic phase when $S_{\rm rel}$ remains large. We show that some of these properties can be analytically reproduced in various instances of doing regression via gradient flows on model predictor classes.

Introduction

A fundamental question in deep learning is how an update on a single data point influences the model's predictions across the entire dataset. Ideally, training on a specific instance (e.g., a "golden retriever") should primarily improve the model's performance on similar instances (other dogs) without adversely affecting unrelated classes (e.g., "airplanes"). This phenomenon is termed local elasticity.

While previous work introduced the relative sensitivity metric $S_{\rm rel}$ to quantify this, existing definitions often fail to capture these dynamics accurately in multi-class classification. Furthermore, the temporal evolution of elasticity—whether a model remains "stretchy" or becomes "stiff" over time—remains poorly understood. This paper addresses these gaps by proposing a refined metric for classification and establishing a theoretical framework for the observed "phases" of training.

Methodology

The investigation follows three primary paths:

  1. Refined Classification Metric: The authors argue that the original $S_{\rm rel}$, based on simple prediction change ratios, is ill-suited for the probability distributions (softmax outputs) in classification. They propose a new definition using KL Divergence to measure the distance between distributions, alongside a "smoothed" version to capture class-level trends.
  2. Empirical Analysis: The metrics are tracked during the training of standard architectures, such as ResNet-18, on benchmark datasets including SVHN, CIFAR-10, and CIFAR-100.
  3. Theoretical Modeling: To explain the empirical patterns, the authors analyze simplified models, such as gradient flow on penalized linear regression and single ReLU gates. These models allow for the derivation of closed-form equations that mirror the behavior of complex networks.

Theoretical Foundations and Results

The study identifies a distinct two-phase behavior in regression training. In the Elastic Phase (Phase 1), $S_{\rm rel}$ changes rapidly as the model is highly sensitive to local updates. As training converges and enters the Inelastic Phase (Phase 2), $S_{\rm rel}$ stabilizes at a high value, indicating a more "stiff" model where updates have a global, persistent impact.

The theoretical analysis provides rigorous support for these observations across various model classes, mapping specific theorems to the underlying hypotheses of local elasticity.

Summary of theoretical models and the hypotheses they corroborate regarding local elasticity ($S_{\rm rel}$).

Key findings include:

  • Class-Sensitive Locality: The KL-based metric confirms that updates are highly local to the class of the sampled data. Training on one class significantly shifts predictions for that class while having minimal impact on others.
  • Analytic Reproducibility: The "stiffening" behavior observed in large-scale ResNets can be mathematically predicted using simple Ordinary Differential Equations (ODEs) applied to single ReLU neurons and linear predictors.
  • Sharper Detection: In SVHN and CIFAR experiments, the new $S_{\rm rel}$ definition clearly separates intra-class influence from inter-class influence, whereas the original definition often produced noisy, indistinguishable results.

Discussion and Future Work

The research demonstrates that local elasticity is a fundamental property of gradient-based learning. The transition from an elastic to an inelastic phase coincides with the period where empirical loss falls most sharply.

However, challenges remain. The current theoretical proofs rely on simplified models; extending these results to deep, multi-layer classification networks is a key next step. Additionally, while the paper suggests a link between local elasticity and generalization, a formal proof connecting $S_{\rm rel}$ dynamics to final test accuracy remains an open research goal.

Summary updated

BibTeX
@misc{dan2021investigating,
  author = {Soham Dan and Phanideep Gampa and Anirbit Mukherjee},
  title = {{Investigating the locality of neural network training dynamics}},
  year = {2021},
  eprint = {2111.01166},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.01166},
}
Figure