DeepNNK: Explaining deep models and their generalization using polytope interpolation

Sarath Shekkizhar, Antonio OrtegaarXiv 2020

Abstract

Modern machine learning systems based on neural networks have shown great success in learning complex data patterns while being able to make good predictions on unseen data points. However, the limited interpretability of these systems hinders further progress and application to several domains in the real world. This predicament is exemplified by time consuming model selection and the difficulties faced in predictive explainability, especially in the presence of adversarial examples. In this paper, we take a step towards better understanding of neural networks by introducing a local polytope interpolation method. The proposed Deep Non Negative Kernel regression (NNK) interpolation framework is non-parametric, theoretically simple and geometrically intuitive. We demonstrate instance-based explainability for deep learning models and develop a method to identify models with good generalization properties using leave-one-out estimation. Finally, we draw a rationalization to adversarial and generative examples which are inevitable from an interpolation view of machine learning.

1. Introduction

Despite the massive success of deep neural networks (DNNs), they remain largely "black boxes," making them difficult to trust in sensitive domains like medicine or defense. Understanding why a model generalizes well—or why it fails against adversarial attacks—is a persistent challenge. Existing attempts to use interpolation to explain DNNs often rely on simplicial interpolation, which is computationally impractical in high-dimensional spaces. Simpler methods like $k$-Nearest Neighbors (KNN) are often biased by data density and lack strong geometric guarantees. DeepNNK aims to bridge this gap with a practical, realizable interpolation framework based on local polytopes.

2. Methodology: Deep Non-Negative Kernel Regression

The core innovation is the Deep Non-Negative Kernel (NNK) regression framework. The authors treat the layers of a DNN as a non-linear mapping ($h_w$) that transforms input data into a feature space. In this transformed space, NNK solves a quadratic optimization problem to select a sparse set of neighbors that "reconstruct" a query point.

Geometric intuition of NNK local polytope interpolation (b, c) compared to traditional simplicial methods (a).

Geometrically, these neighbors form a convex polytope around the query. Unlike a simplex, which is constrained to a fixed number of points ($d+1$), NNK automatically selects a variable number of neighbors based on the local data topology. This makes it significantly more efficient in high dimensions. For evaluation, the final classification layer is replaced by the NNK interpolator, allowing the model to explain a prediction as a weighted combination of specific training instances. The authors also introduce Leave-One-Out (LOO) stability to measure how much a single training point affects the model's output, characterizing the smoothness of the classification surface.

3. Experimental Evaluation

The paper evaluates the approach using the CIFAR-10 dataset across three distinct model variants: Regularized (standard training), Underparameterized (reduced depth), and Overfit (trained to force zero training error).

Average classifier error across training epochs for different model regimes. NNK shows stability and performance parity with standard classifiers like SVM.

Key Results and Insights

  • Robustness to $k$: In standard weighted KNN, performance often degrades as the number of neighbors ($k$) increases. DeepNNK remains stable or improves as $k$ grows because the optimization process filters out irrelevant or redundant neighbors.
  • Performance Parity: DeepNNK performs on par with standard SVM or Softmax classifiers, proving that an interpolative framework does not require sacrificing accuracy.
  • Stability and Generalization: The authors demonstrate that models with good generalization properties have smoother interpolation surfaces. The gap between the DNN model's error and the DeepNNK LOO error serves as a reliable indicator of whether a model is underfitting or overfitting.
  • Adversarial Vulnerability: Adversarial and generative images tend to fall into "unstable" regions of the interpolation space, surrounded by significantly fewer NNK neighbors than real images. This suggests they exist in sparse, poorly-mapped areas of the feature manifold.

4. Conclusion

DeepNNK provides a geometrically intuitive framework for explaining individual predictions and quantifying a model's generalization ability. By identifying influential training examples and utilizing LOO stability, it offers a robust tool for model selection and interpretability. Future work includes applying these stability measures to detect dataset shifts and exploring applications in domain adaptation and transfer learning.

Summary updated

Abstract

Modern machine learning systems based on neural networks have shown great success in learning complex data patterns while being able to make good predictions on unseen data points. However, the limited interpretability of these systems hinders further progress and application to several domains in the real world. This predicament is exemplified by time consuming model selection and the difficulties faced in predictive explainability, especially in the presence of adversarial examples. In this paper, we take a step towards better understanding of neural networks by introducing a local polytope interpolation method. The proposed Deep Non Negative Kernel regression (NNK) interpolation framework is non parametric, theoretically simple and geometrically intuitive. We demonstrate instance based explainability for deep learning models and develop a method to identify models with good generalization properties using leave one out estimation. Finally, we draw a rationalization to adversarial and generative examples which are inevitable from an interpolation view of machine learning.
BibTeX
@misc{shekkizhar2020deepnnk,
  author = {Sarath Shekkizhar and Antonio Ortega},
  title = {{DeepNNK: Explaining deep models and their generalization using polytope interpolation}},
  year = {2020},
  eprint = {2007.10505},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.10505},
}
Figure