Biologically informed cortical models predict optogenetic perturbations

  1. Christos Sourmpis
  2. Carl CH Petersen
  3. Wulfram Gerstner
  4. Guillaume Bellec  Is a corresponding author
  1. Laboratory of Computational Neuroscience, Brain Mind Institute, School of Computer and Communication Sciences and School of Life Sciences, École Polytechnique Fédérale de Lausanne (EPFL), Switzerland
  2. Laboratory of Sensory Processing, Brain Mind Institute, School of Life Sciences, École Polytechnique Fédérale de Lausanne (EPFL), Switzerland
  3. Machine Learning Research Unit, Technical University of Vienna (TU Wien), Austria
5 figures, 2 tables and 1 additional file

Figures

Figure 1 with 1 supplement
Network reconstruction and perturbation tests.

(A) The three steps to reconstruct the reference circuit (RefCirc) using a biologically informed RNN (bioRNN) or a sigmoidal RNN (σRNN) and evaluate the reconstruction based on perturbation tests. (B) Summary of the differences between a bioRNN and a σRNN. (C) Trial-averaged activity of area A of the two circuits during hit (black-dashed: RefCirc1; blue: bioRNN1; pink: σRNN1) and miss (grey-dashed: RefCirc1; light blue: bioRNN1; light pink: σRNN1) trials. All models display a hit rate of p50%. (D) Same as C during inactivation of area B. ΔpD=0 is the recorded change of hit rate for the feedforward circuit RefCirc1, so a successful reconstruction achieves p^0%. (E) Quantitative results on perturbation tests showing that σRNN achieves the lowest loss function on the unperturbed test trials, but only the bioRNN retains an accurate fit to the perturbed trials.

Figure 1—figure supplement 1
Modeling ‘optogenetic’ perturbations.

(A) Two different network hypotheses for implementing a detection task. In RefCirc1, area A projects to area B but not vice versa. In RefCirc2, the areas are recurrently connected. (B) Raster plots of all neurons in RefCirc1 during a single hit trial under normal conditions (control, left) and under optogenetic perturbation of excitatory (middle) and inhibitory (right) neurons. The duration of the light stimulus is shown with a blue shading. (C) Same for RefCirc2 (D) Trial-averaged activity of the two circuits during Hit (blue: RefCirc1; green: RefCirc2) and Miss (yellow: RefCirc 1; red: RefCirc2) trials. A trial is classified as ‘Hit’ if area A reaches a transient firing rate above 8 Hz; and otherwise as ‘Miss’. For the control case, the maximal difference between the trial average activity of the two networks is below 0.51 Hz (zoom inset).

Figure 2 with 4 supplements
Reconstruction of network mechanisms.

(A) RefCirc1 is feedforward and RefCirc2 is recurrent. (B) The fitted RNNs are blind to the structural difference of RefCirc1 and 2 and must infer this from the spiking data. (C) Raster plot showing an example trial of the bioRNN and σRNN models, neurons in red are mapped to inhibitory neurons. (D) To study which model feature matters, bioRNN variants are defined by removing one of the features, for instance ‘No Dale’s law’ refers to a bioRNN without weight sign constraints. Trial-averaged activity in area A under activation/inactivation of area B. All the RNNs are tested with the same reference circuit and training data (No spike and No Sparsity models are shown in Figure 2—figure supplement 3). (E) Error between the change of hit probability after perturbations in the RNN Δp^ and in the RefCirc ΔpD, the whiskers indicate the 95% confidence interval. (F) The distance of network dynamics Ltriallight between each RNN and RefCirc (horizontal axis: light power in arbitrary units). (G) Same quantity as D but averaged for each RNN under the strongest light power condition (averaging activations and inactivations of area B), the whiskers indicate the 95% confidence interval. Statistical significance in comparison with bioRNN is computed with t-test using the mean over multiple network initializations and is indicated with 0–4 stars corresponding to p-values thresholds: 0.05, 10-2, 10-3, and 10-4.

Figure 2—figure supplement 1
Fitting Reconstructed networks to the synthetic dataset.

(A) Schematic representation of the RefCirc1 and bioRNN1 and probability of hit trials. (B) Histogram of the firing rate distribution of the RefCirc1 and all the RNN1 versions. We observe that all RNN1 versions fit well with the RefCirc1. (C) Left: Neuron loss of the different RNN1 variants. Right: Trial-matching loss of the different RNN1 variants. We observe that the model without the trial-matching loss function behaves considerably worse. The whiskers show the 95% confidence interval of the mean across trials. (D-F) Same as AB for RefCirc2 and RNNs2.

Figure 2—figure supplement 2
Picking the sparsity level.

(A) Grid search for the optimal maximum regularization strength (λ3) without a drop in performance. As a performance measure, we used the trial-matching loss, Ltrial.

Figure 2—figure supplement 3
Trial-averaged traces across RNN variants.

Trial-averaged activity in area A under activation/inactivation of area B. Dashed black lines indicate the activity of RefCirc1 (thick dashed) and RefCirc2 (thin dashed). All the RNNs are tested with the same reference circuit and training data, and each bioRNN model variant is shown with a different color.

Figure 2—figure supplement 4
Hit frequency prediction error |ΔpDΔp^| as in Figure 2E.

In contrast to Figure 2E, here we show separately the change of hit probability for RefCirc1 (left) and RefCirc2 (right).

Figure 3 with 2 supplements
Predicting optogenetic perturbations for in vivo electrophysiology data.

