2
$\begingroup$

Recently I managed to create simple neural network visualization, to help to understand how neural network works on the signal level. I also wanted to arrange neurons by similarity cause I was expecting them to have noticeable areas of responsibility.

see how it looks:

http://nn.3dev.io

in order to see the distribution I've created two metrics:

  • Euclidean : calculates the distance in output weights space (10 dimensions) and repels neurons according to that distance, as well as attracts neurons which are close in that 10d space

  • output dominance : that attracts neurons having maximum weight at the particular output.

The problem is that I don't see any trend (or tendency) in neuron distribution which may be caused by :

  • there is no such trend or noticeable areas of neuron responsibility (at least in this case)
  • I have improper metric

Guys, what do you think about it? Thanks, Regards

$\endgroup$

1 Answer 1

1
$\begingroup$

The animation is pretty!

I think with a fully-connected network and a single hidden layer you would not expect to see any strong patterns of neuron responsibility emerge. But if you used two or three hidden layers, you might start to see some patterns in the 3rd layer.

Additionally, if you use a high L1 regularization when training, then very small contributions will go to 0. This encourages the model to make each decision with fewer, more dedicated, neurons. So you might see more distinct patterns.

If you train a CNN then the lower-levels will be discovering features, such as straight lines and curves. Higher-levels might combine these to discover loops, etc. You would then expect to see trends in the final linear layer. E.g. all the zeroes are reacting to discovering one large loop. The 6s and 9s are reacting to discovering small loops and a line. The 1s and 7s don't react to any of the loop features. Etc.

$\endgroup$
1
  • $\begingroup$ great thanks for you response! I will try to add more layers :) $\endgroup$
    – dismedia
    Commented Mar 22, 2023 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.