Fig. 4: Assembly of neural encoding model during operant task with 1-photon imaging.

a Schematic showing viral injection strategy to label pathway specific PL neurons for 1-photon calcium imaging (top) and representative image indicating GRIN lens location (bottom, n = 17 animals). scale bar, 500 μm. b MIN1PIPE workflow (left) for extraction of calcium signal and snapshot for each step (middle). scale bar, 50 pixels. Representative raw Ca2+ traces from 10 neurons (right). Scale bar, 20 s. c Abstract of design matrix structure for neural encoding model showing behavioral predictors for pre-outcome, outcome, internal representations of value (top, see Table S1). Schematic of DeepLabcut pipeline for estimating head velocity (blue box) and Q + forget modeling (pink box) to estimate latent internal choice values (bottom). d Example of raw Ca2+ trace and predicted trace from full encoding model (top, left). Encoding model inferred kernels (bottom, left) from example neuron exhibiting strong O+ modulation (top, right, tuning plot). Radar plot shows overview of tuning indices from representative neuron. Peri-event time histogram and trial-by-trial neuronal activity heat map (bottom, right) aligned by O+. e, f) Histogram of binned total FVE distribution for all neurons from PL::A-DMS (e) or PL::P-DMS (f). Gray bars denote non-task tuned population (<5% FVE threshold); colored bars (blue, PL::A-DMS; orange, PL::P-DMS) denote task-tuned neurons. Pie charts showing the proportion of task-tuned neurons (insets).