BAM
Background
Bi-directional Associative Memory (BAM) was introduced by Kosko in 1987. It’s use of linear algebra through matrix calculations provided an easier and simpler process towards the desired network associations.
![]()
The Weight Matrix is built by taking the outer productions of the
network:
The Vectors A and B need to be transformed into bi-polar vectors with the threshold function. In other words, the vector values are converted to either a 1 or a –1 by the following: 1à1 and 0à -1.
For example, given A and B matrices – we first bi-polarize the patterns. Then we calculate W above by breaking the matrices into corresponding row and column vectors and transposing one of them for the multiplication. This is done for each of the vectors, so that W= W1+ W2+ W3 if there are only 3 vectors. This means that W is computed in one shot, not through many cycles as with other models. Then we look at vector V. If it is an A-vector, then we must transpose W to calculate the B vector à W T V. On the other hand, if the vector V is a B vector, then we need not transpose W to calculate the A vector à W V. After calculating the desired vector, we shall apply the threshold:
If the value is < 0 à -1
> 0 à 1
= 0 à previous output
The Energy Surface, E, of BAM is calculated as follows:
![]()
For the continuous function, derived from Grossberg:

Where the λ determines the slope of the curve. This produces a behavior similar to the threshold.
BAM is adaptive with the following weights equation:
![]()