[nengo-user] Calculating dot product using spiking neurons
Daniel Rasmussen
dhrsmss at gmail.com
Fri Nov 21 10:23:10 EST 2014
Hi Claus,
The problem is likely just that you don't have enough neurons in your 20
dimensional ensemble. Computing a complex function like four different dot
products in a single ensemble is going to require a lot of neurons. You
could make it more tractable by splitting up the calculation. For example,
you do four 1D multiplies to do the dot product for one vector, then you
repeat that 4 times for your 4 vectors, and then you combine the results
together.
Also, if you're using Nengo 2.0, you can take a look at the
`nengo.networks.Product` network to see how to go about implementing an
element-wise product as accurately as possible. The main trick is that you
want to set all your encoders to be on the diagonals (e.g., [1, 1], [1,-1],
[-1, 1], [-1,-1]). Also don't forget that you will probably need to adjust
the radius of your ensemble to match the range of the values you are
multiplying.
Daniel
On 21 November 2014 04:21, Claus Agerskov <clausagerskov at hotmail.com> wrote:
> Hi
> I have a model where an ensemble stores four different semantic pointer in
> the form of 4D vectors. To this ensemble is coupled a simplenode input that
> shows one of those four pointers every half a second. Both input and
> storage ensembles are outputting to a another ensemble that is 20
> dimensional. It takes five 4D inputs, which represents every pattern stored
> (4) and the simplenode (1). The ensemble that takes the input then computes
> four dot products, comparing each pattern to the (simplenode) input. This
> in effect should give a signal of 1 every time a pattern is recognized. My
> problem is however that this system only works if the ensemble comparing
> the inputs is using direct mode. I assume this is because the NEF algorithm
> cannot compute the necessary weights. Is this because the full weight
> matrix between the inputs and the dot product ensemble is not square
> (currently a 4x5-matrix)? As I have looked through a lot of Eliasmith's and
> his colleague's papers and the How to Build a Brain book, I see that the
> Basal Ganglia model as well as the Clean-up memory model is performing the
> same function that I am interested in but simply by having the dot product
> ensemble have direct access to the full vocabulary which doesn't seem very
> biologically realistic. Am I required to using a direct mode ensemble or is
> there a better way of comparing two semantic pointer outputs using the dot
> product?
> Sorry for the very long question, hope you will forgive me!
> With best regards
> Claus Agerskov
>
> _______________________________________________
> nengo-user mailing list
> nengo-user at ctnsrv.uwaterloo.ca
> http://ctnsrv.uwaterloo.ca/mailman/listinfo/nengo-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://artsservices.uwaterloo.ca/pipermail/nengo-user/attachments/20141121/d89eeccb/attachment-0002.html>
More information about the nengo-user
mailing list