Fast Large Associative Memory

In this example Locality Sensitive Hashing (LSH) is used in 2 different ways to create a reasonably fast and potentially very large associative memory bank.
You can think of it as a soft vector to vector hash table. The input vector does not have to be exactly correct to get an approximately correct response. Making it easier for a neural network to learn how to use it as an external memory bank.
First a LSH is used to select a few weight vectors among many. Then the chosen weight vectors are combined with further LSHs of the input vector to create the associations.
Large scale associative memory:
https://s6regen.github.io/Block-Associative-Memory/

The JavaScript code is in the docs folder here:

2 Likes

Basic LSH Associative Memory:
View:
https://editor.p5js.org/siobhan.491/present/MTPzfwYbo
Edit:
https://editor.p5js.org/siobhan.491/sketches/MTPzfwYbo

Block Vector LSH Associative Memory:
View:
https://editor.p5js.org/siobhan.491/present/tenYuNHNC
Edit:
https://editor.p5js.org/siobhan.491/sketches/tenYuNHNC

Hash Table LSH Associative Memory:
View:
https://editor.p5js.org/siobhan.491/present/zIANaDtiG
Edit:
https://editor.p5js.org/siobhan.491/sketches/zIANaDtiG