Neural-DISCO

Source-conditioned counterfactual editing of neural population activity

Nico Policzer*James Ho*Joseph Soo*Xin Tang†
Michael Smith Laboratories and Department of Computer Science, University of British Columbia
*Equal contribution · †Corresponding author: xin.tang@msl.ubc.ca · NeurIPS 2026

What would these neurons have done if the animal had been somewhere else? Neural-DISCO takes a real recording, swaps out one behavior (like position or running speed), and predicts the new activity. The other measured labels, and the parts of the recording no label explains, are kept.

place cells head-direction cells speed cells

The problem

Generating "typical" activity isn't enough

Modern probes record hundreds to thousands of neurons while an animal moves, decides and sees. Many questions about this data are "what if" questions: how would this population have responded if the animal had run faster, or reached in another direction?

Models that generate activity from labels alone give you a plausible average response. They throw away everything that made a particular moment unique: internal state, fidgeting, unmeasured task variables. Neural-DISCO is built to keep them. We call this source-conditioned counterfactual editing: start from one real recording, change one measured label, keep the rest.

How it works

One slot per label, plus a narrow slot for everything else

Step 1 · Encode

Split into blocks

Each measured behavior or stimulus gets its own small network and its own slot in the representation. A separate "residual" encoder reads the spikes themselves to capture what the labels miss.

Step 2 · Squeeze

Keep the residual narrow

During training, noise is added to the residual and its size is penalized. That makes it cheaper for the model to send label information through the label slots, so the residual only keeps what it has to.

Step 3 · Edit

Swap one block, decode

To ask "what if", replace one label's block with a new value, keep the others and the residual fixed, and decode firing rates. The same structure lets us score which neurons care about which label.

Neural-DISCO overview diagram: label encoders, residual encoder, generator, counterfactual editing and neuron attribution

Fig. 1. Overview. (a) Neural-DISCO rebuilds the recorded spike counts from a block for each label plus a bottlenecked residual. (b) An edit replaces one label's block while keeping the other label blocks and the residual from the original recording. (c) The same block structure gives a per-label importance score for every neuron.

Results

Tested from simulation to real brains

When we know the right answer, does the edit hit it?

A simulated rat explores a 2 × 1 m box with 100 place cells, 100 head-direction cells and 100 speed cells. The model is told position and head direction, but never speed.

Shift the rat to the other half of the box, and the place cells follow the true target while the speed cells keep their original activity. Reverse its heading by 180°, and the head-direction cells change while place and speed cells stay put. Without the bottleneck, label information leaks into the residual and edits often fail to take effect.

The importance scores also pick out the right cell types: position scores find place cells, direction scores find head-direction cells, and residual scores find speed cells.

RatInABox evaluation figure

Fig. 2. Controlled simulation. (b) Cell-type recovery across bottleneck strength. (c) The residual is organized by the withheld speed. (d–g) Position shift and heading reversal, scored against the simulator's true rates.

Cite

BibTeX

@inproceedings{policzer2026neuraldisco,
  title     = {Neural-{DISCO}: Source-Conditioned Counterfactual Editing of Neural Population Activity},
  author    = {Policzer, Nico and Ho, James and Soo, Joseph and Tang, Xin},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026}
}