safemutations

by uber-research

uber-research /safemutations

safemutations

133 Stars 14 Forks Last release: Not found Other 4 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Safe Mutations for Deep and Recurrent Neural Networks through Output Gradients

Code for a pytorch implementation of the mutation operators from the paper.

This repository contains code for the illustrative experiments, the recurrent parity task, and the breadcrumb hard maze task.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • PyTorch -- version 0.2.0_2 was what was used in the experiment
  • Python -- version 2.7
  • PyGame -- only relevant for visualization
  • SCons -- to build the hard maze domain

Building

If you want to run the breadcrumb hard maze experiment, you will need to install SCons and run the command

scons
in the working directory, which should build from source the python module. Note that the current release requires python 2.7 (although it is likely possible to port it to python 3).

Running the Illustrative Experiments

sm_simple.py
contains code to recreate the illustrative experiments, and can be invoked in the following way:

python sm_simple.py --domain [domain] --mutation [method] --mutation_mag [float]

The parameter domain can be one of: easy, medium, or washout (for the gradient-washout task).

The parameter mutation can be one of: control, SM-G-SUM, SM-G-SO, SM-G-ABS, or SM-R.

The parameter mutation_mag can be set to an arbitrary float value. Parameter values used in the paper's experiments can be found in the appendix.

Running Other Experiments

experiment_runner.py
contains code to run experiments in the recurrent parity task and the breadcrumb hard maze. It can be invoked in the following way:

python experiment_runner.py --domain [domain] --mutation [method] --mutation_mag [float]
`

The parameter domain can be one of: classification (for the recurrent parity task) or breadcrumbmaze (for the breadcrumbhard_maze).

The parameter mutation can be one of: control, SM-G-SUM, SM-G-SO, SM-G-ABS, or SM-R.

The parameter mutation_mag can be set to an arbitrary float value. Parameter values used in the paper's experiments can be found in the appendix.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.