Complex priors and flexible inference in recurrent circuits with dendritic nonlinearities
Authors: Benjamin S. H. Lyo
Cristina Savin
Venue: ICLR 2024 spotlight (2024)
Keywords: computational neuroscience
probabilistic coding
neural sampling
priors
Primary area: applications to neuroscience & cognitive science

Abstract: Despite many successful examples in which probabilistic inference can account for perception, we have little understanding of how the brain represents and uses structured priors that capture the complexity of natural input statistics. Here we construct a recurrent circuit model that can implicitly represent priors over latent variables, and combine them with sensory and contextual sources of information to encode task-specific posteriors. Inspired by the recent success of diffusion models as means of learning and using priors over images, our model uses dendritic nonlinearities optimized for denoising, and stochastic somatic integration with the degree of noise modulated by an oscillating global signal. Combining these elements into a recurrent network yields a stochastic dynamical system that samples from the prior at a rate prescribed by the period of the global oscillator. Additional inputs reflecting sensory or top-down contextual information alter these dynamics to generate samples from the corresponding posterior, with different input gating patterns selecting different inference tasks. We demonstrate that this architecture can sample from low dimensional nonlinear manifolds and multimodal posteriors. Overall, the model provides a new framework for circuit-level representation of probabilistic information, in a format that facilitates flexible inference.

Published as a conference paper at ICLR 2024
COMPLEX PRIORS AND FLEXIBLE INFERENCE IN RECURRENT CIRCUITS WITH DENDRITIC NONLINEARITIES
Benjamin S. H. Lyo
Cristina Savin
Center for Neural Science New York University bl yoyyonyuuuc edu
Center for Neural Science, Center for Data Science New York University
csavinênyu.ed.
ABSTRACT
Despite many successful examples in which probabilistic inference can account for perception, we have little understanding of how the brain represents and uses structured priors that capture the complexity of natural input statistics. Here we construct recurrent circuit model that implicitly represent priors over latent variables, and combine them with sensory and contextual sources of information encode task-specific posteriors. Inspired by the recent success of diffusion models as means of learning and using priors over images, our model uses dendritic nonlinearities optimized for denoising, and stochastic somatic integration with the degree of noise modulated by oscillating global signal. Combining these elements into recurrent network yields stochastic dynamical system that samples from the prior at rate prescribed by the period of the global oscillator. Additional inputs reflecting sensory or top-down contextual information alter these dynamics to generate samples from the corresponding posterior, with different input gating patterns selecting different inference tasks. We demonstrate that this architecture sample from low dimensional nonlinear manifolds and multimodal posteriors. Overall, the model provides a new framework for circuit-leve representation probabilistic information, in format that facilitates flexible inference.
INTRODUCTION
The organization of past experience in the form of internal models is crucial for making sense of noisy and incomplete sensory information. The framework of Bayesian inference successfully formalizes this knowledge in terms probabilistic priors, and perception and action as probabilistic inference.
However, despite many successes in explaining behavioral (Mamassian et al. [002] Li al. 2003]
Gerardin et af.] 2010: Girshick et al., 2011: Wei & Stocker] 201 Ma 2012 Hahn & Wei
2022
Angeletos Chrysaitis & Series 2023) and neural (Zemel & Dayan 1998: Ma et al. 2006 Fiser et al.
2010 Savin & Denève 2014; Savin et al. 2014 Orbán et al.) 2016 Echeveste et al. 2020 Aitchison
al. 2021 observations through the lens of Bayesian inference, the circuit implementation such
computations remains poorly understood. In particular, we know relatively little about how priors are represented and the mechanics of how they affect perception.
Brain priors come in many flavors. For instance, priors over faces are structurally complex and invariant across tasks within subjects, despite substantial across subject variability (Houlsby et 2013). Such structural priors reflect natural world statistics; they allow for efficient learning and powerful generalization across a range of tasks (Gerardin et al.] 2010 Houlsby et al. (013). In contrast, contextual priors relatively lived and adapt to reflect the needs of the task at hand (Seriès Seitz, 2013 Darlington et al. 20. Due to these differences, is possible for different types of priors to have different neural representations (Rullán Buxó & Savin 2021 and be accessed through separate neural mechanisms during inference.
Neural representation of priors generally assumed to be implicit, with the exact form reflecting different schools of thought on neural correlates of uncertainty (Ma et al., 2006) FFser et al. (2010). One set of models take the view that priors are represented in the stimulus encoding population,

---

Published as a conference paper at ICLR 2024
with more neural resources dedicated to higher probability stimuli (Fischer & Peña 2011 Girshick et al. 2011 Ganguli & Simoncelli 2014; Bredenberg et al. 2020). The (log) prior could also be encoded in separate subpopulation. e.g. in the form of a probabilistic population code and then linearly combined with the (log) sensory evidence (Ma et al. 2006). These theoretical schemes focus largely on the probabilistic representation of a single, one-dimensional stimulus feature, and cannot be readily generalized to the high-dimensional structured priors needed for representing natural stimuli (Houlsby et al., 2013 Durrant et al. 2023). Such complex distributions can be represented in stochastic recurrent circuits whose activity over time encodes samples from the posterior distributions (Hoyer& & Hyvärinen 2002] Fiser et al.) 2010). or- or-in the limit of vanishing sensory evidence samples from the prior (Berkes et al. 2011). In this neural sampling framework, prior information is implicitly encoded in the recurrent collaterals between the neurons that encode the inferred latents. However, the worked out examples of neural sampling dynamics have so far been restricted to priors and posteriors with relatively simple structure, c.g. Gaussian scale mixtures to account for statistics of gratings in early vision (Orbán et al. (2016), multimodal distributions to model bistable percepts (Reichert et al., [201]] Savinn et al. (014). Finally, some priors could be encoded downstream of sensory representations (Mal 2012). affecting perception through feedback mechanisms akin to attention (Whiteley& & Sahani, 2012), although the circuit implementation of such effects remains underspecified. Overall, we are still missing circuit level models of probabilistic computation that capture the statistical complexity of natural priors and their flexible use across tasks.
The problem of representing complex nigh-dimensional distributions has close correspondents in machine learning. For example, digital images lie in a high dimensional pixel space, yet not all points in this space correspond to veridical images. Within this huge ambient dimensionality, naturalistic images trace low dimensional nonlinear manifolds, whose local coordinates represent continuous deformations or intensity variations. Among recent machine learning attempts at modeling such structure, diffusion models have emerged as particularly expressive and stable generative neural network models "Sohl-Dicksteii et al. 2015| Kadkhodaie & Simoncelli] 2020: Ho et al. 2020), outperforming previous generative solutions such VAEs, normalizing flows and GANs the task of image synthesis (Dhariwal & Nichol 2021). Their training involves local denoising operations, which can translate into relatively simple local learning objectives (Raphan & Simoncelli 2011 1). Furthermore, they can be combined flexibly with different likelihoods to support inference (Sohl- Dickstein et al., 2015] Kadkhodaie & Simoncelli 2021 Song & Ermon 2019 Nichol & Dhariwal 2021). Taken together, these features make diffusion models a valuable source of inspiration for building new classes of neural circuits for probabilistic computation.
Here we adapt several ideas developed in the context of diffusion models to construct a recurrent eircuit model that can implicitly represent sensory priors and combine them with other sources of information to encode task-specific posteriors. Our solution relies on dendritic nonlincarities, optimized for denoising, and stochastic somatic activity modulated by a global oscillation that determines the effective rate of sampling. Additional inputs into the circuit which provide sensory or top-down contextual information shape the dynamics to generate samples from the corresponding posteriors. In simulations, we demonstrate several scenarios of prior and posterior encoding, including nonlinear manifolds embedded in a higher dimensional ambient space as priors and several likelihoods corresponding to bottom-up and top-down evidence. We also identify potential neural signatures of such probabilistic inference that might be testable experimentally. A software implementation of the model is available at attttps::/ / //g thub. com Saann///aiiiii -aw--aaaaaaaeeaaaaaeaeaaee
2 ENCODING COMPLEX PRIORS IN RECURRENT NEURAL CIRCUITS
Representing priors with diffusion models. Diffusion models (DMs) are generative neural net- works that develop an implicit representation of data statisties by learning to denoise noisy versions of the data across multiple noise levels (Sohl-Dickstein et al.) 2015 Kadkhodaic & Simoncelli 2020 Ho et al. 2020). While there is more than one way to describe DMs, the essence of the process involves predetermined forward process, which iteratively adds noise with known statistics to the input, and a learned reverse process which aims to "undo" the effects of the added noise.
Formally, the forward process transforms N W-dimensional samples from data distribution {xo} p(x,), e.g. natural images, by progressively adding small amounts of Gaussian noise over a number of steps A following pre-determined variance schedule (ax) E (0, 1) that increases in magnitude
2

---

