Skip to main content
. Author manuscript; available in PMC: 2026 Nov 5.
Published in final edited form as: Neuron. 2026 May 8;114(18):3459–3479.e15. doi: 10.1016/j.neuron.2026.04.003

Figure 4. Disentangling contributions of task stimuli, choices, and context to single neuron responses with a kernel regression encoding model.

Figure 4.

A) Model schematic. Left: task events across 4 example trials aligned to stimulus onset or movement onset, as well as ongoing spontaneous behavior traces, throughout each trial. Middle: zoomed in view of the regressors for one trial (marked by gray shading and red bracket) which are convolved with a temporal kernel aligned to either stimulus onset or movement onset. Spontaneous behavior regressors are not lagged. White indicates a regressor value of −1, black is +1, gray is in between. Right: predictor matrix is reduced to 20 predictors using reduced rank regression, where target variable is binned spiking from all neurons in a session. Ridge regression is then used to fit the binned spiking of one neuron. B) PETH of a stimulus-encoding MRF neuron (top) and residuals from fits of full model and model with shuffled stimulus labels (bottom). The shuffle iteration with median R2 was used for plotting and ΔR2 value compared to full model. C)-E) Same as B) but for MOs, MRF, and SCm neurons which encode Choice, Context-Premotor, and Context-Premotor variables respectively. PETHs are aligned to wheel movement onset. F) 3-Venn diagrams (estimated using Chow-Rodgers method81) of percentages of neurons across the 8 target regions encoding stimulus, choice, and/or trial context (i.e. contextual modulation: Context-Stim and Context-Premotor combined), defined as p<0.02 against respective shuffled null. Filled circles indicate above chance coding; empty circles indicate below chance coding (Figures S7B-C). Value below the region labels is the percentage of neurons in a region represented by the total area encompassed by the three circles. See also Figures S7, S8.