Towards Robust, Locally Linear Deep Networks

Guang-He Lee, David Alvarez-Melis, Tommi S. Jaakkola

Deep neural networks realize incredibly complex mappings, but we often try to understand them by looking at their locally linear behavior—specifically, the derivative of the mapping with respect to its inputs. We use these gradients for sensitivity analysis or to generate saliency maps that explain a model's prediction.

However, modern over-parametrized networks are notoriously "jittery." A tiny, imperceptible nudge to an input image might completely flip which pixels appear "important" to the model, even if the final prediction remains unchanged. This inherent instability in gradients creates a significant "trust gap" for high-stakes AI applications. While much of the field focuses on adversarial robustness (ensuring the output doesn't change under perturbation), this paper tackles gradient stability (ensuring the explanation doesn't change).

To address this, the authors introduce ROLL (RObust Local Linearity), a novel regularization technique that encourages networks to maintain stable, linear behavior over much larger regions of the input space.

The Mechanics of ROLL

The authors focus on networks utilizing piecewise linear activation functions, such as ReLU. These networks naturally divide the input space into a patchwork of distinct "linear regions." Inside any single region, the complex neural network behaves exactly like a simple linear model.

The paper introduces three main technical contributions to expand and stabilize these regions:

  1. Inference of Linear Margins: The authors derive a method to calculate the $\ell_p$ margin, defined as the maximum radius around a specific data point where the network's gradient is mathematically guaranteed to remain constant.
  2. The ROLL Loss: Because directly optimizing this raw margin is computationally intractable, the authors propose a "hinge-based relaxation" inspired by Support Vector Machines (SVMs). In essence, the algorithm treats every neuron in the network as a mini-SVM, penalizing the network when the "decision boundaries" of these neurons fall too close to the training data points.
  3. Parallel Gradient Computation: Calculating the gradient of every single neuron with respect to the input is usually a massive bottleneck. To solve this, the authors developed a clever perturbation algorithm. By using forward passes with carefully crafted samples, they can collect exact gradients for all neurons in parallel, bypassing the need for multiple slow backpropagation steps.

Visualizing Local Linearity

The impact of ROLL is most obvious when visualizing the linear regions of a network. In a standard network, the boundaries between linear regions form a dense, chaotic web. By applying ROLL, the network is forced to push these boundaries away from the data points, creating large, stable neighborhoods.

Comparison of linear regions under different regularization schemes.

As seen above, the proposed regularizations drastically clean up the local neighborhoods around data points (marked by circles), ensuring that explanations derived from gradients remain consistent within those expanded radii.

Key Results and Insights

The authors evaluated ROLL across three distinct architectures and data types: standard handwritten digit classification (MNIST) using Fully Connected networks, time-series speaker identification (Japanese Vowel Dataset) using RNNs, and complex image categorization (Caltech-256) using an 18-layer ResNet.

  • Massive Stability Gains: On MNIST, models trained with ROLL achieved linear regions with margins 10 to 30 times larger than standard "vanilla" models. Remarkably, this massive increase in interpretability came with only a negligible (~1%) drop in classification accuracy.
  • Cleaner Explanations: For the Caltech-256 dataset, the saliency maps produced by ROLL were visually much cleaner and more aligned with human intuition (e.g., highlighting the actual object) compared to the noisy, "snowy" gradients typical of standard models.
  • Computational Speedup: The novel forward-perturbation algorithm achieved a 12x empirical speedup compared to standard backpropagation for computing the necessary training signals.
  • Interpretability by Design: A core takeaway is that stability does not necessarily mean a small gradient; it means a consistent gradient. By baking this local linearity into the training process, ROLL creates models that are interpretable by design, rather than relying on post-hoc fixes for messy saliency maps.

Limitations and Future Work

While highly effective for piecewise linear networks, the current framework struggles with non-linearities like max-pooling or maxout, which introduce extra constraints that make linear regions harder to track. The authors suggest using average pooling or strided convolutions as practical workarounds.

Furthermore, while the accuracy drop was minimal in these tests, there is an inherent tension between a model's capacity to represent highly complex, "wiggly" functions and the regularized requirement to remain locally flat. Scaling this exact approach to massive foundation models may also require more aggressive approximations of the ROLL loss in the future.

Summary updated

BibTeX
@inproceedings{lee2019towards,
  author = {Guang-He Lee and David Alvarez-Melis and Tommi S. Jaakkola},
  title = {{Towards Robust, Locally Linear Deep Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=3qDjtJMVn5},
}
Figure