Bidirectional Associative Memories (BAM)
Introduction
Bidirectional Associative Memories (BAM) are a type of recurrent neural network
introduced by Bart Kosko in 1988. They extend the concept of Hopfield networks to store
and recall pairs of patterns rather than single patterns, enabling a bidirectional association
between input and output patterns.
Key Characteristics
1. **Bidirectional Association**:
- BAM networks store associations between two sets of patterns (e.g., \( X \) and \( Y \))
and can retrieve one set when the other is presented.
2. **Architecture**:
- Two layers of neurons: input layer and output layer.
- Neurons in the input layer are connected to neurons in the output layer and vice versa.
- Weights are represented by a bipartite connection matrix.
3. **Symmetric Weight Matrix**:
- Weight matrix \( W \) is calculated using Hebbian learning:
\[
W = \sum_{\mu} X^{\mu} (Y^{\mu})^T
\]
where \( X^{\mu} \) and \( Y^{\mu} \) are pattern pairs.
4. **Binary States**:
- Neurons typically take binary states (\(+1, -1\) or \(0, 1\)).
5. **Energy Function**:
- Similar to Hopfield networks, BAM networks minimize an energy function to find stable
states. The energy function is:
\[
E = -\sum_{i} \sum_{j} W_{ij} x_i y_j
\]
where \( x_i \) and \( y_j \) are the states of input and output neurons, respectively.
Working Mechanism
1. **Training**:
- BAM is trained using pairs of patterns. The weight matrix is updated to encode the
associations between input and output patterns.
2. **Recalling Patterns**:
- Given an input pattern \( X \), the network retrieves the associated output pattern \
( Y \).
- Similarly, given \( Y \), it can retrieve \( X \). This bidirectional retrieval makes BAM
unique.
3. **Iterative Process**:
- BAM alternates between layers, updating the state of one layer based on the other until
the network converges to a stable state.
Applications
1. **Associative Memory**:
- Storing and retrieving paired data like question-answer pairs or translations.
2. **Pattern Recognition**:
- Recognizing patterns where there is a known association between inputs and outputs.
3. **Data Recovery**:
- Reconstructing missing or noisy data in one layer using the associated data in the other
layer.
4. **Language Translation**:
- Associating words or phrases in two different languages.
Limitations
1. **Limited Capacity**:
- The number of patterns that can be stored without interference is limited by the size of
the network.
2. **Noise Sensitivity**:
- Performance may degrade with noisy or incomplete input patterns.
3. **Scalability**:
- Larger networks require significant computational resources, limiting practical
applications.
4. **Stability Issues**:
- The network may converge to spurious states that do not correspond to any stored
pattern pairs.