SlowGuess/NeurIPS_2023_OCR huggingface dataset:
rule was parameterized as a polynomial (Eqn 6, [15]), with a total of 24 parameters  $\theta$  (6 parameters per connection type). We applied fSBI to this 24-dimensional search space, to identify and retain the rules that established biologically plausible dynamics in SNNs. To ensure the inferred rules robustly enforced plausible dynamics in SNNs, any simulation was assigned a random input rate and connectivity matrix.
We started fSBI with uniform priors for all plasticity parameters:  $\tau_{XY}^{\mathrm{pre}}$ ,  $\tau_{XY}^{\mathrm{pre}} \sim \mathcal{U}[10,100]\mathrm{ms}$ , and  $\alpha_{\mathrm{XY}}, \beta_{\mathrm{XY}}, \gamma_{\mathrm{XY}}, \kappa_{\mathrm{XY}} \sim \mathcal{U}[-2,2]$ . The resulting rules formed the initial prior  $\pi_0$ . We then sampled multiple plasticity rules  $\theta \sim \pi_0$ , simulated SNNs with these plasticity rules, and saved their spike-trains and weight evolutions for offline analysis of the network metrics  $x$  (see Section 2.4). For the first round, we trained Neural Posterior Estimation (NPE) to produce posteriors conditioned only on a subset of metrics—the excitatory and inhibitory population firing rates— $p(\theta | r_{\mathrm{exc}}, r_{\mathrm{inh}})$ . Next, we sampled plasticity rules from this posterior corresponding to networks with excitatory and inhibitory rates between 1 and  $50\mathrm{Hz}$ , i.e.,  $\theta' \sim p(\theta'| r_{\mathrm{exc}} \in [1,50]\mathrm{Hz}, r_{\mathrm{inh}} \in [1,50]\mathrm{Hz})$ . These rules were used for the next round of inference, which we conditioned on the metrics associated with stable weight dynamics ( $f_{w_{\mathrm{blow}}}, w_{\mathrm{creep}}, \langle w_{\mathrm{XY}} \rangle$ ), in addition to the population activity rates. We thus made the posterior from the previous iteration,  $p(\theta | r_{\mathrm{exc}} \in [1,50]\mathrm{Hz}, r_{\mathrm{inh}} \in [1,50]\mathrm{Hz})$ , into the prior  $\pi_1(\theta)$  of the current iteration. We progressively applied all above mentioned metrics (defined in Section 2.4), in the order of the least to the most restrictive metric, to maximize sample efficiency (Fig. 2B, C).
We quantified the behaviour of the network with a range of metrics [23, 25] and noticed that some networks satisfied some conditions, but not others which should discern similar qualities. For example, some networks passed the auto-covariance criterion  $(\langle \rho \rangle_{i,t} < 0.1)$  but not the CV criterion  $(\langle \mathrm{cv}(\mathrm{IS}_i) \rangle > 0.7)$ , by allowing a small population of neurons with unrealistically high firing rates to "cheat" the metric (Fig. 2E, F). Conversely, other networks passed the CV condition but failed the auto-covariance one, e.g., with a bimodal inter-spike interval (ISI) distribution (Fig. 2G). To
filter out these edge cases, we used several metrics for each desired aspect of the network dynamics (Section 2.4).
We found that fSBI successfully identified relevant parts of the search space: the 10,000 samples from the uniform prior  $\pi_0(\theta)$  contained no plausible rules (i.e., no rules producing networks satisfying all criteria). However, by sequentially adding constraints we arrived at a posterior  $\pi_3(\theta)$  that, at the end of the fourth search round, led to more than  $50\%$  suitable rules (Fig. 2C). Interestingly, the dimensionality of the posterior, i.e., of the "suitable rule space", shrunk as we sequentially refined the criteria for plausible network dynamics (Fig. 2D), suggesting that fSBI captured specific relationships between the plasticity parameters. On the other hand, the final posterior remained relatively high dimensional, comprising a variety of different rules, with no apparent posterior collapse onto a single rule. The plausible rules sampled from this final posterior showed stable activity and weight dynamics, regardless of their input rates (Fig. 2H).
Interdependencies between plasticity parameters in the fSBI inferred rules: Next, we examined interdependencies between fSBI-inferred parameters as a possible explanation for the reduced effective dimensionality of the parameter space (Fig. 2D). We found that the correlation was overall weak between the parameters of the plausible rules (Supp. Fig. 6.2B). This was not surprising, as we compared a range of rules that establish a wide diversity of SNN dynamics, such that individual rules can be expected to have different parameter inter-dependencies. We thus narrowed our investigation to rules that produced excitatory firing rates of  $10\mathrm{Hz}$  (as opposed to a range of rates between 1 and  $50\mathrm{Hz}$ , Fig. 3A). The corresponding correlation matrix revealed a fine-grained structure for parameters within the same rule (block diagonal structure), where we observed mostly negative correlations, especially between the non-Hebbian parameters within each rule,  $\alpha_{\mathrm{XY}}$  and  $\beta_{\mathrm{XY}}$ . Additionally, we found both positive and negative correlations between any given connection types (off-diagonal structure, Fig. 3A), suggesting that plasticity mechanisms must be co-tuned to function properly.
fSBI rules improve upon mean-field predictions: We also compared the fSBI-inferred rules to mean-field predictions. Mean-field analysis links the plasticity rule parameters to the average expected firing rate (Section 2.3, Fig. 3B), thus allowing us to obtain theoretically viable rules. Samples from the initial prior did not show any similarity to theoretical predictions when projected along the mean-field axes (Fig. 3C, left). As rules were filtered by progressively more constraints, a similar structure to the mean-field predictions emerged, albeit confined to firing rates below  $10\mathrm{Hz}$ , possibly because of synchronisation effects for higher firing rates (Fig. 3C for EE; similar conclusions for the other three synapse types in Supp. Fig.6.2). Interestingly, the set of rules predicted by mean field theory was not a superset of those selected by fSBI: Some rules were exclusively predicted by one but not the other approach (Fig. 3D, E). Notably, many rules predicted by mean-field, but not by fSBI, did not result in plausible dynamics when tested numerically (Fig. 3D, middle). In contrast, several rules predicted by fSBI but rejected by mean-field proved numerically viable (Fig. 3E, middle). Finally, the EE rules predicted by both mean-field and fSBI were plausible (Fig. 3D, bottom). We noted that fSBI rules lead to plausible network dynamics both when simulated with only the EE parameters (keeping the weights of the other connection types fixed, Fig. 3E, bottom), and also when using the rule for all connection types (Fig. 3E, middle), thus confirming the success of fSBI.
Comparing rules under pre-post protocols: We visualized the fSBI rules under the pre-post pairing protocol widely used experimentally and theoretically to uniquely identify STDP rules [1, 6, 43, 44]. We found that among the various rules simulated, there was no apparent link between how rules appeared in the pre-post protocol, and their ability to establish plausible dynamics in SNNs. Some rules appeared near-identical under the pre-post visualization and yet resulted in vastly different network dynamics (Fig. 3D). Conversely, rules with visibly differing pre-post protocols established similar network dynamics (Fig. 2H and Fig. 3E). Taken together, these results question the relevance of such classical pre-post protocols in elucidating and uniquely determining the plasticity rules at play in the brain, particularly when they are performed without additional disambiguating experiments.
3.2 fSBI infers plausible rules from an MLP search space
We wanted to expand our search space to include local and semi-local variables that have been theoretically or experimentally linked to synaptic changes [2-4], such as the efficacy of the synapse [44, 8], the post-synaptic membrane potential [11], the spike-history of both the pre- and post-synaptic neurons [22], as well as the activity of neighboring excitatory and inhibitory synapses (co-dependent plasticity [10]). Since flexibly combining these variables with a polynomial would result in very
Figure 3: Polynomial fSBI rules compared to rules predicted by mean-field.
high-dimensional, hard-to-navigate search spaces, we switched to multi-layer perceptrons (MLP). The MLP-based rules we designed used the aforementioned synaptic variables as inputs at the time of a spike, and produced a weight change for a given synapse (Fig. 4B), thus representing the plasticity rule. Crucially, we only trained the final layer of that MLP, thus allowing for potentially highly non-linear interactions between the plasticity variables while retaining a relatively low dimensional (searchable) parameter space. We verified that such MLP-parameterized rules can approximate established plasticity rules on supervised tasks (see Supp. Fig.6.6), and then applied fSBI to inferring co-active EE and IE rules (Fig. 4A, B). Like for the polynomial space, we found that fSBI produced progressively more constrained posteriors, such that the final fSBI posterior generated over  $50\%$  plausible rules (Fig. 4C). Furthermore, fSBI reduced the effective dimensionality of the parameter space, i.e., increased correlations between the parameters (Supp.6.7), like what we had observed for the polynomial expression of rules. Interestingly, plausible rules from the final fSBI posterior produce stable activity and weight dynamics, but with unique pre-post protocol profiles that are markedly different from that of experimentally observed rules, as well as the rules discovered by the polynomial method above (Fig. 4D, E, Supp.6.7). These rules represent potentially complex and non-linear interactions between Hebbian, local and semi-local factors, but nevertheless robustly establish plausible network dynamics.
Generalization capabilities of meta-learned rules: Finally, we verified that both the polynomial and the MLP rules obtained with fSBI generalized to different network sizes, sparsity, weight initializations, and ratios of E to I, although a few metrics were sometimes outside the predefined ranges (Fig. 5A). We then tested the "plausible" rules on 20-minute-long simulations (versus 2min in Fig. 2&4). Approx.  $25\%$  of the polynomial rules still met the conditions on all 15 metrics after 20 minutes (Fig. 5B). Most other rules were disqualified by our  $\langle w_{\mathrm{IE}} \rangle$  and  $\langle w_{\mathrm{II}} \rangle$  conditions, which select long-term stable weights, and are thus sensitive to simulation duration. Correspondingly, the II and IE plasticity parameters appeared more refined compared to the starting set (Fig. 5D). Overall, this
Figure 4: Posterior of plausible plasticity rules with fSBI. MLP search-space.
suggested that the 2min task had properly constrained the EE and EI rules, but was too short to fully constrain the II and IE rules. Similarly,  $35\%$  of the 2min-plausible MLP rules met all conditions in the 20min task. Interestingly, dimensionality reduction of the successful plasticity parameters did not reveal sub-structures, suggesting that the 20min task did not dramatically refine the set of filtered rules (Fig. 5C).
4 Discussion and Outlook
Plasticity mechanisms are arduous to probe in vivo and theoretically challenging to describe due to the complex interplay between neural activity and weight dynamics. Here, we introduce fSBI, a tool to numerically infer families of plasticity rules while enforcing strong plausibility constraints on SNN dynamics. We show that fSBI can discover generally plausible plasticity rules in large SNNs, with rules parameterized either as polynomials or MLPs.
fSBI has several advantages compared to previous approaches: analytical methods require various and sometimes strong assumptions; local optimization methods only provide single solutions; and brute-force approaches do not scale (in this study, randomly drawing from the full space of plasticity rules would have required simulating  $\sim 100\mathrm{M}$  rules, compared to 200k, Fig. 2C, 4C). However, these approaches are not mutually exclusive: analytical frameworks allow us to understand the sets of rules inferred by fSBI and produce meaningful experimental predictions. Furthermore, the fSBI distributions of plausible rules are a promising starting point for further investigation into specific network computations, potentially suited to local optimization approaches.
In contrast with previous in silico studies of plasticity that produce single predictions, fSBI is a systematic approach to make predictions based on many (if not all) candidate plasticity rules within a search space. For instance, we showed how an isolated EE rule may suggest a Hebbian mechanism, but the fSBI-discovered set contains equally valid anti-Hebbian rules that can establish near identical
Figure 5: Robustness of polynomial and MLP rules.
network activity (Figs. 2H, 3E), suggesting that studies of single rules or individual connection types may be grossly under-constrained.
More generally, our study challenges the widely used pre-post pairing protocols [1, 6, 44], when used in isolation. Indeed, rules that look near identical under such pre-post protocols may have widely different network-level effects (Fig. 3D, middle and bottom), validating, in hindsight, the need for finely-tuned orchestration in previous studies [8]. Conversely, rules that appear different under observation with a pre-post protocol (Fig. 2H and Fig. 3E) may lead to similar network dynamics. In addition, the results above were obtained in noise-free in silico experiments, suggesting that the connection between empirical data and plasticity rules may be even more complex. The interpretability of the pre-post pairing protocols is further compromised in the MLP-based rules, since these rules include factors linked to plasticity that are not explicitly constrained by such low-dimensional protocols, leading to widely different outcomes depending on the synaptic and neuronal state (Fig. 4D). Additionally, we have not touched on the effects of neuromodulation in our study, something that is currently out of scope but will become the focus of future studies.
Our approach naturally comes with limitations and idiosyncrasies. First, we cannot prove the long-term stability of the rules, as we are limited by the numerical approach and associated demanding compute requirements. On longer timescales, slower homeostatic mechanisms may play a part in synaptic dynamics [45, 46]. Another potential limitation of fSBI is the curse of dimensionality, inherent to most SBI approaches [36], although some recent improvements have been proposed [47-50]. Finally, further analysis is needed to forge robust and meaningful predictions from the commonalities of the large set of inferred rules.
In summary, we meta-learn plasticity rules with an inference-based method, fSBI. This method can be applied to large spiking networks with flexibly parameterized plasticity rules and narrow down the set of promising plasticity mechanisms.
We thank Chaitanya Chintaluri, Everton Agnes, Nicoleta Condruz, Douglas Feitosa Tomé, Michael Deistler and Jan Boelts for helpful discussions and feedback on the manuscript. This work was funded by the European Research Council (ERC consolidator grant SYNAPSEEK), the German Research Foundation (DFG; Germany's Excellence Strategy MLCoE - EXC number 2064/1 PN 390727645), the German Federal Ministry of Education and Research (BMBF; Tübingen AI Center, FKZ: 01IS18039A), the Human Frontier in Science Program (RGY0076/2018) and the FENS-Kavli Network of Excellence scientific exchange program. This research was supported by the Scientific Service Units (SSU) of IST Austria through resources provided by Scientific Computing (SciComp).
[1] Tim VP Bliss and Terje Lømo. Long-lasting potentiation of synaptic transmission in the dentate area of the anaesthetized rabbit following stimulation of the perforant path. The Journal of physiology, 232(2):331-356, 1973.
[2] Larry F Abbott and Sacha B Nelson. Synaptic plasticity: taming the beast. Nature neuroscience, 3(11):1178-1183, 2000.
[3] Jeffrey C Magee and Christine Grienberger. Synaptic plasticity forms and functions. Annual review of neuroscience, 43:95-117, 2020.
[4] Ami Citri and Robert C. Malenka. Synaptic plasticity: Multiple forms, functions, and mechanisms. Neuropsychopharmacology, 33:18-41, 2008.
[5] Amanda R. McFarlan, Christina Y. C. Chou, Airi Watanabe, Hannah Owens Nicole Cherepacha, Maria Haddad, and P. Jesper Sjöström. The plasticitome of cortical interneurons. Nature Reviews Neuroscience, 24, 2022.
[6] Wulfram Gerstner, Richard Kempter, J Leo Van Hemmen, and Hermann Wagner. A neuronal learning rule for sub-millisecond temporal coding. Nature, 383(6595):76-78, 1996.
[7] Tim P Vogels, Henning Sprekeler, Friedemann Zenke, Claudia Clopath, and Wulfram Gerstner. Inhibitory plasticity balances excitation and inhibition in sensory pathways and memory networks. Science, 334(6062):1569-1573, 2011.
[8] Friedemann Zenke, Everton J Agnes, and Wulfram Gerstner. Diverse synaptic plasticity mechanisms orchestrated to form and retrieve memories in spiking neural networks. Nature communications, 6(1):1-13, 2015.
[9] Ashok Litwin-Kumar and Brent Doiron. Formation and maintenance of neuronal assemblies through synaptic plasticity. Nature Communications, 5, 2014.
[10] Everton J Agnes and Tim P Vogels. Codependent excitatory and inhibitory plasticity accounts for quick, stable and long-lasting memories in biological networks. BioRxiv, page 437962, 2022.
[11] Claudia Clopath, Lars Busing, Eleni Vasilaki, and Wulfram Gerstner. Connectivity reflects coding: a model of voltage-based stdp with homeostasis. Nature Neuroscience, 13:344-352, 2010.
[12] Sukbin Lim, Jillian L. McKee, Yali Woloszyn, Luke Amit, David J. Freedman, David L. Steinberg, and Nicolas Brunel. Inferring learning rules from distribution of firing rates in cortical neurons. Nature neuroscience, 18:1804-1810, 2015.
[13] Yoshua Bengio, Samy Bengio, and Jocelyn Cloutier. Learning a synaptic learning rule. CiteSeer, 1990.
[14] Keren Gu, Sam Greydanus, Luke Metz, Niru Maheswaranathan, and Jascha Sohl-Dickstein. Meta-learning biologically plausible semi-supervised update rules. bioRxiv, 2019.
[52] Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, Robert Kern, Matti Picus, Stephan Hoyer, Marten H. van Kerkwijk, Matthew Brett, Allan Haldane, Jaime Fernández del Río, Mark Wiebe, Pearu Peterson, Pierre Gérard-Marchant, Kevin Sheppard, Tyler Reddy, Warren Weckesser, Hameer Abbasi, Christoph Gohlke, and Travis E. Oliphant. Array programming with NumPy. Nature, 585(7825):357–362, September 2020.
[53] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
[54] Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, Stéfan J. van der Walt, Matthew Brett, Joshua Wilson, K. Jarrod Millman, Nikolay Mayorov, Andrew R. J. Nelson, Eric Jones, Robert Kern, Eric Larson, C J Carey, Ilhan Polat, Yu Feng, Eric W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, E. A. Quintero, Charles R. Harris, Anne M. Archibald, Antonio H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt, and SciPy 1.0 Contributors. SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17:261-272, 2020.
[55] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Z. Yang, Zach DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. CoRR, abs/1912.01703, 2019.
[56] Alvaro Tejero-Cantero, Jan Boelts, Michael Deistler, Jan-Matthis Lueckmann, Conor Durkan, Pedro J. Gonçalves, David S. Greenberg, and Jakob H. Macke. sbi: A toolkit for simulation-based inference. Journal of Open Source Software, 5(52):2505, 2020.
[57] J. D. Hunter. Matplotlib: A 2d graphics environment. Computing in Science & Engineering, 9 (3):90-95, 2007.
[58] Nikolaus Hansen. The CMA evolution strategy: A tutorial. arXiv preprint, 1604.00772, 2016.