Cebra

CEBRA, or Learnable Latent Embeddings for Joint Behavioural and Neural Analysis, is a novel machine-learning method developed with the aim to map behavioural ac...

Last verified:

Visit Cebra

What is Cebra?

CEBRA is a self-supervised machine-learning library for obtaining interpretable, consistent embeddings of high-dimensional time-series recordings using auxiliary variables. The tool compresses neural and behavioral time series to reveal hidden structures in data variability, excelling specifically on behavioral and neural data recorded simultaneously. It produces consistent, high-performance latent spaces that map behavioral actions to neural activity, enabling researchers to probe neural representations during adaptive behaviors.

Key features include support for both calcium imaging and electrophysiology datasets, compatibility across sensory and motor tasks, and applicability to simple or complex behaviors across multiple species. CEBRA works in hypothesis-driven (supervised) or discovery-driven (self-supervised) modes, supports single and multi-session datasets, and can be used label-free. The library implements self-supervised learning algorithms in PyTorch and provides a scikit-learn-style interface for easy integration with existing data analysis pipelines. Additional capabilities include time-series attribution maps with regularized contrastive learning, mapping of space, uncovering complex kinematic features, and rapid high-accuracy decoding of natural movies from visual cortex.

CEBRA is designed for neuroscientists, computational biologists, machine learning researchers working on neural decoding, and anyone analyzing joint behavioral and neural data. It has been validated on datasets from mouse visual cortex, primate sensorimotor cortex, rat hippocampus, and other species. The tool improves decoding accuracy of behavioral variables over standard supervised learning and produces embeddings robust to domain shifts.

Cebra pricing

Pricing model: Free

CEBRA is open source software under an Apache 2.0 license since version 0.4.0. The software is free to use for academic and non-academic purposes. Prior versions 0.1.0 to 0.3.1 were released for academic use only. EPFL has filed a patent titled 'Dimensionality reduction of time-series data, and systems and devices that use the resultant embeddings' - for non-academic use cases where the patent may cause issues, users should contact the EPFL Tech Transfer Office. No paid tiers or subscription plans are offered.

Cebra pros

  • Jointly uses behavioral and neural data for consistent embeddings
  • Self-supervised learning requires no manual labels
  • Works with calcium imaging and electrophysiology datasets
  • Compatible across multiple species (mouse, primate, rat)
  • Supports single and multi-session datasets
  • Hypothesis-driven and discovery-driven analysis modes
  • PyTorch implementation with scikit-learn-style interface
  • Improves decoding accuracy over standard supervised learning
  • Embeddings robust to domain shifts
  • Decodes natural movies from visual cortex with high accuracy
  • Uncovers complex kinematic features during navigation
  • Open source under Apache 2.0 license (version 0.4.0+)
  • Active development with regular updates
  • Integrates with matplotlib and plotly for visualization
  • Validated in Nature 2023 publication with high citations

Cebra cons

  • API may include breaking changes between versions
  • Under active development, stability not guaranteed
  • Patent pending may limit non-academic commercial use
  • Requires PyTorch knowledge for advanced customization
  • Primarily designed for neural/behavioral data, not general time series
  • No official GUI, requires coding skills
  • Docker recommended for reproducible experiments
  • Limited documentation for non-neuroscience applications

Frequently asked questions about Cebra

What is CEBRA and what does it do?

CEBRA is a self-supervised learning library for estimating Consistent EmBeddings of high-dimensional Recordings using Auxiliary variables. It compresses time series data, particularly behavioral and neural data recorded simultaneously, to reveal hidden structures and produce consistent, high-performance latent spaces that map behavioral actions to neural activity.

What types of neural data does CEBRA support?

CEBRA validates accuracy on both calcium imaging (2-photon) and electrophysiology (Neuropixels) datasets. It has been demonstrated on mouse primary visual cortex data from the Allen Institute, primate sensorimotor cortex (M1 and S1), and rat hippocampus data.

Can CEBRA be used without behavioral labels?

Yes, CEBRA can be used label-free in a self-supervised, discovery-driven manner. It can also work in a supervised, hypothesis-driven mode when behavioral labels are available.

What species can I analyze with CEBRA?

CEBRA has been validated across multiple species including mice (visual cortex), primates (sensorimotor cortex), and rats (hippocampus). The tool works for both simple and complex behaviors across species.

Is CEBRA open source and free to use?

Since version 0.4.0, CEBRA is open source under an Apache 2.0 license and free for both academic and non-academic use. Versions 0.1.0 to 0.3.1 were academic-use only.

How do I install CEBRA?

CEBRA can be installed using conda, pip, or docker. Detailed installation options are available in the installation documentation. The library is implemented in PyTorch.

Does CEBRA work with multi-session datasets?

Yes, CEBRA allows single and multi-session datasets to be leveraged for hypothesis testing. It produces consistent latent spaces across different recording sessions and modalities (2-photon and Neuropixels).

What makes CEBRA embeddings 'consistent'?

CEBRA produces consistent latent spaces by jointly using behavioral and neural data. Consistency can be used as a metric for uncovering meaningful differences between datasets, and the inferred latents can be used for decoding behavioral variables with improved accuracy.

Can CEBRA decode viewed videos from neural activity?

Yes, CEBRA has been shown to decode visual cortex activity from mouse brains to reconstruct viewed videos. It provides rapid, high-accuracy decoding of natural movies using DINO frame features as labels with a kNN decoder.

How do I cite CEBRA in my research?

Cite the main Nature 2023 paper: Schneider, S., Lee, J.H. & Mathis, M.W. 'Learnable latent embeddings for joint behavioural and neural analysis.' Nature (2023). DOI: 10.1038/s41586-023-06031-6. For time-series attribution maps, cite the AISTATS 2025 paper.

Categories

Use cases

Browse all AI tools on NeedAnAI