Spiking Neural Network for Unsupervised Learning


#1

Hi there,
I’m building a code for a task of Unsupervised Learning, in particular I need to create clusters of unlabeled input signals. I’d like to know if it’s possible to find an example that uses Nengo and SNN to perform an Unsupervised Learning (e.g. using Self-Organizing Maps, Boltzmann Machine or Autoencoders like in Deep Learning). Does anyone have an example/code in order to study it?
Thank you in advance!


#2

Training an autoencoder would be the easiest one to get started with. You can train this using NengoDL.
That’ll work the same as training any other kind of network with NengoDL, except the target output values are the same as the input values (as opposed to being some transformation of those input values). So a super simple autoencoder would be

with nengo.Network() as net:
    input = nengo.Node(np.zeros(input_d))
    hidden = nengo.Ensemble(inner_d, 1)
    output = nengo.Node(size_in=input_d)
    output_p = nengo.Probe(output)

    nengo.Connection(input, hidden.neurons, synapse=None, 
                     transform=nengo_dl.dists.Glorot())
    nengo.Connection(hidden.neurons, output, synapse=None, 
                     transform=nengo_dl.dists.Glorot())

with nengo_dl.Simulator(net) as sim:
    sim.train({input: my_inputs}, {output_p: my_inputs}, ...)

(substituting in your desired input data and dimensionalities)

You could then add additional hidden layers and things like that.


#3

Thank you for the answer! Is it possible to implement a Self-Organizing Maps for clustering too (using NengoDL) ?


#4

It should definitely be possible, but you’d probably have to write your own TensorFlow optimizer (or find an implementation someone else has made).