AxoSim models

Learned surrogates of cortical layer-5 pyramidal neurons, trained on AxoBench v2. At every millisecond a model reads the synaptic events of a neuron, on an excitatory and an inhibitory channel for each of its 639 dendritic sites, and predicts its spike probability and soma voltage. One model covers twelve cells (the NeuronIO Hay cell and eleven Allen all-active models), each selected by an embedding that is linear in the cell's morphological and electrical features.

Model Parameters Mean F1 Event error (mV) Subthreshold error (mV)
small.pt 34,466 0.476 11.87 1.075
medium.pt 525,058 0.589 10.68 0.908
large.pt 1,803,522 0.634 10.16 0.846
small-population.pt 34,466 0.475 11.89 1.076

Scores are on the AxoBench v2 test split of the twelve training cells, with AxoBench's metrics. Besides AxoBench's 8,000 training traces per cell, the models saw more traces simulated with the same cell models and input statistics: 16,000 per Allen cell for the small and medium models, and 24,000 to 26,000 per Allen cell and 28,000 for the Hay cell for the large model. small-population.pt is the small model fine-tuned on the input that neurons receive inside networks of the small model, labelled by the biophysical cell models: in networks of 4,000 neurons with 1,000 to 2,500 contacts each, it closes about 60% of the gap in firing rate to the same network of biophysical cells, at unchanged AxoBench scores. The small models are the ones the population runtime runs: on an RTX 5090 it simulates about half a million neurons with 2,500 contacts each in real time.

Usage

pip install "axosim[hub]>=0.2.1"
import torch
from axosim import Stepper, load_pretrained

model, saved = load_pretrained("large", "cuda")
model.eval()
cell = torch.full((8,), saved["cell_index"]["neuronio_hay_cell1"], device="cuda")
stepper = Stepper(model, cell)
events = torch.zeros(8, 1278, device="cuda")   # +1 excitatory (channels 0-638), -1 inhibitory (639-1277)
spike_logit, voltage_mv = stepper.step(events)  # one ms

saved["cells"] lists the cells. small-population.pt loads with axosim.load_model(huggingface_hub.hf_hub_download("Axym-Labs/AxoSim", "small-population.pt")). Full sequences, the population runtime and contact adaptation are described in the documentation. Checkpoints load with torch.load(..., weights_only=True).

Limits

The models reproduce detailed biophysical simulations of these twelve cell models under AxoBench's input distribution; they are not fitted to recordings. Inputs far from that distribution, such as very dense or synchronous drive, lie outside what the scores above measure.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train Axym-Labs/AxoSim