Neuronal Learning Analysis using Cycle-Consistent Adversarial Networks
Authors: Bryan M. Li
Theoklitos Amvrosiadis
Nathalie L. Rochefort
Arno Onken
Venue: ICLR 2022 Submitted (2022)
Keywords: neuronal learning
unsupervised learning
calcium imaging
generative adversarial networks
cycle-consistent adversarial networks
explainable AI

Abstract: Understanding how activity in neural circuits reshapes following task learning could reveal fundamental mechanisms of learning. Thanks to the recent advances in neural imaging technologies, high-quality recordings can be obtained from hundreds of neurons over multiple days or even weeks. However, the complexity and dimensionality of population responses pose significant challenges for analysis. Existing methods of studying neuronal adaptation and learning often impose strong assumptions on the data or model, resulting in biased descriptions that do not generalize. In this work, we use a variant of deep generative models called - cycle-consistent adversarial networks, to learn the unknown mapping between pre- and post-learning neuronal activities recorded $\textit{in vivo}$. To do so, we develop an end-to-end pipeline to preprocess, train and evaluate calcium fluorescence signals, and a procedure to interpret the resulting deep learning models. To assess the validity of our method, we first test our framework on a synthetic dataset with known ground-truth transformation. Subsequently, we applied our method to neuronal activities recorded from the primary visual cortex of behaving mice, where the mice transition from novice to expert-level performance in a visual-based virtual reality experiment. We evaluate model performance on generated calcium imaging signals and their inferred spike trains. To maximize performance, we derive a novel approach to pre-sort neurons such that convolutional-based networks can take advantage of the spatial information that exists in neuronal activities. In addition, we incorporate visual explanation methods to improve the interpretability of our work and gain insights into the learning process as manifested in the cellular activities. Together, our results demonstrate that analyzing neuronal learning processes with data-driven deep unsupervised methods holds the potential to unravel changes in an unbiased way.

Under review as a conference paper at ICLR 2022
NEURONAL LEARNING ANALYSIS USING CYCLE- CONSISTENT ADVERSARIAL NETWORKS
Anonymous authors Paper under double-blind review
ABSTRACT
Understanding how activity in neural circuits reshapes following task learning could reveal fundamental mechanisms of learning. Thanks to the recent advances in neural imaging technologies, high-quality recordings can be obtained from hun- dreds of neurons over multiple days or even weeks. However, the complexity and dimensionality of population responses pose significant challenges for analy- sis. Existing methods of studying neuronal adaptation and learning often impose strong assumptions on the data or model, resulting in biased descriptions that do not generalize. In this work, we use a variant of deep generative models called cycle-consistent adversarial networks, to learn the unknown mapping between pre- and post-learning neuronal activities recorded in vivo. To do so, we develop an end-to-end pipeline to preprocess, train and evaluate caleium fluorescence sig- nals, and procedure interpret the resulting deep learning models. To assess the validity of our method, we first test our framework on a synthetic dataset with known ground-truth transformation. Subsequently, ronal activities recorded from the primary visual cortex of behaving mice, where the mice transition from novice expert-level performance in visual-based vir- tual reality experiment. We evaluate model performance on generated calcium imaging signals and their inferred spike trains. To maximize performance, we de- networks rive novel approach to pre-sort neurons such that convolutional-boat can take advantage of the spatial information that exists in neuronal activities. In addition, we incorporate visual explanation methods to improve the interpretabil- ity of our work and gain insights into the learning process as manifested the cellular activities. Together, our results demonstrate that analyzing neuronal learn- ing processes with data-driven deep unsupervised methods holds the potential to unravel changes in unbiased way.
applied method to neu-
INTRODUCTION
One of the main objectives in computational neuroscience is to study the dynamics of neural pro- cessing and how neural activity reshapes in the course of learning. A major hurdle was the difficulty in obtaining high-quality neural recordings of the same set of neurons actoss multiple experiments, though such limitation in recording techniques has seen tremendous improvements in recent years. With the advent of modern neural imaging technologies, it is now possible monitor large pop- ulation of neurons over days or even weeks (Williams et al.) 201 Sa, Steinmetz et al. 2021 thus allowing experimentalists obtain in vivo recordings from the same of neurons across different learning stages. Significant efforts have been put into extracting interpretable and unbiased descrip- tions of how cortical responses change with experience. Proposed approaches model changes in neuronal activity include linear latent variable models such as PCA, TCA, GPFA, GPFADS and
PSID (Cunningham & Byron 2014] Williams et al. 2018b) (Sani et al., 2021 Yu et al. 2009 Rutten et al. 2020). Methods employing deep learning models but with linear changes or mapping include LFADS and PILDS (Pandarinath et al. 2018 Gao al. 2016). While these methods enabled sub- stantial progress in understanding the structure of neuronal activity, they do have strong assumptions inherent in the modelling technique or the analysis, such as the linearity assumption in linear latent variable models. Therefore, making sense of the unknown mapping between pre- and post-learning neural activity in an unbiased manner remains a significant challenge, and a data-driven method to interpret the circuit dynamics in learning is highly desirable.

---

Under review as a conference paper at ICLR 2022
Thanks to their ability to self-identity and self-learn features from complex data, deep neural net- works (DNNs) have seen tremendous success in many biomedical applications (Cao et al. 2018 Zemouri et al. 2019 Piccialli et al.] 202T). Specifically, deep generative networks have shown promising results in analyzing and synthesizing neuronal activities in recent years. Pandarinath et al. (2018) developed a variational autoencoder (VAE) learn latent dynamics from single-trial spik- ing activities and Prince et al. (2020) extended the framework to work with calcium imaging data. Numerous work have demonstrated generative adversarial networks (GAN) are capable of synthe- sizing neuronal activities that capture the low-level statistics of recordings obtained from behaving
animals (Molano-Mazee et al. 2018 Ramesh al. 2019 Li et al. 2020).
In this work, we explore the use of cycle-consistent adversarial networks (Zhu et al., 2017). or Cy- cleGAN, to learn the mapping between pre- and post-learning neuronal activities in an unsupervised and data-driven manner. In other words, given the neural recordings of a novice animal, can we translate the neuronal activities that correspond to the animal with expert-level performance, and vice versa? The resulting transformation summarizes these changes in response characteristics in a compact form and is obtained in a fully data-driven way. Such a transformation can be useful in follow-up studies to 1) identify neurons that particularly important for describing the changes in the overall response statistics, not limited to first or second order statistics; 2) detect response patterns relevant for changes from pre- post-learning and 3) determine what experimental details are of particular interest for learning.
To learn the transformation, derive a standardized procedure to train, evaluate and interpret the CycleGAN framework. To improve the explainability of our work, we incorporate a self-attention mechanism into our generator models and also employ a feature-importance visualization method into our pipeline so that we can visualize and identify the input that the networks deemed relevant in their decision making process. In addition, we introduced novel neuron ordering method to im- prove the learning performance of convolutional neural networks (CNN), To quantify the capability of the proposed unsupervised learning method, we evaluate our method on two datasets: 1) an arti- ficially constructed dataset with handcrafted transformation, and 2) recordings obtained from the primary visual cortex of a behaving animal across multiple days. We then compare several metrics and statistics between the recorded and translated calcium traces and their inferred spike trains.
2 METHODS
2.1 ANIMAL EXPERIMENT To obtain neuronal activities that can demonstrate pre- and post- learning responses, we conducted a visual-based experiment which follows a similar procedure as Pakan et al. (2018) and Henschke et al.) (2020). Briefly, a head-fixed mouse was placed on linear treadmill that allows it to move forward and backward. A lick spout and two monitors were placed in front of the treadmill and virtual corridor with defined grating pattern reward (water drop) would be made available if the mouse licked within the predefined reward loca- tion (at 120-140 cm), in which black screen is displayed experiment setup. The mouse should learn to utilize both visual information and self-motion feed- back to maximize reward. The same set of neurons in the primary visual cortex were labelled with GCaMP6 calcium indicator and monitored throughout 4 days of experiment, the relative changes in fluorescence (&F/Fo) over time were used as a proxy for an action potential. 4 mice were used in the virtual-corride experiment and all mice transitioned from novice to expert in the behaviour task within days of training. Mouse took on average 6.94s per trial on day and 4.43s per trial on day 4, Table A. A.2 A the trial information of all the mice. Hence, this dataset can provide excellent insights into how cortical responses reshape with experience.
shown to the mouse. A
visual clue. Figure A. illustrates the
2.2 CYCLEGAN CycleGAN (Zuu et al. 2017) is GAN-based unsupervised framework that learns the mapping between two unpaired distributions X and Y via the adversarial training and cycle-consistency optimization. The framework has shown excellent results in number of unsuper- vised translation tasks, including natural language translation (Gomez et al. 2018) and molecular optimization (Maziarka et al. 2020). to name few.
Let X and Y be two distributions with unknown mappings that correspond to (novice) pre- and (expert) post-learning neuronal activity, respectively. CycleGAN consists of four DNNs: generator G : X > Y that maps novice activities to expert activities and generator F : Y - X that maps expert activities to novice activities: discriminator Dx X + [0, 1] and discriminator Dy : Y + [0, 1] that learn to distinguish novice and expert neural activities, respectively. In a forward
2

---

