Skip to main content

This is a preprint.

It has not yet been peer reviewed by a journal.

The National Library of Medicine is running a pilot to include preprints that result from research funded by NIH in PMC and PubMed.

bioRxiv logoLink to bioRxiv
[Preprint]. 2023 Oct 26:2023.05.25.542307. Originally published 2023 May 25. [Version 2] doi: 10.1101/2023.05.25.542307

Bayesian target optimisation for high-precision holographic optogenetics

Marcus A Triplett 1,2,, Marta Gajowa 3, Hillel Adesnik 3, Liam Paninski 1,2
PMCID: PMC10246014  PMID: 37292661

Abstract

Two-photon optogenetics has transformed our ability to probe the structure and function of neural circuits. However, achieving precise optogenetic control of neural ensemble activity has remained fundamentally constrained by the problem of off-target stimulation (OTS): the inadvertent activation of nearby non-target neurons due to imperfect confinement of light onto target neurons. Here we propose a novel computational approach to this problem called Bayesian target optimisation. Our approach uses nonparametric Bayesian inference to model neural responses to optogenetic stimulation, and then optimises the laser powers and optical target locations needed to achieve a desired activity pattern with minimal OTS. We validate our approach in simulations and using data from in vitro experiments, showing that Bayesian target optimisation considerably reduces OTS across all conditions we test. Together, these results establish our ability to overcome OTS, enabling optogenetic stimulation with substantially improved precision.

1. Introduction

A key technological goal in neuroscience is to gain precise control over the activity of neurons. Currently, one of the most promising approaches for achieving such control is two-photon optogenetics [14]. This technique relies on the use of two-photon excitation to activate opsin molecules expressed in the somatic membrane, allowing individual neurons to be targeted for stimulation. Holographic optogenetics further extends this technique by focusing two-photon excitation into ~10 μm disks of light that illuminate all of a neuron’s opsin molecules in parallel [59]. Replicating this illumination pattern across many neurons at once then grants simultaneous optogenetic control of entire neural ensembles [1012]. However, the spatial precision of holographic optogenetics has remained fundamentally limited by the problem of off-target stimulation (OTS): if multiple opsin-expressing neurons lie in close proximity (in the most extreme case, if their membranes are in physical contact), two-photon excitation will frequently activate opsin molecules in each neuron when attempting to stimulate only one. This can inadvertently elicit spikes in non-target neurons, compromising the precision and specificity of the optogenetic manipulation [13].

Previous attempts at overcoming OTS have been either optical or molecular in nature (e.g. by using temporal focusing [2, 6, 7, 14] or improving the soma-targeting of the opsin [15, 16, 10]), but have not yet achieved “true” single-cell precision under many experimental conditions. Frequently, experimenters will simply express opsin sparsely in a population to avoid OTS, as this reduces the number of nearby opsin-expressing neurons that could be mistakenly activated [17]. However, sparse opsin expression reduces the number of neurons that can potentially be probed during an experiment, and therefore limits the kinds of scientific questions that can be addressed using two-photon optogenetics. Conversely, in an ideal experiment, one could precisely stimulate any neuron despite a moderate or high density of opsin-expressing cells.

Here, we develop a novel computational strategy for all-optical experiments [1821] that reduces (and in some cases entirely eliminates) OTS (Figure 1a, b). The key insight is that heterogeneity in opsin expression and intrinsic excitability causes neurons to have different sensitivities to optical stimulation. This implies that in some cases laser power could be safely turned down to prevent the spiking of a nearby non-target neuron that is weakly driven by stimulation while still spiking a target neuron that is strongly driven by stimulation. Further, the spatial arrangement of neurons can be exploited by moving a holographic target off of a neuron’s nucleus (the typical stimulation point) towards a less dense area (e.g. towards neuropil or less photosensitive neurons) while still exciting a sufficient number of the target neuron’s opsin molecules to elicit a spike. While some prior experimental research has considered cell-specific tuning of laser powers [22], our advance is to identify both the optimal laser powers and target locations automatically using efficient Bayesian techniques.

Figure 1:

Figure 1:

Off-target stimulation with two-photon optogenetics. (a) Two-photon holographic opto-genetics can be used to elicit spikes in specific ensembles of experimenter-selected neurons. (b) OTS arises due to an inability to confine two-photon excitation to the soma of a target neuron. By repositioning the hologram away from the soma, OTS could be avoided while still activating the target neuron. (c) Data from real two-photon optogenetics experiment showing that at high power (e.g. 40 mW) a neuron can be activated from 15-20 μm away, though this depends on the specific pattern of opsin expression at the soma and proximal dendrites. Red and gray circles indicate locations where stimulation resulted in successful or unsuccessful spikes. Colour map shows the inferred probability of spiking (i.e., the ORF) using the log-barrier Newton method from Subsection 3.2. As the number of sampled locations and laser powers increases, the GP model adapts to the particular ORF shape (see supplementary material for the prior mean). This shape can then be exploited to precisely optimise holographic stimuli. Data from PV-neuron in L2/3 of V1 expressing the soma-targeted, excitatory opsin ChroME2f [44].

