Skip to main content

DRIADA

Dimensionality Reduction for Integrated Activity Data Analysis — a Python framework for cross-scale analysis of neural population activity.

Python Version PyPI version Downloads License Tests codecov Docs Platform

Integrating analysis scales

Neuroscience describes brain activity through three complementary paradigms: single-neuron selectivity (what does each cell encode?), population dynamics (what is the collective geometry?), and networks (how are units connected?). These are not competing theories — they are complementary lenses on the same data. The same neuron can be viewed simultaneously as a feature detector, a dimension of a population manifold, and a node in a functional circuit.

Yet in practice, each paradigm has its own tools, its own data formats, its own packages. If you want to ask a question that crosses paradigm boundaries — does selectivity predict network membership? does filtering by tuning improve manifold structure? how do individual neurons contribute to population coding? do temporal dynamics of single neurons reveal population-level organisation? — you have to build a custom pipeline from incompatible parts.

DRIADA provides a shared data model where all three paradigms operate on the same objects. Results from one domain flow directly into the others:

DRIADA architecture

Three bidirectional bridges connect the paradigms:

  • Neurons ↔ Populations. Selective neurons filter the population matrix for dimensionality reduction; embedding coordinates feed back into neuron-level importance estimation, revealing which cells drive each manifold dimension.
  • Neurons ↔ Networks. Pairwise MI significance testing builds functional connectivity from neural activity; per-neuron recurrence graphs, visibility graphs, and ordinal partition networks yield functional networks grounded in temporal dynamics rather than correlations.
  • Populations ↔ Networks. Graph-based dimensionality reduction (Isomap, diffusion maps) returns proximity graphs that inherit the full network toolkit — spectral decomposition, community detection, entropy — without format conversion. RSA provides a complementary route from population representations to network structure.

DRIADA's strength is integrating these scales — crossing them should be a function call, not a weekend of data wrangling.

🔬 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
  • ➕ Higher-Order Information — total correlation, dual total correlation, and O-information (redundancy vs synergy) for groups of neurons or features
  • 💾 NWB I/O — save experiments to Neurodata Without Borders files and load them back
  • 🧪 Synthetic Data — generate populations with known ground truth for validation
  • ⚡ Neuron — calcium kinetics optimization (rise/decay fitting), event detection, and signal quality metrics

🚀 Tutorials

Interactive notebooks — click a badge to open in Google Colab (no setup required):

Notebook Topics
Open In Colab DRIADA overview Experiment objects, feature types, quick tour of INTENSE, dimensionality reduction, networks
Open In Colab Neuron analysis Spike reconstruction, kinetics optimization, quality metrics, surrogates
Open In Colab Selectivity detection (INTENSE) Mutual information, two-stage testing, optimal delays, mixed selectivity
Open In Colab Population geometry & DR PCA, UMAP, Isomap, autoencoders, manifold quality metrics, dimensionality estimation
Open In Colab Network analysis Cell-cell significance, spectral analysis, communities, graph entropy
Open In Colab Advanced capabilities Embedding selectivity, leave-one-out importance, RSA, RNN analysis
Open In Colab Recurrence analysis Delay embedding, recurrence plots, RQA, visibility & ordinal graphs, population module recovery

All notebooks generate synthetic data internally — no external files needed. See the examples reference for 25+ standalone scripts covering additional use cases.

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. Variable types (continuous, discrete, circular, multivariate) are auto-detected and preprocessed appropriately.

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

Artificial neural networks

Methodological applications

See PUBLICATIONS.md for the complete list with abstracts and details.

Support

License

This project is licensed under the MIT License — see the LICENSE file for details.

Metadata

Release files for driada 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for driada 1.2.2
File Size Uploaded Provenance Actions
driada-1.2.2.tar.gz 1.4 MB With provenance Details for driada-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for driada 1.2.2
File Interpreter ABI Platform Actions
driada-1.2.2-py3-none-any.whl Python 3 none any Details for driada-1.2.2-py3-none-any.whl

Total release size: 2.0 MB

Release files / driada-1.2.2.tar.gz

Download URL driada-1.2.2.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
0b11d4c561d8bbb6fa90dbf0e923dda08a418bd04b45a5e4f8ec402e91457cb7
BLAKE2b-256 checksum
How to use checksums
5eb72f2017f4acb2d37f6216918a8289072361e4b6a1d95bec84359757f4fca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / driada-1.2.2-py3-none-any.whl

Download URL driada-1.2.2-py3-none-any.whl
Size 639.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53bae637f8e0555b9aebc9c6e363c46b48c9d666350637cb599056c39f40ba15
BLAKE2b-256 checksum
How to use checksums
261456f999af50d4f322eb4e7d8cfe09c3c395fd1e7159a380dd0d2cdae48a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for driada 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for driada-1.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page