Under review as a conference paper at ICLR 2022
eycle step (X - Y + X, illustrated in Figure B.1 we first sample novice recording x from distribution X and apply transformation G to obtain 9 = G(z). We expect á to resembles data from the expert distribution Y, hence Dy learns to minimize (1) LPx = -By-- (D
1) Ex-x (e>xxDD(G(zz))) (G(z))². Similar to a typical GAN, generator G' learns to deceive Dy with the objective (2) L = -B XED=xx(Dy((() (G(z)) - Note that these are same objectives in LSGAN (Mao et al,, 2017). However, Dy can only verify if 9 Y, though cannot ensure that ý is the corresponding expert activity of the novice recording x. Moreover, X and Y are not paired hence we cannot directly compare with samples in Y. To tackle this issue, CycleGAN applies another transformation to reconstruct the novice recording I = = where the distance || x - I || or || x F(G(z)) II should be minimal. Therefore, the generators also optimize this cycle-consistent loss (3) Leyele xx~x(1 x - F(G(z)) II] + Eg-yll y G((())) II]. Mean absolute error (MAE) was used as the distance function, though other distance functions can also be employed. In addition, we would expect á = F(x) and = G(y) to be in distributions X and Y given that F Y + X and G:X + Y, hence the identity loss objective (4) C Cidemmy E II| G(v) III.
Taken all together, G optimizes the following objectives: (5) S = CG + Aeyele + Xideniity 4 ideniity where Aidentiy and Aeyele are hyper-parameters for identity and cycle loss coefficients. All four networks are trained jointly where L and LD are similar Lioaal and LDv though in opposite directions. In this work, we adapt the CycleGAN framework to learn the unknown map- ping between pre- and post-learning neuronal activities recorded from the primary visual cortex of behaving mice. In addition, we experiment with different GANs objective formulations on top of the original LSGAN objective, including GAN (Goodfellow et al. 2014). WGANGP (Arjovsky et al. 2017) and DRAGAN (Kodali et al. 2017). Table C.2
shows their exact formulations in CycleGAN.
2.3 MODEL PIPELINE We devise a consistent analysis framework, including data preprocessing and augmentation, networks interpretation, and evaluation of the generated calcium fluorescence signals and their inferred spike trains. Figure C.1 illustrates the complete pipeline of our work
We denote the day 1 (pre-learning) and day 4 (post-learning) recording distributions to be X and Y. With Mouse 1, W 102 neurons from the primary visual cortex were monitored, as well as trial information such as the virtual distance, licks and rewards. In total, 21471 and 21556 samples were recorded on day 1 and 4. Since we want the generators and discriminators to identify patterns rele- vant to the animal experiment in a data-driven manner, we do not incorporate any trial information into the training data. We first segment the two datasets with a sliding window of size H 2048 along the temporal dimension (around 85 in wall-time). resulting in data with shape (N, H, W) for X and Y where N is the total number of segments. We select a stride size that space out each segment evenly so that we obtained sufficient number of samples while keeping the correlations between samples reasonably low. In order to take advantage of the spatiotemporal information in the neuronal activities in a 2D CNN, we further convert the two sets to have shape (N, H, W, C) where
C'= 1. Finally. we normalize each set to the range [0, 1]. and divide them into train, validation and test set with 3000, 200 and 200 samples respectively.
To evaluate the transformation results of G and F, we can compare the cycle-consistency MAE(X, F(G(X))) and MAE(Y, G(F(Y))) as well as the identity losses MAE(X, F(X)) and MAE(Y, G(Y)) (e.g. we expect F to apply no transformation to a novice sample æ). We also evalu- ate the generated data in terms of spike activities in the following distribution combinations: novice against translated novice (X F(Y)), novice against reconstructed novice (X F(G(X))) ex- pert against translated expert (Y G(X)) and expert against reconstructed expert (Y G(F(Y))) We use Cascade (Rupprecht et al. 2021) infer spike trains from the recorded and generated cal- cium signals to assess the credibility of the generated signals. We measure the following com- monly used spike train similarities and statistics: 1) mean firing rate for evaluating single neuron statistics; 2) pairwise Pearson correlation for evaluating pairwise statistics; 3) pairwise van Rossum distance (Rossum| 2001) for evaluating general spike train similarity. We evaluate these quantities across the whole population for each neuron or neuron pairs and compare the resulting distributions over these quantities obtained from the recorded and generated data. We, therefore, validate the whole spatiotemporal first and second-order statistics as well as general spike train similarities.
To improve the explainability this work we introduce number of recently proposed model inter- pretation methods into our pipeline. We design a self-attention generator architecture which allows 'The software codehase will be made publicly available upon acceptance.
3

---