To achieve highly precise optogenetic ensemble control, we propose a two-phase process called Bayesian target optimisation (Bataro). In the first phase, we map the “optogenetic receptive field” (ORF) of each neuron by stimulating at various locations around cell nuclei and at a range of laser powers to test whether they elicit spikes. To infer these ORFs without exhaustively testing every combination of location and power, we use Gaussian processes (GPs) to encode prior knowledge about how neurons respond to optogenetic stimulation. Further, we propose to use holographic stimulation to test multiple locations around one or many neurons simultaneously, ensuring that the mapping phase completes quickly. This also allows us to model how neurons integrate two-photon excitation from multiple nearby holograms. In the second phase, we then exploit knowledge of the ORFs to optimise holographic targets. We use properties of the GP to infer gradients of an objective function at a spatial resolution that exceeds the original sampling resolution, enabling us to optimise for the exact holographic targets and laser powers needed to evoke a specific neural activity pattern.

2. Related work

Our work is related to prior research in three areas: GP-based receptive field inference, optimal stimulus design, and statistical methods for estimating connectivity using optogenetic stimulation. Since ref. [23], many studies have used GPs to infer the relationship between neural spiking and multi-dimensional covariates. This includes using GPs to infer place fields [24, 25] and orientation preference maps [26], as well as with Bayesian active learning techniques for inferring sensory receptive fields [27, 28]. However, none to our knowledge have used GP inference to model responses to optogenetic stimulation. Closed-loop methods for optimal control of neural activity using one-photon or electrical stimulation have been recently explored [2934], though these approaches lack the necessary spatial specificity for highly precise ensemble control. Ref. [35] considers optimising spike-timing using two-photon stimulation (in addition to electrical stimulation), but focused on single neurons and did not use GP estimation methods. Finally, a number of papers have developed statistical models of optogenetic data to infer functional or synaptic connectivity [3643], but do not consider identifying the exact stimulation parameters needed to evoke specific activity patterns. Here, we unify these three approaches to develop a novel computational framework for optimal holographic stimulation of neural ensembles.

3. Methods

3.1. Optogenetic receptive field model

Given a population of N neurons, we first wish to learn ORF functions gn that model how each neuron responds to optogenetic stimulation at different laser powers and locations near the cell soma. Ideally, ORF mapping should be completed quickly, stimulating as few times as possible, so that stimulus optimisation and the desired experiment can begin. Therefore, an ORF model should leverage prior knowledge of how neurons respond to stimulation. Importantly, spike probability should increase monotonically with laser power until saturation [42], and the ORF should approximately match the shape of the somatic membrane (though enlarged to account for the ~10 μm diameter of the holographic disk [22]). However, any residual expression of opsin molecules in the proximal dendrites of a neuron creates unique differences in its ORF shape compared to other neurons (Figure 1c). Further, neurons can express opsin in variable concentrations and vary in their intrinsic excitability, leading to an unpredictable dependence of spiking on power. Thus, we need an approach to modelling an ORF that roughly describes the typical shape and photosensitivity of a cell, but that can flexibly adapt to variation across neurons.

To simultaneously account for these factors, we use a novel variant of the GP-Bernoulli model. Let ynt{0,1} denote the response of neuron n on trial t to a holographic stimulus xtJ×3. As our approach is designed for all-optical experiments, the response to stimulation is assumed to be observed for all neurons at once using calcium or voltage imaging. Each stimulus delivers two-photon excitation to J1 different target locations, with xtj=(c1tj,c2tj,Itj)3 representing the two-dimensional coordinates and laser power of the jth target (though note that we can also handle three-dimensional hologram coordinates without any substantial changes to the model). While in some cases the targets will be far enough apart in space to not interact with each other, frequently a neuron will integrate two-photon excitation from multiple nearby targets, increasing the risk of OTS. To account for this, we model the probability of evoking a spike in neuron n by summing across all J points on that neuron’s ORF,

yntBernoulli(σ(γn(xt)θn)),γn(xt)=j=1Jgn(xtj), (1)

where σ is the logistic sigmoid function and θn is a scalar threshold. We model each ORF using a three-dimensional GP prior that describes the effect of stimulating at a given location and power: gn𝒢𝒫(mn(),k(,)), where mn and k are respectively the mean and covariance functions of the GP. During inference (as discussed below) we constrain gn to be non-negative, which ensures that stimulation cannot have an inhibitory effect. Further, using a non-negativity constraint rather than (e.g.) applying a rectifying nonlinearity to gn guarantees that the posterior distribution remains log-concave, facilitating tractable identification of the global optimum.

To encode prior knowledge about optogenetic stimulation, the mean function should have the property that the probability of evoking a spike increases with laser power but decays quickly as the hologram is positioned further away from the nucleus. To this end, we set

mn(x)=ρIexp(cLn2/σm2) (2)

for n=1,,N (note that we suppress reference to the target dimension j for notational clarity here and in the definition of the covariance function below). Here c=(c1,c2) denotes the coordinates of the holographic target, Ln is the location of neuron n, and ρ can be loosely interpreted as the average opsin expression level, determining how laser power affects the probability of spiking. While we treat ρ and σm2 as static hyperparameters, in future work one could consider a hierarchical model where the mean function is also learned, with its accuracy improving as additional ORFs are probed.

