Reputation: 8058
I wrote a simple Feed Forward Artificial Neural Network for Symbol Recognition.
I have a Set of 6 possible Symbols in a 5x5 grid of pixels.
These are {X, +, -, \, /, |}
For example X
would be:
X = [1,0,0,0,1,
0,1,0,1,0,
0,0,1,0,0,
0,1,0,1,0,
1,0,0,0,1]
Values for grey noisy areas can be between 0 and 1.
My ANN consists of 25 input neurons (the 5x5 grid), 6 hidden neurons with biases, and 6 output neurons.
Each output neuron maps to a symbol. The outputs between 0 and 1 determine which symbol it recognizes i.e - the symbol is chosen for the max value of the output nodes.
i.e - If the output is {X : 0.9, + : 0.2, - : 0.1, \ : 0.15, / : 0.15, | : 0.2}
the recognized symbol would be X
.
It seems to work very well. I then performed the following experiment:
I got the test inputs (the 6 symbols above), and created a noise function addNoise(n)
where n
is a percentage of noise added randomly to that input.
For each noise value between 0
and 1
, I ran the test 2000
times (the noise randomly changes slightly each time). I got the following graph when doing this on X
.
You may need to open the image on another page to see the full size.
As you can see after I injected approximately 40%
(400 in x-axis) noise to the X test input it begins to predict other symbols.
With 70%
noise added to X
, there is an equal chance of the Network predicting X
and \
.
Anyway, my question is:
Shouldn't the lines on the graph for \
and /
be almost perfectly aligned, as they are identical with respect to the X
symbol?
To clarify, after 70%
noise, the network equally mixes up X
and \
.
However, after ~88%
noise, the network equally mixes up X
and /
.
Why might my network produce such results?
Upvotes: 0
Views: 81
Reputation: 723
You are assuming the network is learning a complete
representation of character X
during training. Maybe the internal representation it learned was heavily biased towards /
with a bit of \
mixed in. i.e If input has strong /
component and some of \
component -- then predict X
. This information is enough to discriminate X
from other characters (when clean). Training NN is based on loss function, if this representation already satisfies our classes, the network has no need to learn more robust representations.
In this hypothetical case injecting small amount of noise will obscure the \
component easily compared to /
which will require injecting large amount of noise.
Upvotes: 1