Giter Club home page Giter Club logo

attract-or-oscillate's Introduction

Dynamical mechanisms figure

To attract or to oscillate: Validating dynamics with behavior

This repository contains the code for my MEng thesis, To attract or to oscillate: Validating dynamics with behavior. All code is written in Python, and recurrent neural network (RNN) models are written and trained in JAX, Flax, and Optax.

Synopsis

RNNs can learn two distinct dynamical systems to compute modular arithmetic, specifically $a + b + c \equiv 0\ (\text{mod } 3)$. One dynamical system is characterized by a lattice of fixed-point attractors, termed the attractive mechanism, and the other is characterized by a limit cycle, termed the oscillatory mechanism. These two systems exhibit unique psychometric curves when computing modular arithmetic for ambiguous stimuli and unique generalization curves when trained on partial datasets. Fundamentally, they differ in how they encode stimuli: the attractive mechanism encodes stimuli as vectors, while the oscillatory mechanism encodes stimuli as angles.

Repository organization

In the results/ and scripts/ folders, there are two subfolders:

  • development/ - Jupyter notebooks used for the development of the src/ python package
  • experiments/ - Jupyter notebooks used to train models and generate the results discussed in the thesis

A technical note

JAX is an incredibly powerful Python package. In the context of training RNNs, JAX's scan function is significantly faster than using a for loop. I was able to train 16,128 RNNs on the MIT SuperCloud HPC in about 60 hours. Given that training and analyzing RNNs has become routine in computational neuroscience, I'm betting that the field will shift to using JAX, Flax, and Optax.

attract-or-oscillate's People

Contributors

ktmurray1999 avatar

Watchers

 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.