HIPPIE β High-dimensional Interpretation for Physiological Patterns in Intercellular Electrophysiology
HIPPIE is a multimodal generative model that learns a shared latent representation of neurons from extracellular electrophysiology recordings. It is trained jointly on waveform shape, inter-spike interval (ISI) distribution, and autocorrelogram (ACG) features across 11 publicly available datasets, with explicit conditioning on recording technology.
The checkpoint released here was pretrained on all 11 datasets using technology conditioning (4-class: neuropixels, silicon probe, juxtacellular, tetrode), making it suitable for transfer to new datasets without retraining the full model.
Model Details
| Property | Value |
|---|---|
| Architecture | Conditional VAE (ResNet18-based 1D conv encoder/decoder) |
| Latent dimension | 30 (10 per modality Γ 3 modalities) |
| KL weight (Ξ²) | 1.0 |
| Input modalities | Waveform (50 samples), ISI (100 bins), ACG (100 bins) |
| Technology conditioning | 4-class embedding (dim=5) |
| Pretraining datasets | 11 (see below) |
| Framework | PyTorch + PyTorch Lightning |
Architecture
Each modality is independently encoded by a 1D ResNet18 with channel widths [64, 128, 256, 512]. A fusion encoder concatenates all three modality representations and projects to the shared latent space. The decoder mirrors the encoder structure and is conditioned on both the latent code and the cell-type label (decoder-only conditioning β the encoder is label-agnostic at inference time).
For datasets lacking ACG data (bimodal recordings), zero vectors are injected for the ACG modality.
Training Data
Pretrained on 11 labeled electrophysiology datasets spanning mouse, rat, and macaque:
| Dataset | Species / Region | Technology | # Cell Types |
|---|---|---|---|
| Hull et al. | Mouse cerebellar cortex | Neuropixels | 3 |
| Hausser lab | Mouse cerebellar cortex | Neuropixels | 3 |
| Lissberger lab | Macaque cerebellum | Silicon probe | 3 |
| CellExplorer (Petersen et al. 2021) | Mouse cortex / hippocampus | Neuropixels | Multi |
| IBL brain-wide | Mouse whole-brain | Neuropixels | Multi-region |
| Allen Neuropixels | Mouse cortex | Neuropixels | Multi |
| DANDI 000041 | Rat frontal cortex | 64-ch silicon probe | Multi |
| DANDI 000473 | Mouse PFC | Neuropixels | Multi |
| DANDI 000955 | Rat somatosensory cortex | 32-ch NeuroNexus | 2 |
| A1 (Lakunina et al. 2020) | Mouse auditory cortex | Silicon probe | Multi |
| Juxtacellular S1 | Mouse somatosensory cortex | Juxtacellular micropipette | Multi |
Technology Conditioning Vocabulary
| ID | Label | Datasets |
|---|---|---|
| 0 | neuropixels |
IBL, Allen, Hausser, Hull, CellExplorer, DANDI 000473 |
| 1 | silicon_probe |
DANDI 000041, DANDI 000955, A1, Lissberger |
| 2 | juxtacellular |
Juxtacellular mouse S1 |
| 3 | tetrode |
Reserved |
Performance
KNN balanced accuracy (cosine distance, k=1..20 sweep) on held-out test splits:
| Dataset | HIPPIE | NEMO | PhysMAP | VAE |
|---|---|---|---|---|
| Hull (cerebellum) | 0.955 | 0.862 | 0.813 | 0.941 |
| Lissberger (cerebellum) | 0.796 | 0.781 | 0.743 | 0.704 |
| A1 (auditory cortex) | 0.658 | β | 0.624 | 0.588 |
| Juxtacellular S1 | 0.677 | β | 0.657 | 0.537 |
How To Use
Fine-tune on a new dataset
import torch
from huggingface_hub import hf_hub_download
# Download checkpoint
ckpt_path = hf_hub_download(
repo_id="Jesusgf23/hippie",
filename="hippie_techcond_v1.ckpt"
)
# Load with the HIPPIE training script
# (requires the hippie_benchmarking repository)
# python scripts/train_multimodal_transductive.py \
# --dataset YOUR_DATASET \
# --pretrain-checkpoint PATH_TO_CKPT \
# --use-tech-conditioning \
# --config class_decoder_source_bn_aug_reg \
# --z_dim 30 --beta 1.0
Extract latent embeddings
import torch
import numpy as np
# Load model state dict
ckpt = torch.load(ckpt_path, map_location="cpu")
state_dict = ckpt["state_dict"]
# Inputs (all float32, batch-first):
# waveform: (N, 1, 50) β min-max normalized to [-1, 1]
# isi: (N, 1, 100) β log-transformed ISI distribution
# acg: (N, 1, 100) β autocorrelogram (zeros if unavailable)
# tech_id: (N,) int β 0=neuropixels, 1=silicon_probe, 2=juxtacellular
# See hippie/multimodal_model.py for the full forward pass.
Waveform preprocessing
import torch
import torch.nn.functional as F
def preprocess_waveform(raw: np.ndarray, wave_len: int = 50) -> torch.Tensor:
wave = torch.as_tensor(raw, dtype=torch.float32).unsqueeze(0).unsqueeze(0)
wave = F.interpolate(wave, size=(wave_len,), mode="linear", align_corners=False)
wave = wave.squeeze(0)
mn, mx = wave.min(), wave.max()
if mx > mn:
wave = (wave - mn) / (mx - mn)
return wave * 2.0 - 1.0
Citation
If you use this model, please cite:
@article{gonzalez2025hippie,
title = {HIPPIE: High-dimensional Interpretation for Physiological Patterns in Intercellular Electrophysiology},
author = {Gonzalez-Ferrer, Jesus and Lehrer, Julian and Alvarez-Esteban, Bruno and
Schweiger, Hunter E. and Geng, Jinghui and Mostajo-Radji, Mohammed A. and
Haussler, David and Teodorescu, Mircea},
journal = {Nature Communications},
year = {2025},
note = {In revision}
}
License
Apache 2.0. See LICENSE for details.