TL;DR
What would a specific brain state look like if a mouse had run faster, or a monkey had reached left instead of right—while keeping its internal mood, arousal, and unmeasured twitches exactly the same? Neural-DISCO lets neuroscientists perform "what-if" edits on recorded neural population activity, cleanly swapping out specific behaviors or sensory stimuli while preserving the unique background signature of that exact moment in time. Better yet, untangling these signals reveals which individual neurons actually care about which behaviors.
What Problem Does This Paper Address?
Modern neuroscience tools let us record thousands of neurons firing simultaneously while an animal sees, moves, and decides. Standard generative models can take a behavioral label—say, "reaching upward"—and dream up plausible-looking neural spikes.
However, those models average out everything you didn't measure: the animal’s alertness, spontaneous fidgeting, or hidden internal states. If you want to ask a source-conditioned counterfactual question—how would this specific recorded neural response change if only one variable were altered?—you face a delicate balancing act. Without access to the original neural recording, you lose the animal's unique internal state. Conversely, if you feed the original neural activity straight into a model without constraints, the model "cheats" by memorizing everything through that neural input and ignoring your edited label altogether.
Methods
To solve this tug-of-war, the authors introduce Neural-DISCO (DISentangled learning for COunterfactual editing), which splits the model's latent space into clean, separate compartments using standard multilayer perceptrons (MLPs) and a Poisson spike-count observation model:
- Label-Specific Encoders: Each measured variable (e.g., hand velocity, visual grating angle) gets its own dedicated mini-network mapping it to a clean latent block.
- A Bottlenecked Residual Encoder: A separate network reads the raw source neural spikes to capture everything not explained by the labels.
- Asymmetric Noise Regularization (The Secret Sauce): Adapted from disentanglement frameworks like LORD, the residual latent is deliberately corrupted with Gaussian noise and hit with an $L_2$ activation penalty during training, while the label latents pass through untouched. Because the residual channel is noisy and "expensive" to use, the generator is forced to route known behavioral info through the clean label blocks, reserving the residual strictly for unmeasured background state.
At test time, the training noise is turned off. To make an edit, you swap one label latent for a new target value, hold the other labels and the clean residual fixed, and decode the new firing rates. Finally, the authors apply Integrated Gradients (a standard feature-attribution technique) across these neatly separated blocks to score exactly how much each individual neuron relies on each specific label.
Datasets
No new datasets are introduced, though the authors construct controlled synthetic setups alongside established benchmarks:
- RatInABox Simulation: A synthetic 2D foraging agent with 300 neurons split evenly into known functional types (place, head-direction, and speed cells), providing ground-truth counterfactual firing rates.
- Macaque Reaching (Neural Latents Benchmark): Electrophysiology recordings of 137 motor/premotor cortical units during a center-out reaching task, paired with hand position, hand velocity, and eye position.
- Allen Visual Coding (Neuropixels): 32 recording sessions from mouse visual cortex while mice view drifting gratings (varying in orientation and temporal frequency) and run on a wheel.
Key Insights and Ideas
- The Goldilocks Bottleneck: Without regularization ($\lambda = 0$), observed labels leak straight into the residual pathway—when you try to edit a reach trajectory, the generated spikes stubbornly decode back to the original reach. Strengthening the bottleneck forces true separation without destroying unmeasured context.
- Disentanglement Unlocks Better Single-Neuron Biology: Forcing the latent space to separate variables doesn't just enable editing; it sharpens biological interpretability. As the residual bottleneck tightens, feature attribution becomes dramatically better at pinpointing true functional cell types (like distinguishing speed-modulated cells or orientation-selective neurons).
- Flipping the Script to Probe Brain State: You can reverse the editing trick—holding sensory labels fixed while swapping residuals from different trials. In mouse visual cortex, doing this revealed how much each neuron was modulated by an unmeasured variable (temporal frequency), offering a computational microscope into how hidden brain states shape sensory coding.
Key Results
Since real brains don't give us ground-truth "what-if" spikes, the authors train external decoders on real neural data and test whether edited spikes decode to the new target label while preserving unobserved variables:
- RatInABox: Neural-DISCO accurately shifts place-cell firing to a new room half or reverses head-direction cells while preserving withheld speed-cell activity via the residual, whereas unregularized baselines fail completely ($R^2$ dropping into negative values).
- Macaque Reaching: Edited neural activity decodes closely to target reach trajectories: $R^2 = 0.895$ for hand position, $0.772$ for hand velocity, and $0.630$ for eye position (nearly matching real target-spike decoding ceilings of $0.909$, $0.845$, and $0.656$). Attribution also cleanly separates real motor neurons from synthetic constant-rate decoy neurons as regularization increases.
- Allen Visual Coding: Across 32 sessions, editing running speed hits a target RMSE of $3.629\text{ cm/s}$ (beating a Gaussian GLM baseline at $6.017\text{ cm/s}$) while keeping withheld stimulus temporal frequency decodable above chance ($0.541$ balanced accuracy). When rotating visual grating orientation by $180^\circ$, target-orientation accuracy reaches $0.949$ (vs. $0.714$ for Gaussian GLM) while preserving withheld running speed.
Limitations and Future Work
- Operational, Not Causal: These are model-based predictions from observational data, not true causal interventions. Edits that violate natural dependencies (e.g., impossible combinations of posture and speed) are extrapolations and shouldn't be over-interpreted.
- No Guarantees Under Correlation: The noisy channel limits residual capacity, but doesn't mathematically guarantee strict disentanglement—especially when observed and unobserved variables are heavily correlated.
- Static Snapshots: Neural-DISCO models independent time bins using feed-forward networks, ignoring temporal and transition dynamics across time.
- Indirect Validation: On real recordings, evaluation relies on downstream decoders rather than ground-truth neural perturbations—making Neural-DISCO best suited as an in-silico hypothesis generator to guide future wet-lab experiments.
Summary updated