Git Product home page Git Product logo

lomonas's Introduction

LOMONAS: Local-search algorithm for Multi-Objective Neural Architecture Search

MIT licensed

Quan Minh Phan, Ngoc Hoang Luong.

In GECCO 2023.

Setup

  • Clone repo.
  • Install necessary packages.
$ pip install -r requirements.txt
  • Download databases in this link, unzip and put all folders into data folder for building APIs (benchmarks).

In our experiments, we do not implement directly the API benchmarks published in their repos (e.g., NAS-Bench-101, NAS-Bench-201, etc). Instead, we create smaller-size databases by accessing their databases and only logging necessary content.

You can compare our databases and the original databases in check_log_database.ipynb

Reproducing the results

You can reproduce our results by running the below script:

$ python main.py --optimizer [MOEA_NSGAII, MOEA_MOEAD, RR_LS, LOMONAS] --problem [NAS101, MacroNAS-C10, MacroNAS-C100, NAS201-C10, NAS201-C100, NAS201-IN16, NAS-ASR]

Search with different hyperparameters

Moreover, you can search with different hyperparameter settings

For environment

  • n_run: the number times of running algorithms (default: 31)
  • max_eval: the maximum number of evaluation each run (default: 3000)
  • init_seed: the initial random seed (default: 0)
  • api_benchmark_path: the path that contains the api databases (default: ./data)
  • res_path: the path for logging results (default: ./exp_res)
  • debug: print the search performance at each generation if debug is True (default: False)

For evolution-based MONAS (NSGA-II & MOEA/D)

  • pop_size: the population size
  • loop: implement the loop RR-LS variant if loop is True (default: False)

For LOMONAS

  • NF: the number of fronts kept for performing neighborhood checks (default: 3)
  • check_all_neighbors: evaluate all solutions in the neighborhood if set True (default: False)
  • neighborhood_check_on_all_sols: perform neighborhood check on all solutions instead of knee and extremes ones if set True (default: False)

The results of LOMONAS in the paper are run with the default hyperparameters.

Transferability Evaluation

In our study, we evaluate the transferability of algorithms by evaluating the found architectures (search on CIFAR-10) on CIFAR-100 (for MacroNAS and NAS-201) and ImageNet16-120 (for NAS-201 only).

$ python transferability_evaluation.py
--problem [MacroNAS-C100, NAS201-C100, NAS201-IN16]
--api_benchmark_path <path_of_benchmark_databases, default: ./data>
--cifar10_res_path

Note: --cifar10_res_path must contain the searching result at MacroNAS-C10 or NAS201-C10 problems.

For example:

$ python transferability_evaluation.py --problem NAS201-C100 --cifar10_res_path ./exp_res/NAS201-C10 --api_benchmark_path ./data

Visualization and T-test

You can create all figures presented in our paper by run the visualization_and_statistical_test.ipynb file.

Acknowledgement

Our source code is inspired by:

lomonas's People

Contributors

f4nku4n avatar elo-lab avatar

Stargazers

An Vo avatar Khang Tran avatar  avatar

Watchers

 avatar  avatar

Forkers

f4nku4n

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.