NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Analytic Expressions for Probabilistic Moments of PL-DNN With Gaussian Input

Adel Bibi, Modar Alfadly, Bernard Ghanem

Abstract

Deep Neural Networks (DNNs) are highly sensitive to input perturbations, yet analyzing this sensitivity typically requires computationally expensive Monte Carlo simulations. This paper derives exact analytic expressions for the mean and variance of a Piecewise Linear (PL) network's output when subjected to Gaussian noise. By utilizing a two-stage linearization approach, these formulas scale to deep architectures like AlexNet, enabling precise prediction of fooling rates and the systematic construction of adversarial attacks without the need for extensive sampling.

Introduction: The Black Box of Robustness

DNNs are notoriously vulnerable to adversarial perturbations—small, targeted changes to input data that trigger misclassification. Understanding this vulnerability usually involves empirical testing: researchers add random noise to an image thousands of times and observe the statistical distribution of the output. While effective, this "Monte Carlo" approach is slow and provides limited theoretical insight. This research addresses the gap by asking whether the output distribution can be calculated mathematically if the input noise distribution is known.

Methodology: Two-Stage Linearization

The researchers focus on Piecewise Linear (PL) networks, which primarily use ReLU activations. The derivation proceeds in two main steps:

  1. Shallow Network Derivation: The authors first derive exact expressions for a basic unit: an Affine layer followed by a ReLU and another Affine layer. They use the Gaussian error function (erf) for the mean and extend Price’s Theorem—a classical signal processing result—to calculate the variance of the non-smooth ReLU outputs.
  2. Scaling to Deep Networks: To handle multi-layer architectures, they propose a "two-stage linearization." By selecting a specific layer and linearizing the preceding and succeeding layers via Taylor series expansion, they effectively reduce a deep network into the solvable shallow form.
Figure 1: Overview of the two-stage linearization process used to derive analytic moments for deep networks.

Experimental Validation

The mathematical proofs were validated across synthetic networks (2 to 4 layers), LeNet on MNIST, and AlexNet on ImageNet. A primary metric for success was the "tightness" of the analytic moments compared to the empirical ground truth provided by Monte Carlo simulations.

Figure 3: Comparison of Analytic vs. Monte Carlo moments across different layer types. The slopes near 1.0 indicate high accuracy in the derived formulas.

As shown in Figure 3, the analytic mean aligns almost perfectly with the Monte Carlo mean (slope $\approx 1.0$). While the variance estimates are slightly less tight in deeper layers due to linearization approximations, they remain highly predictive of the network's behavior. On ImageNet, the analytic expressions correctly predicted the top-1 class ranking with 98.3% accuracy, proving that the linearization preserves the network's decision-making logic.

Key Insights and Applications

  • Predictive Power: The formulas accurately predict "fooling rates." For AlexNet, the analytic formula predicted a 38.62% fooling rate under universal perturbations, while empirical testing yielded 38.70%.
  • Sensitivity Mapping: By applying these formulas across an image, the authors generated spatial sensitivity maps that highlight which pixels most significantly influence misclassification.
  • Systematic Adversarial Attacks: Rather than guessing noise patterns, the authors used their mean and variance expressions as objective functions to optimize and calculate the most effective noise for causing specific misclassifications. This allowed for "sparse attacks" where corrupting only 2% of pixels could change a prediction.

Conclusion and Future Directions

While the two-stage linearization introduces some local approximation errors in very deep networks, the method offers a significant leap in computational efficiency and theoretical clarity. Future work suggests using these differentiable expressions as regularizers during training. Instead of merely optimizing for accuracy, models could be mathematically penalized for high output variance under noise, potentially leading to architectures with "built-in" robustness against adversarial threats.

Summary updated

BibTeX
@inproceedings{bibi2018analytic,
  author = {Adel Bibi and Modar Alfadly and Bernard Ghanem},
  title = {{Analytic Expressions for Probabilistic Moments of PL-DNN With Gaussian Input}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00948},
}
Figure