Designing Compact Neural Architectures via Neuron Gating and Mixed Activation
Organizations: Department of Management Sciences, IIT Kanpur, India
Abstract
Neural Architecture Search (NAS) is naturally formulated as a bilevel optimization problem, where the upper-level optimizes the architecture using validation performance and the lower-level trains network parameters using training loss. However, NAS is computationally expensive due to discrete architectural decisions, exponentially growing search spaces, and the high cost of training candidate architectures. This work develops a general bilevel optimization framework for NAS across diverse architectures, including MLPs, CNNs, RNNs, and Transformers, to identify compact architectures with strong predictive performance. We propose three scalable formulations that replace discrete neuron- and activation-level decisions with continuous relaxations, enabling differentiable optimization over otherwise combinatorial architecture spaces. These formulations give rise to three NAS methods: NAS based on Neuron Gating (NAS-NG), NAS based on Mixed Activation (NAS-MA), and NAS based on Neuron Gating and Mixed Activation (NAS-NGMA). Experiments on MLPs and CNNs using MNIST and CIFAR-10 show that the proposed methods consistently identify compact architectures with competitive or improved predictive performance. On MNIST, NAS-NGMA achieves 98.68% test accuracy with 7.69M MLP parameters, while NAS-NG achieves 99.63% accuracy with only 0.26M CNN parameters. On CIFAR-10, the proposed methods consistently outperform vanilla DARTS. Further experiments demonstrate that NAS-NG can optimize substantially over-parameterized and literature-optimal architectures, improving accuracy while reducing parameters. These results establish relaxed bilevel optimization as a scalable alternative to discrete NAS and provide a general framework for efficient neuron- and activation-level architecture optimization.
Figures & tables
| Notation | Description |
| Training and validation sets | |
| Input vector and true output label for the sample | |
| Index of the input layer | |
| Indices of the hidden layers | |
| Index of the output layer | |
| Number of neurons in the layer |
| 1–4 Hidden Layers {1024, 2048, 3072} Neurons/Layer | ||||||
| Search Method | Val Acc (%) | Time (hrs) | Params (M) | |||
| Mean | Std Dev | Mean | Std Dev | Mean | Std Dev | |
| NAS-NG | 97.59 | 0.04 | 0.45 | 0.14 | 1.90 | 1.33 |
| NAS-MA | 97.27 | 0.12 | 18.80 | 12.04 | 4.64 | 4.38 |
| NAS-NGMA | 96.20 | 0.31 | 18.81 | 11.89 | 3.54 | 3.56 |
| Search Method | Mean Test Acc. | Max Test Acc. | Mean Params | Param |
| (%) | (%) | (M) | Reduction (%) | |
| Baseline | 98.56 | 98.69 | 8.97 | — |
| NAS-NG | 98.53 | 98.60 | 1.90 | 78.8 |
| NAS-MA | 98.50 | 98.65 | 4.64 | 48.3 |
| NAS-NGMA | 98.55 | 98.68 | 3.54 | 60.5 |
| Search Method | 3 Layer Conv [64, 128, 256] | 4 Layer Conv [32, 64, 128, 256] | ||||
| Val Acc (%) | Time (hrs) | Params (M) | Val Acc (%) | Time (hrs) | Params (M) | |
| NAS-NG | 99.31 | 0.50 | 0.26 | 99.24 | 0.44 | 0.12 |
| NAS-MA | 99.22 | 5.46 | 0.45 | 99.24 | 4.64 | 0.24 |
| NAS-NGMA | 99.26 | 5.51 | 0.25 | 99.24 | 4.59 | 0.14 |
| Search Method | 3 Layer Conv [64, 128, 256] | 4 Layer Conv [32, 64, 128, 256] | ||
| Test Acc (%) | Params (%) | Test Acc (%) | Params (%) | |
| Baseline | 99.60 | - | 99.62 | - |
| NAS-NG | 99.63 | 73.5 | 99.50 | 74.7 |
| NAS-MA | 99.49 | 55.1 | 99.55 | 50.5 |
| NAS-NGMA | 99.61 | 75.4 | 99.56 | 72.3 |
| Search Method | Val Acc (%) | Time (hrs) | Params (M) | |||
| Mean | Std Dev | Mean | Std Dev | Mean | Std Dev | |
| NAS-NG | 77.59 | 0.31 | 0.56 | 0.02 | 0.49 | 0.04 |
| NAS-MA | 74.16 | 0.13 | 10.75 | 0.39 | 0.83 | 0.10 |
| NAS-NGMA | 74.88 | 0.24 | 10.19 | 0.08 | 0.41 | 0.03 |
| DARTS | 81.93 | 0.31 | 26.30 | 0.56 | 3.40 | 0.10 |
| Search Method | Test Acc (%) | Eval. Time (hrs) | Params (%) | ||
| Mean | Std Dev | Mean | Std Dev | ||
| Baseline | 86.14 | 0.22 | 1.48 | 0.05 | – |
| NAS-NG | 85.60 | 0.21 | 1.09 | 0.02 | 91.4 |
| NAS-MA | 84.55 | 0.31 | 4.61 | 0.22 | 85.4 |
| NAS-NGMA | 84.73 | 0.18 | 3.08 | 0.08 | 92.8 |
| DARTS | 82.03 | 0.50 | 20.20 | 0.47 | – |
| Method | Layers | Config. | Test Acc. | Params | Search |
| (%) | (M) | Time (hrs) | |||
| Baseline | 4 | [3072, 3072, 3072, 3072] | 98.69 | 30.76 | — |
| NAS-NG | 4 | [3072 4 ] Pruned | 98.60 | 4.29 | 0.76 |
| NAS-MA | 4 | [1024 4 ] Pruned | 98.65 | 1.75 | 16.16 |
| NAS-NGMA | 3 | [3072 3 ] Pruned | 98.68 | 7.69 | 35.80 |
| Method | Layers | Config. | Test Acc. | Params | Search |
| (%) | (M) | Time (hrs) | |||
| Baseline | 4 | [32, 64, 128, 256] | 99.62 | 0.49 | — |
| NAS-NG | 3 | [64, 128, 256] Pruned | 99.63 | 0.26 | 0.50 |
| NAS-MA | 4 | [32, 64, 128, 256] Pruned | 99.55 | 0.24 | 4.64 |
| NAS-NGMA | 3 | [64, 128, 256] Pruned | 99.61 | 0.25 | 5.51 |
| Method | Layers/Cells | Config. | Test Acc. | Params | Search |
| (%) | (M) | Time (hrs) | |||
| Baseline | 3 | [128, 256, 512] | 86.34 | 5.69 | — |
| NAS-NG | 3 | [128, 256, 512] Pruned | 85.77 | 0.51 | 0.53 |
| NAS-MA | 3 | [128, 256, 512] Pruned | 84.83 | 0.79 | 10.64 |
| NAS-NGMA | 3 | [128, 256, 512] Pruned | 84.85 | 0.38 | 10.15 |
| DARTS | 20 | Stacked Normal–Reduction Cells | 82.57 | 3.38 | 25.88 |
| Rank | MNIST | CIFAR-10 | ||||
| Method | Config. | Efficiency | Method | Config. | Efficiency | |
| 1 | NAS-NG | [32, 64, 128, 256] | 803.97 | NAS-NGMA | [128, 256, 512] | 225.65 |
| 2 | NAS-NG | [32, 64, 128, 256] | 803.89 | NAS-NGMA | [128, 256, 512] | 199.23 |
| 3 | NAS-NGMA | [32, 64, 128, 256] | 732.76 | NAS-NG | [128, 256, 512] | 195.28 |
| 4 | NAS-NGMA | [32, 64, 128, 256] | 732.32 | NAS-NGMA | [128, 256, 512] | 193.98 |
| 5 | NAS-MA | [32, 64, 128, 256] | 410.58 | NAS-NG | [128, 256, 512] | 166.88 |
| Model | Test Acc. (%) | Model | Test Acc. (%) |
| CNN [ 45 ] | 99.45 | LSTM [ 45 ] | 99.22 |
| LeNet-5 [ 23 ] | 99.05 | Consensus Clustering [ 46 ] | 95 |
| LR-based [ 24 ] | 93.83 | SVM [ 47 ] | 97.83 |
| Spiking-CNN [ 32 ] | 96.89 | Multi-Column DNN [ 38 ] | 99.77 |
| PCA/LDA [ 26 ] | 86.60 | EfficientDet-D4 [ 35 ] | 99.83 |
| CNN-SVM [ 34 ] | 99.30 | RMDL [ 36 ] | 99.82 |
| Model | Architecture | Baseline | NAS-NG | ||
| Test Acc. (%) | Params (M) | Test Acc. (%) | Params (M) | ||
| MLP | |||||
| [3072, 3072, 3072, 3072, 3072, 3072] | 98.68 | 49.64 | 98.65 | 4.80 | |
| [4096, 4096, 4096, 4096, 4096, 4096] | 98.64 | 87.16 | 98.67 | 7.38 | |
| [6144, 6144, 6144, 6144, 6144, 6144] | 98.64 | 193.66 | 98.73 | 12.97 | |
| CNN Backbone: [128, 256, 512, 512, 1024] | |||||
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Activation Function | Definition and Mathematical Formula |
| None (Inactive Neuron) | Produces a zero output for any input, effectively deactivating the neuron to enable soft pruning within the activation search framework |
| Identity | A linear activation that preserves the pre-activation value, allowing the network to retain linear transformations when nonlinearity is unnecessary |
| Rectified Linear Unit (ReLU) | Introduces nonlinearity without saturation for positive inputs, enabling effective gradient propagation in deep networks |
| Leaky Rectified Linear Unit (Leaky ReLU) | A ReLU variant that retains a small gradient for negative inputs to mitigate the dead-neuron problem |
| Hyperbolic Tangent | A smooth, zero-centered nonlinear activation mapping inputs to to enhance optimization stability in shallow and medium-depth networks |
| Sigmoid | A bounded, smooth activation mapping inputs to , widely used for probability estimation and gating mechanisms |
Neural Architecture Search
Neural Architecture Search automates neural network design for target tasks, resource budgets, and hardware constraints.
See all 132 papers