Siamese-NAS: Using Trained Samples Efficiently to Find Lightweight Neural Architecture by Prior Knowledge

Yu-Ming Zhang, Jun-Wei Hsieh, Chun-Chieh Lee, Kuo-Chin FanOpenReview 2022

TL;DR

This paper introduces Siamese-NAS, a novel Neural Architecture Search (NAS) method that significantly improves efficiency by leveraging "Estimation Code" – a form of prior knowledge derived from early training losses. This approach, combined with a new lightweight search space called Tiny-NanoBench, allows for the discovery of high-performing, resource-efficient CNN architectures with substantially fewer training samples.

What Problem Does This Paper Address?

Designing effective Convolutional Neural Networks (CNNs) has historically been a labor-intensive process, relying heavily on human expertise and extensive trial-and-error. Neural Architecture Search (NAS) emerged to automate this, but many existing NAS methods, particularly predictor-based ones, still require a considerable number of trained architectures to achieve good performance. This is problematic because training each architecture to assess its true performance is computationally expensive. The paper aims to bridge this gap by developing a NAS method that can find excellent architectures using significantly fewer training samples, thereby reducing computational costs and time.

Methods

The core innovation is the Siamese-Predictor, a predictor-based NAS method that incorporates Estimation Code as prior knowledge.

  • Estimation Code: This is derived from the initial training losses of an architecture. The authors hypothesize and demonstrate a strong correlation between these early losses and the final accuracy of a model. This code acts as a cheap proxy for full training.
  • Siamese-Predictor: This predictor has two branches:
  • Basic Branch: Uses standard architectural features (adjacency and feature matrices) to make a coarse prediction of accuracy. This is computationally cheap.
  • Estimation Branch: Incorporates the "Estimation Code" alongside the architectural features for a more refined accuracy prediction. This branch is more computationally intensive due to the need to derive the Estimation Code.
  • Siamese-Ranking: To balance efficiency and accuracy, this strategy first uses the basic branch to rank a large portion of the search space and then employs the more accurate estimation branch to re-rank a smaller, top-performing subset.
  • Estimation Fusion Module (EFM): A novel cross-attention mechanism that fuses the architectural features with the upsampled Estimation Code.
  • Nodes Self-Attention Module (NSAM): Another component that uses self-attention with graph convolutions to enhance feature representation.
  • Batch Top Sampling (BTS): A training strategy for the predictor that iteratively refines the training pool by selecting promising architectures, aiming for better predictor performance with fewer samples.

Datasets

  • CIFAR-10: Used for training and evaluating architectures.
  • NASBench-201: A public, well-established cell-based search space used for evaluating the Siamese-Predictor.
  • Tiny-NanoBench: A newly proposed search space specifically designed for lightweight CNN architectures. It's built upon lightweight operations and trained on CIFAR-10.
  • Tiny-NASBench-201: A subset of NASBench-201 constrained to approximately 35 MFLOPs, used for comparison with Tiny-NanoBench.

Key Insights and Ideas

  • Early training losses are powerful predictors: The paper demonstrates that the first few training losses of an architecture are highly correlated with its final accuracy. This "Estimation Code" provides a cheap yet effective way to gain prior knowledge about model performance.
  • Two-stage prediction is efficient: By using a cheap "basic branch" for initial ranking and an expensive but more accurate "estimation branch" for fine-tuning, Siamese-NAS significantly reduces the overall computational cost compared to methods that require full training for every candidate.
  • Lightweight search spaces are crucial for lightweight models: The introduction of Tiny-NanoBench highlights the need for specialized search spaces that are tailored to finding efficient architectures, rather than just scaling down existing ones.
  • Prior knowledge is key to sample efficiency: The success of Siamese-NAS hinges on effectively incorporating prior knowledge (Estimation Code) to make better decisions with fewer training samples.

Key Results

  • SOTA performance on NASBench-201: Siamese-Predictor, especially when combined with NSAM and BTS, surpasses the state-of-the-art BRP-NAS on NASBench-201, achieving SOTA performance with significantly fewer training samples (e.g., 1.3% of the search space for 200 samples).
  • Efficient lightweight architecture search: On the proposed Tiny-NanoBench, Siamese-NAS can find high-accuracy, lightweight CNN architectures more easily and faster than on Tiny-NASBench-201.
  • Estimation Code correlation: Figure 1 and Figure 8 show a strong positive correlation between the Estimation Code and ground truth accuracy, outperforming other cost-free metrics like synflow in terms of correlation strength.
  • BTS reduces training time: Table 1 shows that Batch Top Sampling (BTS) significantly reduces the training time for the Siamese-Predictor compared to Fully Top Sampling (FTS), especially on larger search spaces like NASBench-201.

Limitations and Future Work

  • Computational cost of Estimation Code: While significantly reduced (0.3% of full training), deriving the Estimation Code still requires some training. The paper explores ways to minimize this cost through strategies like using a subset of the training data.
  • Search space design: The paper introduces Tiny-NanoBench, but acknowledges it might not be the absolute optimal lightweight search space. Future work could involve further refining or exploring other lightweight search spaces.
  • Generalizability of Estimation Code: While shown to be effective, the paper focuses on its application within NAS. Further research could explore its utility in other areas of model optimization or analysis.
  • Trade-off between N and K: The paper investigates the trade-off between the number of training samples (N) and the top-k selection (K) for the predictor. They suggest increasing N is generally more beneficial, but further exploration of optimal strategies for this trade-off could be valuable.

Summary updated

Abstract

In the past decade, many architectures of convolution neural networks were designed by handcraft, such as Vgg16, ResNet, DenseNet, etc. They all achieve state-of-the-art level on different tasks in their time. However, it still relies on human intuition and experience, and it also takes so much time consumption for trial and error. Neural Architecture Search (NAS) focused on this issue. In recent works, the Neural Predictor has significantly improved with few training architectures as training samples. However, the sampling efficiency is already considerable. In this paper, our proposed Siamese-Predictor is inspired by past works of predictor-based NAS. It is constructed with the proposed Estimation Code, which is the prior knowledge about the training procedure. The proposed Siamese-Predictor gets significant benefits from this idea. This idea causes it to surpass the current SOTA predictor on NASBench-201. In order to explore the impact of the Estimation Code, we analyze the relationship between it and accuracy. We also propose the search space Tiny-NanoBench for lightweight CNN architecture. This well-designed search space is easier to find better architecture with few FLOPs than NASBench-201. In summary, the proposed Siamese-Predictor is a predictor-based NAS. It achieves the SOTA level, especially with limited computation budgets. It applied to the proposed Tiny-NanoBench can just use a few trained samples to find extremely lightweight CNN architecture.
BibTeX
@misc{zhang2022siamese,
  author = {Yu-Ming Zhang and Jun-Wei Hsieh and Chun-Chieh Lee and Kuo-Chin Fan},
  title = {{Siamese-NAS: Using Trained Samples Efficiently to Find Lightweight Neural Architecture by Prior Knowledge}},
  year = {2022},
  eprint = {2210.00546},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.00546},
  howpublished = {OpenReview},
}
Figure