Giter Club home page Giter Club logo

puttingabuginml's Introduction

23 April 2018

This repository contains the code used in the paper "Putting a bug in ML: The moth olfactory network learns to read MNIST" (CB Delahunt and JN Kutz, January 2018).

This codebase simulates a moth olfactory network as it learns to read MNIST digits. It generates a model of the Manduca sexta moth olfactory network, then runs a time-stepped evolution of SDEs to train the network to read downsampled MNIST digits. The moth's architecture is able to learn very rapidly (1 to 10 digits per class). Notes:

  1. 'runMothLearnerOnReducedMnist.m' runs the simulation. Key experiment parameters: goal, trPerClass, numSniffs.

  2. Run time for a simulation is 30 - 120 seconds. It is a time-stepped simulation of a fast learning system (the moth brain), not a fast system in itself.

  3. The learning task is not MNIST per-se. Rather, it is a simpler, cruder version of MNIST, created by downsampling then selecting a subset of pixels. The features are pixels (no spatial relationships). This is done to accommodate the size of the natural moth brain architecture (~ 60 features).

  4. 'runOtherAlgorithms' contains scripts to run Nearest-neighbor, SVM, and neural net on the downsampled MNIST. Key experiment parameters are: trPerClass, numNeighbors, boxConstraint (matlab script); trainPerClass (python script).

  5. We find that the moth brain out-performs the ML methods given in the few-samples regime (less than 20 training samples per class). Conversely, the moth brain seems to max out at around 85% accuracy. We don't know if this is due to the learning rates we chose, or if it's an intrinsic limitation of the moth architecture at moth size (moths can learn about 8 new odors). For example, honeybee olfactory networks are larger, though with the same basic layout. They demonstrate much richer learning behavior.

  6. We had earlier found that the moth brain substantially out-performed ML methods. However, this was due to a bug (...) in the pre-processing code that unfairly penalized ML methods. So the ML methods come closer to the moth performance than we previously thought, and match moth performance at 20 training samples per class. The ML methods given here can likely be optimized.

  7. The code here is a variant, for MNIST experiments, of code at github/charlesDelahunt/smartAsABug, which supports the paper "Biological Mechanisms for Learning:A Computational Model of Olfactory Learning in the Manduca sexta Moth, with Applications to Neural Nets" (CB Delahunt, JA Riffell, JN Kutz, January 2018). The mechanics of the moth architecture and the SDE evolution are largely the same.

Many thanks for your interest in these clever moths :) We hope you enjoy them, and we welcome any questions, comments, (constructive) criticisms, bug reports, improvements, extensions, etc.

Charles Delahunt, [email protected]

puttingabuginml's People

Contributors

charlesdelahunt 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.