(A) During a delayed whisker detection task, the mouse reports a whisker stimulation by licking to obtain a water reward. Jaw movements are recorded by a camera. Our model simulates the jaw movements and the neural activity from six areas. (B) The experimentalists performed optogenetic inactivations of cortical areas (one area at a time) in three temporal windows. (C) Example hit trial of a reconstructed network (left). Using the same random seed, the trial turns into a miss trial if we inactivate area wS1 (right, light stimulus indicated by blue shading) during the whisker period by stimulation of inhibitory neurons (red dots). (D) Error of the change in lick frequency caused by the perturbation, Δp^ is predicted by the model, and ΔpD is recorded in mice. Light-shaded circles show individual reconstructed networks with different initializations. The whiskers are the standard error of means. Statistical significance is computed with t-test using the mean change of lick frequency over different network initializations (n=3-6) and is indicated with 0-2 stars corresponding to p-values thresholds: 0.05 and 0.01. (E) Examples of Δp^ hit rate changes under perturbation for wS1 (Top) and tjM1 (Bottom). The black circles refer to the hit rate change from the recordings, ΔpD. See Figure 3—figure supplement 2 for the other areas.

Figure 3—figure supplement 1
Reconstruction of the real recordings.

(A) Probability of hit trials of the different variant models. (B) Histogram of the firing rate distribution from the real recordings and all the variants. (C) Top: Neuron loss of the different RNN1 variants. All RNN versions have a similar loss value. Bottom: Trial-matching loss of the different model variants. We observe that the model without the trial-matching loss function behaves considerably worse. The whiskers show the 95% confidence interval.

Figure 3—figure supplement 2
Hit rate changes under inactivations.

(A) Change of lick probability under inactivation of all areas in all the different temporal windows. We show the Δp from the data and reconstruction model variants.

Measuring circuit gradients with µ-perturbations.

(AB) Numerical verification for Equation 1. A shows the change of jaw movement ΔY following inactivations in a “No Spike” bioRNN. From left to right, we reduce the size of the spatiotemporal window for the optogenetic stimulation. (B) Gradient values i,tdYdu that approximate ΔY from A using Equation 1. (CD) Verification that gradients predict the change of movement on single trials. In C, we display the gradients and jaw movement for three different trials, the neurons targeted by the µ-perturbation are boxed and the perturbed jaw movement is blue. Results averaged for every 100ms stimulation windows are shown in (D) positive (resp. negative) modulated means that the 20 neurons with highest (resp. lowest) gradients are targeted, random neurons are selected for the shuffled case. The whiskers show the 95% confidence interval.

Gradient-targeted µ-perturbations could precisely bias an animal behavior.

(A) Protocol to deliver an optimal µ-perturbation on the experimental preparation based on jaw gradients. (Step 1) The circuit is recorded until stimulation time t. (Step 2) The closest bioRNN trial to the ongoing recorded trial is retrieved from the databank B. (Step 3) We select the neurons with the highest (or lowest) gradient value for the µ-perturbation. (Step 4) The µ-perturbation is delivered at t. (B) Effect of the µ-perturbation using the artificial setup (A) under different light protocols. Practically, for ‘High gradient’, we keep step 3 as it is, for ‘Low gradient’, we change the sign of the gradient, and for ‘Zero gradient’, we pick the 40 neurons with lowest gradient norm. The whisker indicate the 95% confidence interval. (C) Speculative schematic of a close-up setup implementing the protocol (A) inspired by the all optical ‘read-write’ setup from Aravanis et al., 2007; Packer et al., 2015.

Tables

Table 1
BioRNN is more robust to optogenetic perturbations than σRNN.

The table reports the trial matching (TM) loss Ltrial on test trials; it measures the distance between the distributions of single trial network dynamics Sourmpis et al., 2023 in area A when stimulating area B. Column ‘no light’ indicates values on the unperturbed test trials, and ‘light’ the perturbation trials. ± indicates the 95% confidence interval, best values are shown in bold and major failure with distance above 0.5 is in red.

RefCirc1 vs. RNN1RefCirc2 vs. RNN2
no lightlightno lightlight
bioRNN0.19 ± 0.010.25 ± 0.090.18 ± 0.010.28 ± 0.13
σRNN0.16 ± 0.011.15 ± 1.070.17 ± 0.011.22 ± 0.64
No sparsity0.20 ± 0.011.37 ± 1.420.19 ± 0.010.19 ± 0.13
Non-local inhibition0.20 ± 0.020.54 ± 0.420.18 ± 0.011.19 ± 0.91
No Dale’s law0.18 ± 0.010.86 ± 0.230.18 ± 0.012.21 ± 1.60
No spike0.17 ± 0.000.19 ± 0.040.18 ± 0.000.46 ± 0.19
No Trial Matching (TM)0.33 ± 0.010.44 ± 0.190.35 ± 0.030.44 ± 0.09
Table 2
Trial-matching loss test loss Ltrial of the different reconstruction methods with the real recordings from Esmaeili et al., 2021 ± indicates the 95% confidence interval.

Unlike in Table 1, the same metric cannot be evaluated for the perturbation trials due to the absence of joint recordings and stimulation in this dataset.

Method nameReal dataset vs reconstructed network
bioRNN0.76 ± 0.14
σRNN0.62 ± 0.12
No sparsity0.77 ± 0.15
Non-local inhibition0.79 ± 0.15
No Dale’s law0.68 ± 0.13
No TM1.63 ± 0.55
No spike0.64 ± 0.13

Additional files

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Christos Sourmpis
  2. Carl CH Petersen
  3. Wulfram Gerstner
  4. Guillaume Bellec
(2026)
Biologically informed cortical models predict optogenetic perturbations
eLife 14:RP106827.
https://doi.org/10.7554/eLife.106827.3