What you are seeing
- The agentMoves like a rat, using real rat movement statistics
- Its pathA short trail behind the agent
- One neuron firingEach dot is a spike from unit 13
- A column formsIt stretches along gravity, not across the floor
Timeline
- 2021Research startsIIT Madras, funded by SERB (now ANRF)
- 2024Paper publishedScientific Reports
- 2026Live demoAnyone can try it
We trained a small autoencoder only on flat 2D movement, and its units became place and grid cells that stretch along gravity in 3D mazes, as in real rats. I then took the research code to a public app and hardened it.
Research
The problem
Rats in 3D climbing mazes have place fields that stretch along the vertical axis, unlike the compact fields of flying bats. Grieves and colleagues (2020) saw this in an upright lattice but not in a tilted one. Hayman and colleagues (2011) saw it on a helix and a pegboard.
When we started, almost no model covered 3D. Our question: can one model, trained only on a flat floor with no position labels, reproduce all four results?
Research
Key decisions
One simple model for 2D and 3D. Our earlier 2D models used a lateral anti Hebbian network. We replaced it with a single linear autoencoder, 80 → 50 → 80, so the same model and training serve every maze and only the input angles change.
Encode movement, not position. 80 head direction cells feed path integration, PIᵢ = cos(β · z·uᵢ), where z is the distance from the start. The model only learns to rebuild its input; the 50 bottleneck units are what we read as neurons.
Copy how the real rats moved. We built trajectories by sampling from the movement statistics the original studies report. In the lattice, for example, the agent climbs 20% of the time.
Research
What we found
In 3D, erosion analysis showed fields stretching along the vertical axis in the upright lattice and no preferred axis in the tilted one, as in rats. On the helix and pegboard, fields ran across coils and layers, with less information about height than about horizontal position.
Where it disagrees: helix fields came out far longer than in the experiment (aspect ratio 11.28 against 1.99 on the floor), because field width depends on β.

- Where one unit fires
- Gravity

One spot: place cells

Repeating spots: grid like

Product
From paper to product
How I shipped it
I turned the offline Python and MATLAB pipeline into a public app: pick a maze, run the model, flip through all 50 neurons, or retrain with your own settings. I picked the Docker SDK on Hugging Face Spaces over the Streamlit SDK to control the serving layer, and FastAPI for Pydantic validation and generated API docs. Model weights broke plain Git pushes, so I moved them off it. A scheduled ping keeps the Space awake.
How I hardened it
A later review of the live demo found five problems, listed below. I fixed each one and checked the result with 13 API tests and a scripted click through of the interface. Retraining is now bounded by the API, not just the sliders, with a 240 s wait limit.
Honest limits
Limits and next steps
- Movement onlyNo vision or landmarks, so no drift correction. My next project adds it. See it →
- No timingTheta rhythm and spike timing are left out.
- Rats, not batsHeadings are mostly horizontal; free flight needs full 3D tuning.
- Free serverThe Space sleeps when idle; waking takes about a minute.