We model the covariance between points on the ORF using the radial basis function (RBF) kernel k, which regularises the ORF by encouraging it to vary smoothly through space and power. However, we note that other covariance kernels could be used here provided that they are differentiable with respect to x. We define

k(x,x)=α2exp(12(xx)TΛ(xx))+σd2δx,x, (3)

where Λ=diag(λs,λs,λI) is a diagonal matrix with each diagonal term giving the characteristic lengthscale for the corresponding GP dimension. We assume that the lengthscales λs in the two spatial dimensions are equal (a typical assumption in holography, see e.g. ref. [6]), but take a different lengthscale λI for the laser power dimension. Finally, we denote the hyperparameters of the ORF prior by ϕ=(α2,σd2,λs,λI,ρ,σm2).

3.2. Inference

During an ORF mapping experiment we first collect calibration data by performing stimulation in a series of trials x1,,xT, where each xt targets J different locations and laser powers near a random set of neurons. Then we combine these stimuli with the corresponding observations of any evoked activity y:,1,,y:,T to estimate the ORFs. Here each y:,t{0,1}N describes the population response to the stimulus xt. Due to the non-negativity constraints on gn, the posterior p(gn|yn,{xt}t=1T,θn,ϕ) is not itself a GP, and hence we perform maximum a posteriori (MAP) inference rather than attempting to obtain a complete description of posterior uncertainty (though see the supplementary material for a full treatment of posterior uncertainty in the J=1 case). To this end, the MAP estimates are obtained by maximising the log-posterior, which, via Bayes rule, is equivalent to computing

g^nθ^n=argmaxgn,θn{t=1Tlnp(ynt|xt,gn,θn)+lnp(gn(x1),,gn(xT)|ϕ)}such thatgn(xt)0fort=1,T. (4)

Note that we have abbreviated g^n(X) (the MAP version of the ORF) as g^n. To solve Equation 4 we alternate between using Newton’s method with a log-barrier to update gn (such that the optimised ORFs respect the non-negativity constraints), and performing gradient descent steps for updating θn. We also adaptively set the Newton step-size using a standard backtracking line-search method.

3.3. Optimisation approach

Given the estimated ORFs, we then aim to identify holographic stimuli that evoke specific neural activity patterns as accurately as possible (i.e., minimising off-target activation). To do this, we introduce a novel optimisation approach that exploits properties of the GP to compute gradients of an error function between a target activity pattern and the (predicted) evoked activity. To this end, let 𝒢={g^n,θ^n}n=1N be the MAP-estimated ORFs, and define the predicted evoked activity as

y^(x,𝒢)=(σ(γ^1(x)θ^1),,σ(γ^N(x)θ^N))N, (5)

where γ^n(x)=j=1Jg^n(xj). Let Ω{0,1}N denote a target activity pattern. The optimal holographic stimulus is then

xoptimal=argmaxxΩy^(x,𝒢)2such that0IImax. (6)

Note that we include Imax as an upper bound on the laser power, which can be set to match the power practically deliverable by the microscopy system or to prevent tissue damage due to excess heating.

We propose to solve Equation 6 using a projected gradient descent algorithm. While for the ORF mapping phase we only need to compute the ORFs g^n at a small set of stimulation points xt, for the optimisation phase we must evaluate the gradients of Equation 6 (and therefore of the ORFs) at a series of new, unobserved points constituting an optimisation path. However, it is not immediately obvious how to evaluate these gradients for a general nonparametric function gn. The key idea for our approach is that at each step, gradient descent will provide an updated estimate x* of the optimal stimulus, which will act as a “test point” commonly used in GP regression. We then leverage properties of the GP to perform inference of the ORF gradients at x*, and subsequently perform a gradient descent update that reduces the value of the objective function in Equation 6.

Inferring the ORF gradients relies on the fact that a GP and its derivative are jointly GP-distributed, and hence the derivative can be inferred just from a small number of observations of the GP itself. To this end, note that the covariance between a GP and its derivative is given by [45, Sec 9.4]

cov(gn(xt),xdgn(x))=k(xt,x)xd, (7)

where d is any dimension of x* and where we have suppressed reference to the hologram target j for notational clarity here and in the following equation. The expression in Equation 7 can be used to obtain a predictive distribution over derivative functions consistent with the observed data points, which we use to evaluate the derivatives of g^ at the test point x* via

g^n(x)xd=mn(x)xd+cov(gn(χ),gn(x)xd)K1(g^n(χ)mn(χ)), (8)

where χJT×3 is the collection of JT unique points on the ORF that were probed during ORF mapping, gn(χ), mn(χ)JT give the value of the GP and mean function evaluated at each such point, and where K is the corresponding GP covariance matrix obtained by evaluating the covariance kernel k at every pair of elements of χ. Further details are provided in the supplementary material.

Equation 8 allows us to define a closed-form gradient of the objective function, which we use in a projected gradient descent algorithm (Algorithm 1). Note, however, that the objective function is not convex in x, and therefore such updates are only guaranteed to converge to a locally optimal solution. We therefore typically run Algorithm 1 with several random initialisations and select the optimised target with the lowest predicted error.

3.

4. Results

4.1. Simulations

