arXiv:2608.14443cs.LGAug 2026

Manuscript Offprint

arXiv:2608.14443

Designing Compact Neural Architectures via Neuron Gating and Mixed Activation

Abhishek Shukla, Ankur Sinha, Faiz Hamid

Abstract

Neural Architecture Search (NAS) is naturally formulated as a bilevel optimization problem, where the upper-level task involves optimizing the neural architecture with respect to validation performance, while the lower-level task focuses on training the network parameters by minimizing the training loss. However, NAS, being a combinatorial optimization problem, is computationally expensive due to the discrete nature of architectural decisions, the exponential growth of the search space with network depth and width, and the high cost of training candidate architectures to optimality. This work aims to develop a fundamental method for NAS that is applicable across diverse neural network architectures—including MLPs, CNNs, RNNs, and Transformers—for identifying compact architectures with strong predictive performance. We propose three scalable and efficient bilevel optimization formulations for NAS. This replaces discrete neuron- and activation-level architectural decisions with continuous relaxations, enabling differentiable optimization over otherwise combinatorial architecture spaces. The resulting differentiable bilevel problems are efficiently solved using hypergradient-based methods, giving rise to the NAS methods termed 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). The proposed methods are evaluated on MLP and CNN architectures with varying depths and widths using the MNIST dataset. They are further assessed on the CIFAR-10 dataset against vanilla Differentiable Architecture Search (DARTS). Across these experiments, the proposed approaches consistently identify compact architectures while achieving competitive or improved predictive performance. In particular, on MNIST, NAS-NGMA achieves 98.68% test accuracy with 7.69M MLP parameters, while NAS-NG attains 99.63% test accuracy with only 0.26M CNN parameters. On CIFAR-10, the proposed methods consistently outperform the DARTS method. Additional experiments further show that NAS-NG scales effectively to substantially over-parameterized architectures and can further improve literature-optimal architectures through neuron-level optimization, yielding higher accuracy with significantly fewer parameters. These findings establish relaxed bilevel optimization as a practical and scalable alternative to discrete search for combinatorial NAS, one that replaces expensive architecture-level search with efficient, gradient-based optimization at the neuron and activation level. Because the formulations are agnostic to the underlying network type, they offer a general route to compact, high-performing architectures across MLPs, CNNs, and beyond, and point toward extending neuron-level optimization to further improve even well-established, hand-tuned architectures.

Keywords: Neural architecture search, Bilevel optimization, Neural network pruning, Gated activation.

1 Introduction

Artificial Neural Networks (ANNs) consist of layered, interconnected neurons whose trainable parameters (weights and biases) are optimized to minimize task-specific loss, whereas hyperparameters, such as network depth and width, activation functions, and optimization settings, are fixed prior to training. Among these, architectural parameters play a decisive role in determining a model’s expressive power and generalization ability. Increasing the number of layers enhances representational capacity, but excessive capacity can result in overfitting, where the models fit the training data perfectly but generalize poorly. Traditionally, neural architectures have been designed through expert intuition and extensive trial-and-error. In the absence of domain expertise, discovering an effective architecture can be highly challenging. Furthermore, even expert-driven design does not necessarily yield optimal architectures, especially as the complexity of modern deep neural networks continues to grow. Consequently, architectural design remains a fundamental challenge in deep learning.

Neural Architecture Search (NAS), a subfield of Automated Machine Learning (AutoML) [1] and Hyperparameter Optimization (HPO) [2], seeks to automate network design by systematically exploring large architecture search spaces. These efforts also connect to Automated Reinforcement Learning (AutoRL) [3], which applies AutoML principles to RL while addressing additional challenges unique to RL agents, whose success is often highly sensitive to training design choices. The primary objective of NAS is to identify an optimal architecture from a large and complex set of design choices tailored to a specific task and dataset. A comprehensive conceptual framework for NAS is presented in [4]. Although effective, NAS poses significant computational challenges due to the discrete nature of architectural decisions and the high cost of training many candidate architectures. This motivates optimization-based formulations that can exploit the structure in the search space. Formally, NAS, like many HPO tasks, can be naturally formulated as a Bilevel Optimization Problem (BOP) [5, 6]. In this formulation, the leader’s problem determines the architectural parameters, while the follower’s problem optimizes the corresponding network weights through standard training.

