1 Bidirectional Associative Memory (BAM) By: Ali Akram Abdulkareem Supervisor Prof. Dr. Hussein K. Khafaji
Retrieval of Memories 2 Learning
3
4
5
6
Auto-Associative Network 7
8 Prof. Bart Kosko BAM - 1988
BAM 9
Bidirectional associative memory (BAM), A hetero-associative network. It associates patterns from one set, set A, to patterns from another set, set B, and vice versa. This phenomenon is very similar to the human brain. BAM is a supervised learning model in Artificial Neural Network. 10
Hetero-Associative Network 11
BAM Architecture 12
BAM Operations Forward direction: The input vector X(p) is applied to the transpose of weight matrix WT to produced output vector Y (p). Backward direction: The output vector Y(p) is applied to the weight matrix W to produced output vector X(p+1). This process is repeated until input and output vector become unchanged (stable state) 13
BAM Operations 14
The BAM training algorithm W ij = ( i =1…n , j = 1 …. m) For each input: A i =X i ( i =1…n) For each output: B j = Y j (j=1…m) Y i (for unipolar targets) Y i (for bipolar targets) 15
The BAM training algorithm Y = X = W ij = X i (P) Y T j (p)] (for bipolar targets) Step1: Storage The BAM is required to store M pairs of patterns. For example, we may wish to store four pairs 16
The BAM training algorithm Set A: X 1 = X 2 = X 3 = X 4 = Set B: Y 1= Y 2 = Y 3 = Y 4 = The BAM input layer must have six neurons and the output layer three neurons 17
The BAM training algorithm Calculate the weight matrix W ij = X i (P)] [ Y j (p) T ] (for binary targets) W1= * [1 1 1 ] = +W2+ W3+W4 18
Step2: Testing The BAM should be able to receive any vector from set A and retrieve the associated vector from set B, and receive any vector from set B and retrieve the associated vector from set A. Thus, first we need to confirm that the BAM is able to recall Y m when presented with X m 20
Step2: Testing Y 1 =(X1W T ) = * = X 3 = (Y 3 W)= * = 21
Step 3 Retrieval Present an unknown vector (probe) X to the BAM and retrieve a stored association . The probe may present a corrupted or incomplete version of a pattern from set A (or from set B) stored in the BAM. That is, Initial the Bam retrieval algorithm by setting X(0)=X , P=0 And calculate the Bam output at iteration P Y(p) = W T X(p) Update the input vector X(p) X(p+1) = WX(p) Recall this iteration until reach the stable state, when input and output vectors are unchanged with iteration 22
X 1 = * W = Y 1= Correct X 1 = * W = Y 1= Correct X 1 = * W = Y 1= Not Recognized 23
BAM Limitations BAM has limited stored patterns Limited noise ratio The more serious problem with the BAM is incorrect convergence. 24
Conclusion The basic idea behind the BAM is to store pattern pairs so that when n-dimensional vector X from set A is presented as input, the BAM recalls m-dimensional vector Y from set B, and when Y is presented as input, the BAM recalls X 25