We first tested Bataro by simulating an optical “write-in” experiment, where we attempted to write specific activity patterns into a hypothetical neural population. To do this, we positioned 50 neurons randomly in a 250 μm × 250 μm field of view (FOV), sampled each neuron’s ORF from its GP prior, and generated responses to ensemble stimulation. To quantify the optical write-in error, we used the sum of squared errors n(Ωnyn(x))2, where yn(x) is the ground truth probability of neuron n spiking in response to stimulus x. This error takes the interpretable value of ~m if m non-target neurons are inadvertently recruited due to OTS. In this simulation, holographic stimulation of an example ensemble consisting of 6 selected neurons resulted in a substantial recruitment of activity from non-target neurons due to OTS, especially when multiple holograms converged on nearby non-target neurons (Figure 2a; optical write-in error = 7.84).

Figure 2:

Figure 2:

Minimising off-target stimulation using Bayesian target optimisation. (a) Direct nuclear stimulation at 70 mW successfully activates the target neurons with high probability, but also activates nearby non-target neurons due to OTS. Triangles indicate target neurons. Shading indicates probability of spiking. Optical write-in error (bottom) given as the sum of squared errors between the evoked and desired activity patterns. (b) Optimised stimulation using Algorithm 1 repositions the hologram locations away from the nuclei of non-target neurons, resulting in a substantial reduction in off-target activation. (c) Optimisation trajectory of the 6 different target laser powers. Initial laser powers selected randomly between 50 and 70 mW. (d) Optimising holographic targets for 20 different random ensembles shows a robust reduction of optical write-in error (average reduction, 75%).

To optimally reposition the holographic targets, we probed the population’s ORFs using 10-target ensemble stimulation, and then used Bataro (Algorithm 1). This successfully repositioned holographic targets an appropriate distance from the nuclei of the target neurons, such that while minimal excitation was applied to the non-target neurons, the target neurons were still driven to spike with high probability (Figure 2b,c; write-in error = 1.61). To confirm that the improvement in write-in precision was robust, we repeated the optimisation for 20 additional random 6-target ensembles and found that off-target effects were substantially reduced in every case, with the write-in error reducing by 75% on average compared to naively stimulating the nucleus of each neuron (Figure 2d).

Next, we investigated two variables known to critically constrain the ability to evoke specific neural activity patterns: (1) the density of opsin-expressing neurons in the stimulation FOV, and (2) the size of the ensemble that one is attempting to activate. Figure 3a illustrates how increasing the number of opsin-expressing neurons introduces many more potential non-target neurons that could be inadvertently activated. This causes errors induced by direct nuclear stimulation of (e.g.) 5-neuron ensembles to grow rapidly (Figure 3b, grey curve), though note that the magnitude of the error depends on many experimental factors including the size of the ORF, numerical aperture of the microscope, and the soma-targeting efficacy. By optimising holographic target locations and laser powers, the average write-in error was reduced by 76% relative to nuclear stimulation (Figure 3b, red curve). Similarly, in these simulations, nuclear stimulation resulted in an error that grew almost directly proportionally to the size of the stimulated ensemble, indicating that almost as many non-target neurons were activated as target neurons. However, Bataro reduced the average write-in error by 69% across ensembles of size 1-15 (Figure 3c).

Figure 3:

Figure 3:

Performance of Bayesian target optimisation in increasingly difficult contexts. (a) Two example scenarios with low (left) and high (right) density of opsin-expressing neurons. Triangles indicate example 5-target ensemble to be stimulated. At low density, the risk of OTS is low because neurons are often spaced far apart. However, at high density, OTS arising from direct nuclear stimulation at high power is unavoidable. (b) Optical write-in error for nuclear and optimised stimulation of 5-target ensembles. Error bars show the mean error ± 1 s.d. over 10 different simulations. For each simulation we averaged the write-in error over 20 random ensembles. (c) Same as (b), but for a fixed population size of 50 and varying ensemble size.

4.2. Application to holographic optogenetics experiments

To test whether Bataro could eliminate OTS in realistic settings, we created synthetic optogenetics experiments involving >100 neurons from a small number (n=4) of detailed cell-attached recordings in slice [42]. Briefly, each slice experiment was performed by first establishing a cell-attached electrophysiological recording of a single L2/3 interneuron from mouse V1 expressing the soma-targeted opsin ChroME2f. Then, the recorded neuron was optogenetically stimulated at a dense grid of locations surrounding the cell and at a range of laser powers to comprehensively map its ORF (see Figure 1c, “100% sampled” column, also see supplementary material for additional examples). We used this data to create a set of four “ground truth” ORFs by fitting the GP-Bernoulli model from Equation 1, where the hyperparameters of the GP covariance kernel were selected using the cross-validated predictive log-likelihood. Next, we used a fluorescence image from a separate experiment to extract the locations of 116 putative opsin-expressing neurons, and randomly assigned each putative neuron one of four ground-truth ORFs. Together, this enabled us to simulate responses to optogenetic stimulation at arbitrary locations and laser powers and for a large number of neurons that were realistically distributed in space.

