Fig. 4: Validation of model-based compressed sensing approach for mapping PV–pyramidal connections.

a, ‘Checkerboard’ visualization of CAVIaR inferences. Left column shows demixed PSCs evoked by single-target stimulation of the listed ROI (‘target’). Right column shows PSCs evoked by holographic stimulation of ensembles containing the listed ROI. Trials separated by dashed lines and rearranged to be in order of increasing laser power (from 30 mW to 60 mW). While all single-target stimulation trials are shown on the left, for ease of visualization only a fraction of ensemble stimulation trials are shown on the right. Shaded trials indicate when CAVIaR detects that the observed PSC was evoked by successfully spiking the listed (presynaptic) ROI; opacity of shading represents the estimated posterior uncertainty of the spike (lighter, less certain; darker, more certain). Blue stars represent when CAVIaR determines that the PSC is spontaneous (due to, for example, an uncharacteristic amplitude). Note that responses are only shaded when the neuron in the listed row actually spiked (as determined by CAVIaR). PSC waveforms that are not shaded and not labeled as spontaneous can still be attributed to other neurons that were stimulated in the same ensemble. Out of 169 stimulated ROIs, the same set of 7 were identified by CAVIaR as being presynaptic by both single-target and ensemble stimulation. b, Example PSCs (corresponding to neuron marked by white arrow in d, below) evoked by holographic stimulation of ensembles containing a putatively connected neuron (left). Single-target stimulation of the same neuron validates the existence of the individual synapse (right). Gray traces show raw PSCs, colored traces show demixed PSCs. Traces colored at random. c, Synaptic weights estimated by CAVIaR independently from single-target stimulation and ensemble stimulation trials show strong agreement (R2, 0.99). Seven synaptic connections shown; points at zero indicate no connection. d, Z-projection (over five different planes) of stimulation FOV for experiment corresponding to a–c. White circles show identified presynaptic neurons. Left, presynaptic neurons identified using single-target stimulation; right, presynaptic neurons identified using ensemble stimulation. NWD and CAVIaR were used in both cases. Seven connections are found using both single-target stimulation and ensemble stimulation. Note that one connection is hidden by another on a higher plane and therefore not directly visible. e, Additional example of similarity between synaptic connectivity maps obtained using single-target (left) vs ensemble stimulation (right) in combination with NWD and CAVIaR. f, Number of connections identified by CAVIaR using both single-target and ensemble stimulation across 14 experiments. Dashed gray line shows identity. g, Agreement between 14 connectivity maps obtained using single-target stimulation compared to compressed sensing. Agreement measured using the R2 (which accounts for synaptic strength; mean ± 1 s.d., 0.89 ± 0.19) and the precision and recall (which measures agreement using only a binary classification; mean ± 1 s.d.; precision 0.95 ± 0.12, recall 0.84 ± 0.15). Bounds of box plots represent interquartile range, triangles show the mean, and whiskers represent lower and upper limits (excluding outliers). h, Joint whole-cell and cell-attached recordings provide ground-truth presynaptic spikes associated with postsynaptic responses during single-target and ensemble stimulation. i, Example image showing locations of presynaptic and postsynaptic neurons, among other segmented ROIs. j, Example scenarios from a paired recording associated with successful optogenetic generation of presynaptic spikes. While trials (i) and (ii) resulted in correct predictions of presynaptic spiking by CAVIaR (are true positives), trials (iii) and (iv) were declared trials on which the stimulated neuron did not spike, either due to an unusually low-amplitude PSC or synaptic failure. Underlaid gray traces show raw PSC without NWD, black traces show PSC with NWD. Scales at the bottom left apply to all subpanels. k, Performance of presynaptic spike inference over n = 4 paired recordings, separated by single-target versus ensemble stimulation and laser power. Error bars show mean ± 1 s.d. over four data points. Performance of presynaptic spike inference does not depend on power or single-target versus ensemble stimulation (P > 0.05 for all pairs, dependent t-test), though lack of significance could be due to sample size.