The recursive neural network is a combination of neural model and feedback, in order to learn different behaviors of input images by one neural network. First, the idea is to have distinct sets of recursive neural networks, M0, · · · , M9for training a sequence of images with
0, · · · , 9 labels, respectively. Therefore,
My = {Ψh|h = 1, · · · , ¯ny}, y = 0, · · · , 9,
where Ψh is the result of training the set of B input images, Pb, b = 1, · · · , B. Pb is a set of
vectors indicating image pixels, Pb= {xi|xi ∈ R3}. We propose a recursive form of Algorithm
13 for training process and the scheme of Rec-MSOM is presented in Figure 8.3. As it is presented in this figure, The P(0) is the first incoming image and the feedback of the network at time t is combined with the incoming picture at time t + 1 in order to be learned by the network. Sp lit tin g & Me rg in g P(0) P(t +1)! !(t) P(t +1) Sequence of images with label y !(t)
Recursive Modified SOM
Figure 8.3: Topology of modified SOM.
Algorithm 14. Recursive Modified SOM algorithm
Step 1. Let have a set of images ℵ = {P1, · · · , PB}. Initialize parameters of the Algorithm
13. Set network Ψ = ∅. Step 2. Select a Pb ∈ ℵ.
Step 3. (Training) Apply Algorithm13 on the set Pb∪ Ψ as input data vectors.
Step 4. (Update Ψ) Set the output neurons of Modified SOM into the parameter Ψ. Step 5. If all Pb ∈ ℵ are visited terminate, otherwise go to Step 2.
In Step 3 of Algorithm 14, the training is done on the union of new input image and the network obtained from the previous sequence. Usually all Pb ∈ ℵ are from same label,
therefore the final set Ψ is a trained network with a label as the input images. Assume that all Pb ∈ ℵ are from the images of digit with label 0, therefore we add the network Ψ to the
set M0,
M0 = M0∪ Ψ,
and the network Ψ is a recognition tool for images with label 0 in the set M0.
8.3.1 Training
In the training phase, the cardinality of sets M0, · · · , M9 are predefined. Assume that
the cardinality of sets My, y = 0, · · · , 9 are set as ¯ny, y = 0, · · · , 9, therefore, we have ¯ny
number of networks, Ψy1, · · · , Ψyn¯y, in the set My. The set of training sample images ℵy of
label y are divided into ¯ny subsets ℵy1, · · · , ℵyn¯y to be learned by the networks Ψy1, · · · , Ψyn¯y,
in the set My, respectively. It should be noted that
ℵyi ∩ ℵyj = ∅, i 6= j, i, j = 1, · · · , ¯ny.
Each subset ℵyi learned by Ψyi, where i = 1, · · · , ¯ny, using Algorithm 14. The training Algorithm is defined as follows:
Algorithm 15. Training algorithm
Step 1. (Initilization) Let have a set of images ℵ = {P1, · · · , PB}. Initialize the values ¯ny
Step 2. (Selection and devision) Select all images with label y in ℵ and put them in ℵy.
Divide the set ℵy into ¯ny number of distinct subsets ℵyj, j = 1, · · · , ¯ny.
Step 3. (Training) Select a ℵyj and its corresponding network Ψyj then send them as an input to Algorithm14.
Step 4. The output of Algorithm14 is a trained network Ψyj, therefore,
My = My∪ Ψyj.
Step 5. If all ℵyj, j = 1, · · · , ¯ny are visited go to Step 6, otherwise go to Step 3. Step 6. If y > 9 terminate, otherwise y = y + 1 and go to Step 2.
After termination of Algorithm 15 the sets My, y = 0, · · · , 9 contain trained networks
which are used for recognizing unknown images.
Assume that we have selected 13 images with label 0 as is presented in Figure 8.4. We set ¯n0 to 5 and apply Step 2 of Algorithm 15 on this set and divide these images into ¯n0 subsets. The Steps 3 to 5 of Algorithm15generate 5 different networks, which are presented in Figure8.5.
Figure 8.4: A set of images, ℵ0, with label 0, which are selected randomly from the training
set.
Figure 8.5presents the set M0, which contains 5 Rec-MSOM networks.
8.3.2 Testing
In this section we propose the testing procedure for handwritten digits recognition. As- sume a Modified SOM network Υ as a screen to train the input unknown images using Algorithm13. Then, the network Υ is compared with all the networks in the sets My, y =
Ψ1 Ψ2 Ψ3
Ψ4 Ψ5
Figure 8.5: The set of modified SOM networks, Ψh ∈ M0, after training with samples in
Figure8.4. This set is using for recognition of images with 0 label. equation, ¯ y = min y j=1,··· ,¯ny E(Ψyj, Υ) (8.1) E(Ψyj, Υ) = |Υ| X i=1 min k k ˆwi− w y kk, w y k∈ Ψ y j,
where y = 0, · · · , 9. There are many neurons in the the network Υ and also in all the networks in the sets My, y = 0, · · · , 9, which are dark and carry no information. Therefore, before
using equation (8.1) for image recognition, we introduce a filtering parameter, δ, to remove those neurons in the sets of training networks Ψyj, j = 1, · · · , ¯ny, y = 0, · · · , 9 and also in the screen network, Υ, which are low in luminance. One can see that, in Figure8.5 the shape of digit is held by neurons which are in white or light colors. Therefore, we discard the neurons which are dark or low in luminance by setting filtering parameter δ, in advance. The set of neurons that are extracted by filtering from the network Ψyj is calculated as follows:
¯ Ψyj =
n
wyk | kwkyk ≥ δ, wyk∈ Ψyjo, (8.2) where k = 1, · · · , |Ψyj|, j = 1, · · · , ¯ny, y = 0, · · · , 9.
In Figure 8.6 the result of filtering on the network, Ψ, which is on the left with dark background, is presented. The result is a reduced size network, ¯Ψ, on the right of the Figure
8.6with a white background.
The set of black dots in Figure 8.6, ¯Ψ, are those neurons with high luminance in the network Ψ. These neurons should be extracted from the network, Υ, as well as all the sets
5 10 15 20 25 5 10 15 20 25 5 10 15 20 25 5 10 15 20 25 Ψ Ψ¯
Figure 8.6: The Modified SOM network, Ψ, in the left and the network ¯Ψ in the right after applying filtering on Ψ.
of trained networks, My, y = 0, · · · , 9, before using equation (8.1) for digit recognition.