The network structure
of the *Bidirectional Associative Memory*
model is similar to that of the linear associator
but the connections are bidirectional, i.e., *w _{ij}* =

BAM model

Just like the linear associator and Hopfield model, encoding in BAM can be carried out by using:

* W_{k}*
=

to store a single associated pattern pair and

to simultaneously store several associated pattern pairs.

After encoding,
the network can be used for decoding. In BAM, decoding involves reverberating
distributed information between the two layers until the network becomes stable.
In decoding, an input pattern can be applied either on the *X* layer or
on the *Y* layer. When given an input pattern, the network will propagate
the input pattern to the other layer allowing the units in the other layer to
compute their output values. The pattern that was produced by the other
layer is then propagated back to the original layer and let the units in the
original layer compute their output values. The new pattern that was produced
by the original layer is again propagated to the other layer. This process
is repeated until futher propagations and computations do not result in a change
in the states of the units in both layers where the final pattern pair is one
of the stored associated pattern pairs. The final pattern pair that will
be produced by the network depends on the initial pattern pair and the connection
weight matrix.

Several modes can also be used to update the states of the units in both layers namely synchronous, asynchoronous, and a combination of the two. In synchronous updating scheme, the states of the units in a layer are updated as a group prior to propagating the output to the other layer. In asyncrhonous updating, units in both layers are updated in some order and output are propagated to the other layer after each unit update. Lastly, in synchronous-asynchronous updating, there can be subgroups of units in each layer that are updated synchronously while units in each subgroup are updated asynchronously.

Since the BAM also
uses the traditional Hebb's learning rule to build the connection weight matrix
to store the associated pattern pairs, it too has a severely low memory capacity.
The BAM storage capacity for reliable recall was given by Kosko (1988) to be
less than *minimum*(*m*, *n*), i.e., the minimum of the dimensions
of the pattern spaces. A more recent study by Tanaka et al (2000) on the
relative capacity of the BAM using statistical physics reveals that for a system
having *n* units in each of the two layers, the capacity is around 0.1998*n*.

In a discrete BAM,
the network propagates an input pattern ** X** to the

and determine their output values using:

for *j* =
1, 2, ..., *n*.

The pattern ** Y**
produced on the

and determine their output values by:

Just like the discrete Hopfield model, there is an energy function characterizing the state of the discrete BAM. The energy function due to Kosko (1988) is given by:

It is shown by Kosko (1988) that the energy of the BAM decreases or remains the same after each unit update. Therefore, the network will eventually converge to a local minimum that corresponds to a stored associated pattern pair. The energy of the discrete BAM is bounded below by:

In the continuous
BAM, the units use the sigmoid or hyperbolic tangent output function.
The units in the *X* layer have an extra external input *I _{i}*
(not shown in the figure) while the units in the

for *i* =
1, 2, ..., *m* and *j* = 1, 2, ..., *n*.

The energy function of the continuous BAM is given as:

It is shown by
Kosko (1988) that D*E *£ 0. Therefore, the continuous BAM will
eventually converge to a local minimum corresponding to a stored associated
pattern pair.