Triadic Memory — A Fundamental Algorithm for Cognitive Computing

They seem to be performing the same task but they are structured differently. but thats just a part of the task, theres probably much more stuff going on. I’d bet on ring attractors.

@JarvisGoBrr you told many times about your test with N=2000.
In my case I have N=1920, P=60, but I can not allocate memory even with the current TriadicMemory 1bit C-version.
The memsize: (1920 * 1920 *1920 +7) /8
Does anybody have this problem?

I found why it failed? thanks

By testing with N=1920, P=60, current TemporalMemory 1bit C-version I found that the time consumption for prediction increases 25 times in comparison to N=768, P=24.
Exactly, it took 100ms for one prediction.
Maybe we need somehows to optimize/accelerate the query process.

what language are you using, if its just python makes total sense for it to be slow.

I use C or C++ with GCC in Ubuntu.

a larger memory will benefit less from cache locality and 60^3 is 15x more addresses to look up than 24^3, maybe thats the reason then.

but what exactly are you predicting?

@JarvisGoBrr I am testing it with SDR of 2D-data, so that we need a longer SDR.
I believe that is more problem with bigger N than bigger P, so that we have a big array (N³) by 8bit version and (N³ +7)/8 by 1bit version and memory access time will be increased dramatically!

well, something is not right, a triadic memory usually get thousands of reads per second.
there must be something funky going on on your code, how are you iterating over the addresses?

@JarvisGoBrr I tested the TemporalMemory1Bit (original C-version in Github) here in a very common way:

  1. I have 7 SDR, each of N=1920, P=60;
  2. I put them in a sequence into TM like adr1, adr2,…, sdr7, sdr1, sdr2, sdr3,…
  3. and see if it can predict sdr(j+1) by inputing sdr(j) …

They’re getting about 1k/sec; the limitation is RAM bandwidth, and with N that large, it requires a ton of memory IO. When I run the same size SDRs through my benchmark, I only get 290 z-reads/sec.

@nebkor your benchmark results look like the same as my ones, because the prediction has 3 read out and 2 writes

No, it’s slower than that, because my benchmark is not doing any prediction, just storing and reading SDRs in a single triadic memory.

@nebkor if you use C-version, you can speed-up it using openmp. By me: 2-2.5x better

1 Like