Biologically informed cortical models predict optogenetic perturbations
Figures
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 . (D) Same as C during inactivation of area B. is the recorded change of hit rate for the feedforward circuit RefCirc1, so a successful reconstruction achieves . (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.
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 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).
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 under activation/inactivation of area . 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 and in the RefCirc , the whiskers indicate the 95% confidence interval. (F) The distance of network dynamics between each RNN and RefCirc (horizontal axis: light power in arbitrary units). (G) Same quantity as but averaged for each RNN under the strongest light power condition (averaging activations and inactivations of area ), 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.
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 A–B for RefCirc2 and RNNs2.
Picking the sparsity level.
(A) Grid search for the optimal maximum regularization strength () without a drop in performance. As a performance measure, we used the trial-matching loss, .
Trial-averaged traces across RNN variants.
Trial-averaged activity in area under activation/inactivation of area . 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.
Hit frequency prediction error as in Figure 2E.
In contrast to Figure 2E, here we show separately the change of hit probability for RefCirc1 (left) and RefCirc2 (right).
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, is predicted by the model, and 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 hit rate changes under perturbation for wS1 (Top) and tjM1 (Bottom). The black circles refer to the hit rate change from the recordings, . See Figure 3—figure supplement 2 for the other areas.
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.
Hit rate changes under inactivations.
(A) Change of lick probability under inactivation of all areas in all the different temporal windows. We show the from the data and reconstruction model variants.
Measuring circuit gradients with µ-perturbations.
(A–B) Numerical verification for Equation 1. A shows the change of jaw movement 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 that approximate from A using Equation 1. (C–D) 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 . (Step 2) The closest bioRNN trial to the ongoing recorded trial is retrieved from the databank . (Step 3) We select the neurons with the highest (or lowest) gradient value for the µ-perturbation. (Step 4) The µ-perturbation is delivered at . (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
BioRNN is more robust to optogenetic perturbations than σRNN.
The table reports the trial matching (TM) loss 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 . 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. RNN1 | RefCirc2 vs. RNN2 | |||
|---|---|---|---|---|
| no light | light | no light | light | |
| bioRNN | 0.19 ± 0.01 | 0.25 ± 0.09 | 0.18 ± 0.01 | 0.28 ± 0.13 |
| σRNN | 0.16 ± 0.01 | 1.15 ± 1.07 | 0.17 ± 0.01 | 1.22 ± 0.64 |
| No sparsity | 0.20 ± 0.01 | 1.37 ± 1.42 | 0.19 ± 0.01 | 0.19 ± 0.13 |
| Non-local inhibition | 0.20 ± 0.02 | 0.54 ± 0.42 | 0.18 ± 0.01 | 1.19 ± 0.91 |
| No Dale’s law | 0.18 ± 0.01 | 0.86 ± 0.23 | 0.18 ± 0.01 | 2.21 ± 1.60 |
| No spike | 0.17 ± 0.00 | 0.19 ± 0.04 | 0.18 ± 0.00 | 0.46 ± 0.19 |
| No Trial Matching (TM) | 0.33 ± 0.01 | 0.44 ± 0.19 | 0.35 ± 0.03 | 0.44 ± 0.09 |
Trial-matching loss test loss 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 name | Real dataset vs reconstructed network |
|---|---|
| bioRNN | 0.76 ± 0.14 |
| σRNN | 0.62 ± 0.12 |
| No sparsity | 0.77 ± 0.15 |
| Non-local inhibition | 0.79 ± 0.15 |
| No Dale’s law | 0.68 ± 0.13 |
| No TM | 1.63 ± 0.55 |
| No spike | 0.64 ± 0.13 |