RatInABox, a toolkit for modelling locomotion and neuronal activity in continuous environments.

George TM
Rastogi M
de Cothi W
Clopath C
Stachenfeld K
Barry C
Scientific Abstract

Generating synthetic locomotory and neural data is a useful yet cumbersome step commonly required to study theoretical models of the brain's role in spatial navigation. This process can be time consuming and, without a common framework, makes it difficult to reproduce or compare studies which each generate test data in different ways. In response, we present RatInABox, an open-source Python toolkit designed to model realistic rodent locomotion and generate synthetic neural data from spatially modulated cell types. This software provides users with (i) the ability to construct one- or two-dimensional environments with configurable barriers and visual cues, (ii) a physically realistic random motion model fitted to experimental data, (iii) rapid online calculation of neural data for many of the known self-location or velocity selective cell types in the hippocampal formation (including place cells, grid cells, boundary vector cells, head direction cells) and (iv) a framework for constructing custom cell types, multi-layer network models and data- or policy-controlled motion trajectories. The motion and neural models are spatially and temporally continuous as well as topographically sensitive to boundary conditions and walls. We demonstrate that out-of-the-box parameter settings replicate many aspects of rodent foraging behaviour such as velocity statistics and the tendency of rodents to over-explore walls. Numerous tutorial scripts are provided, including examples where RatInABox is used for decoding position from neural data or to solve a navigational reinforcement learning task. We hope this tool will significantly streamline computational research into the brain's role in navigation.

Citation

2024. eLife, 13:e85274

DOI
10.7554/eLife.85274
Similar Content
Paper
Author
Quinn AJ
Atkinson LZ
Gohil C
Kohl O
Pitt J
Nobre AC
Woolrich M

2024. Imaging Neurosci (Camb), 2.

Paper
Author
Shah SA
Brown P

2017.Int IEEE EMBS Conf Neural Eng, 2017():371-374.

Paper
Author
Reeve HM
Koolschijn RS
Shpektor A
Nili H
Rothaermel R
Campo-Urriza N
O'Reilly JX
Bannerman DM
Behrens TE
2020. Cell, 183(1):228-243.e21.
Paper
Author
Zhao H
Hao S
Zhang P
Wehmeyer L
Feng Z
Xu LL
Zhan S
Liu W
Zhang X
Welter ML
Li D
Sun B
Lu Y
Cao C

2025. Mov Disord, 40(12):2641-2653.