NAS-HPO-Bench-II is the first benchmark dataset for joint optimization of CNN and training HPs.

Overview

NAS-HPO-Bench-II API

Overview

NAS-HPO-Bench-II is the first benchmark dataset for joint optimization of CNN and training HPs.

It helps

  • a fair and low-cost evaluation/comparison of joint optimization (NAS+HPO) methods
  • a detailed analysis of the relationship between architecture/training HPs and performances

Our experimental analysis supports the importance of joint optimization. Please see our paper for details.

This repo provides API for NAS-HPO-Bench-II to make benchmarking easy. You can query our data when evaluating models in the search process of AutoML methods instead of training the models at a high cost.

If you use the dataset, please cite:

@InProceedings{hirose2021bench,
  title={{NAS-HPO-Bench-II}: A Benchmark Dataset on Joint Optimization of Convolutional Neural Network Architecture and Training Hyperparameters},
  author={Hirose, Yoichi and Yoshinari, Nozomu and Shirakawa,  Shinichi},
  booktitle={Proceedings of the 13th Asian Conference on Machine Learning},
  year={2021}
}

The code for training models is here.

Dataset Overview

The total size of the search space is 192K. The dataset includes

  • the exact data of all the models in the search space for 12 epoch training
  • the surrogate data predicting accuracies after 200 epoch training

Architecture Search Space

The overall CNN architecture is constructed by stacking cells represented as a directed acyclic graph (DAG). Each edge in the graph indicates one of the four operations.

  • 3x3 convolution (ReLU activation, 3x3 convolution with stride 1, then batch normalization)
  • 3x3 average pooling with stride 1
  • Skip, which outputs the input tensor
  • Zero, which outputs the zero tensor with the same dimension as the input

It is based on NAS-Bench-201 and the only difference is that we exclude the 1x1 convolution operation from the options.

Training HP Search Space

The combination of eight initial learning rates and six batch sizes are used.

Hyperparameter Options
Batch Size 16, 32, 64, 128, 256, 512
Learning Rate 0.003125, 0.00625, 0.0125, 0.025, 0.05, 0.1, 0.2, 0.4

Installation

Run

pip install nashpobench2api

, and download the API dataset from Google Drive (93.7MB), then put the data in some directory (default: ./data). This API supports python >= 3.6 (and no external library dependencies).

If you want to run the codes in bench_algos, run pip install -r requirements.txt.

Getting Started

Create an API instance to get access to the dataset.

from nashpobench2api import NASHPOBench2API as API
api = API('/path/to/dataset')

You can get 12-epoch valid accuracy (%) and train+valid training cost (sec.) of the specified configuration.

acc, cost = api.query_by_key(
	cellcode='0|10|210',
	batch_size=256,
	lr=0.1 )

Here, cellcode represents one of the architectures in the search space. As shown in the figure below, the numbers in the cellcode mean the type of operations, and the position of the numbers shows the edge '(A) | (B)(C) | (D)(E)(F)'.

In the querying process, the api instance remembers and shows the log (what you have queried). You can reduce the log if set verbose=False when initializing api.

When the querying process has finished, you can get the test accuracy of the configuration with the best valid accuracy in the queried configurations.

results = api.get_results()

results is a dictionary with the keys below.

Key Explanation
acc_trans a transition of valid accuracies api have queried
key_trans a transition of keys (=cellcode, lr, batch_size) api have queried
best_acc_trans a transition of the best valid accuracies (%) api have queried
best_key_trans a transition of the best keys (=cellcode, lr, batch_size) api have queried
total_cost_trans a transition of train+valid costs (sec.)
final_accs 12-epoch and 200-epoch test accuracies (%) of the key with the best valid accuracy api have queried

You can reset what api have remebered, which is useful when multiple runs.

api.reset_log_data()

The examples of benchmarking codes are in the bench_algos directory. Especially, random_search.py is the simplest code and easy to understand (the core part is random_search()).

Work in Progress

  • Upload the dataset as DataFrame for visualization/analysis.
  • Upload codes for a surrogate model.
  • Upload the trained models.