The hierarchical separation in NAS is not merely cosmetic: it prevents architectures from being evaluated using inadequately trained weights and ensures that the search trajectory is guided by generalization rather than overfitting. In this way, bilevel optimization provides a theoretically grounded framework for NAS that disentangles architecture evaluation from weight optimization. However, the NAS search space is typically high-dimensional and discrete, rendering the optimization process both computationally demanding and algorithmically challenging. A complementary perspective on architectural discovery comes from evolutionary approaches: Stanley and Miikkulainen [7] demonstrate that incrementally complexifying neural architectures through evolutionary search—rather than optimizing over a fixed structure—leads to significantly more sophisticated solutions, underscoring the importance of allowing the search process itself to evolve. Despite these complexities, NAS has demonstrated remarkable success in automating architectural design, substantially reducing human intervention and producing models that match or even outperform manually crafted architectures. When another Machine Learning (ML) model—such as RL [8]—is employed to explore the architecture space of a Neural Network (NN), the search often incurs extremely high computational costs (on the order of 2000 GPU days), primarily due to the combinatorial explosion of candidate architectures and the inherent difficulty of learning-based approaches in consistently navigating billions of possibilities to identify the best feasible (optimal) design, given the inevitable gap between predicted and optimal decisions. This limitation motivates the adoption of optimization-driven architecture search frameworks rather than relying solely on conventional ML-based or naive search strategies. In this direction, a prominent and efficient approach that avoids discrete optimization is Differentiable Architecture Search (DARTS) [9], which relaxes the architecture search space into a continuous domain, thereby enabling a tractable bilevel optimization formulation. In recent years, there has been a significant surge in the DARTS literature, leading to the development of numerous variants of the original algorithm [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]. Notably, Tuli et al. [20] propose a heterogeneous and flexible transformer search space, demonstrating that relaxing homogeneity assumptions in architecture design—combined with surrogate-based bilevel optimization—yields substantially more compact and higher-performing models than their homogeneous counterparts. We also aim to obtain a high-performing and compact neural network architecture by solving a continuous bilevel NAS problem using a hypergradient-based method [21], inspired by the DARTS framework. Beyond NAS, BOPs have also been employed for overfitting control in large language models, including transformer architectures, as demonstrated in [22].

Figure 1: Progressive construction of MLP architectures via neuron- and activation-level modifications.

This paper presents a fundamental method for NAS with the potential for broad applicability. In particular, we develop three relaxed bilevel formulations of the original combinatorial NAS problem, enabling a tractable exploration of the architecture search space. The proposed approach replaces discrete neuron- and activation-level decisions with continuous variables, resulting in differentiable bilevel programs that can be efficiently optimized. Multilayer Perceptron (MLP) and Convolutional Neural Network (CNN) architectures are employed as testbeds to systematically evaluate the effectiveness of the proposed formulations on standard benchmark datasets. Figure 1 illustrates the methodological progression from the original MLP architecture (a) to the proposed relaxed models (b, c, and d) based on Neuron Gating (NG), Mixed Activation (MA), and Neuron Gating and Mixed Activation (NGMA). Although the formulations are developed in the context of MLPs, the framework is general and extends naturally to CNNs and Recurrent Neural Networks (RNNs) through appropriate tensor generalizations. The effectiveness of the proposed approach is validated through a comprehensive comparative experimental evaluation of MLP and CNN architectures on the MNIST dataset and CNN architectures on the CIFAR-10 dataset. The main contributions of this work are summarized as follows:

  1. Relaxed bilevel formulation: We formulate NAS as relaxed bilevel optimization problem by replacing discrete neuron- and activation-level design choices with continuous variables, enabling differentiable and scalable optimization.
  2. Novel NAS algorithms: We propose three novel strategies for architecture search: NAS-NG, NAS-MA, and NAS-NGMA.
  3. Comprehensive experimental evaluation: We conduct a comprehensive experimental evaluation on MLP and CNN architectures for MNIST, and CNN architectures for CIFAR-10, demonstrating the effectiveness of the proposed formulations.
  4. Superior performance over DARTS method: We empirically show that the proposed approaches outperform vanilla DARTS on CIFAR-10.
  5. Compact and accurate architectures: We show that the proposed methods consistently identify compact architectures with competitive or improved predictive performance on MNIST dataset, achieving approximately 40–75% reduction in model parameters. Similar trends are observed on the CIFAR-10.
  6. Competitive MNIST results: We demonstrate that the best-performing models achieve 98.68% test accuracy with 7.69M parameters for MLPs (NAS-NGMA), and 99.63% test accuracy with only 0.26M parameters for CNNs (NAS-NG).
  7. Improving baseline and optimal architectures: We show that NAS-NG remains effective when initialized from substantially over-parameterized architectures and can further improve literature-optimal architectures (architecture fine-tuning), demonstrating that neuron-level optimization complements existing topology search methods.

The remainder of this paper is organized as follows. Section 2 reviews the relevant literature, and Section 3 presents the necessary preliminaries. Section 4 introduces the proposed framework. Section 5 presents a comprehensive empirical evaluation, including experiments on MLP and CNN architectures for the MNIST dataset, where the proposed relaxed bilevel optimization formulations are compared against baseline models. This section further analyzes optimization behavior, generalization performance, and model complexity, and highlights the key findings. In addition, the proposed NAS methods are evaluated on the CIFAR-10 dataset and compared with DARTS method. Finally, Section 6 concludes the paper by discussing the limitations, summarizing the main contributions, and outlining directions for future work.

References (37)