Adaptation Accelerating Sampling-based Bayesian Inference in Attractor Neural Networks
Authors: Xingsi Dong
Zilong Ji
Tianhao Chu
Tiejun Huang
Wenhao Zhang
Si Wu
Venue: NeurIPS 2022 Accept (2022)
Keywords: Neuroscience
Sample-based Bayesian inference
Continuous attractor neural networks
Neural adaptation

Abstract: The brain performs probabilistic Bayesian inference to interpret the external world. The sampling-based view assumes that the brain represents the stimulus posterior distribution via samples of stochastic neuronal responses. Although the idea of sampling-based inference is appealing, it faces a critical challenge of whether stochastic sampling is fast enough to match the rapid computation of the brain. In this study, we explore how latent stimulus sampling can be accelerated in neural circuits. Specifically, we consider a canonical neural circuit model called continuous attractor neural networks (CANNs) and investigate how sampling-based inference of latent continuous variables is accelerated in CANNs. Intriguingly, we find that by including noisy adaptation in the neuronal dynamics, the CANN is able to speed up the sampling process significantly. We theoretically derive that the CANN with noisy adaptation implements the efficient sampling method called Hamiltonian dynamics with friction, where noisy adaption effectively plays the role of momentum. We theoretically analyze the sampling performances of the network and derive the condition when the acceleration has the maximum effect. Simulation results confirm our theoretical analyses. We further extend the model to coupled CANNs and demonstrate that noisy adaptation accelerates the sampling of the posterior distribution of multivariate stimuli. We hope that this study enhances our understanding of how Bayesian inference is realized in the brain.

