Skip to content

jarvez31/Object_representation_model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unified Model of Hippocampal Spatial and Object Cells

Paper Demo API

Overview

A unified computational model that simulates the emergence of spatial and object-sensitive neurons in the hippocampus. By integrating visual inputs (LEC) and path integration (MEC) through a Graph Neural Network, the model reproduces seven cell types observed experimentally: place cells, grid cells, border cells, object cells, object-sensitive cells, object-vector cells, and object-trace cells.

Architecture

  • Visual branch: CNN encoder processing 32×32 agent-POV frames
  • Path integration branch: Dense layer on 100-dim trajectory vectors
  • Integration: Graph Convolutional Network (GNN) connecting LEC and MEC streams
  • Output heads: Multi-task prediction of position (22), heading (11), and reward (1)

Deployment

The model is served via a FastAPI REST endpoint and interactive Streamlit demo, both deployed on HuggingFace Spaces.

  • API: POST /inference — upload trajectory + image files, returns firing rate maps as base64 images
  • Demo: Upload .pk1 trajectory files and visualise neuron firing maps by layer

Repository Structure

├── notebooks/
│   └── simulations/
│       ├── common_model_ver_no.ipynb  # Model architecture and support functions
│       └── main.ipynb                 # Main simulation notebook
├── matlab_support_files/
│   └── get_firing_rates.m             # Shuffling tests for grid cells
├── download_data.py                   # Downloads weights and data from HuggingFace
├── requirements.txt
└── README.md

Getting Started

1. Clone the repository

git clone https://github.com/jarvez31/Object_representation_model.git
cd Object_representation_model

2. Install dependencies

pip install -r requirements.txt

3. Download model weights and data

python download_data.py

4. Run the notebooks

Open notebooks/simulations/main.ipynb and follow the instructions.

Results

Cell Type Emerged
Place cells
Grid cells
Border cells
Object cells
Object-sensitive cells
Object-vector cells
Object-trace cells

Modelling Perspective

CNSLM 2022

Experimental Results

CNSLM 2022 (1) CNSLM 2022 (2) CNSLM 2022 (3)

Multisensory Integration Model

CNSLM 2022 (4)

Model Results

CNSLM 2022 (5)

Citation

@article{patil2024unified,
  title={A unified model of hippocampal spatial and object cells},
  author={Patil, Bharat K.},
  journal={bioRxiv},
  year={2024},
  doi={10.1101/2024.09.09.612040}
}

About

Unified CNN–GNN model of hippocampal spatial and object cells. Multi-task deep learning on 1M+ trajectory points with FastAPI serving, Docker deployment, and interactive Streamlit demo. Published in Nature Scientific Reports (under review).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages