Source-conditioned counterfactual editing of neural population activity
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.
The problem
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
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.
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.
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.
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
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.

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.
In real motor cortex, does edited activity look like the new reach?
137 units recorded from motor and premotor cortex while a monkey reached to targets (Neural Latents Benchmark). We swap one trial's hand position, hand velocity and eye position for another trial's, then read the result with a CEBRA-based decoder trained only on real data.
The edited activity decodes almost as well as the real target trial and is competitive with pi-VAE and NEDS. The version without the bottleneck stays stuck on the original reach.

Fig. 3. Monkey reaching. (b) Decoded trajectories from edited activity follow the target reach, not the source. (c,d) Importance scores separate real neurons from constant-rate control neurons. (e) Target-decoding R² compared with baselines.
In visual cortex, can we edit running or the stimulus and keep the rest?
32 recording sessions from the Allen Visual Coding Neuropixels dataset, recorded while mice watched drifting gratings and ran on a wheel.
Speed edit. The model is given running speed and grating orientation, but not the grating's temporal frequency. Setting running speed to its average brings decoded speed much closer to that target than a linear baseline (Gaussian GLM). Temporal frequency, which only the residual could carry, stays decodable above chance.
Orientation edit. The model is given orientation and temporal frequency, but not running speed. Rotating orientation by 180° makes the activity decode as the new orientation, while the original temporal frequency is kept.
Importance scores line up with the dataset's own unit measures: running scores track which cells are running-modulated, and orientation scores track orientation selectivity. Both get better as the bottleneck gets stronger.

Fig. 4. Mouse visual cortex, 32 sessions. Speed edit (left) and orientation edit (right), each with the withheld variable's preservation. (f,l) Importance scores match running modulation and orientation selectivity better as the bottleneck gets stronger.
Cite
@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}
}