Robustness in sparse artificial neural networks trained with adaptive topology
Authors: Bendegúz Sulyok, Gergely Palla, Filippo Radicchi, Santo Fortunato
Organizations: Dept. of Biological Physics, Eötvös Loránd University, Budapest, Hungary · Semmelweis University, Faculty of Health and Public Administration, Health Services Management Training Centre, Budapest, Hungary · Center for Complex Networks and Systems Research Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington, USA
We investigate the robustness of sparse artificial neural networks trained with adaptive topology. We focus on a simple yet effective architecture consisting of three sparse layers with 99% sparsity followed by a dense layer, applied to image classification tasks such as MNIST and Fashion MNIST. By updating the topology of the sparse layers between each epoch, we achieve competitive accuracy despite the significantly reduced number of weights. Our primary contribution is a detailed analysis of the robustness of these networks, exploring their performance under various perturbations including random link removal, adversarial attack, and link weight shuffling. Through extensive experiments, we demonstrate that adaptive topology not only enhances efficiency but also maintains robustness. This work highlights the potential of adaptive sparse networks as a promising direction for developing efficient and reliable deep learning models.
Figures & tables
Figure 1: Illustration of the network architecture. The input layer (shown on the left) contains 28 x 28 pixels, followed by 3 sparsely connected neuron layers with 1000 neurons each. Blue coloured connections have a positive link weight, whereas red colour indicates a negative weight. The last layer, providing the readout is densely connected to the third sparse layer.
Figure 2: Duration of the topology update. We show the bar chart of the average duration in seconds for a single topology update over 4 training instances and 50 epochs. The results for the CH3L3 method are shown in light blue, whereas for the Random Link Regrowth method in purple, where the dataset is marked under the corresponding bars.
Figure 3: Accuracy during training. We show the accuracy ( fraction of correctly classified inputs, where the shaded area indicates the standard deviation) as a function of the number of epochs (on logarithmic scale). The results for the CH3L3 method are shown in blue, for the Random Link Regrowth method in red. Results are displayed for the following datasets: a) MNIST, b) FashionMNIST, c) KMNIST, and d) EMNIST Letters. Each setup was run 10 times with a different random seed and each training instance run for 1000 epochs with a topology update between consecutive epochs.
Figure 4: Robustness of trained sparse networks against link removal. Average accuracy over 32 networks as a function of the fraction of removed links (perturbation value) for systems trained according to the CHCL3 method (continous lines) and the RLR method (dashed lines) for a) the MNIST dataset, b) the Fashion MNIST dataset, c) the KMNIST dataset, and d) the EMNIST letters dataset. Results for Reverse Weight Order Pruning are shown in red, for Random Pruning in green and for Weight Order Pruning in gray.
Figure 5: Robustness of trained sparse networks against perturbing the weights by shuffling or adding noise. Accuracy as a function of the perturbation value for networks trained with the CH3L3 Link Regrowth method (continuous lines) and with the RLR method (dashed lines) for a) the MNIST dataset, b) the Fashion MNIST dataset, c) the KMNIST dataset, and d) the EMNIST letters dataset. Results for Weight Shuffling are shown in purple, for Weight Modification in light blue.
Figure 6: Weight magnitude distribution in the trained networks. We plot the distribution density for the absolute value of the connection weights at the end of the sparse training process, where results for networks trained according to the CH3L3 algorithm are shown in light blue and results for networks trained with RLR are shown in red. Panels depict the distributions observed for a) the MNIST dataset, b) the FashionMNIST dataset, c) the KMNIST dataset, and d) the EMNIST letters dataset.
Figure 7: The three stages of the topology update. In the first stage (a) a fraction of links (dotted red lines) is removed in each sparse layer. In the second optional stage (b) all links that are no longer connected to the input and/or output layer (dotted red lines) are also removed. In the final stage (c) new links (green) are drawn and initialized such that the total number of links in each layer will be unchanged after the procedure.
Deploying deep neural networks in real-world settings requires models that are both compact and robust to common corruptions. However, at deployment-relevant high sparsity, standard pruning pipelines often degrade corruption robustness, and existing sharpness-aware training/pruning approaches provide limited robustness gains. We address this issue by introducing Sparsity-Adaptive Sharpness-Aware Minimization (SA-SAM), which derives a sparsity-dependent SAM/ASAM perturbation radius by keeping the mean absolute perturbation (an ℓ1-based proxy) approximately invariant as sparsity increases. As a simple complementary option, we evaluate Magnitude-Weighted Hessian (MWH), derived from a second-order removal-path analysis, yielding an importance proportional to Diag(F)i∣wi∣, where Diag(F) is the diagonal empirical Fisher used as a curvature proxy in our implementation. Across CIFAR-10-C, CIFAR-100-C, and ImageNet-100-C, our approach achieved stronger corruption robustness than the considered pruning baselines at 80--90% sparsity, while preserving clean accuracy. We additionally quantify the robustness--throughput trade-off by reporting measured inference throughput under sparse execution at deployment-relevant sparsity levels.
Shiryu Ueno, Yoshikazu Hayashi, Kunihito Kato
Faculty of Engineering Gifu University Gifu, Japan
Spiking Neural Networks (SNNs) have recently received increasing attention in both computational neuroscience and artificial intelligence owing to their potential for energy-efficient computation and reduced memory requirements. Despite these advantages, improving adversarial robustness in SNNs (particularly for vision-based applications) remains an emerging and relatively underexplored research problem. Recent work has suggested that encouraging sparse gradients can act as a regularization mechanism to improve resistance against adversarial perturbations. In this study, we report an unexpected observation: under certain architectural configurations, SNNs inherently exhibit sparse gradients and can attain state-of-the-art adversarial defense performance without requiring any explicit regularization strategy. Further investigation reveals an inherent trade-off between robustness and generalization. Specifically, increased gradient sparsity enhances resistance to adversarial attacks but may reduce the model's generalization capability, whereas denser gradients tend to improve generalization while simultaneously increasing susceptibility to adversarial perturbations. These findings provide new perspectives on the role of gradient sparsity in the training dynamics of SNNs.
Nhan Trong Luu, Duong Trung Luu
College of Information and Communication Technology, Can Tho University, Vietnam · College of Engineering and Computer Science, VinUniversity, Hanoi, Vietnam · Center of Digital Transformation and Communication, Can Tho University, Vietnam
Deep neural networks (DNNs) deployed on resource-constrained neuromorphic hardware face three concurrent challenges: the need for model compression through pruning, vulnerability to adversarial input perturbations, and susceptibility to hardware-induced weight faults such as stuck-at-zero errors. While each of these factors has been studied in isolation, their combined effects on model reliability have received little attention. This paper presents an empirical investigation of how pruning, adversarial training, and hardware fault injection interact to affect the robustness of convolutional neural networks. Using a compact three-layer CNN trained on MNIST, we conduct three experiments: (1) comparing the fault tolerance of naturally and adversarially trained models under simultaneous hardware faults and adversarial attacks, (2) evaluating how pruning affects adversarial robustness, and (3) characterizing the joint accuracy surface across fault rates, adversarial perturbation magnitudes, and pruning levels. Our results show that adversarial training improves robustness against input perturbations but increases sensitivity to stuck-at-zero weight faults. Contrary to intuition, pruning did not significantly increase fault sensitivity, and varying the pruning level had little effect across fault rates and attack strengths. These results highlight the need to jointly consider adversarial robustness and hardware reliability.
Manali Dangarikar, Cory Merkel
Brain Lab Rochester Institute of Technology Rochester, NY, USA