You might also like...
Benchmark for Answering Existential First Order Queries with Single Free Variable
Benchmark for Answering Existential First Order Queries with Single Free Variable

EFO-1-QA Benchmark for First Order Query Estimation on Knowledge Graphs This repository contains an entire pipeline for the EFO-1-QA benchmark. EFO-1

FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization
FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization

FuseDream This repo contains code for our paper (paper link): FuseDream: Training-Free Text-to-Image Generation with Improved CLIP+GAN Space Optimizat

A framework for joint super-resolution and image synthesis, without requiring real training data
A framework for joint super-resolution and image synthesis, without requiring real training data

SynthSR This repository contains code to train a Convolutional Neural Network (CNN) for Super-resolution (SR), or joint SR and data synthesis. The met

This is the official repo for TransFill:  Reference-guided Image Inpainting by Merging Multiple Color and Spatial Transformations at CVPR'21. According to some product reasons, we are not planning to release the training/testing codes and models. However, we will release the dataset and the scripts to prepare the dataset.
This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization

NLopt is a library for nonlinear local and global optimization, for functions with and without gradient information. It is designed as a simple, unifi

[CVPR 2021] 'Searching by Generating: Flexible and Efficient One-Shot NAS with Architecture Generator'
[CVPR 2021] 'Searching by Generating: Flexible and Efficient One-Shot NAS with Architecture Generator'

[CVPR2021] Searching by Generating: Flexible and Efficient One-Shot NAS with Architecture Generator Overview This is the entire codebase for the paper

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

Owner
yoichi hirose
yoichi hirose
"NAS-Bench-301 and the Case for Surrogate Benchmarks for Neural Architecture Search".

NAS-Bench-301 This repository containts code for the paper: "NAS-Bench-301 and the Case for Surrogate Benchmarks for Neural Architecture Search". The

AutoML-Freiburg-Hannover 57 Nov 30, 2022
Human POSEitioning System (HPS): 3D Human Pose Estimation and Self-localization in Large Scenes from Body-Mounted Sensors, CVPR 2021

Human POSEitioning System (HPS): 3D Human Pose Estimation and Self-localization in Large Scenes from Body-Mounted Sensors Human POSEitioning System (H

Aymen Mir 66 Dec 21, 2022
Tgbox-bench - Simple TGBOX upload speed benchmark

TGBOX Benchmark This script will benchmark upload speed to TGBOX storage. Build

Non 1 Jan 9, 2022
NAS Benchmark in "Prioritized Architecture Sampling with Monto-Carlo Tree Search", CVPR2021

NAS-Bench-Macro This repository includes the benchmark and code for NAS-Bench-Macro in paper "Prioritized Architecture Sampling with Monto-Carlo Tree

null 35 Jan 3, 2023
NFT-Price-Prediction-CNN - Using visual feature extraction, prices of NFTs are predicted via CNN (Alexnet and Resnet) architectures.

NFT-Price-Prediction-CNN - Using visual feature extraction, prices of NFTs are predicted via CNN (Alexnet and Resnet) architectures.

null 5 Nov 3, 2022
LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation (NeurIPS2021 Benchmark and Dataset Track)

LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation by Junjue Wang, Zhuo Zheng, Ailong Ma, Xiaoyan Lu, and Yanfei Zh

Kingdrone 174 Dec 22, 2022
Ultra-Data-Efficient GAN Training: Drawing A Lottery Ticket First, Then Training It Toughly

Ultra-Data-Efficient GAN Training: Drawing A Lottery Ticket First, Then Training It Toughly Code for this paper Ultra-Data-Efficient GAN Tra

VITA 77 Oct 5, 2022
A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.

TorchRL Disclaimer This library is not officially released yet and is subject to change. The features are available before an official release so that

Meta Research 860 Jan 7, 2023
Ultra-lightweight human body posture key point CNN model. ModelSize:2.3MB HUAWEI P40 NCNN benchmark: 6ms/img,

Ultralight-SimplePose Support NCNN mobile terminal deployment Based on MXNET(>=1.5.1) GLUON(>=0.7.0) framework Top-down strategy: The input image is t

null 223 Dec 27, 2022