Locally connected neurons

First of all, encog is awesome. I used it last year on a small project and it made my live a lot easer!

While reading an a paper about face detection I was wondering about two things (... and I might have misunderstood the paper so I might be writting rubish here).

Is it possible to setup connections only between specific neurons from one layer to the next? I guess that would mean setting some weights to a fixed value of 0 which cannot be changed by training.

e.g.
i1 --\
i2 ---> h1 ...
i3 --/
i4 --\
i5 ---> h2 ...
i6 --/

Cascaded Face Detection Using Neural Network Ensembles:
http://www.hindawi.com/journals/asp/2008/736508.html

I need the same thing...

John Merk's picture

I also need exactly what rednoah is describing, arbitrary connections (determined by me) between layers. Some neurons in layer 1 connected to some in layer's 2 and 3, etc. Would it be possible to accomplish this by making each neuron its own layer? I'm just starting w/ encog, so maybe I'm wrong. At any rate, this would be a cumbersome way to do it, if possible.

Encog looks awesome. I have been using SNNS for quite a while, and would love to migrate to Encog. Problem is, I need this functionality. I will check in periodically, and when this is implemented I'll make the switch.

Thanks for providing encog. It is quite a service you provide the community!

Sincerely,

John

This will be included in 2.4

jeffheaton's picture

In a way, it is already a part of 2.4 in that 2.4 supports NEAT, which sort of evolves "layerless" neural networks.

It may be possible to do this in Encog with single neuron layers, I have not tried. The most optimal way is to just represent it as a layer-based feedforward network, but "zero-out" the connections not needed, and have some way for Encog training to leave them alone. Which, as Sema stated, it currently will not. It would try to train a zero connection.

This has been requested enough times that I am going to make sure this is implemented in 2.4. All of the other 2.4 work is progressing nicely, so it should fit in just fine.

don't know of a way to do that in Encog

SeemaSingh's picture

It could be done by setting the weights for those neurons to zero, but Encog WILL try to train them. But now that I think of it, there is going to be no gradient on a zero weight, so propagation training would very likely leave them alone. annealing and genetic would for sure mess with those weights.

Eventually, we need to specify a flag or something that tells Encog to not even attempt to train something with a zero weight.


Copyright 2005 - 2010 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright and trademark information.