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

preprint OA: closed
View at publisher

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 .

My notes (saved in your browser only)

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00