We sampled responses to optogenetic stimulation at a sparse grid of locations surrounding each neuron to map their ORFs in a hypothetical experiment (see supplementary methods for details). Then, we used Bataro to compute single-target stimuli that activated each neuron individually and minimised OTS (Figure 4a). We found that, on the one hand, a subset of neurons required no change from nuclear stimulation at high power due to being spatially isolated. However, regions with large numbers of closely-packed, opsin-expressing neurons required repositioning of the holographic targets (Figure 4a, right) and adjustment to the laser powers (Figure 4b) to eliminate OTS (average distance between nuclear and optimised stimuli, 4.9 μm). Across all single-target holograms, target optimisation reduced the average write-in error by 85% (Figure 4c). We also performed a control analysis by matching the nuclear stimulation laser power to the average optimised laser power and obtained similar results (Figure S3).

Figure 4:

Figure 4:

Performance of Bayesian target optimisation using simulations based on two-photon holographic optogenetics data. (a) Left: field of view from a real in vitro optogenetics experiment showing every optimised single-target hologram. Opsin fused to red fluorescent protein mRuby3 so that opsin-expressing neurons can be visualised. Unfilled white circles represent putative neurons detected by automated cell segmentation method. Smaller filled white circles represent optimised holographic targets, shown in relation to the cell nucleus by a straight white line. Right: zoomed view of optimised targets, corresponding to dashed region in the left panel. (b) Optimised laser powers relative to their initialised values show how Bataro exploits differences in photosensitivity to avoid OTS. Each circle represents the power delivered to a single holographic target. (c) Reduction of optical write-in error using optimised holographic targets. Each circle represents the error when attempting to stimulate a single neuron.

Some holographic microscopy systems cannot position holograms at arbitrary continuous depths, instead either requiring holograms to be positioned in two dimensions or on a preselected number of discrete stimulation planes. Hence, thus far, we focused our efforts on the much more common case of two-dimensional optogenetics experiments. However, OTS is generally observed to be even more prevalent in three dimensions, as the optical point spread function is elongated in the “z”-axis [15, 6, 13, 17]. We therefore tested Bataro in the more general setting of three spatial dimensions and laser power (i.e., four dimensions in total), under the assumption that some microscopy systems may be able to flexibly reposition holograms continuously across depths.

We used the fact that the cell-attached recordings were repeated at multiple depths to generate synthetic optogenetics experiments with four-dimensional ORFs (Figure 5a,b). Optimisation of holographic targets successfully reduced OTS by exploiting both the x/y dimensions (Figure 5a), as well the z dimension (Figure 5b), in addition to automatically adjusting the laser power where needed. Repeating the optimisation for every single-target hologram reduced the average optical write-in error by 89% (from 0.7 to 0.08, Figure 5c-g; average distance between nuclear and optimised targets, 8.3 μm), demonstrating the feasibility of largely eliminating OTS in optogenetics experiments involving all three spatial dimensions.

Figure 5:

Figure 5:

Optimisation of holographic targets in three-dimensional space. (a) Example target neuron and optimised holographic stimulus (plane 3, 25 μm). By repositioning the hologram (primarily in the x/y dimensions), off-target activation is entirely eliminated (bottom spike probability plots, inset numbers show write-in error). Deepest plane labelled as 0 μm by convention. Solid white circle indicates target neuron. Dashed white circles indicate nearby non-target neurons that must be avoided. (b) Similar to (a), but for a neuron in plane 2 (50 μm) and with repositioning of the hologram primarily in the z dimension. (c) All optimised single-target holograms over four stimulation planes. Targets shown at their original depth for visualisation. Average displacement of optimised holographic targets relative to nuclei, 8.3 μm. Scale bar, 20 μm. (d) Max-projection over z-planes simultaneously showing locations of all segmented opsin-expressing neurons. (e) Optimised depths of holographic targets corresponding to neurons in (c). Depths are shown in comparison to one of four depths that the target neuron was segmented at during the experiment. (f) Optimised laser powers relative to their initialised values. (g) Reduction of optical write-in error for all neurons, across multiple depths.

5. Conclusions

We developed Bataro, a novel computational framework for two-photon optogenetics that optimises holographic stimuli to evoke neural activity patterns with minimal off-target activation. Our preliminary in vitro experiments predict that specific adjustments to holographic target placements of 5-10 μm (on average) could substantially reduce OTS, even in the more challenging regime of three-dimensional optogenetic stimulation. Our key idea was to simultaneously exploit variability in photoexcitability, residual opsin expression in proximal dendrites (due to imperfections in opsin soma-targeting), and the specific spatial arrangement of neurons in the stimulation FOV. Optimisation using these three factors ultimately led to reductions in the optical write-in error of 85-89% for single-target holograms using data from in vitro two-photon optogenetics experiments.

Whether achieving such stimulus precision is worth spending valuable experiment time mapping ORFs is, of course, highly dependent on the application. While for some experiments minimising off-target activation may not be critical, there are many cases where stimulating with as close to “true” single-cell precision as possible is essential to testing a scientific hypothesis. For example, “hub” neurons in the hippocampus are believed to orchestrate network-level function through their unilateral activity [46, 47]. Thus, using two-photon optogenetics to test whether an individual neuron represents a functional hub by stimulating that neuron alone requires true single-cell precision. In such cases, we believe devoting experiment time to ORF mapping and stimulus optimisation is a necessary trade-off.