Adaptation Accelerating Sampling-based Bayesian Inference in Attractor Neural Networks
Xingsi Dong' dxs dxs19980605@pku. edu. cn
Zilong J Filong.ji@ucl. ac. uk
Tianhao Chu
chutianhao@stu, pku edu. cn
Tiejun Huang t huaagg8pu edu. cn
Wen-Hao Zhang 2.
Si Wulft siwu@pku. edu cn
wenhao wenhao. whwngguttsouthwestem.. edu
School of Psychology and Cognitive Sciences, IDG/McGovern Institute for Brain Research, PKU-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Center of Quantitative Biology, Peking University.
2. Lyda Hill Department of Bioinformatics, O' O'Donnell Brain Institute, UT Southwestem Medical Center. 3. Institute of Cognitive Neuroscience, University College London
4. School of Computer Science, Peking University. : Corresponding authors.
Abstract
The brain performs probabilistic Bayesian inference to interpret the external world. The sampling-based view assumes that the brain represents the stimulus posterior distribution via samples of stochastic neuronal responses. Although the idea of sampling-
inference is appealing, it faces a critical challenge of whether stochastic sampling is fast enough to match the rapid computation of the brain. In this study, we explore how latent feature sampling can be accelerated in neural circuits. Specifically,
consider canonical neural circuit model called con- tinuous attractor neural networks (CANNs) and investigate how sampling-basee -based inference of latent continuous variables is accelerated in CANNs. Intriguingly, we find that by including noisy adaptation in the neuronal dynamics, the CAÑN is able speed up the sampling process significantly. We theoretically derive that the CANN with noisy adaptation implements the efficient sampling method called Hamiltonian dynamics with friction, where noisy adaption effectively plays the role of momentum. We theoretically analyze the sampling performances of the network and derive the condition when the acceleration has the maximum effect. Simulation results validate our theoretical analyses. We further extend the model to coupled CANNs and demonstrate that noisy adaptation accelerates the sampling of the posterior distribution of multivariate stimuli. We hope that this study enhances our understanding of how Bayesian inference is realized the brain.
Introduction
A large volume of human behavioral (1-3 and animal neurophysiological studies 4 5 gested that the brain performs statistically optimal Bayesian inference to interpret the external world (6 Yet, exactly how neural circuits in the brain implement probabilistic inference (al- gorithm) and how neuronal responses represent the stimulus posterior distribution (representation) remain debated. Among the proposed models in the literature 15. the sampling-bes based view promising [6] 19), which considers that the stimulus posterior distribution approximately represented by samples generated by the neural system time, with each sample coming from the
have sug-
36th Conference on Neural Information Processing Systems (NcurIPS 2022).

---

stochastic neuronal responses. The view of stochastic sampling naturally accounts for the irregular firing and other response properties of neurons observed in the experiments [17 20).
Although the idea of sampling-bases inference is appealing, a critical concern is whether stochastic sampling is fast enough to match the rapid computation of the brain. For instance, the sampling trajectory of Gibbs sampling [21 22] or Langevin sampling [23] essentially performs random walks in local regions rather than the whole posterior space, which is too slow to be compatible with brain functions [TS 24]. Thus, it is crucial to explore whether neural circuits in the brain have the capacity of realizing sampling- basse inference rapidly. This issue has been investigated recently by several works [15 16 18 251. Among them, a computational model which considers that neural circuits are performing Hamiltonian Monte Carlo (HMC) sampling is attracting [16 18]. HMC is a method developed in machine learning for accelerating stochastic sampling (26] In HMC, an auxiliary variable representing the momentum of the sampled space variable is introduced, and the two variables follow the Hamiltonian dynamícs. By sampling the momentum variable stochastically from a simple normal distribution, it achieves that the sampling speed of the space variable is accelerated significantly compared to that of random walks. Interestingly, the study [16] found that HMC can be implemented by a biologically plausible neural network with balanced excitation and inhibition (E-I) interactions among neurons, where the activities of inhibitory neurons effectively serve as the auxiliary 'momentum' to accelerate the sampling of responses of excitatory neurons.
Previous works have mainly studied the case that the sampled features are represented by individual neurons [8 20 In the brain, however, it is known that some continuous variables are encoded jointly by population of neurons called population coding 27 The well-known examples include
orientation 28 moving direction [29], head-direction [30,, and spatial location [3] 32], and the
representations of these continuous features are typically mimicked by a canonical network model called continuous attractor neural networks (CANNs). Thus, in this study, we investigate how sampling- -based inference of a continuous feature in CANN is accelerated. In the brain, there is an added difficulty as the brain typically extracts and represents multiple features in a parallel and distributed fashion using separated neural circuits, e.g., for multisensory integration 5 33) and contour integration [4 351, indicating that the acceleration of distributed sampling- based inference is also important. Thus, we also investigate how distributed sampling-bast based inference is accelerated in coupled CANNs.
In this work, we find that by including noisy adaptation, generic feature of neuronal responses, in the dynamics of a CANN, the network is able to speed up sampling-bar based inference significantly. The underlying mechanism can be intuitively understood as follows. In CANN, the values of a continuous feature are encoded by a continuous family of localized stationary states (attractors) called bumps, which form low-dimensional manifold (the attractor space) to represent stimulus feature values. Without adaptation, internal noises in the network drive the bump to exhibit Brownian motion on the attractor space, implying that the CANN performs Langevin sampling. When noisy adaptation is included in the CANN dynamics, it tends to destabilize the network bump response and causes the bump to experience history-dependeee space, which accelerates the sampling process effectively. Remarkably, we show that the sampling process of the CANN with noisy adaptation is equivalent to Hamiltonian dynamics with friction (HDF) 36). where the adaptation effectively serves as the 'momentum' for speeding up the sampling of bump positions (i.e., feature values). We theoretically analyze how noisy adaptation accelerates the sampling performance of the network and derive the condition when the acceleration has the maximum effect. The theoretical analyses are validated by simulations. Furthermore, we extend the study to the case of coupled CANNs, where the correlation priors between features are stored in the reciprocal connections between CANNs. We demonstrate that such coupled neural circuits can achieve distributed sampling- basel inference efficiently, and noisy adaptation speeds up the sampling process in the nigh-dimensional feature space. We hope that this study enhances our understanding of the implementation of sampling- based inference in the brain.
large-step stochastic movements in the attractor
2 A model of Bayesian inference
To study the acceleration of sampling-based Bayesian inference in neural systems, we consider linear Gaussian generative model (A) which has been widely used in previous studies [ 15
25 37 38). The model assumes that an observation s is generated by latent feature according to

---

a Gaussian distribution, i.e.,
(1) where (ss !) denotes the Gaussian distribution with mean s and precision A (the inverse of variance). Here, the feature can be any attribute extracted by neural systems, such as orientation, moving direction, head direction, or spatial location.
p(s"|s) -s
Bayesian inference computes the posterior of the latent feature according to the Bayes' theorem,
p(s[s") x p(s*)s)p(s) (ssss),A-))
where p(s) denotes the prior of the latent feature which assumed to be uniform in this study.
When studying distributed sampling- baatin inference, we consider that observations and the associated latent features are high-dimensional. denoted, respectively, as s = {s.] and s {s:}, for i 1...., M, with M > the dimension of features (Fi The likelihood function and the prior of the nigh-dimensional Gaussian generative model are written as,
p(s*|s) = NN(s A p(s) x ((s)O,
(3)
where the precision matrix A of the likelihood function is diagonal, i.e., A = A2, Am). implying that each observed feature sg independently generated by s;, satisfying p(s" (s)
I p()))ss)) = I (ss !) This assumption is reasonable, since the observations of different features through separate neural pathways. The precision matrix L of the prior is Laplacian, i.e., La = - E; Lij. for j j i. This gives a uniform marginal prior for each feature
and co-occurrence probability between any two features p(s;; 8j) x cxp [= s,) //2 The Laplacian prior was used studying contour integration and multi-sensory integration (34 39 41)
According to the Bayes' theorem, the posterior distribution of the latent features in the high- dimensional case calculated to be,
p(s)s") x p(s{ss)pss) = (s/ss,,,, where the mean μg and the precision matrix Ω are given by.
(4)
Ω A L Ms 52 Ass. 'ss.
(5)
3 Hamiltonian dynamics with friction
We first review machine learning method for accelerating sampling-basck Bayesian inference, and later we embed it into a concrete neural circuit dynamics.
The first-order Langevin dynamics (FLD) has been applied to sample the posterior distribution of Bayesian inference [23 42,, and samples stimulus values by performing stochastic gradient ascent on the manifold of the log-posterior of the stimuli, i.e..
ds Te dt
V In p(sls)) + VT,O,E,
where тa is the time constant of sampling. V = d/ds denotes the derivative over s. & are multivariate independent Gaussian white noises, satisfying (E(+) = Iō(t - t'), with I the identity matrix and 6(t f') the Dirac delta function. o, noise strengths, and
a _ /2.
It has been proved that the stationary distribution FLD equals to the target posterior distribution p(s|s") 23 Under the drive of -aussian-white noises, the value of fluctuates over time, which can be regarded as samples from the posterior p(s[s"). FLD essentially performs noisy gradient ascent in the space of log posterior (Fig. [f). which converges slowly. To speed up the sampling process, Hamiltonian dynamics with friction (HDF) (second-order Langevin dynamics) was proposed [36]. This approach induces set of auxiliary momentum variables y to the 'space' variables and meanwhile includes friction of momentum to reduce large fluctuations. The dynamics of HDF written as,
ds
= a lyy,
dt
dy
= -Ba yy Vinp(s|s") + VT.ogg.
(8)
dt
3

---

(A)
(C)
Sampling trace
(E)
a00 Samping trace
(0xx,
Generative model
Sampling-based inference
Latent feature
HDF
(fr)
Time (fr)
U CANN
S
latent feature
observation
bump position
Latent feature 8
Feature space x
(B)
-V(a,
Feature
Current intensitty
Utx. 8
p(ela)
Vir. 4
Probability
Sample p(s)
Pr +)
0.4
(on(ar,
.(t)
Feature space
Latent feature
bassiddg--asddd based Bayesian inference. (A) Illustration the inference process. Generative model: a latent feature sampled from the prior p(8) generates observation 8 according the likelihood function p()))s). Sampling- inference: a CANN receives the external input Teat conveying the likelihood function of the observation and samples the feature value s(t) by the bump position. (B) The CANN structure. Neurons are uniformly distributed in the feature space and connected recurrently. Each neuron receives an external input jezt (zz and an adaptation current (vx,,,) (C) Illustrating the slow sampling process of FLD and the fast sampling process of HDF. Two-dimensional case is shown. (D) The network state. The neural bump (x, t) locates at s()), i.e. the feature value represented by the network. The adaptation current (ax, t) is delayed to Uzz t), with a separation z(t). The external input Ie=* t) locates at the observation sº (E) A sampling trace of the CANN bump position (orange line) which samples feature values. (F) The sampled distribution p(s) (the normalized orange histogram) agrees with the
Figure 1: A CANN with noisy adaptation implements sampling
target posterior p()(s") (grey line). See SI. for parameter setting and simulation details.
where and are the time constants of the space variables and the momentum variables y. respectively. The matrix a corresponds to the inertia of the Hamiltonian dynamics, and the term -Ba--y on the right-hand side of Eq. (8) represents the friction of momentum, with the matrix B controlling the friction strength. The noise strength matrix satisfies o, 2BTT/Ts-
In the case that the feature is one-dimensional and its posterior distribution satisfies Eq. HDF written as,
ds
(9)
dt
dy A(s" - + VTzayE.
T2 dt
(10)
As illustrated in Fig. [C. FLD wanders locally in the posterior space, while HDF travels distantly and hence speeds up the sampling.
4 A CANN with noisy adaptation accelerating sampling-based inference
We explore how a CANN with noisy adaptation accelerates the sampling-based Bayesian inference and demonstrate that it implements HDF.
4.1 A CANN with noisy adaptation
We consider that an one-dimensional continuous feature E R is encoded by CANN, in which neurons are uniformly distributed the feature space of (Fig [B) Denote U(x, 1) as the synaptic input received by neurons at x, and r(z, t) the corresponding firing rate. The dynamics of the network

---

is written as,
aU(x, 1) tx + /. W(z,z")r('' t)de' - ((x,t) + (
(11)
0t
U² (xx,1)
r(x,t) 1+ kp Sa (2 tt)d'
(12)
where T; the synaptic time constant and p the neuronal density. The neuronal connection strengths W(r, x') = Jo/(V/no exp [-(x - x²)²² (2a2] are translation-invariann in the space, with a and Jo controlling the connection range and amplitude, respectively. re=t (z., t) represents the feedforward input from other areas, e.g., the sensory input. The neuronal firing rate r(z, t) is a nonlinear function of synaptic inputs, where the parameter k the denominator of 12) controls the amplitude of divisive normalization, which could be implemented by shunting inhibition via inhibitory neurons 43 44).
The current (x: i) the right-hand side of Eq. 11 reflects the adaptation effect. Adaptation is general phenomenon referring to that neuron system exploits negative feedback to suppress neuronal responses when they are high, and may arise from different mechanisms. Here we exemplify with spike frequency adaptation [45]. The dynamics of V (z, t) is written as,
@V (z, f) -x + mU (z, t) ov T_U (2, (z, 0t
(13)
where 7= is the time constant of adaptation and m the adaptation strength. E(ar, L) denotes Gaussian white noise of zero mean and unit variance, and the parameter ov controls the noise amplitude. Notably, we include noises in the adaptation dynamics, which is biologically reasonable, as noises are ubiquitous in neural systems (more discussion in Scc(o).
We review some fundamental properties of CANNs relevant to the present study, When there is no external input (Jezt = 0) or adaptation (m = 0, Øv 0), the CANN holds continuous family of Gaussian shussia stationary states called bumps when k < pJ3 (8v/2ma). These bump states can be approximately expressed Uxx) Au exp -(x ²)² 3)²/(4a")] where Ay denotes the bump height, and the bump position (center) s denotes the feature value represented by the CANN. These bumps form attractor space for E IR which the network is neutrally stable [46 47.. Under the drive of Gaussian white noises, the bump position exhibits Brownian motion in the attractor space (48). When adaptation is induced in CANN, it destabilizes the active bump state. In partieular, when the adaptation strength is larger than a boundary, i.e., m > Tz/T2, the network can hold a spontaneously moving bump state called travelling wave 449 50) When noises included in the adaptation and the mean of the adaptation strength is close to the travelling wave boundary TT/T2, the CANN exhibits Lévy flights [5
In this study, we are interested in the dynamics of a CANN with noisy adaptation, when an external input conveying the stimulus information is presented. Specifically, consider that the external input / (z, t) = (I)), with a constant 7 controlling the input strength, and (xx) has the form,
(x
I(x) = A exp
(14)
4a
where s is the observed feature and A the prevision of the likelihood function given in Eq. Here, we take the view of probabilistic population coding (PPC) which assumes that the mean and uncertainty of the feature are encoded by the joint activities of an ensemble of neurons D. and we consider that the activities of these neurons provide the feedforward sensory input to the CANN.
4.2 The network dynamics implementing HDF
We derive that the network dynamics Eqs. [1 14 implement HDF. As general property of CANNs, when the external input is sufficiently small (i.e., 7 is small) and that the adaptation strength m is smaller than threshold (the value of the threshold will be given later), the network state can be approximated to be of the Gaussian form (Fig (P), which are written as,
U(r, t) = uog [a)) (t), 2 r(x,t) t) = rog ()s(t),,a), V( t) = va [z]s(t) 2(t),
(15)
where the symbol Glxlc, o exp [- - -))> denotes Gaussian function of mean and variance o². Up. To, and vo denote the heights of the bumps of synaptic input U U(z t), firing rate
5

---

r(r,t) t). and adaptation current (ax, t), respectively. s(t) denotes the position (center) of the bump U(x,t) t), which is the feature value represented by the network at time t. 2(t) denotes the delay of the adaptation current (() to the bump (x, f), referred to as the adaptation delay hereafter.
Previous studies 47 have shown that the dynamics of CANN is dominated by very few motion modes, and we can project the CANN dynamics on these dominating motion modes to simplify the network dynamics significantly (projecting a function f(x, 1) on motion mode u(t), it means to compute [.. [xx, ())(r)dr) [52]. Here, we consider the first two dominating motion modes, representing the height and position variations of the bump, respectively, which are given by.
(x(ss) = 9 [a|ss 2a"]
@1(x|s) = (z - $)g [ 2a²).
(16)
Substituting the network state Eq. (5) into the network dynamics Eqs. (1-14) and then projecting
them on the two dominating modes Eq. [T),, we obtain the dynamics of the bump position s(t) and the adaptation delay 2tt), which are written as (see S1.2 for the details),
ds
74 (s
Ts dt
8) m2,
(17)
40
dæ
+ T= ds
T= dt
+ T2V
(18)
dt
where Ø= 2//2/
22/3/ (3/3n)ovv (///////o/////u//// (m//uo), and uo = Jo(1 + 8V-8// (T)p) (4/r))//(/ma)))))a
(1) indicates that the adaptation delay =(1) in effect integrates the history of the bump position speed (ds/d(), which enables the bump to experience history-dependent large-step movements
in the attractor space. We re-organize Eqs. (1718) by introducing a new momentum variable y =
A(s - s) + (mo/ and obtain
ds
7
Ts dt
1//
(19)
do
dy
T2
Ts
m
40 Y
+
A
I y+ + A(s -) -) toyTT,,
(20)
df
Ts
Tz
U0
where oy = =2/2a 22/22////// (3 3r) B /7. Note that the term -
8) the right-hand side of Eq. 20
comes from the external input, which conveys the stimulus information.
Comparing Bqs.(19P3 20) with (0). we see that the two dynamical systems are exactly the same when the parameters a- uo/7 and 3 T [(Ta/T= m)) uo/r + A]. Moreover, by setting of 3 1//3r/((4)) (T./Tę - m + 7/ ugA). the condition of 2 Tz holds (note this condition needs not to be satisfied exactly, violating this condition for certain amount does not affect the sampling performance, see SI.3). From Eq. 20). we also observe that for the network performing stochastic sampling, it requires 8 < O, which is equivalent to the condition m < Meh with
me. = TT/T= + 7A/ub the threshold (if the adaptation strength m > meh, the network bump falls into the state of moving spontaneously and no longer performs stochastic sampling; see the analysis in SI.3). It can also be checked that in the limit of to FLD (see the proof in SI.3). Thus, when 0 < < mih. the network implements HDF, where the adaptation in effect plays the role of momentum.
0, the network dynamics Eqs. 18) returns
We can also intuitively understand how the network realizes HDF from the dynamical system point of view. From Eq [7). we see that the speed of the bump position determined by the external input and the adaptation effect, which leads to that the momentum is given by A(s - s) + (uz/7)mz. In Eq, (9). the bump height tig and the strength of the external input ? determine the difficulty of the bump movement, which leads to that the inertia (mass) of the Hamiltonian dynamics is given by a = u0/y (i.e., the higher the bump height uig or the smaller the input strength 7, the larger the inertia, which agree with the dynamical properties of the CANN). The friction strength of the momentum in HDF is given by 3 = T T. [[T=/T= - m) un/7 + A), which is affected by the external input (via the term A, the external input tries to pin the bump position at 8 which dampens the bump movement) and the adaptation strength. Specifically, 3 decreases with the adaptation strength m for m mah- This is also understandable, since adaptation increases the mobility of the bump.

---

(B)
(C)
Likellhood precision A
10
Phase diagram of sampling behavior
Mean
distance
1,0
3
m=0
FLD
KL divergencc
Spood
2-
HDF
Traveling wave
Variance distance
1.0
motion
Brownen
flights
Levyy
1.0
20
40
20 Time ((/x))
40
Adaptation strength m(r./v)) /vg)
Time ((/r)
(D)
(F)
10
A-1
Autocorrlltion
1.0
0t5r./ts
Samp ouu peeds
A=3
KL divergence
2
A=3
0.5-
0.0
0
20
40
0
0.5 Mrusz mozz
20
40
Time lag ((Tx)
Adaptation strength mm(T/TT.)
Time slfr,)
Figure 2: Noisy adaptation accelerating sampling-bass -ased inference in the CANN. (A) Sampling behaviors of the network in different parameter regimes. (B) The convergence processes of the mean (upper panel) and the variance (lower panel) of the sampled distribution to those of the target posterior, whose speeds increase with the adaptation strength for m < Mmaa- A = 1. (C) The convergence process of the KL-divergence between the sampled distribution and the target posterior, whose speed increases with the adaptation strength for m < Mmmar. A = 1. (D) The autocorrelation of sampling as a function of the time lag, whose decay speed increases with the adaptation strength for m < mmaz. A = 1. (E) The sampling speed varies with the adaptation strength, which has the maximum value around the theoretic prediction mmaz. The sampling speed is measured by the inverse of the time consuming for the KL-divergence between the sampled and the target posterior distributions reaching a small threshold и = 0.02. (F) The convergence processes of the KL-divergence for different A. TT. See SI.1 for parameter setting and simulation details.
4.3 Adaptation accelerating sampling-basee inference
We further explore how exactly noisy adaptation speeds up the sampling process of the CANN. We re-organize Eqs. [7 18) as,
d
-m/Ts 7A/ (T.u)) (TT/T,- - mm)
) 8 )+
/A50/(T / )+ o./VTTE
di
(21)
and denote H = (T>A/(rtuo: >A/(Ta (Ta/T= ( m)/T.) be the drift matrix. It has been proved that the upper-bound of the KI KL-divergence between the sampled distribution ps()) and the stationary distribution p(s) of (2. decreases exponentially (33 i.e.,
KL (+) < KL (s. =)] < KL [po(s, 2)1p(s, 2)] exp(-nt),
(22)
where (s 2) denotes the initial distribution at t = O, and h denotes the smallest real-part of all eigenvalues of the drift matrix H. Therefore, we can measure the sampling speed HDF by the value of h, which is calculated to be (see SI.3)
h Re (mmu - m)/T. ((mah -))/r22AAAAAuuu77))) 4rA/(uOT:T2))
(mmh-m)/r
(23)
where Re(F) denotes the real-part of the quantity F. It can be checked that when m < Moma
(TTaTT /Ar/uo)² m. -2 (T.4)) / increases with the adaptation strength m,; when m Mmaz. l reaches the maximum hmaz />A/ (7A/(TTTTu)) (T))) and the sampling reaches the fastest.
We summarize the sampling behaviours of the network in different parameter regimes (see Fig A):
When no adaptation exists (m 0), the CANN performs Langevin sampling.
7

---

When no external input exists (i.e., A = O, the likelihood function is uniform and contains no stimulus information), the network performs either Brownian motion (when m is sufficiently small) or Lévy flights (when m is close to the travelling wave boundary T>/Tz) 51
When both external input and adaptation exist, and the adaptation strength 0 < m < mih the network implements HDF. The sampling speed reaches the maximum when m Mmaz (the dashed line in 2A). Notably, the friction has an appropriate amplitude 3 2/ PVT=Auu T=Auo/((rr when m = Mmaa. For m < Mmmaz the friction is too large which dampens the bump motion; for mmaax < m < Megh the friction is too small which incurs large fluctuations.
When the adaptation strength m > mah: the network bump falls into the state of moving sponta- neously and no longer performs stochastic sampling.
4.4 Simulation results
We carry out simulations to validate the above theoretical analyses. In the simulations, for different values of m and A, we fix the external feedforward input [x) given by Eq [4] (which conveys the likelihood function of the observation) and evolve the network dynamics Eqs. stimulus feature value. The results are presented in Figs
13) to sample the
Firstly, we observe that the network dynamics indeed achieves sampling-based inference. As shown in Fig [E, because of noises, the bump position of the network fluctuates with time, whose trace samples the stimulus feature value in the attractor space. Over time, the stationary sampled distribution p(s) approaches the target posterior distribution p(s p(s]s") as shown in Fi
Secondly, observe that noisy adaptation indeed accelerates the sampling process. As shown in Fig the mean and the variance of the sampled distribution approach to those of the target posterior distribution asymptotically as time goes on, and the converging process is speed up when the adaptation strength m increases, for O S m < Mimaa- This is further confirmed by the converging process of the KI-ddivereence between the sampled distribution and the target posterior shown in Fig.C.. 2 presents autocorrelation as a different measure to demonstrate that the adaptation speeds up the sampling, for 0 S m < Mmas. 2 displays how the sampling speed varies with the adaptation strength, which reaches the maximum around the theoretically predicted point Mmaz- Fig confirms that the network implements rapid sampling for different input uncertainties.
5 Coupled CANNS with noisy adaptation accelerating distributed sampling-based inference
We extend the above study to coupled CANNs with noisy adaptation (A). The coupled CANNS have been used to model multi-sensory integration between brain regions. Previous studies have revealed that reciprocally connected CANNs, with each of them modelling the representation of heading direction in one brain region, can achieve distributed Bayesian inference derive that coupled CANNs with noisy adaptation implement HDF, which accelerates sampling-base inference in the high-dimensional feature space. The dynamics of the ith network in coupled CANNs is given by,
38 54). Here,
= - U,(,,)) + / Wi(c,z')rildd t)dd'' + +p Ts (u,
M
('),(,,
0t
+ 7 (x) Vi(x,(),
(24)
where Wi(x, J./( exp [- (0-xxxr0 x/)2 (2a2)] denote the recurrent connections between
neurons in CANN i, and W., (I, x²) = Giz/ (TTa)) exp [-(x x²)²/'/////// /(22)), for j * i, denote the reciprocal connections from neurons in CANN to neurons in CANN The ith CANN ) = A; exp [- 2 which conveys the information of the feature 8s, with of the corresponding observation and A, the precision. The dynamics of the neuronal firing rate and the adaptation current in each CANN have the same forms as in Eq. (2) and (13). respectively. Adaptation noises between different CANNs are independent to each other, i.e.,
receives the external input (x)
(Z, (x', t') = δ,,ō(t t')8(z z').
8

---

(A)
(B)
Generative model
Sampling-based inference
Latent feature st
S1
S
Fart
U1
$
Latent feature
KL divergence
Time f(fT.))
bya
G
G21
$2
U2
2
latent Seature
observation
external
Coupled- CANNA
bump position
20
40
Inpur
Sampling trace
Time k(/))
Figure 3: Coupled CANNS with noisy adaptation implement distributed sampling- Bayesian inference. (A) The sampling-base inference in two coupled CANNs. (B) Example sampling traces in the -wo-dimensional feature space. (C) The convergence process of the KL-divergence between the sampled distribution p(s) and the target posterior p(s]s"), whose speed increases with the adaptation strength m, for 0 < m Mmax. See SL.1 for parameter setting and simulation details.
Again, by assuming that the state of each CANN has the Gaussian forms in Eq. (15) and projecting the network dynamics onto the two dominating modes (6), we obtain the dynamics of bump positions st) and the corresponding adaptation delays z(t), which are written as (see details SI.4),
ds
- JJ- (
Ts
yu
As
+ mz,
(25)
dz
ds
T2 dt
Ts dt
+ TT
(26)
M....,,,,, M, and G {Gtz] is a I Laplacian matrix. 11 = diag ( (s:) ). with u, = J₂(1 + / / (J/ representing
where {8,). 2 [z.) diag (J.} and A diag (,) for I,...,
the bump height of CANN i. & denote Gaussian white noises satisfying (E(1)E ((') = Iō(1 - 1'), and the noise strengths a - = 80/(3v3rm) of
By introducing new set of momentum variables y - -(uJ-1G/7 + A) A)s mmzz/ Eqs. 25
26 are re-organized as, ds Ts dt
= tt
(27)
dy Ts dt
Tz [(T, Ts
J--JJl G JJ'GG
yu yu-yy "y As ( Jj-'Ga A)s
m
Ta
+ o Doyy TzE,
(28)
where oy 2/ 2au/ /3///33/// (3v3m) (om)oy/s /-- Compared to 77 8), we see that by setting u/7- e = TT/TT [ - m) u/y + L A}, and the reciprocal connections between CANNs,
L J
(29)
the coupled CANNS with noisy adaptation implement HDF, and they sample the posterior distribution given by Eqs. 45) (Fig 3A; see SI.4), Notably, (q. shows that the correlation prior of (the Laplacian matrix
Eq. is stored the reciprocal connections between coupled CANNs, i.c..
G Gu>Ju L. The sampling dynamics Eqs. 2 (6) achieve that the sampled marginal distribution of each feature p(s;) by each CANN equals the corresponding marginal target posterior p(s; implying that coupled CANNs realize Bayesian inference in distributed way (see SI.4).
Following the same calculation in the one dimensional case, quantify the sampling speed of coupled CANNs by computing the smallest real-part of all eigenvalues of the drift matrix in Eqs. (27 28), which is given by (see SI.5)
1 Re 1/r=- m/T, + Q/T,- -IL/T.-m/555 m/r, Q/T,1² -0/((T.T))
(30)
2
where Q is the smallest eigenvalue of the matrix a -'L AA. It can checked that when m (VT./T= 2 the coupled CANNs achieves the fastest sampling speed. We carry out simulations to confirm the above theoretical analyses, and the results are shown in Fig

---

6 Conclusions and discussions
The present study explored how sampling-based Bayesian inference of continuous variables in CANNs is accelerated. We theoretically derived how noisy adaptation enables CANN to implement HDF, and elucidate that the adaptation effectively plays the role of momentum to speed up the sampling process. We systematically analyzed the sampling performances of the network and derived the condition when the adaptation has the maximum acceleration effect. All theoretical analyses are validated by simulation results. Furthermore, we studied coupled CANNs, where the reciprocal connections between CANNs store the prior correlations between features, and we showed that noisy adaptation accelerates distributed sampling in the high-ding sigh-dimensional feature space.
Sampling- -base inference a promising strategy to realize Bayesian inference in the brain, being consistent with the stochastic responses of neurons [T7 [8] 20). Several studies have investigated the issue of accelerating stochastic sampling in neural circuits. However, these studies have typically considered feature representation at the individual neuron level or their linear combination, and the sampling acceleration relies on asymmetric connections between neurons [5] or redundant representation of neuron group [25]. Here, we consider that continuous feature is represented by neuron ensemble jointly in the form of a CANN and the sampling acceleration relies on the adaptation of neuronal responses. Nevertheless, all these proposed mechanisms are not necessarily exclusive to each other. Rather, they are more likely complementary to each other to coherently speed up sampling various levels, which collaboratively implement hierarchical Bayesian inference in the brain. In order to elucidate the mechanism of accelerating sampling by adaptation analytically, we have only considered a linear Gaussian generative model, while neural systems may infer latent variables from very complicated generative processes and their posterior can be multimodal. We will therefore extend the current study to nonlinear generative models, such as the Gaussian scale mixture model [7 18 in the future work. We hope this study enhances our understanding of the sampling- based Bayesian inference in the brain.
On the stochasticity of the adaptation dynamics. our model, spike frequency adaptation (SFA) is used to implement adaptation. A number of mechanisms in biological systems can realize SFA, and three of them are often studied [45], which are: 1) the current caused by voltage-dependent high- threshold potassium channels; 2) the current mediated by calcium-dependent potassium channels; 3) the current caused by the slow recovery from in-activation of fast sodium channels. All these mechanisms depend on ion concentrations, release of neural transmitters, activation/inactivation of ion channels, buffering and diffusion, and all these processes are very noisy (see Fig.9 in (55)). Recent works also show that adaptation noises can play important computational roles (see, e.g., (56]). Indeed, previous modeling works rarely consider adaptation noises, since they focused on different things rather than the functions of adaptation noises. Here, show that adaption noises actually contribute to accelerate stochastic sampling.
Time scales observed in neuroscience experiments. In neuroscience society, it remains unknown yet the exact time cost for the brain performing Bayesian inference. The only known fact is that this process is extremely fast [57]. In monkey experiments, the electrophysiology studies revealed that the visual cortex can accomplish a probabilistic
pocision-making task in less than 800ms (58) and a contour integration task in less than 200ms [59]. If we plug in the biological relevant parameter value 5-10ms in the model, it gives that the sampling speed of HDF is around 100-200ms, while the speed of FLD is around 2-4s in a single CANN (see Fig B-CC). Henee, HDF is about 20 times faster than FL...
Acknowledgement
This work was supported by Science and Technology Innovation 2030-Brain Science and Brain-inspired Intelligence Project (No.202/2D0200200) Guangdong Province with Grant (No 200.20180000330001,,, the National Natural Science Foundation of China (No.4861425025. T.J. HuanH), and Beijing Academy of Artificial Intelligence.
10

---

References
[1] Marc O Ernst and Martin S Banks. Humans integrate visual and haptic information a statistically optimal fashion. Nature, 415(6870):429-433 2002.
[2] Konrad Körding and Daniel M Wolpert. Bayesian integration in sensorimotor learning. Nature, 427(6971):244 2004.
[3] Wei Ji Ma, Vidhya Navalpakkam, Jeffrey M Beck, Ronald Van Den Berg, and Alexandre Pouget. Behavior and neural basis near-optimal visual search. Nature neuroscience, 14(6):783, 201
[4] Yong Gu, Dora E Angelaki, and Gregory C DeAngelis. Neural correlates of multisensory cue integration macaque mstd. Nature Neuroscience, 11(10):100-11210, 2008
[5] Christopher Fetsch, Gregory C DeAngelis, and Dora E Angelaki. Bridging the gap between theories of sensory cue integration and the physiology of multisensory neurons. Nature Reviews Neuroscience, 14(6):429-442, 2013.
[6] Tai Sing Lee and David Mumford. Hierarchical bayesian inference in the visual cortex. JOSA A, 20(7):1434-1455 2003.
[7] David Knill and Alexandre Pouget. The bayesian brain: the role of uncertainty in neural coding and computation. TRENDS in Neurosciences, 27(12):712-119, 2004.
[8] Alan Yuille and Daniel Kersten. Vision bayesian inference: analysis by synthesis? Trends in cognitive sciences, 10(7):301-308, 2006.
[9] Wei Ji Ma, Jeffrey M Beck, Peter E. Latham, and Alexandre Pouget. Bayesian inference with probabilistic population codes. Nature Neuroscience, 911):1432-1438, 2006.
[10] Jeff Beck, Alexandre Pouget, and Katherine A Heller. Complex inference in neural circuits with probabilistic population codes and topic models. Advances in neural information processing systems, 25, 2012.
[11] Sabyasachi Shivkumar, Richard Lange, Ankani Chattoraj, and Ralf Haefner. A probabilistic population code based on neural samples. In Advances in Neural Information Processing Systems, pages 7070-7079, 2018.
[12] Patrik Hoyer and Aapo Hyvärinen. Interpreting neural response variability as monte carlo sampling of the posterior. Advances in neural information processing systems, 15, 2002.
[13] Lars Buesing, Johannes Bill, Bernhard Nessler, and Wolfgang Maass. Neural dynamics as sampling: a model for stochastic computation in recurrent networks of spiking neurons. PLoS computational biology, 7111):100221 2011.
[14] Agnieszka Grabska- Barnkkakkaaiikkaa, Jeff Beck, Alexandre Pouget, and Peter Latham. Demixing odors-fast inference in olfaction. Advances in Neural Information Processing Systems, 26, 2013.
[15] Guillaume Hennequin, Laurence Aitchison, and Máté Lengyel. Fast sampling- based inference in balanced neuronal networks. In Advances in neural information processing systems, pages 2240 2248, 2014.
[16] Laurence Aitchison and Máté Lengyel. The hamiltonian brain: efficient probabilistic inference with excitatory-inhibitee neural circuit dynamics. PLoS computational biology, 12(12), 2016.
[17] Gergö Orbán, Pietro Berkes, József Fiser, and Máté Lengyel. Neural variability and sampling- based probabilistic representations in the visual cortex. Neuron, 92(2):530 2016.
[18] Rodrigo Echeveste, Laurence Aitchison, Guillaume Hennequin, and Máté Lengyel. Cortical-like dynamics in recurrent circuits optimized for sampling-hase probabilistic inference. Nature neuroscience, 23(9): 138-1149, 2020.
[19] Yang Qi and Pulin Gong. Fractional neural sampling as a theory of spatiotemporal probabilistic computations in neural circuits. Nature communications, 13(1):1-19, 2022.

---

[20] Ralf M Haefner, Pietro Berkes, and József Fiser. Perceptual decision decision-making as probabilistic inference by neural sampling. Neuron, 90(3):649 660, 2016.
[21] Stuart Geman and Donald Geman. Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. IEEE Transactions on pattern analysis and machine intelligence, (6):721- 741, 1984.
[22] David H Ackley, Geoffrey E Hinton, and Terrence J Sejnowski. A learning algorithm for boltzmann machines. Cognitive science, 9())117-166, 1985.
[23] Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-II), II), pages 681-688, 2011.
[24] Xiang Cheng and Peter Bartlett. Convergence of langevin meme in kl-divergence. In Algorithmic Learning Theory, pages 186-211. PMLR, 2018.
[25] Cristina Savin and Sophie Deneve. Spatio-temporal representations of uncertainty spiking neural networks. Advances in Neural Information Processing Systems, 27, 2014.
[26] Radford M. Neal. MCMC using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, pages 113-162, 2011.
[27] Alexandre Pouget, Peter Dayan, and Richard Zemel. Information processing with population codes. Nature Reviews Neuroscience, 1(2): 132, 2000.
[28] Dishais R Lev Bar-Or, and Sompolinsky. Theory of orientation tuning in visual cortex. Proceedings of the National Academy of Sciences, 92(9):3844-3844 1995.
[29] Apostolos Georgopoulos, Andrew B Schwartz, and Ronald E Kettner. Neuronal population coding of movement direction. Science, 233(4771)::416-1419 1986.
[30] Kechen Zhang. Representation of spatial orientation by the intrinsic dynamics of the head- direction cell ensemble: a theory. The Journal of Neuroscience, 16(6):2112-2126, 1996.
[31] Bruce L McNaughton, Francesco P Battaglia, Ole Jensen, Edvard I Moser, and May-Britt Moser. Path integration and the neural basis the' cooniiiie map'. Nature Reviews Neuroscience, 7(8):663-678 2006.
[32] Yoram Burak and lla R Fiete. Accurate path integration in continuous attractor network models of grid cells. PLoS computational biology,
2009.
[33] Wen-Hao Zhang, Aihua Chen, Malte J Rasch, and Wu. Decentralized multisensory informa- tion integration in neural systems. The Journal of Neuroscience, 36(2):532 547, 2016.
[34] David J Field, Anthony Hayes, and Robert F Hess. Contour integration by the human visual system: evidence for a local "association field". Vision research, 33(2):173-193 1993.
[35] Wu Li, Valentin Piech, and Charles Gilbert. Contour saliency in primary visual cortex. Neuron, 5066):951-962, 2006.
[36] Tianqi Chen, Emily Fox, and Carlos Guestrin. Stochastic gradient hamiltonian monte carlo. In International conference on machine learning, pages 1683-1691. PMLR, 2014.
[37] Sam Roweis and Zoubin Ghahramani. A unifyyng review of linear gaussian models. Neural computation, 11(2):005-355, 1999.
[38] Wen-Hao Zhang, Tai Sing Lee, Brent Doiron, and Si Wu. Distributed sampling- bassed bayesian inference in coupled neural circuits. bioRxiv, 2020.
[39] Jean-Pierre Bresciani, Franziska Dammeier, and Mare O Ernst. Vision and touch are au- tomatically integrated for the perception of sequences of events. Journal of Vision, 6(5):2, 2006.
12

---

[40] Neil W Roach, James Heron, and Paul V McGraw. Resolving multisensory conflict: a strategy for balancing the costs and benefits of audio-visual integration. Proceedings of the Royal Society of London B: Biological Sciences, 273(1198):2159-2116 2006.
[41] Yoshiyuki Sato, Taro Toyoizumi, and Kazuyuki Aihara. Bayesian inference explains perception of unity and ventriloquism aftereffect: identification of common sources of audiovisual stimuli. Neural Computation, 19( (((1))3333--335) 2007.
[42] Don S Lemons and Anthony Gythiel. Paul langevin's 's 1908 paper "on the theory of brownian (""u la théorie du mouvement brownien," " er acad. sci.(paris) 146, 530-533 (1908)]. American Journal of Physics, 65(11):1079-10))
1997.
[43] Jiang Hao, Xu-dong Wang, Yang Dan, Mu-ming Poo, and Xiao-hui Zhang. An arithmetic rule for spatial summation of excitatory and inhibitory inputs pyramidal neurons. Proceedings of the National Academy of Sciences, 106651):2190-22111, 2009.
[44] Simon J Mitchell and R Angus Silver. Shunting inhibition modulates neuronal gain during synaptic excitation. Neuron, 38(3):333-444 2003.
[45] Jan Benda and Andreas VM Herz. A universal model for spike-frequency adaptation. Neural compulation, 15(1 ((11)):55332255 2003.
[46] CC Alan Fung, KY Michael Wong, He Wang, and Si Wu. Dynamical synapses enhance neural information processing: gracefulness, accuracy, and mobility. Neural computation, 2012.
[47] C. C Alan Fung, K. Y. Michael Wong, and Si Wu. A moving bump in a continuous manifold: A comprehensive study of the tracking dynamics of continuous attractor neural networks. Neural Computation, 22(3):752-792. 2010.
[48] Si Wu, Kosuke Hamaguchi, and Shun-ichi Amari. Dynamics and computation of continuous attractors. Neural Computation, 20(4):994-102; 2008
[49] Paul C Bressloff. Spatiotemporal dynamics of continuum neural fields. Journal of Physics A: Mathematical and Theoretical, 45(3):33300,, 2011.
[50] Si Wu, KY Michael Wong, CC Alan Fung, Yuanyuan Mi, and Wenhao Zhang. Continuous attractor neural networks: candidate of a canonical model for neural information representation. F1000Research, 5, 2016.
[51] Xingsi Dong, Tianhao Chu, Tiejun Huang, Zilong Ji, and Si Wu. Noisy adaptation generates 1évy flights in attractor neural networks. Advances in Neural Information Processing Systems, 34, 2021.
[52] K Wong, Si Wu, and Chi Fung. Tracking changing stimuli in continuous attractor neural networks. Advances in Neural Information Processing Systems, 21, 2008
[53] Sever Silvestru Dragomir and Melbourne City. Some gronwall type inequalities and applications. URL: http://rgmia. vu. edu. aa/SSDragomi/Weh himl, 2002.
[54] Wen-Hao Zhang, Si Wu, Krešimir Josić, and Brent Doiron. Recurrent circuit based neural population codes for stimulus representation and inference. bioRxiv, pages 2020-11, 2021.
[55] Angel Alonso and Ruby Klink. Differential electroresponsivennsss of stellate and pyramidal-like cells of medial entorhinal cortex layer ii Journal of neurophysiology, 70( 128-1144, 1993.
[56] Karin Fisch, Tilo Schwalger, Benjamin Lindner, Andreas VM Herz, and Jan Benda. Channel noise from both slow adaptation currents and fast currents is required to explain spike-response variability in sensory neuron. Journal of Neuroscience, 32(48):
2012.
[57] David C Knill and Whitman Richards. Perception Bayesian inference. Cambridge University Press, 1996.
[58] Hendrikje Nienborg and Bruce G Cumming. Decision-related activity in sensory neurons reflects more than a neuron's 's causal effect. Nature, 459(7243):89-92, 2009.
13

---

[59] Minggui Chen, Yin Yan, Xiajing Gong, Charles D Gilbert, Hualou Liang, and Wu Li. Incre- mental integration of global contours through interplay between visual cortical areas. Neuron, 92(3):682-694, 2014.
Checklist
1. For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope? [Yes]
(b) Did you describe the limitations of your work? [Yes] See Section 6
(c) Did you discuss any potential negative societal impacts of your work? [No] Our study fundamental in neuroscience and not tied to applications.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
2. If you are including theoretical results...
(a) Did you state the full set of assumptions all theoretical results? [Yes] See Section 2
(b) Did you include complete proofs of all theoretical results? [Yes] See Section 4.2 and
many detailed proofs are presented in Supplementary Information.
3. If you experiments...
(a) Did you include the code. data, and instructions needed to reproduce the main ex- perimental results (either in the supplemental material or as URL)? [Yes) We have included the code for reproducing the main results in SI.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] For the setting of hyperparameters, see SI.1.
(c) Did you report error bars (e.g.. with respect to the random seed after running experi- ments multiple times)? [Yes] We reported error bars in Fig/Zland Fig
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] We do not use GPU or CPU clusters, and sufficient to run our code on a laptop.
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators? [N/A]
(b) Did you mention the license of the assets? [N/A]
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
(d) Did you discuss whether and how consent obtained from people whose data you's 're using/curating? [N/A]
(c) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
5. If you used crowdsourcing conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, applicable? [N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
14


Reviews:
[{"review_id": "wcpRF9YAnJV", "reviewer": "Reviewer_3aPt", "summary": "The paper shows that a particular model of continuous attractors very relevant in neuroscience performs HMC sampling.", "questions": "N/A", "limitations": "It isn't clear how far the basic ideas here will extend (e.g. to learned representations, visual system etc.)  But it is definitely an approach worth considering in future.", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n* It is actually surprisingly hard to make rigorous connections between HMC sampling and real neural circuits.  In the Aitchison and Lengyel, they were for instance forced to use linear networks, without the spiking nonlinearity.  But they managed to make such a connection here!  The key innovation here was to consider HMC sampling over higher-level variables such as the location of the bump of activity, rather than considering e.g. firing rates themselves as the variables that HMC samples.\n\nThe key weakness is the need for clarification of the actual derivation of the equivalence, which is currently quite unclear.  Here are some specific issues (but my comments are not limited to these issues):\n* Eq. 15: no x on RHS. \n* Eq. 15/16 G() vs G[] (i.e. sometimes G has curly, sometimes square brackets)\n* The projection seems like the key step.  Can we give some flavour of how that works in the main text, and whether any assumptions go in there (e.g. linearity).\n* It would be worth exploring the biology.  Is there really this kind of adaptation present in e.g. head-direction cells?  That would seem strange, as it would destabilise the bump.  This mechanism would be a potential explanation.", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "lXVInxUzEPW", "reviewer": "Reviewer_YNCK", "summary": "In this paper, the authors address the question of how sampling-based probabilistic inference could be implemented in the brain. An important concern about sampling-based theories is that the sampling speed is too slow to be compatible with brain function. \n\nOne potential approach that circumvents the speed issue is Hamiltonian Monte Carlo (HMC) sampling. Previous works have shown that HMC can be implemented by a biologically plausible neural network with balanced excitation-inhibition among neurons. \nHere, they present an alternate neural implementation of HMC using a canonical network model called continuous attractor neural networks (CANNs). \n \nUsing a linear Gaussian generative model, the authors analytically show how the dynamics of a CANN are equivalent to HMC. Further, they show that adding a noisy adaptation term in the CANN dynamics accelerates the sampling process. They also show how this model could be extended to sampling from a multivariate Gaussian posterior. Finally, they present simulation results that confirm their theoretical analyses. ", "questions": "- There are certain assumptions placed on the form of the neuronal connection strengths, firing rate, adaptation, and external input for the CANN dynamics to be equivalent to HMC sampling for a linear Gaussian model. Are all of these biologically plausible? How would the dynamics change if any of these assumptions are relaxed? \n- Are there any thoughts about how this approach could be extended to multimodal, non-Gaussian distributions? \n- The speed-up observed here is relative to first-order Langevin dynamics. Could you provide a sense of how this compares with inference time scales observed in neuroscience experiments?\n- Clarifying question: in eq 2, where the prior is assumed to be uniform, is the support of $s$ finite? \n- Are there any concrete experimental predictions that could arise from this work? \n", "limitations": "There is no potential negative societal impact - the authors state that their study is fundamental in neuroscience and not tied to applications. \n\nThe authors also discuss the limitations of their work - the analytical results derived here and the simulations correspond to a linear Gaussian generative model. It would be interesting to see how their work could be extended to performing inference on more complicated, multimodal distributions. ", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "This work demonstrates how continuous attractor neural networks (CANNs) could implement Hamiltonian Monte Carlo (HMC) sampling. The authors show that (i) when the dynamics of the adaptation current in CANNs take the form of spike frequency adaptation, and (ii) CANN dynamics are projected onto the first two dominating motion modes, the resulting dynamics of the latent features are equivalent to HMC.\nIn figure 2 they also clearly show how varying the adaption strength results in different sampling regimes. In particular, the simulation results show how the sampling is sped up as the adaptation strength increases in the HMC regime. Overall, this is an interesting implementation of HMC with friction using CANNs. \n\nAs the authors mention in the discussion, the results presented here are for a linear Gaussian model. Real-world distributions are more complicated and often multimodal. It would be interesting to consider how the current approach could be extended to perform inference on more complicated distributions. \nIt would also be useful to provide a sense of how the speedup obtained here compares with inference timescales observed in the brain. \n\nThe paper is quite clear and the figures are very neat and well-annotated. \nHowever, there are a few minor typos and grammatical errors. ", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "FFEY-x_ia9Q", "reviewer": "Reviewer_mjGP", "summary": "In this manuscript the authors describe how adaptation can speed up posterior sampling in continuous attractor neural networks, a neural population model known to be capable of posterior sampling. Concretely, they show that the dynamics of networks with adaptation is equivalent to Hamiltonian dynamics with friction. This equivalence gives a theoretical justification why the methods with adaptation perform better than the ones without adaptation, which effectively implement (first order) Langevin dynamics. Furthermore, their theoretical analysis allows the authors to compute good parameter settings to sample from simple one and two dimensional Gaussians, which are confirmed in simulations.", "questions": "If the authors can show robustness in some way, i.e. that this works for other distributions, this would go a long way towards convincing me that their sampling method could work for other distributions where sampling is necessary.", "limitations": "---", "rating": 5, "confidence": 3, "soundness": 3, "presentation": 2, "contribution": 2, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "\nThe observation that an adaptation mechanism that pushes the sampling chain away from previously visited states can improve convergence speed makes intuitive sense and the derivations in the paper seem correct. Also, the formal connection to hamiltonian sampling with friction are interesting. However, parts of the theory and all of the evaluation are specific to Gaussian probability distributions, for which sampling is not strictly necessary. Thus, this paper is an interesting step towards understanding the dynamics of sampling networks, but not a big break through.\n\nConcrete points:\n1) I am generally worried that all theory here is implemented only for Gaussians and some of the parameters like the optimal and threshold adaptation strength depend on the input distribution. Computing with Gaussians really does not require sampling or a whole population of neurons arranged along the feature space. To make sampling sensible at least arbitrary distributions should be covered I think.\n2) The setup for the CANNs discussed here seems a bit odd, because the input current in itself already a representation of the distribution, which allows computation as discussed in the probabilistic population coding framework. It is unclear to me why one would want to sample from a distribution given in this format.\n3) Without a deep dive into the CANN literature, some of the derivations are extremely hard to follow. In particular, which properties are first derived here, which ones are taken from which older literature and under which assumptions these results hold is impossible to take from the manuscript alone. Here, the authors could definitely communicate more clearly.\n\n\nSmall points:\nIn (14) the standard deviation in the exponential is a, but should be Lambda.\n", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "0C2KfUkk8sN", "reviewer": "Reviewer_trHg", "summary": "In this work, the authors:\n- review Bayesian inference for linear gaussian models, as well as HMC\n- derive how the equations of a CANN with noisy adaptation is identical to that of HMC, with the appropriate substitutions, and how parameter regimes translates to sampling behavior\n- demonstrate how CANN with noisy adaptation converges to the true posterior (in mean, variance, and DKL) more quickly than without, in single and coupled networks", "questions": "- the work is motivated by the claim that naive Langevin sampling cannot work at perceptually relevant speeds due to its slow dynamics around the posterior mode. This is not strictly true, since speed can come at a cost of certainty, and it's unclear if FLD performs unreasonably (and unrealistically) poorly compared to human performance. While it's convincingly shown that higher adaptation (up to the derived max speed) increases sampling efficiency, I'm curious how the performance of both algorithms are when measured against absolute time, instead of in units of synaptic time constant tau_s (e.g., in Figure 2B). In other words, if one plugs in a reasonable value for tau_s (e.g., 5-10ms for AMPA receptors), would HDF actually achieve reasonable performance in reasonable time?\n\n- a critical component of the model seems to be the stochasticity in the adaptation dynamics (Eq13). To my limited knowledge, this is not a common assumption for CANNs, and is typically not included for adaptation dynamics in other models (such as spiking neuron). I would ask the authors to provide some evidence for why this assumption is justified (other than the currently cited \"biological systems is noisy\"). While SI3 provides some evidence that small deviations from the exact value of sigma_V is fine, perhaps a broader treatment is necessary, since one typically assumes the cell has near-perfect access to its own spike history (through calcium dynamics, etc)\n\n- my only concern wrt to originality / significance is, how different is this work from ref 16 & 18? In other words, does CANN need an entirely different treatment than from spiking networks, which is arguably a more difficult problem? This question stems from my naivety, but it would be good if the authors further discuss why CANN should be significantly different, perhaps from the perspective of adaptation (or something else)", "limitations": "very brief discussion of limitation is included, and while the robustness of model parameters (in relation to deriving an exact match to HMC) is discussed in the SI, it's worth mentioning again in the limitations, as well as other strong assumptions of the model. No discussion of societal impact (and none from my perspective)", "rating": 7, "confidence": 2, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "originality: spiking networks have been shown to approximate HMC sampling (in ref 16 & 18). The current authors extend this investigation  to rate-based bump attractor networks, which is commonly used in computational neuroscience. I don't know of other works on this particular topic of adaptation, though I'm not well read in this literature (but see https://www.biorxiv.org/content/10.1101/2021.03.15.434192v2)\n\nquality: at a superficial level and without re-deriving the proofs, I believe the work is of high quality, and that the results fully support the central claim of efficiency (but not necessarily the claim of biologically relevant speed, expanded below)\n\nclarity: overall, I find this paper to be of high quality, and very clearly presented, even for a relative outsider of the literature. The brief but concise review of Bayesian inference, HMC and CANNs touched on all the relevant background without unnecessary length, and I commend the authors for writing such an enjoyable paper and without assuming basic knowledge from the reader, since I learned much from reading it. The figures are also well-presented and with readable font sizes.\n\nsignificance: I believe this paper links two very interesting ideas: adaptation and neural implementation of probabilistic sampling, and will be of significance for a segment of the computational neuroscience community", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}]

Author rebuttal:

Decision: Accept