# Fast Large Associative Memory

**URL:** <https://discourse.numenta.org/t/fast-large-associative-memory/7631>\
**Category:** Lounge\
**Created:** [June 6, 2020, 12:42am UTC](https://discourse.numenta.org/t/fast-large-associative-memory/7631 "2020-06-06T00:42:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeanOConnor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/seanoconnor/32/3441_2.png) [@SeanOConnor](https://discourse.numenta.org/u/SeanOConnor)\
**Post date:** [June 6, 2020, 12:42am UTC](https://discourse.numenta.org/t/fast-large-associative-memory/7631/1 "2020-06-06T00:42:53Z")

</div>

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/](https://s6regen.github.io/Block-Associative-Memory/)

The JavaScript code is in the docs folder here:

> **[S6Regen/Block-Associative-Memory](https://github.com/S6Regen/Block-Associative-Memory)**
>
> Associative memory using (locality sensitive) hashing to select weight vectors - S6Regen/Block-Associative-Memory

---

<div class="post-metadata">

**Author:** ![SeanOConnor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/seanoconnor/32/3441_2.png) [@SeanOConnor](https://discourse.numenta.org/u/SeanOConnor)\
**Post date:** [June 6, 2020, 10:32pm UTC](https://discourse.numenta.org/t/fast-large-associative-memory/7631/2 "2020-06-06T22:32:07Z")

</div>

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

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

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