Published as a conference paper at ICLR 2024
A
forward process
reverse process
B
C
D
Uiobal cxolluior
WV
forward process
reverse process
mathcoreertrent
sampling
G
buth neural sampling
sample auroccrrt
datt mesiold
descending phase
2.00
ascending phase
6.2
X
neural sampling
-002
16
60
1001
(cycles)
latent variable
Figure 1: Diffusion models and their eircuit implementation. (A) Simulated diffusion example for two dimensional data distribution (yellow). Data samples from the manifold (gray dots) are corrupted by increasing levels of noise (blue), while the reverse process pushes the samples back onto the data manifold by recursively removing some of the noise (red). (B) Graphic summary of the two core DM operators: forward process adds noise with a predefined variance; dataset-specific reverse process removes the noise bring the output back to the image manifold. (C) DM sampling starts from random points the state space (gray dots), drawn independently from a standard Gaussian. The reverse process pushes these points back onto the manifold, resulting into independent samples from the data distribution. (D) Cartoon of a neural circuit encoding nonlinear low dimensional manifold embedded recurrent connections between nulti-comprttment neurons (gray triangles), each consisting of dendritic tree with optimized weights and ReLu nonlinearities, modulated by a global oscillatory signal. (E) Graphic summary of sampling in the neural circuit: starting from valid point on the manifold, increasing amounts of noise due to the neural dynamics push the network manifold, followed by the regular reverse process whose attractor forces brings the dynamics back on manifold, resulting in a new (potentially correlated) sample from the prior. (F) Neural sampling alternates between descending phase which pushes points off the manifold through increase in noise (blue trajectories), and an ascending phase, where attractor dynamics draw samples towards the manifold (red trajectories). (G) Numerical validation of neural sampling for the swiss-roll example. Left: autocorrelation function of the neural circuit generated samples. Right: marginal density recovery along the uniform dimension.
larger neural feature space ("swiss-rolll" The network includes all-to-all
with index À = 1,... A. Across these steps, noise gradually accumulates to ultimately overwhelm the signal, and the image distribution morphs into standard N d-dimensional multivariate Gaussian (Fig. [A, B; blue). Each step of this process corresponds to the application of stochastic forward transition operator that maps noisy versions of the data sample XX-1 into noisier versions XX.
p(xx xx-1)
N(xx; vI TAXA-1,
Analogously, the reverse process involves series of applications of Gaussian reverse transition operator that partially denoises noisy versions of the image X into less noisy versions X, (Fig. TA B; red),
pe [xx]
xx+1) A Mo (xx-X 11 A),
The mean of the reverse transition operator p4 (xx++11, A) is parameterized by a feedforward neural network that takes input the noisy image from the previous iteration Xx+1 and the current noise index A, with a matching, but reversed, variance schedule. The network learns this iterative mapping by optimizing a denoising objective that minimizes the reconstruction error, equivalently, the 1.2
3

---

Published as a conference paper at ICLR 2024
distance between the estimated and true noise present in the image:
C = [1,] xo. <x
||| P (Xx, Ex) (x 1
(3)
|||ex [1,
Ex A)]
(4)
where 6A NO(,,) T), وi is the mean of the forward transition operator step À when conditioned on a clean image Xo, and Eg is the network's estimate of the noise present in the noisy image. This objective is equivalent to learning the flow field associated with the score of the reverse transition operator at every noise level Vxa p(x> XX+1) (Hyvärinen 2005 Vincent 2011). At the end of training, the model can generate novel sample images from the same distribution, by starting with i.idd. multivariate Gaussian noise and iteratively applying the reverse transition operator following the same variance schedule, Each run of this procedure generates a new independent image sample.
A catuusioonbbsed circuit for sampling- based probabilistic computation. Several properties of diffusion models seem appealing from a biological perspective. In particular, the iterative nature of the operations make them naturally map into recurrent circuit dynamics. In this view, the data distribution follows a nonlinear manifold attractor, embedded in the N-dimensional space of sensory features encoded by the network (not necessarily image pixels). The forward process injects noise that pushes data samples away from the manifold, generating signals for learning, while the reverse process implements denoising. Here, we chose to focus specifically on the circuit dynamics and the mechanism for sample generation. We leave the learning aspect of the problem for future work.
recurrent circuit can implement something akin to the DM reverse process, by assuming that the the nonlinear reverse operator po (xx Xx+1] is computed in the dendritic trees of a set of N cortical pyramidal neurons. At each time step, nonlinear dendritic computations (Poirazi et al., 2003 Polsky et al.] 2004; Jadi et al., [014]] Ujfalussy et al. 2018) yield somatic currents that reflect the mean of the Gaussian transition operator μig. which is subsequently corrupted by somatic noise. As an analogue for the variance schedule, we introduce a global time-varying signal Br E (0, 1) which modulates the nonlinear operation of the dendrites and the magnitude of somatic noise. Mechanistically, this type of modu lation could be implemented by local inhibitory subunits (Murayama et al. 22099 Roux & Buzsáki 2015). We adopt the convention of associating increasing 39, with a reduction in noise, although this choice is somewhat arbitrary. Scalar Se is sinusoid which fluctuates over time between 0 and 1, in anti-phase to the DM noise schedule ax, to account for the fact that downstream circuits read out information at the peak of the local oscillation (Savin et al. 2014
1 (
12T
0 01
8, = 2
1 +
cos
(5)
σ 01
where T is the number of time steps in a cycle. Putting everything together, recurrent circuit dynamics take the form X++1 = (x, (3)) + (1 11--30 B,)),, where f(-.)) reflects the nonlinear function computed by the dendrites, itself modulated by the global oscillation, and 6, ~ NO0, 7) are i.i.d. samples from an isotropic Gaussian. Following Poirazi et al.] (2003), dendritic computations are modeled using a tree-structured artificial neural network (ANN), whose parameters we train via gradient descent using the standard DM denoising objective (Fig. (D). Unlike previous ANN-based models of dendritic processing, we use ReLU nonlinearities to facilitate training, with the shape of the dendritic tree parameterized by its depth and branching factors at each level This aoologicallymmoivvan represents an architectural departure from standard DMs, which assume all-to-all connectivity. The ability to represent priors is relatively robust to variations in tree geometry, although learning speed can vary with architecture. In partieular, varying tree depth and width while keeping the total number of parameters constant identifies shallow architectures Suppl. B.I.. This implies that one can determine an optimal architecture for encoding any given prior, with potential implications for cortical dendritic morphology.
solution
the fastest learners in our example (see
Another key distinction between traditional DMs and biology is the initial condition for the reverse process during sampling. In DMs, initial conditions are drawn independently from standard Gaussian, which would yield unrealistic state jumps in the circuit dynamics. In contrast, in the recurrent circuit the same neural units need to support the dynamics all times. As result, the same neural transition operator, Pa (x(x x;-1) := A (x;: He. (1 - T)) but under an increasing
Unless otherwise specified, simulations use depth of 7 and branching factor of 3, except in the most proximal section, which has branching factor 4.
4

---

Published as a conference paper at ICLR 2024
noise schedule to reinitialize the reverse process and generate another sample from the prior (Fig. LE). If we were to use the DM forward process for this operation, the end effect would be statistically equivalent to the original (since noise dominates the signal, by construction, the initial conditions are forgotten). The proposed neural dynamics do not necessarily come with the same mathematical guarantees, but they do significantly simplify the circuit's operations. In this scheme, sampling from the prior entails running the same stochastic nonlinear recurrent dynamics, at a pace set by an oscillatory 3e signal, with one new sample from the prior generated once per cycle (Fig. ( The precise structure of these oscillations can be relaxed to account for frequency and amplitude fluctuations seen biologically (Suppl. Sec. B.5).
We numerically tested the quality of the samples generated by our neural circuit in a toy example of a woo-dimensional nonlinear manifold (shaped as a "swiss-roll", see Fig. [ inset) with linear dimen- sionality 3, embedded in an ambient feature space with dimensionality N 10. This simple example both captures the essence of priors of interest (i.e., nonlinear low-dimensional manifold embedded in larger feature space) and is simple enough exploit its structure when assessing the quality of the generated samples, something which is generally difficult for complex distributions (Theis) et al.] 2016). First, we tested the effects of the neural approximation the autocorrelation function of the generated samples and found that this remains steadily around zero even with the shortest lags (Fig. [G left), proving that, despite the approximation, the generated samples are essentially independent. Second, to test the variability of the generated samples we numerically estimated the density along the curved axis of the manifold, which-by construction-haat a uniform distribution. We found that the empirical density constructed using the neural samples closely matched the ground truth (Fig. (T.). This is also true for the marginal along the orthogonal dimension (Suppl. [.2).. While the quality of samples is harder to estimate, we also find good quality representations of high dimensional prior trained on the MNIST dataset (Deng, 2012) (see Suppl. B.6). Overall, these results indicate that the constraints imposed by biology may have a minimal effect on the quality of neural sampling as compared to traditional DMs.
A
B
condedhua
postorior reverse process
CUIS
Bardung
Pe |
neural Sonaee
graphical model
top-down
contextual signats
Po(s| x
divergence
V/yhvl
bottom-up
sentsory sigrials
noural circuit
sensory
abservations
Vx, Jog Xc-1)
Vx. JorEp(s N²)
ascending
Figure 2: Posterior inference. (A) Graphical model illustrating dependencies between latent variables and sensory inputs s. (B) Extended neural circuit for flexible inference: prior dynamics reshaped by external signals due to either bottom-up sensory observations (green) and/or top-down contextual cues (purple). These inputs are themselves modulated by the state of the circuit, through inter-area interactions. (C) Snapshots of posterior samples during the reverse process for the diffusion model (top) and the neural circuit (bottom) under the influence of bottom-up up sensory signals. (D) Flow fields corresponding to prior (left) and a linear gaussian sensory likelihood (right; shaded green area Isd). (E) Quantification of the cost of approximating the likelihood when sampling using DM (top) or neural circuit (bottom) dynamics, measured by the KI. divergence between the true posterior (evaluated at (2) and the approximate posterior (evaluated at x;-1).
II all simulations we initialize the dynamics randomly and discard the first cycle as burn-in period.
5

---

Published as a conference paper at ICLR 2024
3 FLEXIBLE INFERENCE
Using the same prior-encoding circuit for inference. Machine learning has proposed several algo- rithmic solutions for combining DM-based prior representations with different likelihood functions, with practical applications such as in-painting, super-resolution, compressed sensing, or class-specifer conditioning DSohl-Dickstein et al. [2015] Dhariwal & Nichol 202T] Kadkhodaie & Simoncelli [02T]] Song & Ermon 2019: Ho & Salimans 2021). In order to maximize the flexibility of our circuit implementation, we take advantage of a modular approach that reuses the dynamics that sample from the prior to do flexible inference. In particular, posterior samples constructed by altering the flow-fields of the DM-prrior in the form of state-dependent additive changes to the DM reverse transition operator (Sohl-Dickstein et al. 2015 Dhariwal & Nichol 2021).
In general, our approach entails defining a posterior neural transition operator which reflects how additional evidence changes the beliefs about the represented latent variables (Fig 24). Formally, posterior sampling dynamics take the form (see Suppl. A. for derivation):
p(x; x) == (x + 7(1 - -: (x y), (1 3.))..
(6)
where the effects of the prior are reflected in the mean peg, before. but shifted by the (log)likelihood
gradient gr (x y) = Vx_., log (s x;-1), which, unlike Dhariwal & Nichol (022)) is evalu- ated with respect to noisy data sample at the previous time step x, Scalar that weighs the relative contribution of the log prior and log likelihood. This hyperparameter is set to in (Shh--Dickstenn et al. (2015) and varied in Dhariwal & Nichol (202T) to optimize trade-off between sample fidelity and diversity (here,
hyperparameter
1). The relative influence of the additional evidence on the circuit dynamics varies across the cycle, scaled by (1 3r)). Mechanistically, this solution means that the local recurrent circuit representing the prior receives an external input drive, itself gated by the global oscillation, which shifts circuits dynamics sampling from the corresponding posterior. The nature of the input signal is specific to each of the sources of evidence, and implemented in separate feedforward sub-circuit, which interacts bi-directionally with the primary recurrent network. At each timestep, the sub-circuit receives the activity of the recurrent network from the previous timestep and returns an input drive that added to the somatic current of each neuron in the recurrent network. Functionally, this sub-circuit implements the computation of gr (x (Fig. functional form of this circuit is problem specific, determined either in closed form (see sensory inference example below), or itself learned (c.g., in the context example). Different sources of evidence can operate in parallel by providing their own additive contribution to the circuit drive.
BB), The
Inferring latents from sensory evidence. As a first concrete example of inference, we show a simplified version of sensory perception task in which the input is only partially observed and the corresponding features need to be inferred given this incomplete observation (as would be the case in occlusion, for instance). In particular, we take the sensory observation to induce linear constraint on the latent variable (N = 2 for easy visualization), M. (x xe) = O, parameterized by a unit norm uncertainty around it (Fig right). Formally, the corresponding likelihood score is orthogonal to the constraint manifold and linearly rescaled by distance to it, g (x, 8) = J/2 M. (x,-1 x,); parameter o, defines the degree of sensory uncertainty. As was the case for the prior, the DM implementation of this inference problem generates samples starting from the isotropic N N-dimensional Gaussian, with the posterior reverse dynamics bringing the samples towards the posterior, here concentrated at the intersection of the two manifolds corresponding posterior dynamics find a similar solution (Fig. _C, bottom), but with initial conditions reflecting the likelihood. This is due to the sequential sampling process which has the same dynamics operating in both forward and reverse phases of the oscillation, and to the fact that the likelihood is gated oppositely to the prior (due to the - 3, scaling, see Eq. (6).
linear operator M, and offset xx, with maaussinnddistrbbun
the prior and likelihood, respectively (Fig. ZC, top). The neural
When it comes to inference, the sampling dynamics of the neural circuit approximate DM posterior dynamics in two important ways. First, as for the prior, they introduce sequential effects due to the continuous use of the same operator across all phases of the cycle. Second, the computation of the likelihood is itself approximate, as g: is evaluated at point X;- instead of the μo (xx required in the original posterior flow field derivation (Sohl- Dickstein al. 2013 Dhariwal & Nichol 2021). This switch was needed to account for temporal causality and the fact that the sensory area providing this input does not have access to local somatic currents (x) ). In principle, both effects should

---

Published as a conference paper at ICLR 2024
diminish with finer discretization of time, but we also numerically quantified the effects of each approximation individually (Fig. - top) and together (Fig. (Fig.2E, bottom). In particular, we collected samples generated according to either the DM reverse operator (using (x{x) the neural posterior sampler (using x(-1). We quantified the similarity of the resulting sample distributions as a function of Br, using naive KI. divergence estimator (10000 samples each, with space discretized into 225 bins). We found that discrepancies between the distributions are largest at the start of the reverse process. In this regime, the noise and flow fields are large leading substantial differences between x,-1 and no (x (Fig. E top). In principle, this might lead to catastrophic accumulation of errors and large sampling biases; however, the attractor dynamics prevent this from happening. The effects of the approximation reduce over the cycle, with the KL divergence approaching zero We see largely the same effects when the neural likelihood approximation used in conjunction with the neural prior approximation (same operator throughout; Fig. 2 bottom). Overall, these numerical results suggest that, at least in the simple toy examples considered here, the effects of neural approximations on inference are minimal.
Inference with multiple sources of information. The main benefit of separating the neural substrates implementing the prior from the computation of the likelihood is that it makes inference flexible. Gating signals from different sources of evidence allows the model to reuse the same prior information across multiple tasks. Beyond the sensory example above, another important source of evidence that shapes perception/inferee inneonnnniieeenneeeeeeeeee comes from contextual priors, reflecting expectations about which of the latent features are likely to occur (e.g. attention). To illustrate this idea, we introduce a discrete context random variable, whose value leads to different expectations about the latent variable x, formally making the prior a mixture of ID manifolds, with data uniformly distributed 3 This additional complexity does not affect the neural dynamics sampling from this prior (Fig. 3 bottom), but allows us to demonstrate richer inference scenarios.
along each (Fig. 34, top)
Sampling from the context conditioned posterior p(x[c) proceeds very similarly to the sensory inference example above, but the drive to the circuit is given by a separate top-down feedforward sub-circuit which implements different (x(x, c) = Vx log (c x,-1)xx=x--= responding flow field and posterior samples are shown in (Fig. BB), where we see the dynamics being strongly attracted to the region of the latent space corresponding to the cued context (the 'S' manifold). Finally, top-down contextual signals can be combined with the bottom-up sensory evi- dence (Fig. 33) to jointly constrain the posterior distribution from which we draw samples (Fig. [P)) When multiple sources of evidence, y() are available, their net effect the likelihood combines additively, ge (x E, "g." (x.-1. ()). This modular parametrization is at the root of the circuit's 's inferential flexibility, with individual components gated in or out depending on availability of information and current task demands (Womelsdorf et al. 2014 Kuchibhotla et al. 2017).
The cor-
NEURAL SIGNATURES
One unique feature of the inferential process proposed here is how the phase of the circuit oscillation modulates the relative contribution of different inputs to the circuit. At one extreme (3, = 0), the effect of the local attractor dynamics is weak and the corresponding prior unstructured, with neural activity dominated by the likelihood component. At the other extreme (3, 1), the effect of the likelihood on the dynamics is weak, and neural activity corresponds to samples from the posterior (Fig. [A see also Eq. (6. This dialing up and down of different sources of evidence opens the door for experimental validation of the model. Concretely testing such dynamics involves assessing patterns of population activity during perception, at different phases of the dominant circuit oscillation, as samples from the intermediate posterior. Samples from the prior p(x) can be obtained from spontaneous activity, in the absence of sensory stimulus and outside a specific task context, while a reasonable measure of the effects of the likelihood is given by the activity at the lowest phase of the posterior dynamics, p(x; ly, Br 0). Given these statistics, the change in the contribution of the likelihood and the prior on this posterior can be estimated as the KL divergence between the activity of the circuit during inference, and these two reference distributions. The precise assessment of differences between potentially complex and structured distributions based on
'The ambient space is 2D, for simplicity. NNte here that the direction of the conditioning is switched from the natural causal one, which means that this map can be learned from labeled examples by optimization (see Suppl. A. for derivation).
7

---

Published as a conference paper at ICLR 2024
B
S
V., loga/x, (2--1)
S.. ogple 01 |x;
Vs, ltg Me)
V., logp(s. 1,-111800
S
S
p(o)
pix [8)
pix s.c - 21)
Figure 3: (A) Flow fields (top) and samples (bottom) from an example prior mixture distributions, with individual components uniform distributions along low dimensional nonlinear manifolds. (B) Likelihood flow field and samples from the corresponding context-condition lihood flow field and samples from the corresponding sensory conditioned posterior. (D) Posterior flow field and samples from posterior conditioned on both sensory evidence and context.
posterior. (C) Like-
B
KLipossirier [lbehood)
ahergoncs
08 1.0
Figure 4: (A) Relative contribution of the prior and likelihood scores during the neural forward and reverse processes. (B) Fluctuating similarity of neural activity to the likelihood (top) and the prior (bottom) over the ascending phase of the oscillation 3. Distance between sampled distributions measured by naive histogram-ban based KL divergence estimator.
empirical measurements may seem impractical, but there is precedent in the literature for estimating KL. divergences in population activity statistics using coarse discretizations the space (e.g. temporal binning and thresholding of multiunit activity) (Berkes al. 2011). For simplicity, here we draw 10s from each distribution, discretize the latent space into 400 bins and compute naive estimate just based on the resulting histograms, although more sample efficient estimators are certainly available (Nemenman et al.) 2001). Despite the coarseness of the measure, the intuition about the effects of 3 holds: population activity statistics become increasingly similar to the prior, and dissimilar from the likelihood, over the ascending phase of the oscillation (Fig. 4B). With more precise understanding of the mechanies of gating different type of signals into the circuit, could further envision causal manipulations that precisely bias the outcome in one or the other direction.
5 DISCUSSION
Natural sensory inputs are often structured into complex nonlinear manifolds high dimensions
(Carlsson et al. 2008 Fefferman et al. 2016 Gorban & Tyukin 2018 Brown al. 2023). How
8

---

Published as a conference paper at ICLR 2024
does the brain represent such prior knowledge and uses it across tasks? Conceivably, one could solve this problem by learning a mapping between stimuli and responses de novo for each task. However, a more efficient representation would consolidate and leverage universally useful information across tasks. Here, we have proposed a circuit implementation of across-task inference in which a common prior is encoded in the form of recurrent neural circuit with dendritic nonlinearities optimized for denoising. The stochastic dynamics of this circuit provide samples from the prior at the peak of an ongoing local oscillation, while additional inputs (carrying sensory or contextual information) switch the dynamics to sampling from the corresponding posterior. This solution offers the first circuit model for reusing priors across tasks, as seen behaviorally (Houlsby et al., 2013). and has measurable neural signatures based on neural population recordings in animals.
Theories of probabilistic brain computation hased on neural sampling suffer from two main practical challenges. The first is time, as estimating posterior expectations for decision making requires integrating samples over time (Rullán Buxó & Savin, 2021). This makes the speed of sampling key constraint on plausible neural sampling dynamics (Hennequin et al. 2014 Savin & Denève 2014 4
Aitchison & Lengyel 2016; Masset et al. 2022). Second, although in principle sampling makes
most sense for distributions with complex structure that cannot be well-represented parametrically
(Fiser et al. 2010), in practice circuit models of sampling tend to be restricted to relatively simple distributions (Chen et al. 2023). The dendritic nonlinearities and DM-inspired oscillatory sampling schedule in our solution naturally overcome both limitations: by construction, the circuit is designed to sample from complex distributions, c.g. involving low dimensional nonlinear manifolds embedded in high dimensional spaces, and mixture distributions with low probability gaps between the components, which pose fundamental challenges for classic Markov Chain Monte Carlo approaches (Aitchison & Lengyel| 2016). Also by construction, DMs are designed to provide independent samples from the target distribution at the end of each reverse run, something that our neural circuit approximation seems to preserve to a large degree.
The specific role of oscillations in sampling resembles a previous model of sampling in the hippocam- pus (Savin et al. 2014) inspired by tempered transitions (Neal 1996). In this view, /3 functions as an inverse temperature annealing the target distribution so as to reduce the gap (and thus increase the likelihood of transitions) between modes; this may inform the theoretical analysis of the sampler's s properties. Additionally, theta oscillations naturally set the tempo in the hippocampus, which may instruct the experimental validation of our proposal. The concrete approach for testing our experimen- tal prediction was strongly influenced by Berkes et al.] (201T), who originally used KL. divergences to measure the calibration of (sampling based) probabílistic models of early vision over development. While segregating the responses by oscillatory phase brings additional data and estimation challenges, the Berkes result, together with the evidence of hippocampal theta phase sampling from [Savin et al.) (2014), provides reassurance that experimental validation of the model might be possible in practice.
While our proposed solution relies on nonlinearities in the dendrites as an implementation of the reverse operator, it is not clear that this is the only way to map DM operations to biology. In principle, the computations at each timestep could be carried out by small feedforward subnetwork, recursively interacting between them. This version has the advantage of fewer restrictions on the architecture, but requires additional biological accommodations. be distributed equally in all the neurons of the network (as opposed to just the last layer in DMs and our solution). Computationally, this solution remains viable (Suppl. [B.4). although the architecture is arguably more contrived. Models of learning might better distinguish between these architectures in the future.
particular, for consistency noise would need to
Here, we have purposefully abstracted away the nature of the features, so that the modeled circuit could be any processing stage in the cortical hierarchy. receiving evidence from one or several sensory domains bottom-up, and contextual top-down information from higher areas. This modular architecture opens the way for hierarchical probabilistic representations, by stacking such recurrent circuits with appropriate conditioning between them (Qiang et al., (023). Such an architecture would also help limit the computational complexity of the neural nonlinearities involved in any stage: pixel-level DMs models of images are huge, with parameters on the order of billions (Ramesh) et al. 2021 Saharia et al.) 2022). but models of abstract image features are likely more tractable. Future work on hierarchical sampling neural circuits might lead not only to better accounts of brain representations but also to more compact machine learning models.

---

Published as a conference paper at ICLR 2024
REFERENCES
Laurence Aitchison and Máté Lengyel. The Hamiltonian Brain: Efficient Probabilistic Inference with Excitatory-Inhibine Neural Circuit Dynamics. PLOS Computational Biology, :2(12):e December 2016.
Laurence Aitchison, Jannes Jegminat, Jorge Aurelio Menendez, Jean-Pascal Pfister, Alexandre Pouget, and Peter Latham. Synaptic plasticity as Bayesian inference. Nature Neuroscience, 24(4): 565-571, April 2021.
Nikitas Angeletos Chrysaitis and Peggy Seriès. 10 years of Bayesian theories of autism: A compre- hensive review. Neuroscience & Biobehavioral Reviews, 145:105022, February 2023.
Pietro Berkes, Gergö Orbán, Máté Lengyel, and József Fiser. Spontaneous Cortical Activity Reveals Hallmarks of an Optimal Internal Model of the Environment. Science, (6013))3: 87, January 2011.
Colin Bredenberg, Ecro Simoncelli, and Cristina Savin. Learning efficient task-dependent representa- tions with synaptic plasticity. In Advances in Neural Information Processing Systems, volume 33, pp. 15714-15724. Curran Associates, Inc., 2020.
Bradley C. A. Brown, Anthony L. Caterini, Brendan Leigh Ross, Jesse C. Cresswell, and Gabriel Loaiza-Ganem. Verifying the Union of Manifolds Hypothesis for Image Data, March 2023.
Gunnar Carlsson, Tigran Ishkhanov, Vin De Silva, and Afra Zomorodian. On the Local Behavior of Spaces of Natural Images. International Journal of Computer Vision, 76(1):1-12, January 2008
Shirui Chen, Linxin Preston Jiang, Rajesh P. N. Rao, and Eric Shea-Brown. Expressive probabilistic sampling in recurrent neural networks. arXiv, (arXiv:2308.1 11809), August 2023.
Timothy R. Darlington, Jeffrey M. Beck, and Stephen G. Lisberger. Neural implementation of Bayesian inference in a sensorimotor behavior. Nature Neuroscience, 21(10))1442-1453 October 2018.
Li Deng. The mnist database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6):141-143 2012.
Prafulla Dhariwal and Alexander Nichol. Diffusion Models Beat GANs on Image Synthesis. In Advances in Neural Information Processing Systems, volume 34, pp. 7780-8794. Curran Associates, Inc., 2021.
Thomas Durrant, Yul Kang, Daniel Wolpert, and Mate Lengyel. Here, there, but not everywhere: mul- timodal belief's captured by population code during navigation. Bernstein conference proceedings, 2023. doi: 10. 27751/nnn.bcc22.
Rodrigo Echeveste, Laurence Aitchison, Guillaume Hennequin, and Máté Lengyel. Cortical-like dynamics in recurrent circuits optimized for campling-based probabilistic inference. Nature Neuroscience, 23(9):113-1111
September 2020.
Charles Fefferman, Sanjoy Mitter, and Hariharan Narayanan. Testing the manifold hypothesis.
Journal of the American Mathematical Society, 294))983-1149, February 2016.
Brian J. Fischer and José Luis Peña. Owl's behavior and neural representation predicted by Bayesian inference. Nature Neuroscience, 1466):1061-1066, August 2011.
József Fiser, Pietro Berkes, Gergö Orbán, and Máté Lengyel. Statistically optimal perception and learning: From behavior neural representations. Trends in cognitive sciences, 14(3):119-130, March 2010.
Deep Ganguli and Ecro P. Simoncelli. Efficient Sensory Encoding and Bayesian Inference with Heterogeneous Neural Populations. Neural Computation, 26( 10):2003-21144 October 2014.
Peggy Gerardin, Zoe Kourtzi, and Pascal Mamassian. Prior knowledge of illumination for 3D perception in the human brain. Proceedings of the National Academy of Sciences, 107(37): 16309-16314, September 2010.
10

---

Published as a conference paper at ICLR 2024
Ahna R Girshick, Michael S Landy, and Eero P Simoncelli. Cardinal rules: Visual orientation perception reflects knowledge of environmental statistics. Nature Neuroscience, 14(7):926 July 2011.
A. N. Gorban and I. Y. Tyukin. Blessing of dimensionality: Mathematical foundations of the statistical physics of data. Philosophical Iransactions. Series A, Mathematical, physical, and engineering sciences, 376(111))201102237, April 2018.
Michael Hahn and Xue-Xin Wei. A unifying theory explains seemingly contradicting biases in perceptual estimation, December 2022.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition, December 2015.
Guillaume Hennequin, Laurence Aitchison, and Máté Lengyel. Fast sampling for Bayesian inference in neural circuits, April 2014.
Jonathan Ho and Tim Salimans. Classifier-Free Diffusion Guidance. In NeurlPS 2021 Workshop on Deep Generative Models and Downstream Applications, December 2021.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising Diffusion Probabilistic Models. In Advances in Neural Information Processing Systems, volume 33, pp. 6840 6851. Curran Associates, Inc., 2020.
Neil M.T. Houlsby, Ferenc Huszár, Mohammad M. Ghassemi, Gergö Orbán, Daniel M. Wolpert, and Máté Lengyel. Cognitive Tomography Reveals Complex, las--Independent Mental Representa- tions. Current Biology, 23(21):2169-25 2175, November 2013.
Patrik Hoyer and Aapo Hyvärinen. Interpreting Neural Response Variability Monte Carlo Sampling of the Posterior. In Advances in Neural Information Processing Systems, volume 15, MIT Press, 2002.
Aapo Hyvärinen. Estimation of Non-Normalized Statistical Models by Score Matching. pp. 15, 2005.
Monika P. Jadi, Bardia F. Behabadi, Alon Poleg-Polsky, Jackie Schiller, and Bartlett W. Mel. An Augmented Two-Layer Model Captures Nonlinear Analog Spatial Integration Effects in Pyramidal Neuron Dendrites. Proceedings of the IEEE. Institute of Electrical and Electronics Engineers, 102 (5):1, May 2014.
Mehrdad Jazayeri and Srdjan Ostojic. Interpreting neural computations by examining intrinsic and embedding dimensionality of neural activity. Current Opinion in Neurobiology, 70:113-120. October 2021.
Zahra Kadkhodaie and Eero Simoncelli. Stochastic Solutions for Linear Inverse Problems using the Prior Implicit in a Denoiser. Advances in Neural Information Processing Systems, volume 34, pp. 13242-13254, Curran Associates, Inc., 2021.
Zahra Kadkhodaie and Eero P. Simoncelli. Solving Linear Inverse Problems Using the Prior Implicit in a Denoiser, 2020.
Kishore V. Kuchibhotla, Jonathan V. Gill, Grace W. Lindsay, Eleni S. Papadoyannis, Rachel E. Field, Tom A. Hindmarsh Sten, Kenneth D. Miller, and Robert C. Froemke. Parallel processing by cortical inhibition enables context-dependent behavior. Nature Neuroscience, 20(1):62-71, January 2017.
Baowang Li, Matthew R. Peterson, and Ralph D. Freeman. Oblique Effect: Neural Basis in the Visual Cortex. Journal of Neurophysiology, 90(1):204-211 217, July 2003.
Hao Li. Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the Loss Landscape of Neural Nets. 2018.
Wei Ji Ma. Organizing probabilistic models of perception. Trends in Cognitive Sciences, 16(10): 511-5 11-188, October 2012.
11

---

Published as a conference paper at ICLR 2024
Wei Ji Ma, Jeffrey M Beck, Peter E Latham, and Alexandre Pouget. Bayesian inference with probabilistic population codes. Nature Neuroscience, 9(11):1432 1438, November 2006.
Pascal Mamassian, Michael Landy, and Laurence T Maloney. Bayesian modelling of visual perception. In Probabilistic Models of the Brain: Perception and Neural Function, pp. 13-36. The MIT Press, March 2002.
Paul Masset, Jacob A. Zavatone- Veth, J. Patrick Connor, Venkatesh N. Murthy, and Cengiz Pehlevan. Natural gradient enables fast sampling in spiking neural networks. Advances neural information processing systems, 35:22018-222 2-20344,,,, 2022.
Masanori Murayama, Enrique Pérez-Garci, Thomas Nevian, Tobias Bock, Walter Senn, and Matthew F. Larkum. Dendritic encoding of sensory stimuli controlled by deep cortical interneurons. Nature, 257(7233):1177-111 February 2009.
Radford M. Neal. Sampling from multimodal distributions using tempered transitions. Statistics and Computing, 6(4):353-366, December 1996.
Ilya Nemenman, F. Shafee, and William Bialek. Entropy and Inference, Revisited, In Advances in Neural Information Processing Systems, volume 14. MIT Press, 2001.
Alexander Quinn Nichol and Prafulla Dhariwal. Improved Denoising Diffusion Probabilistic Models. In Proceedings of the 38th International Conference on Machine Learning, pp. 8162-8171. PMLR, July 2021.
Gergö Orbán. Pictro Berkes, József Fiser, and Máté Lengyel. Neural Variability and Campling-Basee Probabilistic Representations in the Visual Cortex. Neuron, 92(2):530-543, October 2016.
Panayiota Poirazi, Terrence Brannon, and Bartlett W. Mel. Pyramidal Neuron Two-Layer Neural Network. Neuron, 37(6):989-999) March 2003.
Alon Polsky, Bartlett W Mel, and Jackie Schiller. Computational subunits in thin dendrites of pyramidal cells. Nature Neuroscience, 7(6):621-627, June 2004.
Bo Qiang, Yuxuan Song, Minkai Xu. Jingjing Gong, Bowen Gao, Hao Zhou, Wei- Ying Ma, and Yanyan Lan. Coarse-to-Fine: A Hierarchical Diffusion Model for Molecule Generation in 3D, In Proceedings of the 40th International Conference on Machine Learning, pp. 28279,28299, PMLR, July 2023.
Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-Shot Text-to-Image Generation. In Proceedings of the 38th International Conference on Machine Learning, pp. 8821-8833 PMLR, July 2021.
Martin Raphan and Eero P. Simoncelli. Least Squares Estimation Without Priors or Supervision. Neural Computation, 23(2):374-420, February 2011.
David P. Reichert, Peggy Series, and Amos J. Storkey. Unifying low-level mechanistic and high-level Bayesian explanations of bistable perceptions: Neuronal adaptation for cortical inference. BMC Neuroscience, P2(1):P320, July 2011.
Lisa Roux and György Buzsáki. Tasks for inhibitory interneurons in intact brain circuits. Neurophar- macology, 88: 10-33, January 2015.
Camille Rullán Buxó and Cristina Savin. sampling-based circuit for optimal decision making. In Advances in Neural Information Processing Systems, volume 34, pp. 14163-14175. Curran Associates, Inc., 2021.
Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L. Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Bureu Karagol Ayan, Tim Salimans, Jonathan Ho, David J. Fleet, and Mohammad Norouzi. Photorealistic Text-to- Texteto-Image Diffusion Models with Deep Lan- guage Understanding. Advances in Neural Information Processing Systems, volume 35, pp. 36479-36499 December 2022.
12

---

Published as a conference paper at ICLR 2024
Cristina Savin and Sophie Denève. Spatio temporal Representations of Uncertainty in Spiking Neural Networks. In Advances in Neural Information Processing Systems, volume 27. Curran Associates, Inc., 2014.
Cristina Savin, Peter Dayan, and Máté Lengyel. Optimal Recall from Bounded Metaplastic Synapses: Predicting Functional Adaptations in Hippocampal Area CA3. PLoS Computational Biology, 10 (2)e February 2014.
Peggy Seriès and Aaron R. Seitz. Learning what to expect (in visual perception). Frontiers in Human Neuroscience, 7, 2013.
Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. Proceedings of the 32nd International Conference Machine Learning, pp. 2256 2256-2265. PMLR, June 2015.
Yang Song and Stefano Ermon. Generative Modeling by Estimating Gradients of the Data Distribution. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
Lucas Theis, Aäron van den Oord, and Matthias Bethge. A note on the evaluation of generative models. In International Conference on Machine Learning, April 2016.
Balázs B. Uifalussy, Judit K. Makara, Máté Lengyel, and Tiago Branco. Global and Multiplexed Dendritic Computations under In Vivo-like Conditions. Neuron, 100(3):57--592..5, November 2018.
Pascal Vincent. A Connection Between Score Matching and Denoising Autoencoders. Neural Computation, 23(7):1661-1674 July 2011.
Xue-xin Wei and Alan A Stocker. Efficient coding provides a direct link between prior and likeli- hood in perceptual Bayesian inference. In Advances in Neural Information Processing Systems, volume 25, Curran Associates, Inc., 2012.
Louise Whiteley and Maneesh Sahani. Attention a Bayesian Framework. Frontiers in Human Neuroscience, 6, 2012.
Thilo Womelsdorf, Taufik A. Valiante, Ned T. Sahin, Kai Miller, and Paul Tiesinga. Dynamic circuit motifs underlying rhythmic gain control, gating and integration. Nature Neuroscience, 17 (8):1031-1033 August 2014.
Richard Zemel and Peter Dayan. Distributional Population Codes and Multiple Motion Models, In Advances in Neural Information Processing Systems, volume 11. MIT Press, 1998.
13

---

Published as a conference paper at ICLR 2024
A SUPPLEMENTARY DERIVATIONS
A.1 POSTERIOR SAMPLING DYNAMICS
We modify the original posterior flow field derivation by (SSol--iccsttinn et al. (2015) allow for biologically plausible posterior sampling algorithm. We wish to derive the posterior neural Iransition operator p(x; x)) by combining the prior neural transition operator p(x; x(-1) with an arbitrary likelihood signal (
xz). Recall that our prior neural transition operator is Gaussian:
p(x, xx-1) = (1444 (1 ())))
log pxx: xx-1)
2(1 3,) |x1 Ma 1 C
where C is a constant. Under some mild assumptions, we approximate the log likelihood log by xx) by Taylor expanding around x, = Ho,e. where pø,t = (x(
log logpo(y xx) x log x+) x.=Ho. + (X: -Ma,)) logpoly xx) xx)lxx==e. - (x.- 10,1) (x:-1,
where the likelihood flow field (= = Vx, log xx) x:=uo. and C₁ is a constant. Note that in this derivation, the gradient of the log likelhood is evaluated at (x, the local somatic current at the current time step. This makes direct biological interpretation of the model problematic since the sensory area providing this likelihood signal cannot access the somatic current and only has access to information from the previous time step. In order for our model to obey temporal causality and local access to information, we suppose instead that the likelihood flow field receives as input point x from the previous time step which is used to evaluate the likelihood flow field (x;-,1,, y) = Vx logp& xx-1)lx=x(-1 This approximation becomes more exact the closer we the data manifold: since (x0(x;11) can be thought of the prior network's 's current guess of point on the prior manifold, the error from substituting x,-1 for p4,, goes to zero as x; approaches the prior manifold. We demonstrate this numerically in Fig. 2E.
The posterior neural transition operator combines the prior transition operator and likelihood signal using Bayes rule:
p(x, x) = looo (x,
xx-1) + log x,) C1
1
||x: -M8,el2 2 + (xt - 10,1) gt + C2
2(1 - Be)
1
||x; 14,t - -1) g7(1 3x)
+ C2
2(1 B,)
2
1
2(1 - (B,) ||x: (18,1 + (1 (:) )l² 1++00 C33
llog BogN((x;: M4gt + (1 Br)gr, (1 3,)1) +Ca
where C1-4 are constants that do not contain X₁. As we can see, the posterior transition operator is again Gaussian and C4 corresponds its normalizing constant. The effect of the external likelihood signal is to shift the mean of the prior transition operator by amount (1 8:)g.
To sample from the context conditioned posterior p(x c), we learn a map from x; to e by training a feedforward neural network to classify points x, via optimization. For the trimodal prior in Fig. B this is done by assigning one of three class labels to samples from the corresponding mode. We construct the classifier training set by adding i.i.d. multivariate Gaussian noise of varying degrees of variance to clean samples from the prior using the DM forward process. As with the unimodal swiss-roll prior, at large degrees of noise most of the signal is removed and the distribution resembles a white Gaussian. The classifier network is then trained via backpropagation to receive X, as input and identify the class of the corresponding clean data sample. Since the last layer of the classifier is Softmax layer that normalizes the outputs to one, we interpret the values of the classifier output as the probability distribution p(c| xx). (x( e) is evaluated using the torch autograd package.
14

---

Published as a conference paper at ICLR 2024
B SUPPLEMENTARY RESULTS
B.1 EFFECTS OF DENDRITIC TREE MORPHOLOGY
We studied how the morphology of the dendritic networks affected the speed of learning by conducting grid search over dendritic architectures that differed in width and depth. To isolate the effect of the architecture choice, we kept the total number of parameters roughly the same across all networks, meaning that as we increased network depth we also decreased network width.
A dendritic architecture can be fully specified by an array of branching factors, which denotes the number children nodes at each layer. The array gives branch factors order of distal to proximal layers. The six architectures are defined as follows:
Depth
Morphology
Num. of parameters
2
[59, 59]
35048
[8, 8, 7,
33154
5
5,,5,
34372
6
4,4,,,44,4,
34814
[3. 3. 3,
34986
10
[2, 2, 2, 2, 2,
32234
Table $1: Morphology of dendritic networks.
trained four iterations of each network architecture with different random seeds. The networks were trained on the 2D swiss roll manifold using the Adam optimizer with a learning rate of 3e-4 over 1.5e6 epochs. We quantified the similarity of the network to the ground truth manifold as function of training epoch using naive KL divergence estimator (10000 samples each, with space discretized into 255 bins).
14
12
KL divergence
10
2-
0.2
0.4
1.0
1.2
166
Figure S1: Network performance over training. Each line corresponds to the performance of a model architecture of particular depth. We see that the KL divergence of shallower networks (depths 2, 4) decreased the fastest, while deeper network converges slower. Note that the speed of learning does not scale monotonically with network depth; for example, the 7-layer network learns faster than the layer network.
We see that shallower but wider networks learned faster than deeper but thinner networks, and converged to KL divergence value much lower than the other networks. However, cannot conclude that shallower networks perform better overall: the KL divergence value for the 6 layer network towards the end of the 1.5e6 training epochs indicates that the networks have not reached the global minimum of their loss functions, and suggests that with more training epochs the network performance may continue improve.
15

---

Published as a conference paper at ICLR 2024
11
Te-d
10
1o-5
1e-8
KL divergence
8-
7-
5-
10
number of layers
Figure S2: Effects of sparse recurrent connections targeting different locations the dendritic tree. Quality of prior samples as a function of the dendritic tree depth. S and N in the legend indicate architectures with and without skip connections, respectively. Number denote the strength of the L1 regularization. We trained two models for each architecture. Shaded regions indicate variability in the KI. divergence resulting from variability in generated samples.
One limitation of the architecture that the resulting recurrent network has dense connectivity, linking each neuron all distal branches of all neurons, which is biologically unrealistie. We adjusted the tree architecture so that inputs from other neurons can project to different locations on the target neuron's dendritic tree. Architecturally, this was achieved in the form of skip connections from the neurons in the first layer (representing the output of the somatic compartment at the previous timestep) to intermediate subunits in the dendritic arbor of all neurons. These skip connections, unlike those commonly found in deep neural network models (He et al.) 2015), have learnable weights. The synaptic inputs from these skip connections are summed by the subunit together with incoming activity from more distal subunits. To encourage sparsity in the recurrent inter-neuron connectivity, we added LI regularization on the synaptic strengths.
We studied prior representational quality of the biologically-refnned version of the model while varying the depth the dendritic tree for the same task (10 dimensional network representing dimensional "swiss-roll" latent manifold). All models were trained over 2e6 epochs with different degrees of L1 regularization. We compared model generated samples against the ground truth by calculating the KL divergence between the two distributions formed by projections onto two dimensional cross section of the manifold. The rest of the KL computation is equivalent to the process described in Section 4 Here chose this evaluation method over calculation of marginal statistics (as in Fig. [TG and Fig. S3) because some models produced samples far away from the ground truth manifold. Models with stronger I.1 regularization generally showed lower performance across most layer depths (Fig. [S2}. Skip connections have a more nuanced effect. In deeper networks, they result in large performance gains when compared models without skip connections. However, in shallower networks, skip connections result in comparable or sometimes worse performance than their counterparts with no skip connections.
Why is this the case? Skip connections such as those used by deep networks allow for better performance by preventing vanishing/exploding gradients; by giving the network another way to route information, they induce smoother loss landscape that is easier to traverse during training (Li al. 2018). Even though our skip connections have learnable parameters, information can still be routed along different pathways, allowing for more direct influence over particular subunits. This effect likely more pronounced our tree architecture than in models with fully connected layers since there is greater segregation of information at each layer. The relative loss of performance in shallower networks suggests skip connections may induce destructive interference that cannot be remedied if there when the model is L1 regularized and has skip connections, optimal performance occurs when the architecture is neither too shallow too deep. but rather possesses some intermediate number of
not enough downstream layers for further processing. Indeed,
that
16

---

Published as a conference paper at ICLR 2024
layers. This may have implications the type of dendritic architectures expect in sensory cortices.
B.2 TESTING NEURAL SAMPLING QUALITY BY MARGINAL STATISTICS
The data manifold on which the model in Fig. A was trained has three embedding dimensions but is embedded in 10-dimensional ambient space (using the terminology in [azayerri & Ostojic (2021)) ensured the data have non-zero values in every dimension by rotating the three dimensional manifold by π /4 around each pair of axes.
The three dimensional swiss-roll manifold is uniformly distributed along the linear dimension (i.c. the dimension orthogonal to the swiss-roll cross-section). We evaluated the marginal statistics of the model output along this dimension by comparing the cumulative distribution function (cdf) this model output against reference uniform edf.
To recover the model's ss marginal density along the linear dimension, we first projected the network output onto the three basis vectors of the embedding space, which calculated by transforming unit vectors by the same rotation operators as the data manifold. We then projected the model output along the third basis vector and computed the edf along this dimension.
The empirical edf is close to the reference cdf, indicating that the data are likely distributed according to the uniform distribution. We can quantify this using the Kolmogorov-Smirnoo goodness-of-in test, which is a nonparametrie measure of the similarity between continuous empirical sample distribution and a specified reference distribution. We applied the KS test both the empirical distribution along the nonlinear dimension in Fig. [ and along the linear dimension in Fig, [S3] For a sample size of 1000 each, the p- p-value along the nonlinear dimension 0.145 while the p-value along the linear dimension is () 125, making them statistically indistinguishable from the uniform distribution.
1.0
reference cd! empirical caf
0.4
0.2
0.0
0.4
Figure S3: Marginal statistics along the dimension orthogonal the swiss roll cross-section.
B.3 POSTERIOR AUTOCORRELATION
We numerically evaluated posterior samples generated by the neural circuit. We see in Fig. S4 that the samples generated from neural sampling result in autocorrelation functions that rapidly decrease and remains steadily at zero. This indicates that the posterior samples, like the prior samples in Fig, G largely independent time despite the approximations. This remains even when the neural sampling dynamics are influenced by contextual and sensory evidence.
B.4 STOCHASTIC NEURAL NETWORK
To assess whether the nonlinear operations of the neural sampling process could be instantiated by a population of neurons rather than in the dendritic arbor of pyramidal neurons, we trained a Stochastic Neural Network (SNN) model, fully connected feedforward neural network comprising neurons with linear weights, ReLU nonlinearity and somatic stochasticity. As in dendritic model, the
17

---

Published as a conference paper at ICLR 2024
A
S
S
S
S
B
Coctooe evidence
contextual evidence
both contextual and sensory evidences
2.00
0.00
DM samoling
000
.005
0.05
2.00
0.00
-243
-01
0.03
-205
-01
10
10
log
Figure $4: Autocorrelation comparison of the posterior samples. (A) Posterior samples generated from the two dimensional trimodal dataset as a result of observing contextual evidence (left), sensory evidence (middle), and both forms of contextual and sensory evidence (right). The context cue for the context-conditioned posterior is the discrete context random variable indicating the swiss roll manifold. The sensory likelihood, as before, is a two dimensional linear constraint with cruussian-distribnn uncertainty around it. (B) The autocorrelation functions of samples generated by the DM reverse process (top row) and neural sampling (middle row) for the different posterior distributions. The difference between the two autocorrelation functions is shown in the bottom row.
somatic stochasticity in each neuron additive Gaussian, with the degree of stochasticity modulated by the phase of the global oscillation. The operation performed by the neurons in each hidden layer can be expressed
h ReLU((((hh-itt) + -1 3,)
(7)
where h is the output hidden layer and Wi the weight matrix at layer 1. e is sample of Gaussian with identity covariance.
Our instantiation of this model architecture has three hidden layers, each with a width of 32 neurons. The degree of noise as given by the oscillator is concatenated with the output of the previous hidden layer. We trained the model via backpropagation using the Adam optimizer with a learning rate of le-4 over 5000 epochs. We show the distribution of samples generated at intermediate points of the ascending phase below, in Fig S5
Figure S5: DM reverse process using the SNN architecture. The samples generated by the SNN result samples that lie on the two dimensional swiss roll manifold.
B.5 MORE BIOLOGICALLY REALISTIC OSCILLATIONS
In the brain, oscillations fluctuate in both amplitude and frequency and do not have the perfect sinusoid structure assumed by the model. To test the effects of such fluctuations the eircuit's
18

---

Published as a conference paper at ICLR 2024
ability to sample from priors, introduced variability in the amplitudes and/or period of the 3 oscillation. The original oscillation eycled between O and with a period of 200 timesteps (Fig. S6A). In these variations, the amplitude and period of the oscillation were defined as random variables.
The amplitude was drawn from a truncated normal distribution ~ N Auriginal: AA), A > 0, i.i.d for each cycle
where samples were obtained by rejection sampling. The period of each cycle was similarly drawn from another truncated normal distribution 7 (TToriinall oT), T 0 (Fig. (SC).. Finally, we also considered the combined effect of simultaneous fluctuations both amplitude and frequency (Fig. (SD)). Using the denoising trained 2D swiss-roll model, we used the induced Be values for circuit sampling. We assessed the effect of the generated samples by comparing the empirical distribution given by the resulting samples against the ground truth distribution, via the KL divergence. We find that the quality of the samples is largely unaffected by the deviations from the perfect sinusoid (Fig. E). The KI. divergence remains largely flat for range of noise levels. This suggests that the sampling procedure can be reasonably robust for naturalistic oscillatory signals.
A
0.10
random ampi
both random
B
KL divergence
0.07
0.88
0.5
0.00
0.06
0.15
0.20
timestap
magnitude of fluctuations (s.d//mean)
Figure S6: (A) Reference 3, fluctuations for the simple model. (B) Example draw for a more
naturalistic oscillations with fluctuations amplitude (a = 0.15). (C) Example draw for a more naturalistic oscillations with fluctuations in period (ør = 30). (D) Example draw for more naturalistic oscillations with fluctuations in amplitude (a 0.15 and oT = 30). (E) Deviations of empirical samples from ground truth distribution for varying degrees of oscillation fluctuations. A standard deviation corresponds to the deterministic setting. KL estimates use 5000 samples per run, with shading showing SEM estimated over 20 runs.
B.6 MNIST DATASET
To assess whether our model scales to higher dimensional priors, we trained our circuit model on the MNIST dataset, which contains 28 by 28 pixel images of handwritten digits. We were able to train several dendritic architectures to successfully generate digits from the MNIST dataset (Si top rows). They learning rate of 4e-3 for 5000 epochs. The best performing architectures were two and three layer architectures with branch factors [12, 12) and [5, 5, 5] respectively.
trained by the same denoising objective, using the Adam optimizer with
We sampled a class-conditioned posterior by combining the model with separate classifier trained on MNIST digits (Fig S7 top two rows). We used approximate posterior dynamics described in Section 3 and described in Supplementary section A. Taken together, these MNIST results suggest that the lallooccalll-moiivateee deviations from traditional diffusion models can scale higher dimensional distributions.
19

---

Published as a conference paper at ICLR 2024
A
1
2
3
4
5
6
7
8
9
9
B
3
3
3
3
3
3
3
3
37
7
Figure S7: Results for an MNIST trained neural circuit. (A) Example prior samples, one per class. (B) Example samples from the posterior conditioned on class '3',
20


Reviews:
[{"review_id": "JAhq2gHQni", "reviewer": "Reviewer_8Gad", "summary": "This paper presents a neural circuit model for Bayesian inference, where the prior is proposed to be encoded via a DDPM-like mechanism in the dendrites of neurons. Some additional modifications were made to be more biorealistic, such as the dendrites instantiated as tree-structured MLPs, and iterative prior sampling driven by a global oscillatory noise schedule (as opposed to the standard, “discontinuous” reverse diffusion sampling). The authors show demonstrate that, on a swiss-roll toy task, the neural sampler performs similarly to the standard DDPM. Furthermore, the authors demonstrate how the prior can be flexibly combined with multiple additional sources of information (likelihoods), such as sensory observation and contextual signals, for posterior sampling. Finally, the authors make experimental predictions on how different phases of the global oscillation would be informative if such a representation is implemented in real neural circuits.", "questions": "- is there recurrent interaction between neurons? It’s also a bit unclear how many neurons there are, or are all the results from a single dendritic tree? Also, what exactly are the inputs/outputs of the dendritic networks, and what exactly is the somatic “compartment” doing, or is that functionally just the last layer of the dendrites? Apologies if I had missed this obvious info.\n- In the case of posterior inference (Figure 2/3), do the samples still show zero autocorrelation?\n- I may have fundamentally misunderstood something, but the authors motivate their proposed architecture as flexible, since it can be reused for various inference scenarios, just swapping out or combining likelihoods. This is demonstrated well for the current model, but wouldn’t this be true for a model where a different population encodes the prior as well? Why is it necessary that it’s in the dendrites? Or is that just a “semantic” difference, since the branching networks can equally be implemented as different neurons?\n- Isn’t it typically the case that bottom-up sensory info and contextual info are thought to be likelihood and prior, respectively? Whereas here, they are represented as two different steams of likelihoods. Can the authors comment on this discrepancy?\n- there is a recent body of experimental evidence implicating oscillations of different frequencies coordinating bottom up (gamma, ~40Hz) vs. top down (beta, ~15Hz) signaling (see A. Bastos, EK Miller, etc.), while here it’s crucial that there is a global oscillation of a single frequency, otherwise the prior and likelihood sampling are temporally misaligned.\n- The proposed implementation draws one prior / posterior sample per oscillation cycle, which, given the fastest cortical rhythm (40Hz gamma), results in 40 samples per second, and more likely to be less, e.g., 8Hz theta in the hippocampus. Is this sampling speed too slow? Does it match behavioral data of evidence accumulation?\n- As I mentioned above, most of the time, most areas of the cortex are not experiencing oscillations. Furthermore, oscillations tend to disappear during task engagement (such as 10Hz alpha in visual areas and 20Hz beta in motor areas), which would be a time that is critical for sampling. How reliable would the proposed implementation be in such scenarios?\n- caption for Figure 1F is missing", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "I found the paper to be clearly and concisely written, with very informative figures to illustrate the main idea and key results. The proposed circuit implementation of a diffusion model in the dendrites is interesting and novel, while the oscillatory noise schedule is an elegant device, with an intuitive (though potentially misleading) mapping to neural oscillations. As demonstrated, the proposed model can incorporate multiple likelihood sources separately, and at least for the toy tasks, achieve good performance. I did not examine the math thoroughly, but overall I believe the paper is of high technical quality, and presents an interesting hypothesis (and testable model) for how neural circuits may encode priors.", "weaknesses": "For me, the paper suffers from two major weaknesses:\n\nFirst, while the model is elegant and combines a SOTA class of generative model in ML (DDPMs) with neural circuitry, the end product feels too artificial in construction and biologically implausible, with its many strong restrictions / assumptions. For one, the diffusion model in this implementation can be trained as per usual, but how would real dendrites in a neuron go through this learning? The authors state the the learning aspect is for future work, but that’s a huge “if”—is it really realistic to suppose that such a complex mechanism can emerge in vivo, without any hint for the readers of how it could? Additionally, sampling critically depends on a stationary and permanent oscillation, which is rarely found in the brain. Even hippocampal theta, which the authors draw inspiration from, are irregular in time and frequency, nevermind oscillations in other cortical areas. \n\nSecond, the performance is only demonstrated on a relatively simple task of sampling from a very smooth and low-dimensional manifold. I understand that the quantitative results are mostly a demonstration of proof of principle. However, there’s no indication that this would work with mildly more complex high-d distributions, as the authors had originally motivated (and pointed out as a weakness in previous literatures, i.e., mostly Gaussian prior/posteriors). It would be nice to have some indication of how this can be scaled to perform a mildly more complicated task, like conditionally sampling MNIST, or would it be completely infeasible given the architectural constraints? \n\nThese are the two major categories of concern, and I have a number of other concrete issues in the limitation / questions sections below. Taken together, I am skeptical of how much of the claims regarding “neural circuit implementation” is substantiated. And if not, how impactful would the contribution be, which is essentially connectivity-constrained DDPM with an oscillatory noise schedule. Therefore, I recommend borderline reject, noting that it is a well written paper (with some technically dense sections) and solid work but perhaps for a more niche readership, and that I am open to be convinced of its potential biological relevance.", "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": "", "extra_scores": {}}, {"review_id": "qyc8cSYI5z", "reviewer": "Reviewer_XKTM", "summary": "In this paper, the authors proposed a diffusion-based recurrent circuit for sampling-based probabilistic computation. They used recurrent circuits to represent complex priors implicitly, and the sampling-based inference was accomplished using noise modulated by an oscillatory global signal. The recurrent circuits implement the diffusion models with dendritic nonlinearities and stochastic somatic integration. They showed that the dynamics can be gated by bottom-up or top-down signals to generate samples from the corresponding posteriors in low-dimensional nonlinear manifolds and multimodal posteriors to achieve flexible inference.", "questions": "How can the models be tested? What evidence would prove they are correct or falsify them?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "There have been earlier works exploring ideas of recurrent connections to encode priors and the neural dynamics to perform Langevin sampling. The proposed plausible neural circuit implementation of across-task inference in which a common prior is encoded in the recurrent connections with dendritic nonlinearities optimized for denoising is novel.  The connection to diffusion models,  the use of global oscillatory signals as sampling control, and the use of bottom-up and top-down signals for gating the samplings across multiple tasks are also new and interesting and represent a conceptual advance. It does provide a new plausible framework to allow flexible sampling of complex distributions.", "weaknesses": "While the connection to DM is inspiring, there is no direct evidence to support the key assumptions and innovation of the model -- the dendritic nonlinearities and DM-inspired oscillatory sampling schedule. They remain a fragment of imagination.  As it is mostly a theoretical neuroscience model that works only on a toy example for demonstration, it would be worthwhile to articulate the predictions and the assumptions of the model that can be tested and evaluated by neurophysiological experiments.", "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": "", "extra_scores": {}}, {"review_id": "BbYHa4lp9U", "reviewer": "Reviewer_7hMe", "summary": "This paper proposes the state-of-the-art diffusive model developed in deep learning could be a running algorithm in recurrent neural circuit. Specifically, it claims the nonlinear dendrites of neurons with globally controlled dendritic noises can be used to implement the reverse phase of diffusive models.", "questions": "- Fig. 1E caption: why does neural dynamics push off the network off manifold? Does the author mean the neural dynamics of sensory transmission correspond to injecting noise in a similar fashion with the forward process in a diffusive model? At least this neural dynamics is not the same recurrent neural dynamics which the author claims to implement a reverse process to sample from posteriors.\n\n- Fig. 4B caption: it should be (top) and (bottom) because no (left) and (right) here.\n\n- It seems that the iterative steps in diffusive model are indexed by $\\lambda$ while that in the neural dynamics was indexed by time $t$. What's the relation between $\\lambda$ and $t$? My understanding is that $\\lambda$ is a non-negative number while $t$ can go to infinity. Does it imply the equilibrium neural dynamics repeatedly sample distribution of $x_0$ over time?", "limitations": "", "rating": 5, "confidence": 2, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "The concept of the present study is original and can significantly advance our understanding of the stochastic recurrent neural circuit once some of my major concerns are solved (see weaknesses). The structure of the manuscript is organized well, and the introduction and discussion are clearly written with a thorough review of the research history as well as possible experimental verification of the theory.", "weaknesses": "I have major concerns about the justification and derivation of two central claims (dendritic nonlinear and global oscillating signal) about neural circuit implementation of diffusive models. A possibility is that the text doesn't explain the key math steps sufficiently well. I look forward to seeing some justification in the rebuttal.\n\n### Dendritic nonlinearity\nThe paper directly states the nonlinear dendritic operation $f(x_t, \\beta_t)$ after Eq. 5 without explaining how it is derived. I am confused about how this nonlinearity comes out. Is it directly from $\\mu_\\theta (x_{\\lambda + t}, \\lambda)$ in Eq. 2? In this case, does it imply the dendritic nonlinearity needs to be readjusted if the transition operator in the reverse process is changing? Or it is just used as a way to capture the nonlinearity in biological neurons? \n\n### Global oscillating signal\nI don't understand how the global oscillating signal is derived. Although the author explained the $\\beta_t$ is analogous to the sequence of noise variance in the diffusive model, it seems that the diffusive model doesn't have such an oscillating signal if I understood correctly. I have no idea how Eq. 5 was derived, what assumptions it relies on, and why the $\\beta_t$ becomes a sinusoid function there.\n\n### Training an ANN-based model for dendrites\nThe author says the dendrite is modeled as an ANN whose parameters were trained via gradient descent. Does this imply some mechanism to adjust the dendritic parameters in real neurons? If so, what are the possible biological mechanisms? I don't see related discussions in the paper.\n\nOverall, I suggest the author explain the key motivations, and assumptions in deriving the nonlinear dendrite, global oscillating signals in modulating dendritic noises around Eq. 5. They seem quite critical in this work. In addition, it is better to write a concrete, commonly used recurrent neural dynamics in a single line, and compare it directly with the reverse process in diffusive models. If my major concerns are solved, I'd like to increase my rating.", "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": "", "extra_scores": {}}, {"review_id": "xOq0C8UA4E", "reviewer": "Reviewer_A1Uf", "summary": "The paper introduces a novel recurrent circuit model based on diffusion models that incorporates several biologically plausible properties. This method implicitly encodes priors over latent variables and can combine this information with other sources, such as sensory input, to encode task-related posteriors. The approach is mapped to a recurrent network with multi-compartment neuron models, and its effectiveness is demonstrated through experiments on toy datasets.", "questions": "* In Figure 1D, the caption mentions \"multi-compartment neuron.\" Shouldn't it be \"multi-compartment neurons\"? I thought each gray triangle is a multi-compartment neuron.\n\n* The paper repeatedly mentions \"optimized ReLU nonlinearities.\" I did not really understand the meaning of \"optimized\" in them?\n\n* Is $\\sigma_\\lambda$ in Equation 1 the same with $\\beta_\\lambda$ in Figure 1?\n\n* Regarding the following sentence in page 6: \" In principle, this might lead to catastrophic accumulation of errors and large sampling biases; however, the attractor dynamics prevent this from happening.\" Can authors elaborate on this a bit more? It is not clear to me why?\n\n* In page 6, it is written \"$\\mathbf{g}\\_t (\\mathbf{x}\\_{t-1}, s) = \\frac{1}{\\sigma_s^2} \\mathbf{M}_s \\mathbf{M}\\_s^T (\\mathbf{x} - \\mathbf{x}\\_c)$\". Is it $\\mathbf{g}\\_t (\\mathbf{x}\\_{t-1}, s) = \\frac{1}{\\sigma\\_s^2} \\mathbf{M}\\_s \\mathbf{M}\\_s^T (\\mathbf{x}\\_{t-1} - \\mathbf{x}\\_c)$?\n\n* Does the last sentence of Figure 3 caption correspond to Figure 3D? There is no caption for (D).", "limitations": "", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "* The paper successfully maps diffusion model-inspired dynamics to a recurrent circuit with multi-compartment neuron models,\n\n* The modifications to diffusion model dynamics to align with biologically plausible properties are commendable, especially as they do not harm the network quality,\n\n* The provided code is clear and enhances the paper's reproducibility.", "weaknesses": "I think the paper has several weaknesses. Please see the following list and the questions sections.\n\n* Regarding the following sentence in page 5: \"First, we tested ... autocorrelation ... remains steadily around zero proving that ... samples are essentially independent.\" I might agree that the samples are independent. However, isn't it mathematically misleading to use the word \"prove\" based on correlation?\n\n* Regarding the sentence in page 5: \"Overall, these results indicate that the constraints imposed by biology may have a minimal effect on the quality ... compared to DMs\". Isn't it too early to state such conclusion. The experiment is on a quite toy-dataset.\n\n* The experimental details for the stochastic neural network in Appendix B.2 are lacking, and providing more comprehensive information in this section would strengthen the paper.\n\n* Overall, the experiments are on quite toy datasets.\n\n\n**Minor Comments**\n\n*  In the second line of Section 2, \"nosy\" should be corrected to \"noisy.\"\n\n* Figure 1 lacks a caption for (F).\n\n*  In Figure 4 caption (for (B)), it is written \"(left) ... (right)\" to point out to the corresponding plots, but I guess the caption should use \"(top)\" and \"(bottom)\" to indicate the corresponding plots.\n\n* The first line of Section B.3: \"Fig. ??\" which figure is that?", "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": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (spotlight)