Throughout our analysis we have assumed that ORFs are stable over time (i.e., are stationary). However, desensitisation of opsins following prolonged illumination has previously been observed [11], indicating that some nonstationarity could be encountered in real experiments. To account for this, we note that after the ORFs have been mapped and holographic stimuli optimised, it is straightforward to periodically recompute the MAP estimate of the ORF as the experiment proceeds. This would provide an updated estimate of the laser power required to maintain optimal precision. We hypothesise that this would not require repeating the entire ORF mapping phase as we do not expect the shape of the ORF to change drastically beyond desensitisation.

Standard GP regression methods scale cubically with the number of locations and laser powers probed, and therefore estimation of each neuron’s ORF could encroach on experiment time if ORFs are mapped at high detail just due to required computation time. However, computational efficiency could be improved by appealing to modern GP techniques such as inducing point methods [48], or by adaptively mapping ORFs using Bayesian active learning to minimise the number of probed locations and powers [49, 50]. While in this work we have focused primarily on demonstrating the feasibility of overcoming OTS, in future work we plan to minimise both required experiment and computation time in order to deploy Bataro online.

Supplementary Material

1

Acknowledgements

We thank Darcy Peterka, Benjamin Antin, Cole Hurwitz, Shizhe Chen, and Ben Shababo for helpful discussions and suggestions. This work was funded by NIH awards 1RF1MH120680 and 1U19NS107613-01 to HA and LP. MAT and LP were supported by the Gatsby Charitable Foundation and NSF NeuroNex award 1707398.

