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.
Owner
yoichi hirose
yoichi hirose
Unoffical implementation about Image Super-Resolution via Iterative Refinement by Pytorch

Image Super-Resolution via Iterative Refinement Paper | Project Brief This is a unoffical implementation about Image Super-Resolution via Iterative Re

LiangWei Jiang 2.5k Jan 02, 2023
HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation Official PyTorch Implementation

: We present a novel, real-time, semantic segmentation network in which the encoder both encodes and generates the parameters (weights) of the decoder. Furthermore, to allow maximal adaptivity, the w

Yuval Nirkin 182 Dec 14, 2022
Rede Neural Convolucional feita durante o processo seletivo do Laboratório de Inteligência Artificial da FACOM (UFMS)

Primeira_Rede_Neural_Convolucional Rede Neural Convolucional feita durante o processo seletivo do Laboratório de Inteligência Artificial da FACOM (UFM

Roney_Felipe 1 Jan 13, 2022
Hyper-parameter optimization for sklearn

hyperopt-sklearn Hyperopt-sklearn is Hyperopt-based model selection among machine learning algorithms in scikit-learn. See how to use hyperopt-sklearn

1.4k Jan 01, 2023
This is an official implementation of CvT: Introducing Convolutions to Vision Transformers.

Introduction This is an official implementation of CvT: Introducing Convolutions to Vision Transformers. We present a new architecture, named Convolut

Bin Xiao 175 Jan 08, 2023
CLNTM - Contrastive Learning for Neural Topic Model

Contrastive Learning for Neural Topic Model This repository contains the impleme

Thong Thanh Nguyen 25 Nov 24, 2022
Avalanche RL: an End-to-End Library for Continual Reinforcement Learning

Avalanche RL: an End-to-End Library for Continual Reinforcement Learning Avalanche Website | Getting Started | Examples | Tutorial | API Doc | Paper |

ContinualAI 43 Dec 24, 2022
Face recognize system

FRS Face_recognize_system This project contains my work that target on solving some problems of FRS: Face detection: Retinaface Face anti-spoofing: Fo

Tran Anh Tuan 4 Nov 18, 2021
This repository contains the source code of an efficient 1D probabilistic model for music time analysis proposed in ICASSP2022 venue.

Jump Reward Inference for 1D Music Rhythmic State Spaces An implementation of the probablistic jump reward inference model for music rhythmic informat

Mojtaba Heydari 25 Dec 16, 2022
Hyperparameters tuning and features selection are two common steps in every machine learning pipeline.

shap-hypetune A python package for simultaneous Hyperparameters Tuning and Features Selection for Gradient Boosting Models. Overview Hyperparameters t

Marco Cerliani 422 Jan 08, 2023
MISSFormer: An Effective Medical Image Segmentation Transformer

MISSFormer Code for paper "MISSFormer: An Effective Medical Image Segmentation Transformer". Please read our preprint at the following link: paper_add

Fong 22 Dec 24, 2022
A supplementary code for Editable Neural Networks, an ICLR 2020 submission.

Editable neural networks A supplementary code for Editable Neural Networks, an ICLR 2020 submission by Anton Sinitsin, Vsevolod Plokhotnyuk, Dmitry Py

Anton Sinitsin 32 Nov 29, 2022
Implementation for the paper: Invertible Denoising Network: A Light Solution for Real Noise Removal (CVPR2021).

Invertible Image Denoising This is the PyTorch implementation of paper: Invertible Denoising Network: A Light Solution for Real Noise Removal (CVPR 20

157 Dec 25, 2022
Rotated Box Is Back : Accurate Box Proposal Network for Scene Text Detection

Rotated Box Is Back : Accurate Box Proposal Network for Scene Text Detection This material is supplementray code for paper accepted in ICDAR 2021 We h

NCSOFT 30 Dec 21, 2022
Library for fast text representation and classification.

fastText fastText is a library for efficient learning of word representations and sentence classification. Table of contents Resources Models Suppleme

Facebook Research 24.1k Jan 01, 2023
DenseNet Implementation in Keras with ImageNet Pretrained Models

DenseNet-Keras with ImageNet Pretrained Models This is an Keras implementation of DenseNet with ImageNet pretrained weights. The weights are converted

Felix Yu 568 Oct 31, 2022
A torch.Tensor-like DataFrame library supporting multiple execution runtimes and Arrow as a common memory format

TorchArrow (Warning: Unstable Prototype) This is a prototype library currently under heavy development. It does not currently have stable releases, an

Facebook Research 536 Jan 06, 2023
MVGCN: a novel multi-view graph convolutional network (MVGCN) framework for link prediction in biomedical bipartite networks.

MVGCN MVGCN: a novel multi-view graph convolutional network (MVGCN) framework for link prediction in biomedical bipartite networks. Developer: Fu Hait

13 Dec 01, 2022
A collection of Jupyter notebooks to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

StyleGAN3 CLIP-based guidance StyleGAN3 + CLIP StyleGAN3 + inversion + CLIP This repo is a collection of Jupyter notebooks made to easily play with St

Eugenio Herrera 176 Dec 30, 2022
MPI Interest Group on Algorithms on 1st semester 2021

MPI Algorithms Interest Group Introduction Lecturer: Steve Yan Location: TBA Time Schedule: TBA Semester: 1 Useful URLs Typora: https://typora.io Goog

Ex10si0n 13 Sep 08, 2022