Population and element-level analysis of neuronal computations
Project description
DRIADA
Dimensionality Reduction for Integrated Activity Data Analysis — a Python framework for analyzing neural population activity at both single-neuron and population levels.
DRIADA connects single-neuron selectivity analysis with population-level dimensionality reduction. Given neural activity and related behavior/environment variables, it identifies which neurons encode which variables, extracts low-dimensional population structure, and links the two.
🚀 Tutorials
Interactive notebooks — click a badge to open in Google Colab (no setup required):
All notebooks generate synthetic data internally — no external files needed. See the examples reference for standalone scripts covering additional use cases.
🔬 Key Capabilities
- 🧠 INTENSE — detect neuron-feature selectivity via mutual information with rigorous two-stage statistical testing, delay optimization, and mixed selectivity disentanglement
- 📊 Dimensionality Reduction — linear (PCA), graph-based (Isomap, diffusion maps, LLE), neighbor-embedding (UMAP, t-SNE), and neural network-based (autoencoders) with manifold quality metrics
- 📐 Dimensionality Estimation — PCA-based, effective rank, k-NN, correlation, and geodesic dimension
- 🔗 Integration — map single-cell selectivity onto population manifolds and embedding components
- 🌐 Network Analysis — general-purpose graph analysis (spectral, entropy, communities) for connectomes, functional networks, or dimensionality reduction proximity graphs
- 🔄 Recurrence Analysis — delay embedding, recurrence plots, RQA, visibility graphs, ordinal partition networks for nonlinear dynamics and population module recovery
- 📏 RSA — representational dissimilarity matrices, cross-region and cross-session comparisons
- 🧪 Synthetic Data — generate populations with known ground truth for validation
- 🔬 Neuron — calcium kinetics optimization (rise/decay fitting), event detection, and signal quality metrics
Data
DRIADA is designed for calcium imaging data but works with any neural activity represented as a (n_units, n_frames) array — RNN activations, firing rates, LFP channels, or anything else. Behavioral variables are 1D or multi-component arrays of the same length.
Input workflow: load your arrays into a Python dict and call load_exp_from_aligned_data:
from driada.experiment import load_exp_from_aligned_data
from driada.intense import (compute_cell_feat_significance,
compute_cell_cell_significance, compute_embedding_selectivity)
from driada.rsa import compute_experiment_rdm
from driada.network import Network
from driada.integration import get_functional_organization
import scipy.sparse as sp
data = {
'calcium': calcium_array, # (n_neurons, n_frames) — or 'activations', 'rates', etc.
'speed': speed_array, # (n_frames,) continuous variable
'position': position_array, # (2, n_frames) multi-component variable
'head_direction': hd_array, # auto-detected as circular
'trial_type': trial_type_array, # auto-detected as discrete
}
exp = load_exp_from_aligned_data('MyLab', {'name': 'session1'}, data,
static_features={'fps': 30.0})
feat_stats, feat_sig, *_ = compute_cell_feat_significance(exp) # neuron-feature selectivity
cell_sim, cell_sig, *_ = compute_cell_cell_significance(exp) # functional connectivity
net = Network(adj=sp.csr_matrix(cell_sig), preprocessing='giant_cc') # network analysis
embedding = exp.create_embedding('umap', n_components=2) # dimensionality reduction
rdm, labels = compute_experiment_rdm(exp, items='trial_type') # representational similarity
emb_res = compute_embedding_selectivity(exp, ['umap']) # which neurons encode which components
org = get_functional_organization(exp, 'umap',
intense_results=emb_res['umap']['intense_results']) # selectivity-to-embedding bridge
You can also load directly from .npz files via load_experiment(). See the RNN analysis tutorial for a non-calcium example.
Installation
pip install driada
# Optional extras
pip install driada[gpu] # autoencoders, torch-based methods
pip install driada[mvu] # MVU dimensionality reduction (cvxpy)
pip install driada[all] # everything
# From source
git clone https://github.com/iabs-neuro/driada.git
cd driada
pip install -e ".[dev]"
DRIADA pulls in ~30 dependencies (numpy, scipy, scikit-learn, numba, joblib, etc.). See pyproject.toml for the full list.
Documentation
📖 driada.readthedocs.io — API reference, installation guide, and quickstart 📋 Changelog — release history and migration notes
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
git clone https://github.com/iabs-neuro/driada.git
cd driada
pip install -e ".[dev]"
pytest
Citation
If you use DRIADA in your research, please cite:
@software{driada2026,
title = {DRIADA: Dimensionality Reduction for Integrated Activity Data Analysis},
author = {Pospelov, Nikita and contributors},
year = {2026},
url = {https://github.com/iabs-neuro/driada}
}
Publications
DRIADA has been used in the following research:
Biological neural systems
- Sotskov et al. (2022) — Fast tuning dynamics of hippocampal place cells during free exploration
- Pospelov et al. (2024) — Effective dimensionality of hippocampal population activity correlates with behavior
- Bobyleva et al. (2025) — Multifractality of structural connectome eigenmodes
Artificial neural networks
- Kononov et al. (2025) — Hybrid computational dynamics in RNNs through reinforcement learning
Methodological applications
- Pospelov et al. (2021) — Laplacian Eigenmaps for fMRI resting-state analysis
See PUBLICATIONS.md for the complete list with abstracts and details.
Support
- 📧 Email: pospelov.na14@physics.msu.ru
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
License
This project is licensed under the MIT License — see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file driada-1.1.0.tar.gz.
File metadata
- Download URL: driada-1.1.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f9245a8e9205b2547dca690a5b00eb75d85e6949b3119339c8c5184e17d43f9
|
|
| MD5 |
4ebdd2add6875fbfb2ef41993e81545d
|
|
| BLAKE2b-256 |
203b7c5f8400b0ddddcec8c11696329cd7a4920707c13a76ea1db56d99897328
|
Provenance
The following attestation bundles were made for driada-1.1.0.tar.gz:
Publisher:
publish.yml on iabs-neuro/driada
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
driada-1.1.0.tar.gz -
Subject digest:
5f9245a8e9205b2547dca690a5b00eb75d85e6949b3119339c8c5184e17d43f9 - Sigstore transparency entry: 1108305384
- Sigstore integration time:
-
Permalink:
iabs-neuro/driada@8d317bf661707c57b1050cda5de586eb34415466 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/iabs-neuro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8d317bf661707c57b1050cda5de586eb34415466 -
Trigger Event:
release
-
Statement type:
File details
Details for the file driada-1.1.0-py3-none-any.whl.
File metadata
- Download URL: driada-1.1.0-py3-none-any.whl
- Upload date:
- Size: 616.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96cb1bc5b8c234bd8cefcd571521a8fdf6b0017c4659e67c2368bebadad30f21
|
|
| MD5 |
1850b9a27150784758cf721aa3ed0a79
|
|
| BLAKE2b-256 |
42cfd9a72243b9f8fb218db0ff3f2dc085757d6ba9d966c9e0a9eec0765eb324
|
Provenance
The following attestation bundles were made for driada-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on iabs-neuro/driada
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
driada-1.1.0-py3-none-any.whl -
Subject digest:
96cb1bc5b8c234bd8cefcd571521a8fdf6b0017c4659e67c2368bebadad30f21 - Sigstore transparency entry: 1108305388
- Sigstore integration time:
-
Permalink:
iabs-neuro/driada@8d317bf661707c57b1050cda5de586eb34415466 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/iabs-neuro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8d317bf661707c57b1050cda5de586eb34415466 -
Trigger Event:
release
-
Statement type: