I designed the Unity simulator, the data pipeline, the model, the code that evaluates it, and the API that serves it. Seven types of hippocampal cells emerged in the network, from nothing more than what an agent sees and how it moves.
What I owned, as first author
- ScopeThe question, and which experiments would answer it
- Simulator and dataThe Unity room, the paths, the views, the dataset
- ModelArchitecture, graph rule, loss switches, EWC
- EvaluationClassifier code for all seven cell types
- ShippingAPI, interface, hosting, then a review and fixes
- Top: the 32 × 32 view
- The agent and its trail
- Where one unit fires
Research
The problem
The brain has cells for space (place, grid, border) and cells for objects (object sensitive, object, object vector, object trace). Models usually explain one family at a time, and one well known model, the Tolman Eichenbaum Machine, needs a map of the world given to it. Can one network that only sees and moves give rise to both families, with no map at all? And what decides which ones appear?

System design
How it works
Exact labels from Unity. I built the room in Unity3D, so every view comes with its exact position, heading and reward.
Two senses, one graph. Vision plays the lateral entorhinal cortex, movement the medial one. A graph layer joins them, with no map given in advance.
Read the hidden layers. After training, each of the 320 hidden units gets a firing map and is tested against the rule for each cell type.
Judgement
The decisions
What changed between the 2022 notebooks and the final model, and the thinking behind each.
Research
What emerged
Same data, same network. Only the training switches change, and they decide which cells appear.

- Position
- Heading
- Reward
- Position
- Heading
- Reward
- Position
- Heading
- Reward
- Position
- Heading
- Reward

- Place:
I am here
- Grid:
A map grid laid over the room
- Position
- Heading
- Reward

- Border:
A wall is close
- Position
- Heading
- Reward

- Object sensitive:
Something new is in the room
- Object:
Something is here

- Object vector:
It is over there, at this distance
- Object trace:
Something was here
- Place
I am here
- Grid
A map grid laid over the room
- Border
A wall is close
- Object sensitive
Something new is in the room
- Object
Something is here
- Object vector
It is over there, at this distance
- Object trace
Something was here
Research
A memory of the object

- The object
- Where it used to be
- 105 of 131place cells kept their field in the dark
- 36 of 72object cells moved with the object
- 51cells kept a memory of the object
Limits
- Movement is idealisedPath integration is a function of position, not integrated velocity.
- Overlapping labelsOne unit can pass two rules, for example place and object trace.
- Grids bendGrid cells lost their pattern when the room changed: 24 of 50 kept it in a circle.
- Borders need sightIn the dark only 4 units stayed border cells. Touch as a third node would help.
Next: real limb movement as the input to path integration, and an agent that navigates.
Product
Shipping, then reviewing my own system
I split the research code into two Docker Spaces, then reviewed the live API as if someone else had built it.
- Uploads were unpickledOnly .npz archives, size checked, kept in memory.Pickle refused
- Wrong weightsStartup fetched config 100 while the API loaded 111.Matches training
- Hard to tryA 245 MB upload replaced by a one click sample.2.4 s run
- Raw errorsGeneric messages; logs keep only the error type.No internals leak
- Unbounded inputsShapes, sizes and ranges checked before the model runs.Bad input gets 400
- Slow startModel built once; path integration as one matrix product.Same output
Release gate
The served model reproduces the training activations on all 20,000 points, to within one millionth.
Run it yourself
git clone https://github.com/jarvez31/Object_representation_model.git
pip install -r requirements.txt
python download_data.py
curl "https://jarvez-object-representation-model-api.hf.space/sample?layer=D3"The API sleeps when idle, so the first call is slow.