GithubHelp home page GithubHelp logo

mva's Introduction

Maximum Variation Averaging

This repository contains the implementation of the so-called Maximum Variation Averaging (MVA) proposed in our paper, Adaptive Learning Rates with Maximum Variation Averaging . MVA aims to stabilize the adaptive step size of Adam-like optimizers by adopting an adaptive weighted average of the squared gradients, where the coordinate-wise weights are chosen to maximize the estimated gradient variance. In this repository, we provide its implementation with PyTorch on synthetic datasets, image classification, Neural Machine Translation and Natural Language Understanding tasks, as mentioned in the experiment section of our paper.

Usage

We used PyTorch v1.4.0 for the experiments. We have divided the experiments into 3 folders:

synthetic_data: You could run nonconvex.py or nqm.py to reproduce the experiments for the nonconvex function or the Noisy Quadratic Model.

image_classification: Please refer to launch.sh to launch the experiments on CIFAR10 and CIFAR100. For ImageNet, you could plug the same optimizers into the PyTorch official example code and refer to the hyper-parameters in the paper.

nmt_nlu: Please first enter the nmt_nlu directory and then run pip install --editable .. For Neural Machine Translation, please first follow the steps to download and process the data, and then refer to run-iwslt-lamadam-tristage.sh to train a transformer with our optimizers from scratch. For the GLUE benchmark, again, first follow the steps to prepare the data, download a RoBERTa-base model and put it under nmt_nlu/roberta-pretrained, and use run-glue-base.sh to fine-tune a RoBERTa-base model on the GLUE tasks.

Citation

Please cite as

@inproceedings{zhu2020mva,
  title = {Adaptive Learning Rates with Maximum Variation Averaging},
  author = {Zhu, Chen and Cheng, Yu and Gan, Zhe and Huang, Furong and Liu, Jingjing and Goldstein, Tom},
  booktitle = {arXiv: 2006.11918},
  year = {2020},
}

mva's People

Contributors

zhuchen03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.