Git Product home page Git Product logo

betterrnn's Introduction

BetterRNN

This repository is for research around RNNs that use persistent memory modules.

What are we trying to solve?

Both Transformers and LSTMs have some issues with very long sequences, and we will try to tackle this with "snapshot" memories - where we save an input/state, and reuse it for future computations. The main difference between this idea and normal RNNs is that these snapshot memories will truly be saved in memory, and not implemented as a recurent cell that receives its hidden state at every state.

One important issue that we will need to tackle is how to decide which "snapshots" do we need to save. Since we don't want to use LSTM's mechanism, which is costly and often doesn't work well with far connections between two inputs. The way we want to solve that is by adding another output to the network, one that will train another part of the network that decides which snapshot should be kept. This part will be trained by actually trying to forget a snapshot and seeing if it improves the network's performance.

In theory, our learning algorithm looks like this:

Given an encoder/decoder network N = (E,D), a snapshot memory size m:

  1. For each input x:
  2. Encode x, i.e. E(x)
  3. (Maybe?) Embed E(x) into some "snapshot memory sapce", i.e. something that describes what kind of information is kept.
  4. Pass the value from step 2/3 into the new part of the network that has m outputs (probably a softmax). This output says into which snapshot memory this value should be saved (if any). This new part will consider the other "memory embeddings" that are already saved.
  5. Run each possible combination of saved information (maybe we can optimize this) into the decoder. i.e. D(E(x), E(all the memories that are saved))
  6. Train the Encoder/Decoder based to the output from step 5
  7. Train the new part of the network based on the performance of each combination of memories.

betterrnn's People

Contributors

mlellouch avatar

Watchers

James Cloos 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.