Abstract
Convolutional neural networks have gained a remarkable success in computer vision. However, most usable network architectures are hand-crafted and usually require expertise and elaborate design. In this paper, we provide a block-wise network generation pipeline called BlockQNN which automatically builds high-performance networks using the Q-Learning paradigm with epsilon-greedy exploration strategy. The optimal network block is constructed by the learning agent which is trained sequentially to choose component layers. We stack the block to construct the whole auto-generated network. To accelerate the generation process, we also propose a distributed asynchronous framework and an early stop strategy. The block-wise generation brings unique advantages: (1) it performs competitive results in comparison to the hand-crafted state-of-the-art networks on image classification, additionally, the best network generated by BlockQNN achieves 3.54% top-1 error rate on CIFAR-10 which beats all existing auto-generate networks. (2) in the meanwhile, it offers tremendous reduction of the search space in designing networks which only spends 3 days with 32 GPUs, and (3) moreover, it has strong generalizability that the network built on CIFAR also performs well on a larger-scale ImageNet dataset.
Introduction
Designing state-of-the-art Convolutional Neural Networks (CNNs) has traditionally been an expert-driven process, often described as a "black art" due to the immense trial and error involved. While Neural Architecture Search (NAS) has emerged to automate this, early approaches were computationally prohibitive, requiring thousands of GPU hours. Furthermore, architectures optimized for small datasets often struggled to scale to larger ones like ImageNet.
BlockQNN addresses these challenges by shifting the focus from entire architectures to modular "blocks." By designing a high-performance block and stacking it repeatedly, the search space is drastically reduced, and the resulting models are more generalizable.
Methodology
The BlockQNN framework utilizes Reinforcement Learning, specifically Q-Learning, to evolve optimal network blocks.
Network Structure Code (NSC)
Each layer within a block is represented by a 5-D vector known as the Network Structure Code (NSC). This code includes parameters like layer type, kernel size, and predecessor indices. This representation allows the agent to construct complex Directed Acyclic Graphs (DAGs) with multi-branch connections and shortcuts, mirroring the complexity of advanced hand-crafted designs like Inception or ResNet.
Q-Learning and Reward Shaping
An agent explores the search space using an epsilon-greedy strategy, choosing actions to build a block. To handle the "temporal credit assignment" problem—where rewards are only available after full training—the authors introduced reward shaping. This includes penalties for excessive computational cost (FLOPs) and model complexity, ensuring the agent finds efficient yet powerful structures.
Distributed Framework and Early Stopping
To accelerate the search, a distributed asynchronous framework was implemented, utilizing Master, Controller, and Compute nodes. An "early stop" strategy, where candidate networks are trained for only 12 epochs, provides a fast proxy for final performance, allowing the search to complete in just 3 days on 32 GPUs.
Results and Discussion
The BlockQNN pipeline was evaluated on CIFAR-10, CIFAR-100, and ImageNet.
- State-of-the-Art Performance: The best-found model, Block-QNN-S, achieved a 3.54% top-1 error rate on CIFAR-10, surpassing previous auto-generated models and rivaling top hand-crafted architectures like DenseNet.
- Efficiency: BlockQNN achieved these results in a fraction of the time required by earlier NAS methods (3 days vs. 28 days), despite using significantly fewer GPUs (32 vs. 800).
- Transferability: Blocks discovered on CIFAR-100 transferred effectively to ImageNet, achieving a 22.6% Top-1 error rate. This demonstrates that modular blocks capture universal features that scale across different resolutions and task complexities.
Conclusion
BlockQNN demonstrates that modularity is key to efficient and effective neural architecture search. By focusing on block-wise generation, the framework achieves competitive performance while significantly lowering the computational barrier to entry. Future work will explore incorporating more advanced operations like depth-wise separable convolutions and extending the framework to tasks such as object detection and semantic segmentation.
Summary updated