TL;DR
Most Neural Architecture Search (NAS) methods focus on finding the best model within a fixed, human-defined search space. This paper introduces S3 (Searching the Search Space), a framework that automatically evolves and refines the search space itself before picking the final Vision Transformer (ViT) architecture, leading to models that outperform Swin and DeiT across multiple vision tasks.
The Dilemma of Search Space Design
In the world of deep learning, the "Search Space" is the set of all possible architectures a NAS algorithm can choose from. Think of it as the "menu" from which the algorithm orders. However, if the menu is poorly designed—perhaps it lacks deep enough networks or has the wrong ratio of parameters—even the best search algorithm will produce a mediocre model.
Currently, designing these search spaces requires significant human expertise and trial-and-error. For Vision Transformers (ViTs), which are more complex than traditional CNNs, this manual design is a major bottleneck. The authors ask a fundamental question: Can we automate the design of the search space itself?
Methodology: Evolving the Space
To automate this process, the authors propose a three-step pipeline to "Search the Search Space":
- Space Quality Evaluation: They introduce a new metric called E-T Error. It combines the Expected Error (the average performance of randomly sampled models in the space) and the Top-tier Error (the average performance of the best 50 models). This ensures the space is good on average and has a high performance ceiling.
- Once-for-all Supernet: To calculate these errors efficiently without training thousands of models from scratch, they use a weight-sharing "supernet" (based on the AutoFormer approach). This allows them to estimate the performance of any sub-network in the space almost instantly.
- Space Evolution: They decompose the search space into dimensions (depth, embedding dimension, MLP ratio, window size, etc.). By modeling the "tendency" of these dimensions using linear parameterization, they gradually evolve the space. For example, the system might shift the range of allowed blocks in a specific stage if the data suggests more blocks lead to a lower E-T Error.
Key Insights and Automated Design Rules
The automated search process revealed several "design guidelines" that might be counter-intuitive to manual designers.
- The "Stage 3" Rule: Just like in many successful CNNs (e.g., ResNet), the third stage of a ViT is the most critical. The search consistently increased the number of blocks in Stage 3 while decreasing them in Stages 1, 2, and 4.
- Dynamic Window Sizes: The search found that shallow layers prefer smaller window sizes (local focus), while deeper layers benefit from larger window sizes (global context).
- Progressive MLP Ratios: Instead of a constant MLP expansion ratio (usually 4x), the best models progressively increase the MLP ratio as the network gets deeper.
- Q-K-V Compression: Interestingly, the Query-Key-Value (Q-K-V) dimension can be smaller than the embedding dimension without a performance drop, especially in deeper layers where many attention heads may be redundant.
Performance and Results
The models were primarily evolved and trained on ImageNet-1K for image classification, but were also evaluated on COCO, ADE20K, and VQA v2.0 to demonstrate generality. The resulting models, dubbed S3, set new benchmarks for efficiency and accuracy:
- ImageNet Classification: S3-T (Tiny) achieved 82.1% top-1 accuracy, outperforming Swin-T (81.3%) and DeiT-S (79.9%) with similar computational costs.
- Parameter Efficiency: S3-B (Base) achieved 84.0% accuracy on ImageNet using only 71M parameters, compared to Swin-B which requires 88M parameters for a lower 83.3% accuracy.
- Object Detection: On COCO, S3-T outperformed ResNet-50 by +4.2 box AP and DeiT-S by +2.5 box AP.
- Generality: The S3 models showed superior performance in VQA tasks, proving that a search space optimized for classification transfers well to complex vision-language reasoning.
Limitations and Future Work
While S3 significantly reduces human bias in search space design, the authors note a few areas for growth:
- Initial Priors: The process still starts with a "minimal prior" initialization. While much broader than standard NAS, it isn't truly starting from "zero."
- Compute Costs: Although the once-for-all supernet is efficient, the initial training of that supernet still requires significant GPU resources (e.g., 16 Nvidia V100 GPUs).
- CNN Application: The authors suggest that while this paper focuses on Transformers, the S3 methodology could be tested on CNN search spaces in the future to see if similar design principles emerge.
Summary updated