Skip to content

ClaraWanjura/neuroscatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neuroscatter - Code for "Fully Non-Linear Neuromorphic Computing with Linear Wave Scattering" (C. Wanjura and F. Marquardt)

This repository contains the source code for the paper https://arxiv.org/abs/2308.16181 on nonlinear neuromorphic computing via linear wave scattering.

image

The idea behind this work is to send optical waves through a linear scattering system like an array of waveguides and optical resonators. These optical resonators or other elements may have tuneable parameters. These tuneable parameters now serve two functions in trying to use the system to solve a machine-learning task: Some of the parameters can be used to inject the input (e.g. images to be classified). Other parameters are trainable and will be slowly updated during training. The code given here simulates physical scattering setups, observes the scattering response for many different training samples, and updates the trainable parameters via gradient descent to minimize the deviation from the desired target output for the training samples. Evaluation of the scattering response as well as calculation of the gradients is done using jax, and training updates are implemented via optax.

See the two subdirectories for the code used in handwritten-digit recognition (a scaled-down version of MNIST) and for fashion-MNIST (with many more neurons and trainable parameters). This code can be run directly to reproduce the results shown in the figures (although a GPU is advisable). Note that some of the code may refer to figures that are in the manuscript under submission but not in the arXiv version linked above. To run the code, you need to install jax and optax (and tensorflow for importing data sets).

About

Code for "Fully Non-Linear Neuromorphic Computing with Linear Wave Scattering" (C.C. Wanjura and F. Marquardt).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published