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

Biologically inspired protection of deep networks from adversarial attacks.

Aran Nayebi, Surya GanguliarXiv 2017

TL;DR

By mimicking the non-linear, switch-like saturation behavior of biological dendrites, this paper introduces a novel regularization scheme that trains deep neural networks to be intrinsically robust against adversarial attacks. Remarkably, these "saturating networks" achieve state-of-the-art defense performance on MNIST without ever being exposed to adversarial examples during training.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously fragile. Tiny, human-imperceptible perturbations to an input image—known as adversarial attacks—can completely flip a model's prediction. This vulnerability poses severe security risks and highlights a fundamental divergence between machine learning models and the human visual system: deep networks now serve as foundational models in neuroscience, yet they lack the intrinsic robustness of the biological brains they attempt to emulate.

A leading explanation for adversarial vulnerability is that standard DNNs operate heavily in a high-dimensional linear regime. When a network linearly sums up thousands of inputs with small weights, an attacker can subtly nudge each input dimension to collectively alter the final sum dramatically.

In contrast, biological neurons utilize complex, branched dendritic structures filled with active ionic conductances. These conductances act as high-threshold, non-linear switches, forcing parts of the neuron to operate in a highly saturated state (either far below or far above threshold). This biophysical mechanism prevents small input perturbations from easily propagating through the system. The authors set out to bring this non-linear saturation property into artificial neural networks to build intrinsic adversarial immunity.

Methods

Rather than simulating complex biophysical equations directly, the authors introduce a computationally cheap regularization penalty that explicitly forces artificial neurons into a saturating regime (where the derivative of the activation function approaches zero).

The proposed penalty minimizes the distance of any individual activation to its nearest saturation region: $$\lambda \sum_{l=1}^D \sum_{i=1}^{N_l} \phi_c(h_i^l)$$

  • For a Sigmoid neuron, the penalty minimizes the derivative magnitude $|\sigma'(z)|$, pushing activations toward extreme positive or negative values.
  • For a ReLU neuron, the penalty minimizes positive activations ($\max\{0, z\}$), pushing them toward the flat, zero-activation region.

Crucially, the authors found that annealing $\lambda$ (gradually increasing it from 0 to a maximum value during training) is essential. This allows the network to first learn the classification task before being forced into a highly non-linear, saturated operating regime.

Datasets

The method was evaluated on the standard 10-class MNIST dataset. The authors tested three architectures:

  1. A 3-layer Sigmoid Multilayer Perceptron (MLP)
  2. A 3-layer ReLU MLP
  3. A Convolutional Neural Network (CNN)

Key Insights and Ideas

  • The Power of Weight Kurtosis: Forcing networks to saturate naturally leads to highly kurtotic (heavy-tailed, sharp-peaked) weight distributions—a feature prominently shared by biological brains. The authors mathematically prove that high weight kurtosis inherently protects even simple linear classifiers by shrinking the effective space an adversary can exploit.
Figure 1. Comparing the vanilla and saturating network’s weights for the Sigmoid MLP (A) and ReLU MLP (B) in each layer. The excess kurtosis (γ2) of each weight distribution is given as well.
  • Wider Internal Class Separation: Using Representational Dissimilarity Matrices (RDMs), the authors discovered that saturating networks progressively push internal representations of different classes much further apart in deeper layers. This makes it significantly harder for small input perturbations to push an image across a decision boundary.
  • Flat Information Geometry: Using tools from information geometry, the authors showed that saturating networks create a locally flat input-output map. An adversary can move large distances in pixel space without changing the output probability. Furthermore, at decision boundaries, only one singular value of the Jacobian inflates (compared to multiple in vanilla networks), meaning the network suppresses sensitivity in all directions orthogonal to the true transition.
Figure 4. Comparison between the vanilla (top 3 rows) and sat- urating Sigmoid MLP’s (bottom 3 rows) length element, soft- max output probabilities, and Jacobian singular values as a func- tion of the interpolation parameter between source and target. The columns denote a particular source and target class pair: (S : 1, T : 7), (S : 3, T : 7), (S : 6, T : 9), (S : 0, T : 6). A similar trend occurs for the ReLU MLP (data not shown).

Key Results

  • Defeating the Fast Gradient Sign Method (FGSM): On MNIST, vanilla networks drop to nearly 0% accuracy under FGSM attacks. Standard adversarial training (training directly on adversarial images) recovers this to ~81–91%. The proposed Saturating Networks achieved 94.43% (Sigmoid MLP), 94.59% (ReLU MLP), and 98.45% (CNN) accuracy on adversarial examples, while preserving high clean test accuracy (~95–99%).
  • Resistance to Iterative & Second-Order Attacks: The authors subjected the models to powerful iterative first-order (Adam) and second-order (L-BFGS) targeted attacks. While vanilla networks were fooled in less than 10 iterations, the saturating networks successfully resisted misclassification in the vast majority of cases, even when the optimization was run for up to 30 million iterations.

Limitations and Future Work

  • Scalability to Complex Datasets: The evaluation was strictly limited to the MNIST dataset. While the method proved highly effective on a small CNN, scaling this saturating penalty to massive datasets like ImageNet or much deeper architectures (e.g., deep ResNets) remains an open challenge.
  • Hyperparameter Sensitivity: Training saturating networks requires a carefully tuned annealing schedule for $\lambda$. If $\lambda$ is increased too quickly, the network saturates prematurely and fails to learn the underlying task, resulting in a severe drop in clean test accuracy.

Summary updated

BibTeX
@misc{nayebi2017biologically,
  author = {Aran Nayebi and Surya Ganguli},
  title = {{Biologically inspired protection of deep networks from adversarial attacks.}},
  year = {2017},
  eprint = {1703.09202},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1703.09202},
}
Figure