References

  • [1].Rickgauer John Peter and Tank David W. Two-photon excitation of channelrhodopsin-2 at saturation. Proceedings of the National Academy of Sciences, 106(35):15025–15030, 2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [2].Papagiakoumou Eirini, Anselmi Francesca, Bègue Aurélien, De Sars Vincent, Glückstad Jesper, Isacoff Ehud Y, and Emiliani Valentina. Scanless two-photon excitation of channelrhodopsin-2. Nature Methods, 7(10):848–854, 2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [3].Packer Adam M, Peterka Darcy S, Hirtz Jan J, Prakash Rohit, Deisseroth Karl, and Yuste Rafael. Two-photon optogenetics of dendritic spines and neural circuits. Nature Methods, 9(12):1202–1205, 2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [4].Prakash Rohit, Yizhar Ofer, Grewe Benjamin, Ramakrishnan Charu, Wang Nancy, Goshen Inbal, Packer Adam M, Peterka Darcy S, Yuste Rafael, Schnitzer Mark J, et al. Two-photon optogenetic toolbox for fast inhibition, excitation and bistable modulation. Nature Methods, 9(12):1171–1179, 2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [5].Hernandez Oscar, Papagiakoumou Eirini, Tanese Dimitrii, Fidelin Kevin, Wyart Claire, and Emiliani Valentina. Three-dimensional spatiotemporal focusing of holographic patterns. Nature Communications, 7(1):1–11, 2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [6].Pégard Nicolas C, Mardinly Alan R, Oldenburg Ian Antón, Sridharan Savitha, Waller Laura, and Adesnik Hillel. Three-dimensional scanless holographic optogenetics with temporal focusing (3d-shot). Nature Communications, 8(1):1–14, 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [7].Ronzitti Emiliano, Ventalon Cathie, Canepari Marco, Forget Benoît C, Papagiakoumou Eirini, and Emiliani Valentina. Recent advances in patterned photostimulation for optogenetics. Journal of Optics, 19(11):113001, 2017. [Google Scholar]
  • [8].Accanto Nicolò, Molinier Clément, Tanese Dimitrii, Ronzitti Emiliano, Newman Zachary L, Wyart Claire, Isacoff Ehud, Papagiakoumou Eirini, and Emiliani Valentina. Multiplexed temporally focused light shaping for high-resolution multi-cell targeting. Optica, 5(11):1478–1491, 2018. [Google Scholar]
  • [9].Yang Weijian, Carrillo-Reid Luis, Bando Yuki, Peterka Darcy S, and Yuste Rafael. Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions. elife, 7:e32671, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [10].Mardinly Alan R, Oldenburg Ian Antón, Pégard Nicolas C, Sridharan Savitha, Lyall Evan H, Chesnov Kirill, Brohawn Stephen G, Waller Laura, and Adesnik Hillel. Precise multimodal optical control of neural ensemble activity. Nature Neuroscience, 21(6):881–893, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [11].Marshel James H, Kim Yoon Seok, Machado Timothy A, Quirin Sean, Benson Brandon, Kadmon Jonathan, Raja Cephra, Chibukhchyan Adelaida, Ramakrishnan Charu, Inoue Masatoshi, et al. Cortical layer–specific critical dynamics triggering perception. Science, 365(6453):eaaw5202, 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [12].Carrillo-Reid Luis, Han Shuting, Yang Weijian, Akrouh Alejandro, and Yuste Rafael. Controlling visually guided behavior by holographic recalling of cortical ensembles. Cell, 178(2):447–457, 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [13].Adesnik Hillel and Abdeladim Lamiae. Probing neural codes with two-photon holographic optogenetics. Nature Neuroscience, 24(10):1356–1366, 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [14].Papagiakoumou Eirini, Ronzitti Emiliano, and Emiliani Valentina. Scanless two-photon excitation with temporal focusing. Nature Methods, 17(6):571–581, 2020. [DOI] [PubMed] [Google Scholar]
  • [15].Baker Christopher A, Elyada Yishai M, Parra Andres, and Bolton M McLean. Cellular resolution circuit mapping with temporal-focused excitation of soma-targeted channelrhodopsin. Elife, 5:e14193, 2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [16].Shemesh Or A, Tanese Dimitrii, Zampini Valeria, Linghu Changyang, Piatkevich Kiryl, Ronzitti Emiliano, Papagiakoumou Eirini, Boyden Edward S, and Emiliani Valentina. Temporally precise single-cell-resolution optogenetics. Nature Neuroscience, 20(12):1796–1806, 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [17].Hage Travis A, Bosma-Moody Alice, Baker Christopher A, Kratz Megan B, Campagnola Luke, Jarsky Tim, Zeng Hongkui, and Murphy Gabe J. Synaptic connectivity to l2/3 of primary visual cortex measured by two-photon optogenetic stimulation. Elife, 11:e71103, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [18].Emiliani Valentina, Cohen Adam E, Deisseroth Karl, and Häusser Michael. All-optical interrogation of neural circuits. Journal of Neuroscience, 35(41):13917–13926, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [19].Packer Adam M, Russell Lloyd E, Dalgleish Henry WP, and Häusser Michael. Simultaneous all-optical manipulation and recording of neural circuit activity with cellular resolution in vivo. Nature Methods, 12(2):140–146, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [20].Zhang Zihui, Russell Lloyd E, Packer Adam M, Gauld Oliver M, and Häusser Michael. Closed-loop all-optical interrogation of neural circuits in vivo. Nature Methods, 15(12):1037–1040, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [21].Russell Lloyd E, Dalgleish Henry WP, Nutbrown Rebecca, Gauld Oliver M, Herrmann Dustin, Fişek Mehmet, Packer Adam M, and Häusser Michael. All-optical interrogation of neural circuits in behaving mice. Nature Protocols, 17(7):1579–1620, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [22].Bounds Hayley A, Sadahiro Masato, Hendricks William D, Gajowa Marta, Oldenburg Ian Antón, Gopakumar Karthika, Quintana Daniel, Daigle Tanya, Zeng Hongkui, and Adesnik Hillel. Multifunctional cre-dependent transgenic mice for high-precision all-optical interrogation of neural circuits. bioRxiv, page 463223, 2021. [Google Scholar]
  • [23].Rad Kamiar Rahnama and Paninski Liam. Efficient, adaptive estimation of two-dimensional firing rate surfaces via gaussian process methods. Network: Computation in Neural Systems, 21(3-4):142–168, 2010. [DOI] [PubMed] [Google Scholar]
  • [24].Savin Cristina and Tkacik Gasper. Estimating nonlinear neural response functions using gp priors and kronecker methods. Advances in Neural Information Processing Systems, 29, 2016. [Google Scholar]
  • [25].Rule M, Chaudhuri-Vayalambrone P, Krstulovic Marino, Bauza Marius, Krupic Julija, and O’Leary Timothy. Variational log-gaussian point-process methods for grid cells. bioRxiv, pages 2023–03, 2023. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [26].Macke Jakob H, Gerwinn Sebastian, White Leonard E, Kaschube Matthias, and Bethge Matthias. Gaussian process methods for estimating cortical maps. NeuroImage, 56(2):570–581, 2011. [DOI] [PubMed] [Google Scholar]
  • [27].Park Mijung, Horwitz Greg, and Pillow Jonathan. Active learning of neural response functions with gaussian processes. Advances in Neural Information Processing Systems, 24, 2011. [Google Scholar]
  • [28].Park Mijung, Weller J Patrick, Horwitz Gregory D, and Pillow Jonathan W. Bayesian active learning of neural firing rate maps with transformed gaussian process priors. Neural Computation, 26(8):1519–1541, 2014. [DOI] [PubMed] [Google Scholar]
  • [29].Newman Jonathan P, Fong Ming-fai, Millard Daniel C, Whitmire Clarissa J, Stanley Garrett B, and Potter Steve M. Optogenetic feedback control of neural activity. Elife, 4:e07192, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [30].Yang Yuxiao, Connolly Allison T, and Shanechi Maryam M. A control-theoretic system identification framework and a real-time closed-loop clinical simulation testbed for electrical brain stimulation. Journal of Neural Engineering, 15(6):066007, 2018. [DOI] [PubMed] [Google Scholar]
  • [31].Bolus Michael F, Willats Adam A, Whitmire Clarissa J, Rozell Christopher J, and Stanley Garrett B. Design strategies for dynamic closed-loop optogenetic neurocontrol in vivo. Journal of Neural Engineering, 15(2):026011, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [32].Shah Nishal, Madugula Sasidhar, Hottowy Pawel, Sher Alexander, Litke Alan, Paninski Liam, and Chichilnisky EJ. Efficient characterization of electrically evoked responses for neural interfaces. Advances in Neural Information Processing Systems, 32, 2019. [Google Scholar]
  • [33].Bolus Michael F, Willats Adam A, Rozell Christopher J, and Stanley Garrett B. State-space optimal feedback control of optogenetically driven neural activity. Journal of Neural Engineering, 18(3):036006, 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [34].Yang Yuxiao, Qiao Shaoyu, Sani Omid G, Sedillo J Isaac, Ferrentino Breonna, Pesaran Bijan, and Shanechi Maryam M. Modelling and prediction of the dynamic responses of large-scale brain networks during direct electrical stimulation. Nature Biomedical Engineering, 5(4):324–345, 2021. [DOI] [PubMed] [Google Scholar]
  • [35].Ahmadian Yashar, Packer Adam M, Yuste Rafael, and Paninski Liam. Designing optimal stimuli to control neuronal spike timing. Journal of Neurophysiology, 106(2):1038–1053, 2011. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [36].Hu Tao and Chklovskii Dmitri. Reconstruction of sparse circuits using multi-neuronal excitation (rescume). Advances in Neural Information Processing Systems, 22:790–798, 2009. [Google Scholar]
  • [37].Fletcher Alyson K, Rangan Sundeep, Varshney Lav R, and Bhargava Aniruddha. Neural reconstruction with approximate message passing (neuramp). Advances in Neural Information Processing Systems, 2011. [Google Scholar]
  • [38].Shababo Ben, Paige Brooks, Pakman Ari, and Paninski Liam. Bayesian inference and online experimental design for mapping neural microcircuits. Advances in Neural Information Processing Systems, 26:1304–1312, 2013. [Google Scholar]
  • [39].Fletcher Alyson K and Rangan Sundeep. Scalable inference for neuronal connectivity from calcium imaging. Advances in Neural Information Processing Systems, 2014. [Google Scholar]
  • [40].Aitchison Laurence, Russell Lloyd, Packer Adam, Yan Jinyao, Castonguay Philippe, Häusser Michael, and Turaga Srinivas C. Model-based bayesian inference of neural activity and connectivity from all-optical interrogation of a neural circuit. Advances in Neural Information Processing Systems, 2017. [Google Scholar]
  • [41].Draelos Anne and Pearson John. Online neural connectivity estimation with noisy group testing. Advances in Neural Information Processing Systems, 33, 2020. [Google Scholar]
  • [42].Triplett Marcus A, Gajowa Marta, Antin Benjamin, Sadahiro Masato, Adesnik Hillel, and Paninski Liam. Rapid learning of neural circuitry from holographic ensemble stimulation enabled by model-based compressed sensing. bioRxiv, page 507926, 2022. [Google Scholar]
  • [43].Printz Yoav, Patil Pritish, Mahn Mathias, Benjamin Asaf, Litvin Anna, Levy Rivka, Bringmann Max, and Yizhar Ofer. Determinants of functional synaptic connectivity among amygdala-projecting prefrontal cortical neurons in male mice. Nature Communications, 14(1):1667, 2023. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [44].Sridharan Savitha, Gajowa Marta A, Ogando Mora B, Jagadisan Uday K, Abdeladim Lamiae, Sadahiro Masato, Bounds Hayley A, Hendricks William D, Turney Toby S, Tayler Ian, et al. High-performance microbial opsins for spatially and temporally precise perturbations of large neuronal networks. Neuron, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [45].Williams Christopher KI and Rasmussen Carl Edward. Gaussian Processes for Machine Learning, volume 2. MIT Press; Cambridge, MA, 2006. [Google Scholar]
  • [46].Bonifazi Paolo, Goldin Miri, Picardo Michel A, Jorquera Isabel, Cattani A, Bianconi Gregory, Represa Alfonso, Ben-Ari Yehezkel, and Cossart Rosa. Gabaergic hub neurons orchestrate synchrony in developing hippocampal networks. Science, 326(5958):1419–1424, 2009. [DOI] [PubMed] [Google Scholar]
  • [47].Bocchio Marco, Gouny Claire, Angulo-Garcia David, Toulat Tom, Tressard Thomas, Quiroli Eleonora, Baude Agnès, and Cossart Rosa. Hippocampal hub neurons maintain distinct connectivity throughout their lifetime. Nature Communications, 11(1):4559, 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [48].Titsias Michalis. Variational learning of inducing variables in sparse gaussian processes. In Artificial Intelligence and Statistics (AISTATS), pages 567–574. PMLR, 2009. [Google Scholar]
  • [49].Lewi Jeremy, Butera Robert, and Paninski Liam. Sequential optimal design of neurophysiology experiments. Neural Computation, 21(3):619–687, 2009. [DOI] [PubMed] [Google Scholar]
  • [50].Pillow Jonathan W and Park Mijung. Adaptive bayesian methods for closed-loop neurophysiology. Closed Loop Neuroscience, pages 3–18, 2016. [Google Scholar]
  • [51].McHutchon Andrew James et al. Nonlinear modelling and control using Gaussian processes. PhD thesis, Citeseer, 2015. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

1

Articles from bioRxiv are provided here courtesy of Cold Spring Harbor Laboratory Preprints

RESOURCES