Back

Decodanda: a Python toolbox for best-practice decoding and geometric analysis of neural representations

Posani, L.

2026-03-18 neuroscience
10.64898/2026.03.16.711920 bioRxiv
Show abstract

Neural decoding is a powerful approach for inferring which variables are represented in the activity of a population of neurons, with broad applications ranging from basic neuroscience to clinical settings such as brain-computer interfaces. More recently, decoding has also been used as a cross-validated tool for studying the computationally relevant properties of representational geometry, revealing not only whether a variable is encoded, but also how it is encoded and which computations the collective activity of neural populations may support. However, decoding analyses present several technical challenges and common pitfalls that can lead to misleading conclusions if not handled carefully. Here, we introduce Decodanda, a Python toolbox for decoding and geometric analysis of neural population activity. Decodanda provides functions for decoding arbitrary variables and for quantifying geometric features of neural representations, including shattering dimensionality and cross-condition generalization performance (CCGP). Importantly, the package automates several essential best-practice safeguards, including trial-based cross-validation to avoid training-testing leakage from temporally correlated neural traces (a particularly important issue for calcium imaging data), null models for statistical significance, pseudo-population pooling, and cross-variable balancing to determine which of a set of correlated variables is genuinely encoded in the activity. Decodanda is agnostic to the specific classifier used for decoding, and it is designed to be both user-friendly and highly customizable, allowing researchers to assemble flexible analysis pipelines from modular building blocks. Here, we provide an overview of the design principles of Decodanda and illustrate its use cases in neuroscience research. Documentation, example notebooks, and source code are available at github.com/lposani/decodanda.

Matching journals

The top 7 journals account for 50% of the predicted probability mass.

1
PLOS Computational Biology
1633 papers in training set
Top 2%
16.9%
2
eLife
5422 papers in training set
Top 7%
9.8%
3
Imaging Neuroscience
242 papers in training set
Top 0.6%
6.1%
4
Human Brain Mapping
295 papers in training set
Top 1%
4.7%
5
Nature Computational Science
50 papers in training set
Top 0.1%
4.7%
6
NeuroImage
813 papers in training set
Top 2%
4.2%
7
eneuro
389 papers in training set
Top 2%
4.0%
50% of probability mass above
8
Nature Methods
336 papers in training set
Top 3%
3.8%
9
PLOS ONE
4510 papers in training set
Top 37%
3.8%
10
Nature Communications
4913 papers in training set
Top 40%
3.5%
11
Neuroinformatics
40 papers in training set
Top 0.3%
2.5%
12
Nature Neuroscience
216 papers in training set
Top 3%
2.4%
13
Network Neuroscience
116 papers in training set
Top 0.4%
2.3%
14
Patterns
70 papers in training set
Top 0.5%
2.3%
15
Journal of Neural Engineering
197 papers in training set
Top 1%
1.8%
16
Cell Reports
1338 papers in training set
Top 22%
1.8%
17
Neuron
282 papers in training set
Top 5%
1.7%
18
Scientific Reports
3102 papers in training set
Top 57%
1.7%
19
Communications Biology
886 papers in training set
Top 10%
1.6%
20
Proceedings of the National Academy of Sciences
2130 papers in training set
Top 34%
1.6%
21
Frontiers in Neuroinformatics
38 papers in training set
Top 0.4%
1.6%
22
Medical Image Analysis
33 papers in training set
Top 0.7%
1.6%
23
Journal of Neuroscience Methods
106 papers in training set
Top 1%
1.2%
24
GigaScience
172 papers in training set
Top 3%
0.9%
25
Scientific Data
174 papers in training set
Top 3%
0.6%
26
Bioinformatics
1061 papers in training set
Top 10%
0.6%
27
BMC Bioinformatics
383 papers in training set
Top 8%
0.6%