Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VectorHaSH

A biologically-plausible vector hashing framework for associative memory and bio-inspired SLAM, developed as part of the RatSLAM 2.0 COMP 400 honors project at McGill University.

Overview

VectorHaSH provides a neocortical-hippocampal-entorhinal memory scaffold that stores sensory observations in a distributed, denoising-friendly representation. The framework is built around:

  • vectorhash.py – the core VectorHaSH class (store_memory, recall, denoising, and dream/fix modes).
  • clean_scaffold.pyGridHippocampalScaffold modeling entorhinal grid cells over a toroidal attractor network.
  • hippocampal_sensory_layers.pyHippocampalSensoryLayer for Hebbian / analytic / iterative pseudoinverse learning between the hippocampus and sensory inputs.
  • shifts.py – velocity-driven continuous attractor dynamics for path integration.
  • graph_utils.py / grid_module.py – topological graph building and grid-module utilities used for SLAM loop-closure and pose tracking.

Experiments (capacity scaling, learning-rule benchmarks, and SLAM evaluations in AnimalAI) are in the notebooks and experiments/, kidnapping_tests/, and results/ directories.

Visuals

RatSLAM 2.0 pose tracking in AnimalAI — a test path with the agent's true vs. predicted camera view, plus the estimated x, y, and heading distributions tracked by the hippocampal grid code:

Grid-module dynamics — the entorhinal grid-cell continuous attractor network (CAN) sustains a localized activity bump that drifts with velocity input (path integration). Left: a bump circulating under rotational velocity input. Right: bump stabilization/repair via the Burak & Fiete healer.

circular velocity drive stabilization by healer

Shift dynamics — how new sensory evidence moves the grid-cell bump: additive shift vs. multiplicative shift of the one-hot grid representation.

additive shift multiplicative shift

Write-up

Full write-up, abstract, and presentation slides: Research & Publications – RatSLAM 2.0 (VectorHaSH & Bio-Plausible SLAM)

Dependencies

Python + PyTorch, with scipy, numpy, and matplotlib. See environment-aai-linux.yml for a full conda environment.

Citation

@techreport{huang2025ratslam2,
  title={COMP 400 Final Report: RatSlam 2.0 (VectorHaSH \& Bio-Plausible SLAM)},
  author={Huang, Ezra and Lamontagne-Kratz, Jonathan and Lefevre, Olivier and Premont-Schwarz, Isabeau},
  institution={McGill University School of Computer Science},
  type={COMP 400 Final Report},
  month={May},
  year={2025},
  url={https://github.com/epicgamer17/vectorhash}
}

License

MIT

Note: the kidnapping_tests/, kidnapping_tests_identity_smoothing/, results/, and hypers_searching/ directories contain generated experiment outputs (.pkl checkpoints, .zip archives) and are gitignored. They are recreated by running the notebooks.

About

Vectorhash with Ratslam implementation for COMP 400 created with Ezra Huang and Olivier Lefevre, migrated from another codebase.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages