ArticleslgStudy

computer science

Bidirectional associative memory

Bidirectional associative memory is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Bidirectional associative memory rather than just read about it. In short: Bidirectional associative memory (BAM) is a type of recurrent neural network. BAM was introduced by Bart Kosko in 1988.

Key takeaways

  • Bidirectional associative memory belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Bidirectional associative memory to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Bidirectional associative memory from memory before moving on to harder problems.

Reference excerpt

Bidirectional associative memory (BAM) is a type of recurrent neural network. BAM was introduced by Bart Kosko in 1988. There are two types of associative memory, auto-associative and hetero-associative. BAM is hetero-associative, meaning given a pattern it can return another pattern which is potentially of a different size. It is similar to the Hopfield network in that they are both forms of associative memory. However, Hopfield nets return patterns of the same size. It is said to be bi-directional as it can respond to inputs from either the input or the output layer.

Topology A BAM contains two layers of neurons, which we shall denote X and Y. Layers X and Y are fully connected to each other. Once the weights have been established, input into layer X presents the pattern in layer Y, and vice versa. The layers can be connected in both directions (bidirectional) with the result the weight matrix sent from the X layer to the Y layer is W and the weight matrix for signals sent from the Y layer to the X layer is WT. Thus, the weight matrix is calculated in both directions.

Procedure

Learning Imagine we wish to store two associations, A1:B1 and A2:B2.

A1 = (1, 0, 1, 0, 1, 0), B1 = (1, 1, 0, 0) A2 = (1, 1, 1, 0, 0, 0), B2 = (1, 0, 1, 0) These are then transformed into the bipolar forms:

X1 = (1, -1, 1, -1, 1, -1), Y1 = (1, 1, -1, -1) X2 = (1, 1, 1, -1, -1, -1), Y2 = (1, -1, 1, -1) From there, we calculate M=∑XiTYi where XiT denotes the transpose. So, M=[200−20−220200−2−200202−20−2002]

Recall To retrieve the association A1, we multiply it by M to get (4, 2, -2, -4), which, when run through a threshold, yields (1, 1, 0, 0), which is B1. To find the reverse association, multiply this by the transpose of M.

Capacity The memory or storage capacity of BAM may be given as min⁡(m,n), where "n" is the number of units in the X layer and "m" is the number of units in the Y layer. The internal matrix has n x p independent degrees of freedom, where n is the dimension of the first vector (6 in this example) and p is the dimension of the second vector (4). This allows the BAM to be able to reliably store and recall a total of up to min(n,p) independent vector pairs, or min(6,4) = 4 in this example. The capacity can be increased above by sacrificing reliability (incorrect bits on the output).

Stability A pair (A,B) defines the state of a BAM. To store a pattern, the energy function value for that pattern has to occupy a minimum point in the energy landscape. The stability analysis of a BAM is based on the definition of Lyapunov function (energy function) E , with each state (A,B). When a paired pattern (A,B) is presented to BAM, the neurons change states until a bi-directionally stable state (Af,Bf) is reached, which Kosko proved to correspond to a local minimum of the energy function. The discrete BAM is proved to converge to a stable state. The Energy Function proposed by Kosko is E(A,B)=−AMBT for the bidirectional case, which for a particular case A=B corresponds to Hopfield's auto-associative energy function. (i.e. E(A,B)=−AMAT).

See also Autoassociative memory Self-organizing feature map

References

External links Bidirectional Associative Memory – Python source code for the Wiki article Bidirectional associative memories – ACM Portal Reference

Worked examples

Example 1 — a first encounter with Bidirectional associative memory

Start with the simplest possible case. Write down what Bidirectional associative memory claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Bidirectional associative memory before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Bidirectional associative memory ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Bidirectional associative memory

In research
Bidirectional associative memory appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Bidirectional associative memory in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Bidirectional associative memory is common in secondary-school and first-year university syllabi. It links to neighbouring topics Artificial neural networks, so understanding it makes those chapters shorter.
In everyday life
Look for Bidirectional associative memory outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Bidirectional associative memory” →

How to study Bidirectional associative memory in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Bidirectional associative memory means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Bidirectional associative memory out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Bidirectional associative memory in simple terms?

Bidirectional associative memory (BAM) is a type of recurrent neural network. BAM was introduced by Bart Kosko in 1988.

Why does Bidirectional associative memory matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Bidirectional associative memory?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Bidirectional associative memory.

Tags

  • Artificial neural networks

Keep exploring