Perceptron Theory Can Predict the Accuracy of Neural Networks

Denis Kleyko, Antonello Rosato, Edward Paxon Frady, Massimo Panella, Friedrich T. Sommer

TL;DR

This paper introduces a statistical theory for the one-layer perceptron that can predict the accuracy of various neural network architectures, including deep convolutional networks. By analyzing the statistics of postsynaptic sums, this theory offers a way to understand and compare network performance without training additional estimator models, providing valuable insights into neural network behavior.

What Problem Does This Paper Address?

Neural networks, particularly deep ones, are often treated as "black boxes." While they achieve state-of-the-art performance in many tasks, understanding why they succeed or fail, and predicting their performance before extensive training, remains a significant challenge. Existing methods often rely on training separate "estimator" models, which can introduce their own complexities. This paper aims to bridge this gap by developing a theoretical framework to predict neural network accuracy based on fundamental statistical properties, offering a more interpretable and potentially more efficient approach.

Methods

The core of this paper is a statistical theory for the one-layer perceptron, generalized from earlier work on reservoir computing and vector symbolic architectures. The theory provides three levels of formulae for predicting classification accuracy, each with increasing detail and complexity:

  • Formula (1): A basic model assuming normal distributions for postsynaptic sums, identical distributions for distractor classes, and independence between classes.
  • Formula (2): Generalizes Formula (1) by dropping the assumption of identical distributions for distractor classes, allowing for class-specific means and standard deviations.
  • Formula (3): Further generalizes Formula (2) by dropping the independence assumption, allowing for correlations between postsynaptic sums using a multivariate normal distribution.

These formulae are analytically intractable but can be evaluated numerically. The paper also explores using Monte Carlo sampling for the more complex formulae. The theory leverages the first two moments (mean and standard deviation) of the postsynaptic sums at the output layer, and in some cases, the weights of the last layer.

Datasets

The paper evaluates its theory on several datasets:

  • Echo State Networks (ESNs): Tested on a trajectory association task.
  • Shallow Randomly Connected ANNs: Evaluated on a collection of 121 real-world classification datasets from the UCI Machine Learning Repository.
  • Deep Convolutional Neural Networks (CNNs): Tested on the ImageNet dataset, specifically using 15 pre-trained deep CNN architectures. The paper also creates sub-problems from ImageNet with varying numbers of classes to test the theory's robustness.

Key Insights and Ideas

  • Perceptron Theory as a Universal Predictor: The paper demonstrates that a theory originally developed for simple perceptrons can effectively predict the performance of complex, multi-layer neural networks, including deep CNNs, by focusing on their output layers.
  • The Power of Postsynaptic Sum Statistics: The theory highlights that the first two moments of the postsynaptic sums at the output layer are surprisingly powerful indicators of a network's classification accuracy, often outperforming metrics based solely on network weights.
  • Correlations Matter (and Introduce Bias): While simpler formulae (like Eq. 2) that assume independence between postsynaptic sums are easier to compute, they introduce a bias in predictions. The more complex formula (Eq. 3), which accounts for correlations, provides more accurate predictions but is computationally challenging.
  • Interpreting Network Behavior: The theory offers a way to understand why certain network architectures perform better than others, by analyzing the statistical properties of their output layers. This can be crucial for tasks like network selection or understanding generalization.
  • Readout Perceptron's Importance: The experiments suggest that even just analyzing the readout perceptron (the last layer's weights) can yield significant predictive power, though less accurate than considering activations.

Key Results

  • ESNs: The generalized perceptron theory (Eq. 3) accurately predicted the performance of ESNs, including those with regression-based readout perceptrons, which were not well-described by earlier theories.
  • Shallow Networks: The theory (Eq. 2) showed high correlation (up to 0.97) between predicted and actual cross-validation accuracies for shallow networks, with predictions based on test data statistics performing better.
  • Deep CNNs (ImageNet):
    • Using Eq. (2), Pearson correlation coefficients between predicted and actual accuracies reached 0.93.
  • Accounting for correlations with Eq. (3) significantly reduced prediction bias, leading to very high correlations (e.g., 0.98 with Monte Carlo sampling).
  • The theory's predictions for ranking network performances were competitive with, and often superior to, existing "zero-cost" metrics that rely solely on network weights.
  • Even using only the readout perceptron's weights (without hidden layer activations) yielded a Pearson correlation of 0.71, demonstrating the perceptron's inherent predictive capability.

Limitations and Future Work

  • Computational Complexity: The most accurate formulation (Eq. 3), which accounts for correlations, involves complex numerical integration that is challenging for a large number of classes. Monte Carlo methods offer a solution but still have computational costs.
  • Bias Mitigation: While Eq. (3) reduces bias, simpler formulae (like Eq. 2) introduce it. The paper suggests empirical bias compensation or using sub-problem analysis for mitigation, but a fully general, bias-free analytical solution for complex cases remains an area for improvement.
  • Future Directions:
    • Applying the theory to a wider range of network architectures beyond those tested.
  • Developing more efficient numerical evaluation methods for Eq. (3).
  • Using the theory to design more efficient training algorithms or to identify classes that require more training.
  • Extending the theory to estimate probabilities of specific postsynaptic sum vectors, which could help detect adversarial examples.
  • Investigating the theory's applicability to comparing networks without access to data or transformation stages, as a potential first-pass filtering mechanism.

Summary updated

Abstract

Multilayer neural networks set the current state of the art for many technical classification problems. But, these networks are still, essentially, black boxes in terms of analyzing them and predicting their performance. Here, we develop a statistical theory for the one-layer perceptron and show that it can predict performances of a surprisingly large variety of neural networks with different architectures. A general theory of classification with perceptrons is developed by generalizing an existing theory for analyzing reservoir computing models and connectionist models for symbolic reasoning known as vector symbolic architectures. Our statistical theory offers three formulas leveraging the signal statistics with increasing detail. The formulas are analytically intractable, but can be evaluated numerically. The description level that captures maximum details requires stochastic sampling methods. Depending on the network model, the simpler formulas already yield high prediction accuracy. The quality of the theory predictions is assessed in three experimental settings, a memorization task for echo state networks (ESNs) from reservoir computing literature, a collection of classification datasets for shallow randomly connected networks, and the ImageNet dataset for deep convolutional neural networks. We find that the second description level of the perceptron theory can predict the performance of types of ESNs, which could not be described previously. The theory can predict deep multilayer neural networks by being applied to their output layer. While other methods for prediction of neural networks performance commonly require to train an estimator model, the proposed theory requires only the first two moments of the distribution of the postsynaptic sums in the output neurons. The perceptron theory compares favorably to other methods that do not rely on training an estimator model.
BibTeX
@article{kleyko2024perceptron,
  author = {Denis Kleyko and Antonello Rosato and Edward Paxon Frady and Massimo Panella and Friedrich T. Sommer},
  title = {{Perceptron Theory Can Predict the Accuracy of Neural Networks}},
  journal = {IEEE TNNLS},
  year = {2024},
  doi = {10.1109/tnnls.2023.3237381},
}

Loading related content...

Figure