Giter Club home page Giter Club logo

textnas's Introduction

This is the implementation of the TextNAS algorithm proposed in the paper TextNAS: A Neural Architecture Search Space tailored for Text Representation. TextNAS is a neural architecture search algorithm tailored for text representation, more specifically, TextNAS is based on a novel search space consists of operators widely adopted to solve various NLP tasks, and TextNAS also supports multi-path ensemble within a single network to balance the width and depth of the architecture.

The search space of TextNAS contains:

* 1-D convolutional operator with filter size 1, 3, 5, 7 
* recurrent operator (bi-directional GRU) 
* self-attention operator
* pooling operator (max/average)

Following the ENAS algorithm, TextNAS also utilizes parameter sharing to accelerate the search speed and adopts a reinforcement-learning controller for the architecture sampling and generation. Please refer to the paper for more details of TextNAS.

Preparation

Prepare the word vectors and SST dataset, and organize them in data directory as shown below:

textnas
├── data
│   ├── sst
│   │   ├── dev.txt
│   │   ├── test.txt
│   │   └── train.txt
│   └── glove.840B.300d.txt
├── dataloader.py
├── model.py
├── ops.py
├── README.md
├── search.py
└── utils.py

The following link might be helpful for finding and downloading the corresponding dataset:

Examples

Search Space

# If the code is cloned already, ignore this line and enter code folder.
git clone https://github.com/microsoft/TextNAS.git

# search the best architecture
cd TextNAS

# run the default search script
sh sst_macro_search_multi.sh

Evaluate the architecture

# If the code is cloned already, ignore this line and enter code folder.
git clone https://github.com/microsoft/TextNAS.git

# evaluate the architecture on sst-2
sh eval_arc_sst2.sh

# evaluate the architecture on sst-5
sh eval_arc_sst5.sh

Citations

If you happen to use our work, please consider citing our paper.

@article{wang2019textnas,
  title={TextNAS: A Neural Architecture Search Space tailored for Text Representation},
  author={Wang, Yujing and Yang, Yaming and Chen, Yiren and Bai, Jing and Zhang, Ce and Su, Guinan and Kou, Xiaoyu and Tong, Yunhai and Yang, Mao and Zhou, Lidong},
  journal={arXiv preprint arXiv:1912.10729},
  year={2019}
}

textnas's People

Contributors

microsoft-github-operations[bot] avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar pkuyym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

textnas's Issues

Training and structure issues.

I would like to ask some questions as follows, and I'm looking forward to your reply soon.

  1. Why the recommended structure is the same for binary classification in eval_arc_sst2.sh and multi-class classification tasks in eval_arc_sst5.sh ? Do they happen to be the best structures found by your project program?
  2. When running the project code, why does the performance on the test set gradually decline as the training progresses?
  3. Is there a lack of generalization and poor performance on the test set of the project?

ACTION REQUIRED: Microsoft needs this private repository to complete compliance info

There are open compliance tasks that need to be reviewed for your TextNAS repo.

Action required: 4 compliance tasks

To bring this repository to the standard required for 2021, we require administrators of this and all Microsoft GitHub repositories to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your microsoft GitHub organization.

Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/TextNAS/compliance

  • The GitHub AE (GitHub inside Microsoft) migration survey has not been completed for this private repository
  • No Service Tree mapping has been set for this repo. If this team does not use Service Tree, they can also opt-out of providing Service Tree data in the Compliance tab.
  • No repository maintainers are set. The Open Source Maintainers are the decision-makers and actionable owners of the repository, irrespective of administrator permission grants on GitHub.
  • Classification of the repository as production/non-production is missing in the Compliance tab.

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

GitHub inside Microsoft program information

More information about GitHub inside Microsoft and the new GitHub AE product can be found at https://aka.ms/gim.

FYI: current admins at Microsoft include @pkuyym

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.