Dimensionality Reduction for Integrated Activity Data β 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.
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 23 standalone scripts covering additional use cases.
- π§ 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
- π 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
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 bridgeYou can also load directly from .npz files via load_experiment(). See the RNN analysis tutorial for a non-calcium example.
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.
π driada.readthedocs.io β API reference, installation guide, and quickstart π Changelog β release history and migration notes
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
git clone https://github.com/iabs-neuro/driada.git
cd driada
pip install -e ".[dev]"
pytestA paper describing DRIADA has been submitted to the Journal of Open Source Software (JOSS). In the meantime, please cite:
@software{driada2026,
title = {DRIADA: Dimensionality Reduction for Integrated Activity Data},
author = {Pospelov, Nikita and contributors},
year = {2026},
url = {https://github.com/iabs-neuro/driada}
}DRIADA has been used in the following research:
- 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
- Kononov et al. (2025) β Hybrid computational dynamics in RNNs through reinforcement learning
- Pospelov et al. (2021) β Laplacian Eigenmaps for fMRI resting-state analysis
See PUBLICATIONS.md for the complete list with abstracts and details.
- π§ Email: pospelov.na14@physics.msu.ru
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
This project is licensed under the MIT License β see the LICENSE file for details.