Git Product home page Git Product logo

sdm's Introduction

Sparse Distributed Memory

We have been working on a new implementation of SDM. It is available at [https://github.com/msbrogli/sdm-framework].

This is an implementation of SDM created by Pentti Kanerva in 1988. SDM is a mathematical model that has some cognitive properties.

It was used to make simulations in my master thesis oriented by Ph.D. Alexandre Linhares. I would like to thanks him and M.Sc. Daniel Chada for their friendship and all their contributions to my thesis.

What is it for?

To do.

How to install?

You need GNU autotools installed in your computer. Then run the following commands:

./autogen.sh
./configure
make

The Python wrapper is in python/ directory.

Where to start?

The supplemental_data.pdf holds:

i) An introduction to the computational methods available in https://github.com/msbrogli/sdm;
ii) A large set of additional heatmaps, documenting the critical distance behavior of the model in a 1000-dimensional memory;
iii) The same tests on 256-dimensional memory,
iv) all rehearsal results for 256-dimensional memory, and
v) the same tests for 1000-dimensional memory.

How do I contribute?

Just fork it and do the usual pull request dance. :)

Where to start?

The supplemental_data.pdf holds:

i) An introduction to the computational methods available in https://github.com/msbrogli/sdm; ii) A large set of additional heatmaps, documenting the critical distance behavior of the model in a 1000-dimensional memory; iii) The same tests on 256-dimensional memory, iv) all rehearsal results for 256-dimensional memory, and v) the same tests for 1000-dimensional memory.

Authors

  • 2011 Marcelo Salhab Brogliato
  • 2011 Alexandre Linhares
  • 2011 Daniel Chada

sdm's People

Contributors

msbrogli avatar alex-linhares avatar

Stargazers

Benjamin avatar  avatar Clément Michaud avatar Carlos Garcia avatar  avatar Joel Boehland avatar Trenton Bricken avatar Violeta Sosa-León avatar Chaofei Fan avatar Vadim Sharay avatar Valentin Plotkin avatar Ajay Pratap Singh avatar Cat Zeng avatar Darío Clavijo avatar James Thornton avatar Brian Cannard avatar  avatar  avatar 2 avatar  avatar Pontus Svenson avatar Jeff avatar Chen Xupeng avatar Stuart Farmer avatar Azizul Karim avatar Easton avatar mengjiexu avatar Spencer Mathews avatar Nick Feller avatar Marvin Schubert avatar Vikrant Sagar avatar Peratham Wiriyathammabhum avatar Harold Figueroa avatar Diogo Almeida avatar Joe Ardent avatar  avatar Claudio Sá de Abreu avatar  avatar Ivana Kajić avatar Yan Chen avatar Adi Shavit avatar Chris Tabor avatar Blanboom avatar  avatar Hai-Anh Trinh avatar dhamu avatar  avatar  avatar

Watchers

Carlo Piva avatar  avatar James Cloos avatar  avatar Yan Chen avatar  avatar  avatar Claudio Sá de Abreu avatar Blanboom avatar  avatar  avatar  avatar

sdm's Issues

OpenCL Implementation: ignoring hardlocation[0]

This could be a relatively serious issue. We are ignoring hardlocation[0] when we delete the 0's from the active hard location buffer.

We'll probably need to change the default buffer value from 0 to -1 or some other impossible parameter.

Remodel OpenCL

HL[mempos] --> deterministic random number in [0, 2**256-1]
Check Hamming Dist;
Store if cool.

The idea here is that we don't need to store even the addresses, if computing their hashes is faster than that. We would never need 2**20 buffers.

And maybe because of that we could retrieve the active hard locations with a small buffer (say, 2000 possible positions, given 1250 expected locations found).

This idea comes from creating hardware chips for Kanervating.

OpenCL Implementation

We need an OpenCL implementation of the system, so that we can make experiments way faster. If we liberate the CPU to concentrate on higher-level tests, we start to get close to really interesting stuff. We expand the adjacent possible! (Eric, LOL)

In a 1st phase, we might want to have at least a function (callable from python):

get_active_hard_locations(bitstring)

Which should return both the "close" hard locations and their distances. I've just committed a very basic draft code that computes the distance for all hardlocs, and I am working on code that will select just those below a certain threshold value for return to the cpu.

​So we have a selection problem. Given 1mm hard locations, we want something like 1000 back. That's the problem--the GPU can do anything with the entire million, but it gets totally weird for building arrays with the result (lists are impossible so far).

The problem is we have to insert a HL into array​ position i (say, that was the i-th hardloc active the system found). NOW:

what is "i"?

Remember the kernels are running in crazy parallel, so it's very hard to include a counter that is available to all without having parallel collisions. Serially we have something like this:

Get_Active_Locs (bitstring b) {
for (x=0, x<NUM_LOCS, x++) {
hamming = dist(location [x], b);
if (hamming<threshold) {
active_locs[num_found] = x;
num_found++;
}
}

In parallel, we have concurrency problems with num_found!

kernel Get_Active_Locs(bitstring b, __global int num_found*) {
x = get_global_id(0);
hamming = dist(location [x], b);
if (hamming<threshold) {
active_locs[num_found] = x;
num_found++;
}
}

I'm looking into pyopencl.scan.GenericScanKernel() --> http://documen.tician.de/pyopencl/algorithm.html

I think its philosophy is close to mapreduce. Let's see where this leads.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.