Under review as a conference paper at ICLR 2022
the network to learn set of attention masks such that it encourages the network to better focus on specific areas of interest in the input and also enables us to visually inspect the learned attention maps. In addition, we use GradCAM (Selvaraju et al., 2017), method visualize discriminative region(s) learned by a CNN classifier w.r. to the input, to extract localization maps from the gen- erators and discriminators. The self-attention mechanism and GradCAM visualization allow to verify and interpret that the networks are learning meaningful features. Moreover, these extracted attention maps can reveal neurons or activity patterns that are informative in the neuronal learning process. A detail description of the model architectures are available in Section D
2.3.1 NEURON ORDERING CNNs with a smaller kernel can often perform as well or even better than models with larger kernels while consisting of fewer trainable parameters (He et al. 2016a Li al.) 202T). Nevertheless, a smaller kernel can also limit the receptive field of the model, or the region in the input that the model is exposed to in each convolution step (Araujo et al. 2019). In addition, the recordings obtained from the virtual-corridor experiment were annotated based on how visible the neurons were in the calcium image, rather than ordered in a particular manner (see Figure A.T. This could potentially restrict CNNs with small receptive field to learn meaningful temporal information from the population responses. To mitigate this issue, we derive procedure to pre-sort X and Y. such that neurons that are highly correlated or relevant are nearby in their ordering. A naive approach is to sort the neurons by their firing rate average pairwise correlation, where the neuron with the highest firing rate or the neuron that, on average, is most correlated other neurons ranked first in the data matrix. However, is possible that not all high- firing neurons or most correlated neurons are the most influential in the learning process. Therefore, also explore data-driven approach. Deep autoencoders have shown excellent results in feature extraction and representation learning (Gondara 2016 Wang et al. 2016]] Tschannen et al. 2018 and we can take advantage of its unsupervised feature learning ability.
We employ a deep autoencoder AE which learns to reconstruct calcium signals in X and Y jointly. AE consists of 3 convolution down-sampling blocks, followed by bottleneck layer, then 3 transposed-coovollttion up-sampling blocks. The down-sampling block consists of convolution layer followed by Instance Normalization (Ulyanov et al. 2016). Leaky ReLU (LReLU) activa- tion (Maas et al. 2013) and Spatial Dropout (Tompson et al. 2015), whereas a transpose convolution used in the up- up-sampling block instead. We optimize the mean-squaree error (MSE) reconstruction loss on the training set of X and Y, then use the per-neuron reconstruction error the test set to sort the neurons (in ascending order): order = argsort( 5. x MSE(X, (E)) +MSE AE(Y)) I). The neuron sorting process is part of the data preprocessing step and is independent from the Cycle- GAN framework.
2.3.2 SYNTHETIC DATA CycleGAN was originally introduced for image-to-image translation. Albeit the two image distributions are not aligned hence cannot be directly compared easily, one could still visually inspect whether or not å F(y) and ý = G(xz) are reasonable transformations. However, it would be difficult to visually inspect the two transformations with calcium signals. To this end, we introduce an additional dataset Y = (xX) with known transformation 4 such that G - Y = ((X) and F Y = ((X) + X. We can then verify G(x) ÿ .(x) and F(y) = 2 x. We defined the spatiotemporal transformation & that can be identified visually as follows: (6) (ar) = "ddigonaa 0.5v), where m-daagoaa is a diagonal mask to zero-out the lower left corners of the signals and ~ ((zz:0)) frr and a₂ are the per-neuron mean and standard deviation X. Figure[]shows an augmented example. Importantly, we shuffle the train set after the augmentation procedure so that X and Y appears to be unpaired to the model. Whereas the test set remains its original paired arrangement so that we can compare X XX-FFF FFY || and || Y -GX( ||-
1.C
Neuron
26
51
0.5
76
102
0.6
42
$
42
54
Time (s)
Time
Figure 1: (Left) original x and (Right) augmented y .(x) calcium traces, where the bottom left corner (yellow dashed triangle) in y has been masked out and noise being added the segment.
4

---

Under review as a conference paper at ICLR 2022
3 RESULTS
We assessed the CycleGAN framework synthetic data with known ground truth and on experi- mental data where we recovered trial information. We also experimented with different GAN objec- tive formulations as well as different neuron ordering methods. All models presented below were trained with the Adam optimizer (Kingma & Ba, (2014) for 200 epochs where all models converged. We trained all CycleGAN models on single NVIDIA A100 GPU which on average took 15 hours to complete. It took an additional hour to train the autoencoder in the case where we pre-sort neurons according to the AE reconstruction loss. Table C.I details the syper-parameters used.
3.1 SYNTHETIC DATA To show that our method is capable of learning subtle differences in cal- shows calcium signals of the
cium traces, we first fit our model on the synthetic dataset. Figure 2 forward and backward cycle transformation of neuron 75 from a randomly selected test segment, where sNet generators were trained with LSGAN objectives (more examples in Figure F.I Without paired samples, F(y) made a reasonable attempt in reconstructing the augmented region in y. whereas G(z) was able to learn to mask out the appropriate regions in 2. Since (x) Y performed systematic spatiotemporal transformation to X, one would expect the networks to learn features that focus on the augmented region of the data. We, therefore, use GradCAM (Selvaraju al. 2017) localization maps to visualize regions of interest learned by the discriminators. The localization map of discriminator (Y) when given an augmented sample y o (zz), shown in Figure 3 demonstrates a high level of attention around the edge of the diagonal region. This indi- cates that Dy learned to distinguish whether or not given sample is from distribution Y (XX) by predominantly focusing on the edge of the masking area. On the other hand, since no augmen- tation was done on the input to discriminator Dx, the localization map does not appear to have a particular structural area of focus at first (c.f. Figure F.3) Interestingly, once we overlay the reward zones the input, we observe that the area of focus learned by Dx is loosely aligned with the reward zones. Note that reward zones are external task-relevant regions that are expected to shape the neural activity in the primary visual cortex the visual patterns change when the mouse enters the reward zone. Our findings therefore suggest that Dx learned distinctive patterns from highly ranked neurons around the reward zones. Figure 3 shows the AG sigmoid masks from G(x). Both attention masks ignored the augmentation region (I.e. bottom left corner), as information in that area not relevant in the G X + (XX) transformation. Similar, I' which should learn (Xx + X also allocated less focus in the masked region in its reconstruction process, as it contains no useful information. (see Figure
Since X and Y (XX) are paired in the test set, this allows us to compute MAB(Y, G(X)) and MAE F(Y)) hence providing a good testbed to compare different generator architectures, GAN objective formulations and neuron ordering methods. We also added the identity models as baseline, which should have perfect cycle-consistent loss as (=)))) and G (F())) perform no operation on the data. Nevertheless, despite the fact that & is a relatively simple augmentation, one would expect the difference between X and ((X) to be small. Table [ shows the direct comparison results of different combinations of objective formulations, generator architectures and neuron ordering meth- ods. Both ResNet and AGResNet achieved significantly better results than the identity model. To mitigate the issues of vanishing gradient and mode collapse, used gradient penalty regulariza- tion to enforce the 1-Lipschitz condition in the discriminator. We, therefore, tested 4 popular GAN objectives with the CycleGAN framework. Interestingly, the LSGAN objectives achieved slightly better results than GAN objectives while both performed better than identity. The two objectives with gradient penalty obtained lower cycle-consistent errors than GAN and LSGAN, yet performed significantly worse in the intermediate transformations F(Y) and G(X). This suggests that the dis- criminators could be overpowered by the generators when trained with WGANGP and DRAGAN, in which Dx (F(()) and (G())) are neither informative nor impactful to the overall objective.
This is likely because the gradient penalty regularization further complicates the already perplexing CycleGAN objectives. We employed 3 different methods to pre-sort neurons in the data, including firing rate, pairwise correlation and autoencoder reconstruction loss. In addition, to demonstrate that 2D convolution can indeed better learn the spatial structure in neuronal activities, trained a 1D variant of AGResNet (denoted as 1D- ND-t)) as baseline which disregards all spatial information. Overall, models trained sorted neurons achieved better results compared un- ordered neurons and in most cases, sorting neurons according to the autoencoder reconstruction loss performed the best, Moreover, 1D-AGResNet performed significantly worse than its 2D coun- terparts, suggesting that the spatial structure in the neural activities is indeed important. In the
5

---

Under review as a conference paper at ICLR 2022
remaining work, use the LSGAN objective to train the generators with the AGResNet archi- tecture along with neurons ordered based on autoencoder reconstruction loss as this combination achieved the best overall results the synthetic data.
G(x)
F(G(x))
2.87
Mull Mall
1,29
AFFF
0.29
Fly)
G(F(r)
3.04
-0.33
85
21
42
63
85
Figure 2: Forward and backward cycle steps of neuron 75 from a randomly selected test segment. G should learn to translate signals in the yellow solid box to yellow dotted box, and F from green dotted box to green solid box. We expect the signals in the green solid box resemble signals in the yellow solid box and yellow dotted box to green dotted box. More examples are shown in Figure
89
86
0.8
26
86
26
71
0.2
38
10
51
255
511
767
1023
6
21
42
63
55 0.0
latent dimensšon
Time (8)
Figure 3: (Left) Learned attention masks AG1 and AG2 in AGResNet G given a random test segment x ~ X. AG₁ and AG, both learned to ignore information in (to-be) masked region in x. Note that AG1 and AG2 are and times diver-ddmeesional than the original input dimension. (Right) GradCAM localization map of Dy given a randomly select test segment The top panel shows the original input, where yellow and orange dotted lines mark the start and end of each reward zone. The second panel shows the GradCAM localization map superimposed on the input. Neurons were ordered based on AE reconstruction loss, the exact ordering available in Table E. Figure F.3 shows the attention gates and GradCAM map of F(y) and Dx (x).
((x) ~ X.
3.2 RECORDED DATA As proposed method has successfully learned the unpaired transforma- tions in the synthetic dataset, we now move on to the recordings obtained from the experiment where attempt learn the unknown mapping between pre- and post-learning ronal activity. Figure Figure4ssoow shows the cycle transformation of neuron 50 from a randomly selected test segment. Visually, G and F' seems to be able reconstruct I F(G(x)) and = G(F(y)) and that the two generators are not simply passing through and in intermediate step ú G(z) and & Fvy). To better analyse the transformation performance, we first compare the generated calcium florescence signals with the recorded test set data. The cycle-consistent loss on the test set achieved values of MAE(X, F (G(())) 0.0733 and MAE G(F(Y)) 0.0737. The identity losses for MAE(Y, G(Y)) and MAE(Y, G(Y)) are also minimal, with values of 0.0101 and 0.0069, respectively. For reference, MAE(X,) Y) = 0.3674. This suggest and are not simply passing through the data without any processing. In addition, the low identity loss indicates that the gener- ators can correctly identify whether or not the given input is already part of its target distribution. Table G. reports the cycle-consistent and identity loss with different neuron ordering methods.
Since we lack paired data in the in vivo recordings, we cannot directly compare MAE(X, F(Y)) nor ((X( in contrast to Section 3.1 In order to better analyse the two intermediate transfor- mations " = G(z) and = Fly), and show that G and can indeed translate and y into their respective distributions ÿ Y and X, we also compare set of spike train statistics. Section H

---

Under review as a conference paper at ICLR 2022
X FOO1
X X-F(())))
I8 C(X)
|Y C(PDD)
(A) DIFFERENT MODELS LSGAN OBIECTIVE
IDENTITY
0.4234 + 0.0172
0
0.4234 = 0.0172
RESNET
0.1617 0.0071
0.1173 = 0.0043
0.3743 = 0.0391
0.1247 0.0067
AGRESNET
0.1508 + 0.0089
0.1107 + 0.0051
0.2520 0.0262
0.1467 0.0084
(B) DIFFERENT OBJECTIVES AGRESNET
GAN
0.1611 +: 0.0063
0.0948 + 0.0069
0.2513 = 0,0350
0.1491 0.0050
LSGAN
0.1508 + 0.0089
0.1107 = 0.0051
0.2520 0.0262
0.1467 0.0084
WGANGP
0,2381 # 0.0123
0.1600 = 0.0098
0.3186 0,0096
0.1960 = 0.0093
DRAGAN
0.3832 + 0.0115
0.0434 + 0.0021
0.4012 = 0.0207
0.0568 + 0.0027
(C) DIFFERENT NEURON ORDERING WITH AGRESNET AND LSGAN OBJECTIVE
1D- SST
0.2724 1: 0.0101
0.1878 + 0.0115
0.3151 : 0.0445
0.1635 : 0.0115
ORIGINAL
0.1508 1 0.0089
0.1107 1 0.0051
0,2520 = 0.0262
0.1467 + 0.0084
FIRING RATE
0,1578 + 0.0079
0.0722 = 0.0044
0.1304 = 0.0306
0.08-12 + 0.0036
CORRELATION
0,1556 + 0.0044
0.0852 = 0.0042
0.1369 = 0.0209
0.0930 0.0034
AUTOENCODER
0.1433 + 0.0083
0.0639 = 0.0032
0.1227 0.0135
0.0671 0.0030
Table 1: MAE comparison between synthetic and generated calcium signals. Results of (A) identity, ResNet and AGResNet generators trained with LSGAN objective, (B) AGResNet generators trained with different objectives and (C) neurons ordered by original annotation, firing rate, pairwise correlation and autoencoder reconstruction loss. We also trained ID variant of AGResNet as baseline which disregards the neuron spatial structure. Lowest values marked in bold.
G(x)
F(G(x))
1.19
0.49
AF/P
-0.21
y
F(y)
G(P(y))
1.06
0.39
-0.28
21
42
63
85
0
21
42
63
85
21
42
63
85
Time (s)
Figure 4: Forward and backward cycle steps of neuron 50 from randomly selected test segment. More examples are shown in Figure G.T and Figure G.2
shows that per-neuron and per-segment comparison. We first compare the firing rate distribution of each neuron between recorded and translated data (e.g. X vs F(Y) and X vs F(G(())) Examples of the distribution comparisons are available in Section H Since we expect that the distribution of the generated data resemble of those from the recorded data, for each neuron to quantify the transformation performance. The firing rate distributions and G(X) closely matched the distributions of X and Y, with average KL divergence of 1.1648 and 1.0697, respectively. Similarly, we can compute the pairwise correlation of each neuron w.r.t the population and compare the distribution between translated and recorded data. X F(Y) and Y G(X) achieved an average KL divergence value of 0.0479 and 0.0493 in the pairwise correlation comparison. both were significantly better results than the baseline identity model. In addition, we measure the van Rossum distance between X and F(Y) for each neuron across 200 test samples, and represent the results in the form of a heatmap. We can observe clear diagonal line of low- intensity values in the heatmaps for most neurons (e.g. Figure HK and H.4 for G and F). Hence, there exists spike train in X and Y that corresponds to a translated spike train in F(Y) and G(X). Table G.2 summaries the average KL divergence of the 3 spike statistics in different distribution combinations, the results indicate that the generators can indeed learn the distribution translation from pre- post-learning neuronal activities, and vice-versa. We additionally trained separate mod- els on the activities recorded from the other mice and obtained similar results, which are available in Section [ and K
compare the KL divergence
F(Y)
7

---

Under review as a conference paper at ICLR 2022
In the previous section, were able identify and interpret the learned features in relatively straightforward manner due to the systematic augmentation we introduced into the data. However, visualizing and interpreting the attention maps pre- and post-learning data could be more chal- lenging as there would not be obvious patterns in the inputs to anticipate. Nevertheless, we would expect higher level of activities in the V1 neurons when the mouse is about enter inside the ward zone, where the grating pattern on the virtual walls turn to black. Subsequently, the generators and discriminators should learn meaningful features from responses surrounding the reward zones. We first visualize the sigmoid masks in ACResNet. Figure 5 shows the learned attention masks of G superimposed on the latent inputs (see Figure G.3 for F). When the neurons were ordered, either by firing rate or autoencoder, we observe that the generators allocate more attention toward neurons that rank higher. This suggest that by grouping neurons in meaningful manner, the convolutional layers in the generators can extract relevant features more effectively as compared to when neurons were randomly ordered. The spike analysis showed that ordering neurons in a structured manner does indeed yield better results across the board. In most cases, ordering the neurons based on the reconstruction error achieved the best results.
We then inspect the GradCAM localization maps of the discriminators. Similar to Dx in the syn- thetic dataset, we observed regions of high attention surrounding the reward zones in both Dx and Dy (see Figure G.3 and 5). To better visualize the relationship between the of focus learned by the model and the virtual-corridor, we generate positional attention maps as shown in Figure [6] We first compute GradCAM maps for all test samples, then we average the activation value for each neuron at each virtual position (160 em in total) and plot the average activation value against dis- tance. Effectively, these maps should represent the average attention learned by the models w.r.t. the visual location of the animal. Importantly, the only objective the discriminators had was to distin- guish if given sample is from particular distribution. Thus, the discriminators could have learned trivial features. Instead, Dx focused on specific group of neurons at 100 130 em in the virtual environment, which coincides with the beginning of the reward zone. Moreover, Dy learned to focus on two groups of neurons with attention patterns that were also in alignment with the reward zone in the virtual-corridor experiment. Similarly, we can extract these positional attention maps for G(X) and F(Y) following the same procedure, where we monitor the change in gradient in the last residual block RBg (bottom row in Figure 6). Interestingly. both generators focused on the first few neurons in their transformation operations. G focused activities the beginning of the trial as well as activities in the reward zone; whereas with F, paid higher level of attention to activities right before the reward zone. This suggests that learn the transformation from post- to pre-learning responses, the activities the mouse exhibit as it approaches the reward zone is deemed more important by the networks. Note that no trial information was incorporated into the training data nor was it formulated in the objective function. Hence, these interesting patterns we observe here were learned entirely by the networks themselves via the adversarial process.
1.0
13
71
0.8
19
10
26
6-
255
1
89
0.4
13
86
10
51
255
511
767
1023
42
0.0
latent dimension
Time (s)
Figure 5: (Left) AG sigmoid masks in AGResNet G given a random test segment x X. The histograms on the right show the neuron-level attention. Note that AG, and AG₃ are at 4 and times lower dimension than the input. (Right) GradCAM localization map of Dy given randomly select test segment y ~ Y. The top panel shows the original input, where yellow and orange dotted lines mark the start and end of each reward zones. The second panel shows the localization map superimposed on the input. Neurons were ordered based on AE reconstruction loss. The exact ordering is available in Table E.T Plots of F and Dxx are shown in Figure G.3
8

---

Under review as a conference paper at ICLR 2022
89
1.0
0.8
86
Ne uron
0.6
71
0.4
10
0.2
0.0
0.8
86
Neuron
71
0.4
0.2
0.0
0
39
79
119
159 0
39
79
119
159
Distance (em)
Distance (cm)
Figure 6: Positional attention maps of (Top Left) Dx, (Top Right) Dy, (Bottom Left) G and (Bot- tom Right) F w.r. virtual position in the animal experiment. Yellow and orange dotted lines indicate the start and end of the reward zone. Neurons exact ordering is available Table The pre- and post-leaming activities of top 10 highlighted neurons learned by Dx and Dy are available in Figure G.5 and Figure G.6b respectively.
ordered based AE reconstruction loss. The
DISCUSSION
We demonstrated that the CycleGAN (Zhu al. 2017) framework is capable data-driven method to model the translation between pre- and post-learning responses recorded in vivo. With self- attention and feature-importance visualization methods, the networks deemed important in their translation and discrimination process. Intriguingly, without providing trial information the training process, the networks self-identified activities surrounding the reward zone in the virtual-come cooual-o experiment to be highly influential, which aligns with our understanding that the responses in the visual cortex were shaped by the change of visual cues. In addition, we introduced novel and simple to implement neuron ordering method enabling more effective learning by convolutional-basee networks.
able visualize information that
A significant portion of the neuronal activity validation in Section 3.2 was performed in spike trains inferred from the recorded and generated calcium fluorescent signals using Cascade (Rupprecht et al., 2021), which is recently introduced method that has outperformed existing model-based algorithms. However, reliable spike inference from fluorescent calcium indicators signals remains an active of research (Theis al. 2016). For instance, Vanwalleghem al. (2020) demonstrated that spiking activities could be missed due to the implicit non-negann non-negativity assumption in calcium imaging data which exists in many deconvolution algorithms,, including Cascade. Nonetheless, would like to emphasize that Cascade was used to deconvolve calcium signals for all distributions of data and therefore all inferred spike trains experienced the same bias. Another notable constraint in our method is the fundamental one-to-one mapping limitation in the CycleGAN framework. The generators learn a deterministic mapping between the two domains and only associate each input with a single output. However, most cross cross-domain relationships consist of one-to- or many- to-many mappings. More recently proposed methods, such as Augmented CycleGAN (Almahairi et al. 2018), aim to address such fundamental limitations by introducing auxiliary noise to the two distributions, and are thus able to generate outputs with variations, Nevertheless, these methods are most effective when trained in a semi-supervised manner which is not possible with our unpaired neural activity.
All in all, deep unsupervised methods have become more expressive and explainable, and neu- ronal activities different learning phases from behaving animals have become more readily avail- able, there is potential for novel insights into fundamental learning mechanisms. Future directions include sorting neurons in 2D space, as they were recorded, such that the model can take advantage of both vertical and horizontal spatial information.

---

Under review as a conference paper at ICLR 2022
REFERENCES
Amjad Almahairi, Sai Rajeshwar, Alessandro Sordoni, Philip Bachman, and Aaron Courville. Aug- mented cyclegan: Learning many-to-many mappings from unpaired data. In International Con- ference on Machine Learning, pp. 195-204. PMLR, 2018.
André Araujo, Wade Norris, and Jack Sim. Computing receptive fields of convolutional neural net- works. Distill, 2019. doi:
http://disttlllpubby http://///commmugggggroooooa 9ccomputing-reeeptie..
fields.
Martin Arjovsky, Soumith Chintala, and Léon Bottou. arXiv: 10Xiv01701.087555 2017.
Wasserstein gan.
arXiv preprint
Chensi Cao, Feng Liu, Hai Tan, Deshou Song, Wenjie Shu, Weizhong Li, Yiming Zhou, Xiaochen Bo, and Zhi Xie. Deep learning and its applications in biomedicine. Genomics, proteomics & bioinformatics, 16(1):17-32, 2018.
John Cunningham and Yu Byron. Dimensionality reduction large-scale neural recordings. Nature neuroscience, 17(1 1000)::55000999 2014.
Yuanjun Gao, Evan W Archer, Liam Paninski, and John Cunningham. Linear dynamical neural population models through nonlinear embeddings. Advances in neural information processing systems, 19:163-171, 2016.
Aidan N Gomez, Sicong Huang, Ivan Zhang, Bryan M Li, Muhammad Osama, and Lukasz Kaiser. Unsupervised cipher cracking using discrete gans. arXiv preprint arXiv: 04883, 2018.
Lovedeep Gondara. Medical image denoising using convolutional denoising autoencoders. In 2016 IEEE 16th international conference on data mining workshops (ICDMW), pp. 241-246. IEEE, 2016.
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In Proceedings of the IEFE conference computer vision and pattern recognition, pp- 770-778, 2016a.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 645- Springer, 2016b.
Julia U Henschke, Evelyn Dylda, Danai Katsanevaki, Nathalie Dupuy, Stephen P Currie, Theok- litos Amvrosiadis, Janelle MP Pakan, and Nathalie Rochefort. Reward association enhances stimulus-speciffc representations in primary visual cortex. Current Biology, 2020.
Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Weinberger. Densely connected convolutional networks. In Proceedings of the IEFE conference on computer vision and pattern recognition, pp. 4700-4708. 2017.
Phillip Isola, Jun Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to -mage translation with conditional adversarial networks. In Proceedings of the IEFE conference on computer vision and pattern recognition, pp. 1 1125-1134, 2017.
Diederik Kingma and Jimmy Ba. Adam: method for stochastic optimization, arXiv preprint arXiv:1412.6980 2014.
Naveen Kodali, Jacob Abernethy, James Hays, and Zsolt Kira. On convergence and stability of gans. arXiv preprini arXiv: 000000077115.. 2017.
Bryan M Li, Theoklitos Amvrosiadis, Nathalie Rochefort, and Amo Onken. Calciumgan: gen- erative adversarial network model for synthesising realistic calcium imaging data of neuronal populations, arXiv preprint 2009v2200 2020.
10

---

Under review as a conference paper at ICLR 2022
Zewen Li, Fan Liu, Wenjie Yang, Shouheng Peng, and Jun Zhou. A survey of convolutional neural networks: analysis. applications, and prospects. IEEE Transactions on Neural Networks and Learning Systems, 2021.
Andrew L Maas. Awni Y Hannun, Andrew Y Ng, et al. Rectifier nonlinearities improve neural network acoustic models. In Proc. ieml, volume 30, pp. 3. Citeseer, 2013.
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. Proceedings of the IEEE international confer- ence on computer vision, pp. 2794-2802, 2017.
Lukasz Maziarka, Agnieszka Pocha, Jan Kaczmarezyk, Krzysztof Rataj, Tomasz Danel, and Michal Warchol. Mol-cyclegan: generative model for molecular optimization. Journal of Cheminfor- matics, 12(1):1-18, 2020.
Manuel Molano-Mazon, Arno Onken, Eugenio Piasini and Stefano Panzeri*, Synthesizing real- istic neural population activity patterns using generative adversarial networks. In International Conference on Learning Representations, 2018. URLAttps:///peeeeviies wew.//ruttfouttt forum?
iddr1IVsebbZ
Ozan Oktay, Jo Schlemper, Loic Le Folgoc, Matthew Lee, Mattias Heinrich, Kazunari Misawa, Kensaku Mori, Steven McDonagh, Nils Y Hammerla, Bernhard Kainz, et al. Attention u-net: Learning where to look for the pancreas. arXiv preprint arXiv:1804.03900 2018.
Janelle MP Pakan, Stephen P Currie, Lukas Fischer, and Nathalie I. Rochefort. The impact of visual cues, reward, and motor feedback on the representation of behaviorally relevant spatial locations in primary visual cortex. Cell reports, 24(10)2552-2252, 2018.
Chethan Pandarinath, Daniel O'Shea, Jasmine Collins, Rafal Jozefowicz, Sergey D Stavisky, Jonathan C Kao, Eric M Trautmann, Matthew T Kaufman, Stephen Ryu, Leigh R Hochberg, et Inferring single-trial neural population dynamics using sequential auto-encoders. Nature methods, pp. 1, 2018.
Francesco Piccialli, Vittorio Somma, Fabio Giampaolo, Salvatore Cuomo, and Giancarlo Fortino. A survey deep learning in medicine: Why, how and when? Information Fusion, 66:1 11-137, 2021.
Luke Yuri Prince, Shahab Bakhtiari, Colleen Gillon, and Blake Aaron Richards. Calfads: latent factor analysis of dynamical systems in calcium imaging data. 2020.
Poornima Ramesh, Mohamad Atayi, and Jakob H Macke. Adversarial training of neural encoding models population spike trains. 2019.
Olaf Ronneherger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedi- cal image segmentation. In International Conference Medical image computing and computer- assisted intervention, pp. 234-241. Springer, 2015.
MCW van Rossum. A novel spike distance. Neural computation, 13(4):751-733, 2001.
Peter Rupprecht, Stefano Carta, Adrian Hoffmaan, Mayumi Echizen, Antonin Blot, Alex C Kwan, Yang Dan, Sonja B Hofer, Kazuo Kitamura, Fritjof Helmchen, et al. A database and deep learning toolbox for noise-optimized, generalized spike inference from calcium imaging. Nature Neuro- science, pp. 1-14, 2021.
Virginia Rutten, Alberto Bernacchia, Maneesh Sahani, and Guillaume Hennequin. Non-reversible gaussian processes for identifying latent dynamical structure in neural data. Advances in Neural Information Processing Systems, 2020.
Omid G Sani, Hamidreza Abbaspourazad, Yan T Wong, Bijan Pesaran, and Maryam M Shanechi. Modeling behaviorally relevant neural dynamics enabled by preferential subspace identification. Nature Neuroscience, 24(1):140-149) 2021.

---

Under review as a conference paper at ICLR 2022
Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient- based local- ization. In Proceedings of the IEEE international conference on computer vision, pp. 618-626, 2017.
Nicholas A Steinmetz, Cagatay Aydin, Anna Lebedeva, Michael Okun, Marius Pachitariu, Marius Bauza, Maxime Beau, Jai Bhagat, Claudia Böhm, Martijn Broux, et al. Neuropixels 2.0: A miniaturized high-density probe for stable, long-term brain recordings. Science, 372(6539), 2021.
Lucas Theis, Philipp Berens, Emmanouil Froudarakis, Jacob Reimer, Miroslav Román Rosón, Tom Baden, Thomas Euler, Andreas S Tolias, and Matthias Bethge. Benchmarking spike rate inference in population calcium imaging. Neuron, 90(3):471 1822, 2016.
Jonathan Tompson, Ross Goroshin, Arjun Jain, Yann LeCun, and Christoph Bregler. Efficient object localization using convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 648-656,75 2015.
Michael Tschannen, Olivier Bachem, and Mario Lucic. Recent advances in autoencoder-based representation learning. arXiv preprint arXiv: 18/2.509/,, 2018.
Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing in- gredient for fast stylization. arXiv preprint arXiv:1607.08022 2016.
Gilles Vanwalleghem, Lena Constantin, and Ethan K Scott. Calcium imaging and the curse of negativity. Frontiers in neural circuits, 14, 2020.
Yasi Wang, Hongxun Yao, and Sicheng Zhao. Auto-encoder based dimensionality reduction. Neu- rocomputing. 14:2232-242, 2016.
Alex H. Williams, Tony Hyun Kim, Forea Wang, Saurabh Vyas, Stephen I. Ryu, Krishna V. Shenoy, Mark Schnitzer, Tamara G. Kolda, and Surya Ganguli. Unsupervised discovery of demixed, low-dimensional neural dynamics across multiple timescales through tensor component anal- ysis. Neuron, 18(6):1099-1111 1115.e,, 2018a. ISSN 0896-6273. doi: htpp://dbi.rrg/10.1116jj securon.201805.000 URL https: www. sci encedi rect com sci wwciiencc/artiioo p1i/5089662733 731 333878
Alex H Williams, Tony Hyun Kim, Forea Wang, Saurabh Vyas, Stephen Ryu, Krishna V Shenoy, Mark Schnitzer, Tamara G Kolda, and Surya Ganguli. Unsupervised discovery of demixed, low- dimensional neural dynamics across multiple timescales through tensor component analysis. Neu- ron, 18(6):1099-1 15, 2018b.
Byron M Yu, John Cunningham, Gopal Santhanam, Stephen Ryu, Krishna V Shenoy, and Ma- neesh Sahani. Gaussian proccess factor analysis for low-dimensional single-trial analysis of neural 2009.
population activity. Journal of neurophysiology.
Ryad Zemouri, Noureddine Zerhouni, and Daniel Racoceanu. Deep learning in the biomedical applications: Recent and future status. Applied Sciences, 98): 2019.
Jun Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-imat translation using cycle-consistent adversarial networks. In Proceedings of the IEEE international conference on computer vision, pp. 2223-2232, 2017.
12

---

Under review as a conference paper at ICLR 2022
APPENDIX
A
ANIMAL EXPERIMENT
DAY
EXPERIMENT DURATION
DURATION
LICKS
REWARDS
129
894.73s
6.94S
2813
140
2
177
$98.68$
5,08s
2364
182
3
192
897. 166
4.67s
2217
198
4
203
898.455
4.438
1671
213
Table A.I: Trial information of mouse in the virtual-corridor experiment across 4 days of training, which include the number of trials, average duration of each trial, total number licks and the total reward received by the mouse. The mouse achieved "expert" level by day 4 where it had success rate > 75% at the task. All data were recorded at a sampling rate 24Hz. Note that the same mouse was used in the experiment.
MOUSE
NUM. NEURONS
DAY LICKS
DAY I REWARDS
DAY 4 LICKS
DAY 4 REWARDS
102
2813
140
1671
213
59
1038
75
1069
157
919
1065
302
32
1239
192
2493
230
Table A.2: The number licks and rewards the 4 mice exhibit on day and 4 in the virtual-corrioor experiment (see Section 2.1.
Cash imaging
(N. 2048, 102, 1)
40
57
66
37
102
12
76
50
8002
50
Figure A.1: (Left) illustration of the mouse virtual-enviromee setup. A defined grating pattern is displayed on the monitors and the mouse can move forward and backward the virtual-corridor: When the mouse approaches the reward zone, which set at 120 to 140 em from the initial start point, the grating pattern would disappear and be replaced with blank screen. If the mouse licked within the virtual reward zone, then droplet of water Trials reset at 160 em. The figure based on Figure 1 in Pakan et al.) (2018). (Right) original coordinates and annotation order of the 102 recorded neurons. i.e. neuron # here would be index O in the data matrix, and neuron 45 would be at index 64, Neurons followed the same order across all experiments.
given the mouse
reward.
13

---

Under review as a conference paper at ICLR 2022
B CYCLEGAN
G
D
Y
y
G
y
X
T
y
F
F
cycle consistent loss
(a)
(b)
Figure B.1: Illustration of (a) the data flow and (b) the cycle-consistent loss in forward cycle X + Y X. G and F are generators that learn the transformation of X + Y and Y + X G(x). To ensure
respectively. We first sample ~ X, then apply transformation G to obtain y resemble distribution Y, we train discriminator Dy to distinguish generated samples from real ÿ is of distribution Y, we cannot verify that ý is the direct correspondent samples. However, transformation F which convert ī = G(ğ) back to domain X. If both F of x. Hence, we apply and G reasonable transformations, then the cycle-consistency [x æ| should be minimal. The backward cycle Y + X + X is mirrored but opposite operation that run concurrently with the forward cycle. Illustration re-created from Figure Zhu al. (2017).
C METHODS
GAN
LSGAN
WGANGP
DRAGAN
FILTERS
32
KERNEL
4
REDUCTION FACTOR
ACTIVATION
LRELU
NORMALIZATION
INSTANCENORM
SPATIAL DROPOUT
0.25
WEIGHT INITIALIZATION
RANDOM NORMAL 0.02)
AevCLE
10
ATDENTITY
5
AGP
N/A
N/A
10
10
N/A
N/A
N/A
10
NUM. DIS UPDATE
AG
0.0001
0.0004
DISTANCE FUNCTION
MEAN ABSOLUTE ERROR
Table C.I: The hyper-parameters used for each objective formulation. NUM. DIS UPDATE is the number of discriminator updates for every generator update, such procedure was introduced in op- timizing WGANGP Arjovsky et al. (2017). ag and ap denotes the learning rates of the generators and discriminators. ÀGP is the gradient penalty coefficient for WGANGP and DRAGAN and is the Gaussian variance hyper-parameter in DRAGAN.
14

---

Under review as a conference paper at ICLR 2022
MODEL
LOSs FUNCTIONS G AND DY
GAN
C
E
(o((D)(G(())
x~x
c2v w-v
(o - 2~x
B log(1 log(11 (G()))))
LSGAN
C
E (Wr(G(s) - -1)²]
x~x
cv
E y~
(Dy - -1)²| + - Dr
E [v(()())]
WGANGP
x-X
Py
[D>()( By [v
x>X
[ VD (1 (1- (1=)))(x)) Ila [1)
Acp
DRAGAN
- [log(1-
log(1
Dy((())))
-~x
Dr
E log(DD got
E (r x~x
AGP
V>Y, [
VD + 2) 1l2 -1)"|
Table C.2: The objective functions of the generator G and discriminator Dy in GAN (Goodfellow and DRAGAN (Kodali 2017) formulations. The loss functions for F and Dx symmetric G and Dy shown above. ÀGP denotes the gradient penalty coefficient in WGANGP and DRAGAN, e the [o. 1 linear interpolation coefficient for WGANGP and e is the Gaussian standard deviation for DRAGAN. Note that the L listed in the table are the generator loss, and the total generator loss remains CG = L *ecycte + Addentiy Edeeiity
2014). LSGAN (Mao et al. 2017). WGANGP (Arjovsky et et al.
al.
15

---

Under review as a conference paper at ICLR 2022
Preprocessing
Autoencoder
segementation
order neurons
augmentation
normalization
CycleGAN
Y
1
cycle-consistent loss
Generator G
Generator F
y
y
L
6
Discriminator Dy
Discriminator Dx
Anaylsis
Ca²* comparsion
feature visualization
spike inference
spike analysis
Figure C.1: Illustration of the complete pipeline used in this work. Black directed lines represent the flow of data and the numbers indicate its order. Note that only the forward cycle step + Y - X shown here for better readability.
16

---

Under review as a conference paper at ICLR 2022
D NETWORKS ARCHITECTURE
The generator architecture used in this work, shown in Figure D.I is based on the ResNet-like (He et al. 2016a) generator in CycleGAN with a number of modifications. Generally, the model consists of down-sampling blocks (DS) and DS2), followed by 9 residual blocks (RB; for 1 < S 9). then 2 up-sampling blocks (US1 and US2). Each down-sampling block uses 2D strided convolution layer to reduce the spatiotemporal dimensions by factor of 2, which then follows by Instance Nor- malization, LReLU activation and Spatial Dropout. Each up-sampling block has the same structure as the down-sampling blocks but with a transposed convolution layer instead. Each residual block consists of two convolution blocks with padding added to offset the dimensionality reduction and skip connection that connect the input to the block with the output of the last convolution block via element- sesment-wiseeee addition. A convolution layer with a filter size of then compresses the channel of the output from US1, followed by a sigmoid activation to scale the final output to have range [0, 1].
Residual connections are known to improve gradient flow in CNN, thus mitigating the issue of vanishing gradients and allowing deeper networks to be trained effectively (He et al.] 22 (b. Huang al.] 2017). Therefore, shortcut connections are added between the down-sampling and up-sampling blocks of the same level. For instance, the output of down-sampling block DS2 is concatenated with the output of residual block RBg, then passes the resultant vector to the next up- sampling block US1, such level-wise residual connection was first introduced in Ronneberger et al. (2015). We denote the level-wise residual connected network as ResNet.
Furthermore, we adapted the Additive Attention Gate (AG) module in Oktay et al. (2018) as a replacement for the concatenation operation in the residual connection described above. The yellow block in Figure D.I illustrates the AG structure. AG takes two inputs and both with height HAG and width WA AG varying channels, where q is the output of the previous processing block and is a shortcut connection from the down-sampling block of the same level. In AGı for instance, & and a are the output of RBg and DS2 respectively. Both q and a are processed by two separate x convolution layers followed by Instance Normalization. The two vectors then summed element- wise such that overlapping regions from the two vectors would have higher intensity. We then apply ReLU activation to eliminate negative values, followed by x convolution layer with filter and Instance Normalization, resulting in a vector with shape AG WAG. 1). Sigmoid activation is applied to obtain [0, 1] attention mask a, where units closer to 1 indicate regions that are more relevant. We apply the sigmoid mask to and concatenate it with q. Since is a set of high-level features processed by the stack of residual blocks, whereas is the low-dimensional representation of the original input. Therefore, the sigmoid attention mask should learn to eliminate information in the input that is less relevant the output. Moreover, as the attention mask is of the same dimension of the input y. we can later superimpose the attention mask onto to visualize the region of interest. learned by the model. We denote the attention-gate -aatedd ResNet as AGResNet.
We use PatchGAN- -based (Isola et al. 2017) discriminator architecture in this work, as it provides more fine-grained discrimination information to the generators instead of the single value discrim- ination in the discriminator in vanilla GAN. Dx and Dy contain 3 down-sampling blocks where each block reduces the spatiotemporal dimension by a factor of 2, like the down-sampling blocks in the generators. For an input sample with shape (H 2048, W 102, C 1), the discriminator outputs a sigmoid activated vector with shape (256, 13, 1). Each element has range [o, 1] where a value closer to 1 suggests that the corresponding patch is real sample.
17

---

Under review as a conference paper at ICLR 2022
Input
CONV
InstanceNorm
Padding
LReLU
CONV Block
2D Dropout
CONV Block DS1
Padding
CONV Block
CONV Block DS2
Padding
CONV Block
Residual Block RB;
+
X9
q
1x1 CONV
InstanceNorm
Attention Gate AG;
InstanceNorm
CONV Block US;
CONV
Attention Gate AG2
CONV Block
ReLU
1x1 CONV
Padding
InstanceNorm
Sigmoid
CONV Block
Sigmoid
Concat
Output
Figure D.I: Architecture diagram of generator G and F. + and x denotes addition and element-wise multiplication respectively. Note that the Attention Gate (AG) block can be replaced by a concate- nation operation between the output of the previous block and the output from the down-sampling block from the same-level. e.g. if AG is not used, then the input to U is concat(DS2, RBa).
18

---

Under review as a conference paper at ICLR 2022
E
NEURON ORDERING
64
29
37
80
25
78
10
40
40
87
38
32
(a) Original
(b) Firing rate
(c) Autoencoder
Figure E.1: Neuron ordering based on a original annotation, firing rate and (c) autoencoder reconstruction loss. The original order was based how visible the neuron were in the calcium imaging data, hence not sorted in particular manner. One naive approach is to sort neurons base on their overall firing rate, such that active neurons can be closer in space thus allow more efficient learning by convolutional-basel networks. We proposed to train an autoencoder AE which learns to the test
reconstruct X and Y jointly, and sort neurons base the average reconstruction set. See Section 2.3.1 for detail regarding different neuron ordering methods and their motivations.
METHOD
ORDER
(A) N/A
1, 2,
3,
4,
5,
6.
8,8,
9,
10,
11,
12,
13
14,
15,
16
17,
18,
19,
20,
21,
22,
23,
24,
25.
26
27
28
29.
30,
31.
32,
33
34
35
36
37
38.
39.
40.
41
42
43.
44,
45,
46. 47. 48,
49.
50.
51,
52
53.
54
55
56
57
58
59.
60
61
62
63
64.
65,
66
67. 68. 69, 70.
71.
72.
73,
74.
75,
76
77.
78,
79.
80.
81, 82,
83
84
85,
86,
87,
88. 89, 90, 91, 92,
95,
96,
97,
100,
102
(B) FIRING RATE
14, 12, 30,
10,
33, 20, 42, 13, 6,
11, 39,
22, 75,
28, 55, 10,,
52, 46, 99, 88, 61,
77,
57,
34, 85,
27.
29, 1.1.8844........21514441.1.....0
26,
83.
92,
74, 25.
49. 23. 97, 48. 68, 60, 76, 70,
25, 93, 32,
56.
66,
81,
72,
94. 38.
64. 82. 50,
102, 97.
(C) CORRELATION
44 92, 10, 18, 20,,
46, 30,
19,
75,
24, 99,
12. 6.4.
48,
56,
83, 62, 49.
16. 26. 94
66, 98.
72, 35, 88.
15, 41.
50. 90, 68. 86. 68.
(D) AUTOENCODER
89, 97, 97,
50, 99, 38, 61, 87, 60, 53, 62, 55,
82, 39, 68, 66, 8. 73, 88, 71, 1, 46 18, 11, 24
40, 26,
84, 90, 36, 92,
25,
25, 85, 29, 56, 20, 80, 28.
9. 26. 101, 65, 24. 5, 98. 1, 57. 43, 10, 12, 31. 63. 33, 75, 19, 47, 45,
74, 42, 102, 30,
67, 16. 79, 15, 14,6
Table E.1: Neuron ordering based on (a) original annotation, (b) firing rate, (c) average pairwise correlation and (d) autoencoder reconstruction loss with respect to the original annotation order recorded on Day data. The physical location of each neuron is available in Figure E.
19

---

Under review as a conference paper at ICLR 2022
F
RESULTS IN SYNTHETIC DATA
G(x)
F(G(x))
1.56
-0.44
0.78
AF/F
0.31
-0.15
2.87
-0.29
21
42
63
85
0
21
42
63
85
21
42
63
85
Time (4)
(a) Forward cycle: X Y +
F(y)
G(F()))
3.67
1.71
Amal
0..5
0.7
AF/F
0.3
-0.11
3.04
1.35
-0.33
21
42
63
85
21
42
63
85
42
63
Time (s)
(b) Backward cycle: Y + X -Y
Figure F.l: aap forward and (b) backward cycle of neuron 25, 50 and 75 from AGResNet trained with LSGAN objectives. Since X and Y in the test set are paired (see Section 2.3.2). we expect Fly) and y G(z). Notice that neurons with a higher index (e.g. neuron 75 in y) would have more units being masked out and replaced by noise. We can see that generator F was able to reconstruct the masked out regions (e.g. neuron 50 and in F(y)) that resemble the traces in X.
20

---

Under review as a conference paper at ICLR 2022
26
51
76
102
26
Nearrnn
51
102
26
F(G(x))
51
76
102
21
42
63
85
Time (s)
(a) Forward cycle: X + X
26
51
76
102
26
Nearon
F(5) C(F())
51
76
102
26
51
76
102
21
63
Time (8)
(b) Backward cycle: Y + X + Y
Figure F.2: (a) forward and (b) backward cycle of the entire 102 neurons from a randomly selected test segment. Model was trained with AGResNet using the LSGAN objectives on the synthetic dataset where Y = 2(X). see Section 2.3.2 for detail.
21

---

Under review as a conference paper at ICLR 2022
89
7
86
0.6
127
255
383
511
89
13
86
26
71
0.2
38
255
$11 latent dimension
767
1023
0
21
42
63
85
Time (9)
Figure F3: (Left) Self-learned attention masks in AG; and AG2 AGResNet G given a random test segment y ((x) ~ X. AG1 and AG2 were less focused in the masked region as it is filled with Gaussian noise and not informative the reconstruction process. Note that AG; and AG2 are at 4 and 2 times lower-dimensional than the original input dimension (see Section D) (Right) GradCAM localization maps of Dx given a randomly select test segment x ~ X. The top panel shows the original input, where yellow and orange dotted lines mark the start and end of each reward zones. The second panel shows the GradCAM localization map superimposed on the input. We observe that Dx focused neuronal activities surrounding the reward zone areas in its discrimination process, which is expected since the activities in the visual cortex are shaped by the visual-clues in the virtual-corridor experiment. Note that trial information such as reward zone locations were not provided to the networks, the pattern observed here was learned by the models themselves.
22

---

Under review as a conference paper at ICLR 2022
G RESULTS IN RECORDED DATA
G(x)
F(G(x))
1.21
0.48
-0.24
1.19
AF/F
0.49
-0.21
1.32
0.54
-0.25
21
42
63
85
0
21
42
63
85
42
63
85
Time (s)
(a) Forward cycle: X Y X
F(y)
G(F(y))
1.17
0.47
-0.24
1.06
AF/F
00.28
1.47
0.61
-0.25
0
21
42
63
85
21
63
85
42
63
Time (s)
(b) Backward cycle: Y X YY
Figure G.1: (a) forward and (b) backward cycle of neuron 6, 27 and 75 from a randomly selected segment. Model was trained with AGResNet using the LSGAN objective on the recorded dataset. Note that, unlike the synthetic dataset, the traces presented here are unpaired. Hence, we cannot directly compare r with F(y) nor with G(z).
23

---

Under review as a conference paper at ICLR 2022
ORDER
- - F(G(X)
XX F(X)
|Y G(F()))
|Y -(Y]
AD=-GRRENET
0.1806 + 0.0077
0.1502 + 0.0064
0.1811 + 0.0163
0.1463 + 0.0149
ORIGINAL
0.0874 0.0037
0.0123 + 0.0015
0.0766 + 0.0025
0.0101 0.0010
FIRING RATE
0.0760 0.0030
0.0108 + 0.0013
0.0752 + 0.0028
0.0070 0.0005
CORRELATION
0.0778 0.0028
0.0111 + 0.0012
0.0757 1 0.0024
0.0089 0.0022
AUTOENCODER
0.0733 1 0.0025
0.0101 1 0.0012
0.0737 1 0.0027
0.0069 + 0.0007
Table G.I: Cycle-consistent and identity loss in the test of Mouse 1 recordings, where rons were ordered by 1) original annotation, 2) firing rate 3) pairwise correlation and 4) autoen- coder reconstruction loss. We also trained ID variant of the model as an additional baseline NLD-AGResNet in the table) such that all spatial information of the neurons is disregarded. The ACResNet generator architecture was used for G and and were optimized with LSGAN objec- tives. The lowest loss in each category is marked in bold. For reference, JX- -Y| 0.3674 0.0023 in the test set.
KL(X,F(Y))
(((X))(G(X))
KL(Y,G(X))
KL(Y,G(P(Y))
(A) PAIRWISE CORRELATION
IDENTITY
0.0875 1 0.05-19
0
0.0821 +: 0.0171
0
1D-AGREsNE: T
0.2027 1002=00.00 0.1040
0,4715 + 0.2051
0.1901 # 0.1003
0.4149 0.2194
ORIGINAL
0.0552 0.0419
0.0754 + 0.0353
0.0583 0.0553
0.0174 0.0110
FIRING RATE
0.0507 = 0.0358
0.0266 = 0.0146
0.0504
0.0267 = 0.0176
CORRELATION
0.0539 + 0.0329
0.0339 + 0.0176
0.0534 + 0.0474
0.0205 0.0133
AUTOENCODER
0.0479 + 0.0372
0.0329 + 0.0163
0.0493 + 0.0448
0.0283 + 0.0206
(B) FIRING RATE
IDENTITY
8.0705 + 6.5500
0
7.7781 1. 6.7338
0
1D- ID-AGREsNE
3.5688 1 3.8895
7.9101 1 5.3517
3.0572 1 3.1114
8.3185 1: 5.5950
ORIGINAL
1.5401 1.2491
2.0442 + 2.0936
1.8527 1.3563
1,4697 1.1412
FIRING RATE
1.3402 = 1.0450
1.2658 + 1.0784
1.6994 1.4170
1.4152 = 1.2221
CORRELATION
1.4006 + 1.1079
1.5450 + 1.0786
1.4088 + 1.0828
1.4674 1.3505
AUTOENCODER
1.1648 = 0.7934
1.4022 = 1.2734
1.0697 + 0.7689
1.2705 = 1.1148
(C) PAIRWISE VAN ROSSUM DISTANCE
IDENTITY
0.5510 0.2960
0
0.3053 + 0.1211
1D- AO-AGREENEE TNET
0.3613 1 0.1597
0.8045 + 0.1846
0.3764 0.1565
1.3897 0.8256
ORIGINAL
0.2790 1 0.2186
0.1878 1 0.0477
0.3216 1 0.1352
0.1581 1: 0.0664
FIRING RATE
0.2539 1 0.1708
0.1003 + 0.0514
0.3080 1: 0.1173
0.1536 1: 0.0663
CORRELATION
0.2629 + 0.1877
0.1905 + 0.0485
0.2953 1 0.1230
0.1797 1: 0.0696
AUTOENCODER
0.2387 = 0.1488
0.1041 = 0.0376
0.3031 + 0.1138
0.1328 0.0592
Table G.2: The average KL divergence between generated and recorded distributions of Mouse in (a) pairwise correlation, (b) firing rate and (c) pairwise Rossum distance. We trained ACResNet with neurons ordered according to the following methods: 1) original annotation, 2) firing rate, 3) pairwise correlation and 4) autoencoder reconstruction loss. We also trained ID variant of the model (denoted as ID-AGResNets such that all spatial information of the neurons is disregarded. Note that added the identity model (first row of each sub-table) as a baseline where we should obtain perfect cycle reconstruction. Entries with the lowest value are marked in bold.
24

---

Under review as a conference paper at ICLR 2022
26
51
76
102
26
Nearron
51
102
26
F(G()))
76
102
21
42
63
Time (s)
(a) Forward cycle: X + X
51
102
26
Nearnn
F(5)
51
76
102
C(F())
51
102
21
63
Time (8)
(b) Backward cycle: Y + X + Y
Figure G.2:
forward and (b) backward cycle of the entire 102 neurons from a randomly se- lected segment. Model was trained with Aet generators using the LSGAN objective on the recorded dataset.
25

---

Under review as a conference paper at ICLR 2022
1.0
86
13
71
0.8
19
10
26
127
255
383
511
89
0.4
13
86
38
10
51
0.0
latent dimension
Time (6)
Figure G.3: (Left) self-learned sigmoid attention masks AG1 and AG2 in AGResNet F given random segment y where neurons were sorted by the autoencoder reconstruction loss. (Right) GradCAM localization map of Dx given randomly select test segment ~ X. The top panel shows the original input, where yellow and orange dotted lines mark the start and end of each reward zones. The second panel shows the localization map superimposed on the input. Again, observe attention patterns that loosely align with the reward zones. Note that trial information such reward zone locations were not provided to the networks, the pattern observed here was learned by the models themselves.
26
26
Input
Input
51
51
76
102
511
1023
1535
2047
511
1023
1535
2047
19
26
127
255
383
511
127
255
383
511
13
26
26
38
38
51
255
511
767
1023
255
511
767
1
26
26
Output
Outout
51
76
102
102
511
1023
1535
2047
0
511
1023 Time-step
1535
2047
Time-step
(a) G(x)
(b) F(y)
Figure G.4: Self-learned sigmoid attention masks AG and AG₂ in AGResNet a
G given
random test segment & X and (b) F' for given random test segment y Y. Top panels shows the original input, where yellow and orange dotted lines mark the start and end of each reward zones. Bottom panels show the generated outputs of G(z) and F(y). The learned sigmoid masks shown here did not exhibit strong patterns compare to Figure 5 and Figure G.3
26

---

Under review as a conference paper at ICLR 2022
0.10
0.3
0.1
1998
0.10
0.05
0.05
D0X
10N
AFJF
0.10
100
0.10
693
0.10
0.10
0.05
0.2
0122
100
108
0.1
01.1
0.10
198t
0.05
Time (6)
Them
(6)
(a) Pre-learning
(b) Post-lcarming
Figure G.5: The pre-learning and (b) post-learning traces of the top 10 neurons that Dx paid the most attention to. The positional attention maps of Dx is available in Figure 6 (Top Left). Note that the pre-learning and post-learning activities not paired.
27

---

Under review as a conference paper at ICLR 2022
0.10
11.2
0.10
00.1
0.15
0.10
063
0.00
0.05
0.10
63
0.05
0.05
0.05
0.2
D8X
D0N
AF/F
AFIF
0.05
000
0.05
0.075
0.2
0.050
0.75
0.050
0.5
0.2
EDN
0.10
0.05
0.55
0.10
Time (6)
Timm (6)
(a) Pre-learning
(b) Post-lcarming
Figure G.6: The (a) pre-learning and b post-learning traces of the top 10 neurons that Dy paid the most attention to. The positional attention maps of Dy is available Figure 6 (Top Right). Note that the pre-learning and post-learning activities not paired.
28

---

Under review as a conference paper at ICLR 2022
H
SPIKE ANALYSIS
172
202
241
2.4
-00
1.0
055
5.
13
0.1
0.2
Maaron 25
Neceett
Neuson 76
112
443
KL.vergnnce
Figure H.1: Spike statistics of (top) firing rate of 3 randomly selected neurons, (middle) pairwise correlation of 3 randomly selected segments and (bottom) van Rossum distance of 3 randomly se- lected segments between X and F(Y) where X was ordered by autoencoder reconstruction loss. The right columns show the KL divergence of each metrics and Table G.2 shows the mean and standard deviation of the KL divergence comparisons.
29

---

Under review as a conference paper at ICLR 2022
Conmiaiion
TME
TIM
200
170
19M
1523
104
05
012
10
Figure H.2: Spike statistics of (top) firing rate of 3 randomly selected neurons, (middle) pairwise correlation of 3 randomly selected segments and (bottom) van Rossum distance of randomly lected segments hetween X and F(G(X)) where X was ordered by autoencoder reconstruction loss. The right columns show the KL divergence of each metrics and Table shows the mean and standard deviation of the KL divergence comparisons.
30

---

Under review as a conference paper at ICLR 2022
TME
TIM
TMI19
170
1977
1941
103
70-000
060
0.3
1.0
93
1..0
3.7
detatue RL
640
01
110
41
Figure H.3: Spike statistics of (top) firing rate of 3 randomly selected neurons, (middle) pairwise correlation of 3 randomly selected segments and (bottom) van Rossum distance of randomly lected segments between Y and G(X) where Y was ordered by autoencoder reconstruction loss. The right columns show the KL divergence of each metrics and Table G.2 shows the mean and standard deviation of the KL divergence comparisons.
31

---

Under review as a conference paper at ICLR 2022
TME
TIM
TM419
174
2014
1944
5
060
0.
1.0
2.4
dl RL
012
00
622
Figure H.4: Spike statistics of (top) firing rate of 3 randomly selected neurons, (middle) pairwise correlation of 3 randomly selected segments and (bottom) van Rossum distance of 3 randomly lected segments between Y and (Y)( where Y was ordered by autoencoder reconstruction loss. The right columns show the KL divergence of each metrics and Table G.2 shows the mean and standard deviation of the KL divergence comparisons.
32

---

Under review as a conference paper at ICLR 2022
1
MOUSE 2 RECORDED DATA
ORDER
X F(G(X)
XX F(X)
C(F(())))
|Y - C(YI
NONE
0.5875 1050
0.1292 + 0.0168
0.4416 + 0.0763
0.0923 + 0.0064
FIRING RATE
0.5794 + 0. 1055
0.1276 + 0.0152
0,4396 + 0.0793
0.0894 = 0.0048
AUTOENCODER
0.5692 + 0.1008
0.1030 + 0.0099
0.4378 + 0.0769
0.0101 + 0.0018
Table I.1: Cycle-consistent and identity loss of AGResNet Mouse recordings, where neurons were ordered by 1) original annotation, 2) firing rate and 3) autoencoder reconstruction loss. For reference, X Y 0.6057 = 0.1146 in the test The lowest loss in each category marked in bold.
(L(XFF)) (L(X,
KL(Y,G(X))
KL(Y,G(F(M))
(A) PAIRWISE CORRELATION
IDENTITY N/A
0,6528 + 0.4980
0
0.4583 = 0.4366
0
0.5523 + 0.4251
0.1617 = 0.0715
0.1212 = 0.0833
0.0499 + 0.0266
FIRING
0.5639
0.4679
0.1951 0.1031
0.1126 + 0.0831
0.0399 + 0.0231
AUTOENCODER
0.5209 0.5554
0.0582 + 0.0361
0.1231 + 0.0988
0.0352 + 0.0228
(B) FIRING RATE
IDENTITY
8.3096 6.1580
0 2.5786 1 2.7222
5.5783 1 5.8451
0
N/A
1,2881 1 1.1147
1.5782 1 1.2217
1.22117
1.6722 1: 1.3286
FIRING RATE
1.2181 0.9909
2.4912 2.5037
1.3656 = 1.1475
1.1767 + 1.0625
AUTOENCODER
0.8087 0.5764
1.1326 1.3149
1.2521 = 0.9649
1.0592 + 1.0722
(C) PAIRWISE VAN ROSSUM DISTANCE
IDENTITY
1.3894 2.0329
1.1240 + 1.5159
0 0.2497 + 0.2443
N/A
1.3392 1.6653
0.5782 + 0.9743
0.6043 + 0.5250
FIRING RATE
1.2464 1 1.7505
0.5946 + 0.9352
0.5638 1 0.4181
0.1977 1 0.1234
AUTOENCODER
0.6946 0.5687
0.1996 + 0.3232
0.5287 + 0.3897
0.1775 1 0.0959
Table I.2: The average KI. divergence between generated and recorded distributions Mouse in (a) pairwise correlation, (b) firing rate and (c) population pairwise van Rossum distance. We compare AGResNet results with different neuron ordering including 1) original annotation, 2) firing rate and 3) autoencoder reconstruction loss. Note that added the identity model (first row of each sub-table) as a baseline where we should obtain perfect cycle reconstruction. Entries with the lowest value are marked in bold.
33

---

Under review as a conference paper at ICLR 2022
J
MOUSE 3 RECORDED DATA
ORDER
X F(G(X)
XX F(X)
|Y GFF(()())
|Y - C(YI
NONE
0.2684 + 0.0290
0.0656 + 0.0037
0.3229 + 0.0476
0.0796 + 0.0047
FIRING RATE
0.2679 + 0.0309
0.0585 + 0.0034
0.3192 + 0.0477
0.0777 = 0.0043
AUTOENCODER
0.2677 + 0.0282
0.0554 + 0.0023
0.3199 + 0.0487
0.0672 + 0.0034
Table J.I: Cycle-consistent and identity loss of AGResNet Mouse recordings, where neurons were ordered by 1) original annotation, 2) firing rate and 3) autoencoder reconstruction loss. For reference, X Y 0.4764 = 0.1520 in the test The lowest loss in each category marked in bold.
(L(XF)() (L(X,
KL(Y,G(X))
KL(Y,G(F(M))
(A) PAIRWISE CORRELATION
IDENTITY N/A
1,0188 + 0.5731
0
0.7363 = 0.3732
0
0.5361 + 0.2817
0.5678 + 0.3145
0.6975 = 0.2202
0.7381 4 0.2977
0.5021 0.2596
0.5184 0.2536
0.6281 + 0.2830
0.6616 + 0.2850
AUTOENCODER
0.5140 0.2538
0.4751 + 0.2421
0.6137 + 0.2997
0.4625 + 0.2443
(B) FIRING RATE
IDENTITY
12.2077 + 7.3556
0 1.8203 1 1.9280
12.4075 1 7.3156
0
N/A
1.0164 1 0.7129
1.2904 1 0.9448
1.4786 1: 1.4374
FIRING RATE
0.9371 0.6735
1.7893 = 2.5419
1.0712 = 0793
1.2805 + 1.5136
AUTOENCODER
0.8936 0.5655
1.1152 0.6797
1.2114 = 0.7281
0.6928 +\  0.4643
(C) PAIRWISE VAN
DISTANCE
IDENTITY
4.2704 + 2.0834
4.9623 + 1.4393
0
N/A
3.0412 + 1.8467
2.0246 + 1.3422
4.6059 + 2.0664
3.0293 + 1.5854
FIRING RATE
2.9009 1 1.7587
1.6458 + 1.2375
4.1910 1 1.7950
2.8613 1 1.7788
AUTOENCODER
2.8383 1.5942
1.4747 1.1150
3.9709 + 1.7732
1.4767 1 L.0195
Table J.2: The average KL divergence between generated and recorded distributions Mouse in (a) pairwise correlation, (b) firing rate and (c) population pairwise van Rossum distance. We compare AGResNet results with different neuron ordering including 1) original annotation, 2) firing rate and 3) autoencoder reconstruction loss. Note that added the identity model (first row of each sub-table) as a baseline comparison and should obtain perfect cycle reconstruction. Entries with the lowest value marked in bold.
34

---

Under review as a conference paper at ICLR 2022
K
MOUSE 4 RECORDED DATA
ORDER
X F(G(X))
XX F(X)
| -(F(()())
|Y - C(YI
NONE
0.2538 + 0.0899
0.0443 + 0.0015
0.2403 + 0.0395
0.0808 + 0.0061
FIRING RATE
0.2511 + 0.0389
0.0376 + 0.0015
0.2388 + 0.0406
0.0764 = 0.0067
AUTOENCODER
0.2489 + 0.0381
0.0382 + 0.0012
0.2367 + 0.0396
0.0764 + 0.0053
Table K.I: Cycle-consistent and identity loss of AGResNet on Mouse 4 recordings, where neurons were ordered by 1) original annotation, 2) firing rate and 3) autoencoder reconstruction loss. For reference, X Y 0.4383 = 0.2354 in the test The lowest loss in each category marked in bold.
KL(X, F()))
(L(X,
KL(Y,G(X))
KL(Y,G(F(M))
(A) PAIRWISE CORRELATION
IDENTITY N/A
0.3724 + 0.2169
0
0.5124 = 0.3238
0
0.2844 + 03152
0.1735 + 0.0918
0.3536 + 0.2541
0.5750 4 0.2883
FIRING
(12488 0.1502
0.1478 0.0848
0.3482 + 0.2561
0.5471 4 0.2577
AUTOENCODER
0.2096 0.1155
0.1587 + 0.0867
0.3460 + 0.2568
0.4795 + 0.2457
(B) FIRING RATE
IDENTITY
5.8031 4.8030
0 0.6034 1 0.6294
5.1383 1 5.4684
0
N/A
1.3062 1 1.0097
1.4253 1 1.5599
2.9196 1: 3.1077
FIRING RATE
1.0818 0.9274
0.5480 = 0.5043
1.2120 = 1.2971
2.8206 + 2.7266
AUTOENCODER
1.0564 1.1415
0.5474 0.5223
1.1570 = 1.0830
2.1015 + 2.2399
(C) PAIRWISE VAN ROSSUM DISTANCE
IDENTITY
2.2670 + 1.2707
2.8134 + 1.5536
0
N/A
1.8698 + 1.1325
0.5625 + 0.4399
2,4011 + 1.4879
3.3849 + 1.7608
FIRING RATE
1.5416 1 0.9327
0.3931 1 0.2821
2.1379 1 1.4338
3.3865 1 1.9320
AUTOENCODER
1.3246
0.8537
0.4578 + 0.3639
2.2134 + 1.3838
2.6537 1 1.6526
Table K.2: The average KI. divergence between generated and recorded distributions of Mouse 4 in (a) pairwise correlation, (b) firing rate and (c) population pairwise van Rossum distance. We compare AGResNet results with different neuron ordering including 1) original annotation, 2) firing rate and 3) autoencoder reconstruction loss. Note that added the identity model (first row of each sub-table) as a baseline comparison and should obtain perfect cycle reconstruction. Entries with the lowest value marked in bold.
35


Reviews:
[{"review_id": "bMAn_QEFZ7", "reviewer": "Reviewer_aJ3M", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The approach mapping pre-learning neural activity to post-learning activity using GANs is interesting, as is the methodology to sort neurons based on an autoencoder reconstruction loss. It was also good to see the paper systematically exploring how to choose a loss function for training the GANs -- a non-trivial issue for GAN training in general, and not always addressed in GAN papers.\nHowever, there are some major concerns about the paper:\n1. The overall motivation of _why_ one would want to map pre-learning to post-learning neural activity was not clear. Although the introduction and discussion briefly discuss interpretability for neural learning, it was not clear how this analysis contributes to that.\n\n2. Using GradCAM maps to visualise \"regions of interest\" for the discriminator was interesting, but this analysis does not seem to lead to any deeper understanding about the neural activity. While the discriminators learn that the activity around the reward regions are critical to distinguishing pre- and post-learning activity (Figure 5), it is not clear why the generators don't do this. Moreover, it is possible that this effect would vanish, or other regions of interest might appear if the networks were conditioned on information about the stimulus or trials. It is also not clear how this analysis is generally applicable, or what insights can be gained if it were applied to neural data from a different task.\n\n3. Reordering the neurons in the data using an autoencoder reconstruction loss appears to be a critical preprocessing step in the training pipeline -- however, the choice of an autoencoder over other approaches to reordering are not clearly motivated. Although this does lead to better reconstruction of the neural data from the GANs, it appears to make the subsequent step with the CycleGAN redundant: if you can accurately reconstruct neural data from the autoencoder, then why train an additional set of adversarial networks to do the same thing again?\n\n4. It would be nice to have an estimate of the compute resources and time required to train all the networks in the pipeline (autoencoder, CycleGAN) and perform the post-hoc analysis with GradCAM, etc. In the light of doubts about motivation and benefits of the method, it would also be relevant to know how computationally expensive it is to implement.\n\n5. There was an overall lack of clarity, and particularly in the methods and results section:\n - all equations are inline and not numbered and therefore references to terms in the equation are hard to keep in mind while trying to understand section 2.2 and 2.3; \n - extensive details about architecture and training frequently detract from understanding what steps the training pipeline consist of (perhaps these should be moved to the appendix)\n- there was no explanation of how to interpret the GradCAM maps in Figures 4 and 5, or what the colours / numbers mean, and the explanation of their overlap with reward regions appeared to be handwaving. It would be nice to see the pre- and post-learning neural activity for precisely those neurons that the discriminator assigns attention to in Figure 4.\n- the description of the results was confusing, and many of the plots that the conclusions here rely on are in the supplementary section, making it hard for a reader to follow any reasoning based on these plots.\n\nMinor comments:\n1. Heatmaps in Figures 2 and 4 are hard to interpret without colourbars\n2. Neural activity in Figure 1 is barely visible due to the colour scheme\n3. The explanation for how plots in Figure 5 is generated appears only in the caption, with no elucidation in the text.\n4. There does not appear to be information of recording time per trial in the main paper\n", "summary_of_the_paper": "The paper proposes to learn a mapping for neural activity in the mouse visual cortex: the mapping is from neural activity before learning to neural activity after learning, and this is achieved using CycleGAN. The paper also performs additional analysis to interpret the weights learned by the generator and discriminator networks, as well as assess the quality of the networks' reconstruction of the neural activity.", "summary_of_the_review": "The motivation for the methods presented in the paper are not clear, the conclusions are not very convincing and consequently, it is hard to judge the contributions of the paper. A lack of clarity in the methods and results section exacerbates this.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "b50kN_4q_Y", "reviewer": "Reviewer_vrSP", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "strengths\n---------\nThe paper proposes a novel and creative analysis method for understanding learning-related transformations in neural activity; I am not aware of work like this in the neuroscience literature.\n\nInclusion of self-attention is a nice way get a better handle on these potentially complex transformations. Is there more that one can say about the masks extracted in Fig. 4?\n\nThe GradCAM localization maps are also very useful for understanding what the model learns; in particular, the \"positional attention maps\" in Fig. 5 are really cool. It would be neat to investigate these neurons/positions in more detail, especially if you could show this model uncovered some aspect of the data that would have been difficult to find with traditional methods.\n\n\nconcerns\n--------\nIntro: \"In other words, given the neural recordings of a novice animal, can we translate the neuronal activities that correspond to the animal with expertlevel performance, and vice versa?\" This is a super interesting question, and the answer this paper appears to give is \"yes\". However, I'm left scratching my head about what *exactly* one can learn from this translation. I'm not suggesting a new analysis (though ultimately the usefulness of this method will depend on whether or not it can uncover new insights/guide new experiments), but a more thorough discussion on how these translations can be used would make this a more compelling introduction.\n\n2.2: I found this section hard to follow; perhaps moving Fig. B.1 (or something similar) to the main text would help with this? Even more useful (but less general) would be an explanation of the CycleGAN in the context of the neural data. For example, \"Let X and Y be the neural activity before and after learning, respectively. The GAN-based framework consists of a generator G: X->Y that maps novice neural activity to expert neural activity; and a second generator F: Y->X that maps expert neural activity to novice neural activity...\" This would make it easier (for me at least) to have an intuitive understanding of what the different losses correspond to.\n\n2.3: Again, describing MAE(X, F(X)) etc would be a lot clearer in the context of the neural activity\n\n2.3.1: Why does this ordering process work? I understand that, in order to use 2D convolutions, there must be some non-random ordering to the cells, but it's a bit bizarre to me that reconstrutcion quality from an autoencoder would be meaningful in this way. Is it possible to motivate this choice better? Another useful baseline would be to just use 1D convolutions in time and remove the spatial structure. Of course this means you can no longer use architectures out of the box, but also removes a poorly understood aspect of the preprocessing.\n\n2.3.2: What is the motivation for this spatiotemporal transformation? While useful to show that the model can handle this, it seems fundamentally different from the types of transformations present in the neural data.\n\n2.4: There are a lot of details here that are important to document, but distract from the main point of the paper. Perhaps move most of this to supplemental and use the extra space for a model/process diagram?\n\n3.1: The raw MAE numbers are difficult to interpret as presented in the text. Maybe one part of table E.1 could be moved to the main text? Also, I think presenting Figure 2 first is a faster way to get an intuition for what the model is doing, and how well it is working.\n\n\nminor\n-----\ntypo, second paragraph in introduction: Prince et al exteneded the framework *to* work with...\n\ntable A2: day 4 -> day 1 rewards\n\n2.3: where do the splits 3000, 200, 200 come from? Is this the total number of segments? how did you arrive at this number, is this related to the stride of the sliding window? seems this would result in highly correlated data samples, is that an issue?\n\n3.2: Would be nice to see parts of Fig. F.1 in the main text; maybe show a single neuron, and present more in the supplemental", "summary_of_the_paper": "This paper presents a new method for learning the transformation in neural population activity that takes place during task learning. The method is based on CycleGAN, but includes additional modifications related to neural data and the manner in which it is collected. The paper also presents visual interrogations of the learned model to better understand details of the learning process.", "summary_of_the_review": "The paper addresses an interesting neuroscience problem from a unique perspective; however, I am still unclear exactly what the method is learning, and how it can be used to gain additional insights into the data. My initial assessment is to not accept this paper.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "Aj2Rnocn3hp", "reviewer": "Reviewer_cz5b", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Strength\n- Extensive ablation studies, although most are not in the main text but in the appendix.\n- Using an autoencoder to sort neurons without bias seem to work better than sorting them by firing rate.\n- Using paired synthetic data to show the effectiveness of applying CycleGAN. And for real data, cycled reconstruction and other distribution metrics are promising, interpretations from both attention masks and Grad-CAM comply well with experiment settings. \n\nWeakness\n- Figures are not explained clearly. What are 6-89 in the right columns of attention mask figures (like 3, 4, 5)?\n- The writing is not very effective: for example, the second to last paragraph in section 2.4 can be simplified to a much shorter one with the addition of an equation describing it. An equation, paired with the module figure, will also be easier to understand than this long paragraph.\n\nQuestion / suggestion\n- Is the model shared among all mice, or does each have its individual model? Namely, is this learned mapping more universal or more individual? \n- Formulation wise: self-attention can also be applied among different neurons (just like in graph attention networks), and this might eliminate the need for pre-sorting. Essentially disentangling spatial and temporal information, modeling the spatial relationship as a graph with a learned adjacency matrix. In this way, neurons will be permutation invariant/equivariant, and the sorting is not needed, and the whole model can be learned end to end. \n\nAnd lastly, it’s not a 9-page paper at all: there are too many places in the experiment section referring to appendix sections that **require** one to look into them for getting a full context. The same is true for the model architecture part. I feel I’m forced to read a 32-page paper…", "summary_of_the_paper": "This paper uses CycleGAN to map neuronal activities of mice (as measured by Calcium traces) pre- and post-learning.\nThe main contributions are (1) empirical results of using CycleGAN to learn the pre- and post-learning mapping look promising. (2) using both attention mask (which is for gating residual concatenations) and Grad-CAM to help with interpretation. (3) sorting neurons with an autoencoder’s reconstruction error, essentially sorting them based on their importance.", "summary_of_the_review": "Empirically, applying CycleGAN to reveal the mapping of pre- and pos-learning neuronal activities shows good results! Although the architecture or method novelty is not significant, and there is some unclarity of the writing, it can be a good starting point for further explorations.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "1: The contributions are neither significant nor novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper received 2 marginally below and 1 marginally above ratings. We discussed the paper with the reviewers and there was broad consensus that 1) the paper lacked clarity; 2) multiple modeling choices were debatable (e.g., ordering or embedding of neurons and convolution over neurons!!) and not sufficiently justified (and these choices will critically impact the conclusions drawn from the analysis); 3) we were not convinced by the relevance of the synthetic data to reflect a meaningful biological process; 4) we did not see any meaningful knowledge gained for biology from this whole analysis. My recommendation is thus to reject this paper.
Decision: Reject