{'fraction_non_alphanumeric': 0.036531873339096466, 'fraction_numerical': 0.011846444465789389, 'mean_word_length': 4.645038857762516, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dynamical Mechanism of Sampling-based Stochastic Inference under Probabilistic Population Codes

Animals are known to make efficient probabilistic inferences based on uncertain and noisy information from the outside world. Although it is known that generic neural networks can perform near-optimal point estimation by probabilistic population codes which has been proposed as a neural basis for encoding of probability distribution, the mechanisms of sampling-based inference has not been clarified. In this study, we trained two types of artificial neural networks: feedforward neural networks (FFNNs) and recurrent neural networks (RNNs) to perform sampling based probabilistic inference. Then, we analyzed and compared the mechanisms of sampling in the RNN with those in the FFNN. As a result, it was found that sampling in RNN is performed by a mechanism that efficiently utilizes the properties of dynamical systems, unlike FFNN. It was also found that sampling in RNNs acts as an inductive bias, enabling more accurate estimation than in MAP estimation. These results will provide important implications for the discussion of the relationship between dynamical systems and information processing in neural networks.


Introduction
Given ambiguous information from external environments, humans and other intelligent species can perform efficient probabilistic inference (Knill and Pouget, 2004;Angelaki et al., 2009;Haefner et al., 2016;Ernst and Banks, 2002;Merfeld et al., 1999;Doya et al., 2007), which may be achieved by estimating posterior distributions over the cause of the input. One neural basis for such an estimation is probabilistic population codes (PPC), proposed by Ma et al. (2006); Beck et al. (2008); Ma et al. (2008); Orhan and Ma (2017). In PPC, neural populations manipulate Poisson-like variability to represent the probability distributions about the external environment. Some studies have suggested that PPC is used for inference in the actual brain (Walker et al., 2020;Tanabe, 2013).
Previous studies have shown that given input signals under PPC, generic neural networks (NNs) can efficiently perform probabilistic inference on the posterior distribution of the stimuli (Orhan and Ma, 2017). Although they investigated only point estimations, such as maximum a posteriori (MAP), as probabilistic inference, some scholars claim that sampling-based inference in which outcomes are sampled from the posterior distribution is more biologically realistic than point estimation (Haefner et al., 2016;Bányai et al., 2019;Orbán et al., 2016). As for sampling, (Moreno-Bote et al., 2011) showed that Bayesian sampling from a categorical distribution can be achieved by attractor NNs; however, the case of continuous distribution was not investigated. Hence, the mechanism of sampling from a continuous distribution in generic NNs and the relationships to PPC remain elusive.
Therefore, in this study, we trained feedforward NNs (FFNNs) and recurrent NNs (RNNs) to perform sampling-based inference from the posterior distribution on cuecombination task (van Beers et al., 1999;Ernst and Banks, 2002), which is a common psychophysical experiment. As a result, we found that both NNs could efficiently perform sampling-based probabilistic inferences with PPC, and RNNs are more accurate. Then, we investigated the dynamical mechanisms of sampling-based inference in the two types of artificial NNs (ANNs) and showed their different mechanisms. Finally, we trained them for a point estimation task and compared their performance on it with sampling-based inference. We found that they were more successful in sampling-based inference than point estimation and revealed the reason by analyzing both geometrical and dynamical features of their neural activities. These results suggest that the training on sampling-based inference plays the role of an inductive bias. The results also clarify the mechanism of sampling-based inference and indicate its significance; further, they are essential for bridging the gap between dynamics (Maheswaranathan et al., 2019;Sussillo and Barak, 2013;Vyas et al., 2020) and geometry (Chung et al., 2018;Cohen et al., 2020) in NNs.

Task
We adopt a cue-combination task in which two ambiguous cues c A and c B representing information about the same environmental status s are integrated to compute the posterior distribution of s. For instance, this task can be considered a simple task for a situation where the location of a bird (corresponds to s) is estimated from its faintly visible sound (corresponds to c A ) and audible chirping (corresponds to c B ) in a forest. Notably, the mechanism of solving this cue-combination task using PPC as MAP estimation has been investigated (Ma et al., 2006;Orhan and Ma, 2017).
We assume that the likelihood of two cues p(c A |s) and p(c B |s) are Gaussian with respect to s and their means and standard deviations are (µ A , σ A ) and (µ B , σ B ), respectively. Assuming that the prior distribution is uniform, the posterior calculated by Now, we consider two signals x A and x B encoding c A and c B , respectively, by PPC defined as follows. The signals x A andx B are random variables whose arbitrary element, which corresponds to a firing rate of a single neuron, takes a value larger than 0, and it follows a Poisson variability given by Eq. (3,4).
f i is a tuning function of the i-th neuron, which has a bell-shaped tuning curve, and one can write it down using the neuron's preferred stimulus φ i as f i (s) = g exp −(s − φ i ) 2 /2σ 2 PPC . preferred stimuli have uniform intervals in the range of µ min -µ max as φ i = µ min + i/m × (µ max − µ min ). Gain g represents the reliability of the input signal (Tolhurst et al., 1983). The gain is related to the variability σ 2 of the input signal as follows: g = 1/σ 2 . One trial lasts for 80τ , where τ is a unit time. See Appendix A for specific examples of the input signals.
During trials, the concatenation of signals is inputted to an NN. In this task, the NN has to estimate the statistics of two cues, compute Eqs. (1) and (2), and then generate output signals as sampling from the posterior distribution.

Neural Networks(NNs)
: We trained two different types of ANNs on the cue-combination task above: FFNN (Svozil et al., 1997) and RNN (Barak, 2017). See Fig. 1 for schematic illustrations of the ANNs.

FFNN
We employed a 3-layer FFNN comprising input, hidden, and output layers. The nonlinear activation function in the hidden layer is rectified linear unit (ReLU) (Nair and Hinton, 2010). Given an input signal x, the hidden and output layer activations, h(t) and y(t), respectively, are deterministically computed as follows: where

RNN
The emerging dynamics of h(t) in the hidden layer of RNN is defined as follows: where we set α = 0.25. The output layer activation is the same as Eq. (6).

Training
As a loss function L in the training phase, we use the Kullback-Leibler divergence (KLD) (Qamar et al., 2013) defined for two probability distributions p(s|c A , c B ) and q dis sampled from the output y(t). For simplicity, we discretized the range of possible values of y, −20 ≤ y < 20, into 200 bins and calculated the KLD for the discrete probability distribution.
where q dis (k) is defined as follows: is an indicator that y(t) is in the k-th bin.
As we intend to train NNs using the gradient descent scheme (LeCun et al., 2015), the loss function should be differentiable. However, L is not differentiated because of Eq. (11). Therefore, we defined a "soft" distribution q soft , which is differentiable and an approximation of q dis : where a k = 2k−1 400 × 40 − 20, and β = 2. Then, we calculate KLD for q soft and p post as a loss function.
We trained the NNs using Adam (Kingma and Ba, 2014) as a specific optimization algorithm. The batch size and value of weight decay were set to 50 and 0.001, respectively, and the training was performed for 6,000 iterations. The source codes of the simulations in this article are available at https://github.com/tripdancer0916/probabilisticinference-rnn.

Results
As a result of training, the distribution of the network output y(t) for both FFNN and RNN approached the posterior distribution p post [ Fig. 2(a)]. The mean and variance of y(t) were similar to those obtained from Eqs. (1, 2) ( Fig. 2(b)). In addition, Fig.  2(c) shows the output timeseries is stochastically generated, not periodically. These results suggest that the ANNs successfully learned to perform sampling-based inference from the posterior distribution in the cue-combination task. We also confirmed that these ANNs could learn to perform sampling-based probabilistic inference in another cognitive task (see Appendix B). Here The dynamics of the output y(t).
One can see that a stochastic output appears, neither persistent nor periodic.
Here, accuracy computed by comparing the mean and the variance of the outputs of Eqs. (1) and (2) in terms of mean squared error (MSE) were higher in the RNN than in the FFNN, especially in the variance, suggesting that the RNN performed samplingbased inference more efficiently (Fig.3). We also found that the FFNN and RNN could perform efficient information processing from the perspective of information theory and confirm that RNN can more efficiently process input information than FFNN(See Appendix C).
In this section, the analyses of the mechanism of sampling behavior in the FFNN and RNN are described.

Sampling mechanism in the FFNN
To accurately perform sampling from the posterior distribution, the NN needs to manipulate the output y(t) variability using stochastic perturbations of the input signals.
Here, as shown in Eqs. (3, 4), the input signals have Poisson-like variability, and their mean and variance increase linearly with the gain g A , g B . However, as the gain g A , g B corresponds to the input signals' reliability, the variance of the posterior distribution decreases as g A , g B increases. It means that the network should have an internal mechanism to reverse the magnitude of variances of the input and output. Here, we clarify the mechanism that transforms the input signal variance to output variance in FFNN. First, there are two possible candidates for where the variance transformation occurs: the input layer to the hidden layer and the hidden layer to the output layer. As the strictly correlates to the standard deviation of the posterior distribution [ Fig. 4(a)], this variance transformation is supposed to occur when the signal is transformed from the input layer to the hidden layer. In the following, we reveal the mechanism of this variance transformation by focusing on the transformation of signals x(t) from the input layer to the hidden layer.
Focusing on a single neuron in the hidden layer, we investigated how differences in the gain of the input signal affect the neuronal activity in that hidden layer. For simplicity, we set g 1 = g 2 = g. Comparing the results for g = 0.25 and g = 0.5, we found that the distribution of the amount of activity obtained by the linear transformation (W in x(t) + b in ) from the input layer widened and shifted to the left as g increased [ Fig. 4(b)]. Indeed, this tendency is supported by the statistics of the input matrix W in and the bias b in ; the mean values of W in and b in , respectively, satisfy Here, considering ReLU nonlinearity, the variance of the hidden layer is affected only by hidden neurons with activities greater than 0, from which a negative correlation between g and ReLU(W in x(t) + b in ) can be derived.
Assuming that the above mechanism is in the FFNN, the number of hidden neurons with values greater than 0 decreases, i.e., the hidden layer gets sparser. In fact, an analysis shows that a sparsity-based coding is present [ Fig. 4(c)]. This sparsity-based coding is similar to the coding in MAP estimation by FFNN (Orhan and Ma, 2017).

Sampling mechanism in the RNN
Now, we discuss the sampling mechanism in the RNN. In the RNN, the relationship between the fluctuation of the hidden layer firing rate h(t) and the standard deviation σ post of the posterior distribution is nonmonotonic, which differs from the result in the FFNN [( Fig.5(a)]. Here, the variation of h(t) and the standard deviation σ post are negatively correlated in the region where σ post is small, whereas they are positively correlated in the region where σ post is large.
First, we found that when the input signals were stationary, the dynamics of the hidden layer converged to certain fixed points. Each of these fixed points corresponds to a pair of mean and standard deviation of the posterior distribution (µ post , σ post ). Hence, we can decompose the dynamics of the hidden layer to fixed-point neural states and the fluctuation around them. Assuming that the fluctuation is sufficiently small, we can linearize the dynamics around a fixed point (Sussillo and Barak, 2013), and it yields where The term dh = dF dh h=h * represents a Jacobian matrix near the corresponding fixed point h * , which determines the characteristics of the landscape of neural dynamics (Ma- . Meanwhile, the term dW corresponds to the fluctuation of the input signal. It is conceivable that the mechanism underlying sampling-based inference in the RNN is a combination of effects from these two terms. Hence, we investigated the relationships among the largest eigenvalues of the Jacobian matrix G = dF dh h=h * near each fixed point, the fluctuation dW of the hidden layer activities, and the standard deviation σ post [ Fig. 5(b, c)].
Comparing this result with the relationship between the fluctuation of the hidden layer firing rate h(t) and standard deviation σ post [ Fig. 5(a)], in the region where σ post is small, the trend is similar to the change in dW [ Fig. 5(b)], whereas, in the region where σ post is large, the trend is similar to the change in the largest eigenvalues of the Jacobian matrix G [Fig. 5(c)].
In the following, we discuss the mechanism of controlling the variance of the output y(t) in each of the two areas: small-and large-variance areas.

Small-variance area
When the standard deviation σ post of the posterior distribution is small, different from the FFNN case, the posterior deviation and the fluctuation of h(t) in RNN positively correlate. It may naively seem that the variance is incontrollable. However, as the output signal is determined as an inner product of the hidden activity h(t) and readout vector W out , the direction of the fluctuation of h(t) also needs to be considered, and it can explain the mechanism. Let us consider a matrix H ∈ R N ×T given by T temporally ordered hidden activities h(t) and perform eigenvalue decomposition of a covariance matrix C ≡ 1 T HH T − h h T as follows: where R 2 1 ≥ R 2 2 ≥ · · · . Each eigenvector v i corresponds to a principal component (PC) of H (Jolliffe and Cadima, 2016).
We elucidate how each PC affects the variance of the output y(t). As shown in Fig.  6(a), the first and second components are nearly orthogonal to W out , which implies they slightly affect the variance of the output. Meanwhile, the third to fifth PCs significantly affect the output variance via solid correlation from the sum of inner products with W out to σ post ( fig. 6(b)). Further, quantifying the fluctuation directions of the internal dynamics h(t) as angles between W out and eigenvectors of these (from the third to fifth) PCs shows that these directions negatively correlate with the posterior variance σ post in the area where σ post is small. Although the effect on the output y(t) is determined by the magnitude of the fluctuations of h(t) and their directions, the results show that when σ post is relatively small, the output variance is controlled by the directions of the fluctuations [ Fig. 6(c)].

Large-variance area
In the area with large posterior variance, the correlation between the variance σ post and angles of PCs and the readout vector W out is weak, which implies that, in the large-variance area, the output variance is simply controlled by the magnitude of the fluctuation of the internal dynamics h(t). In fact, Fig. 5(a) shows a positive correlation between σ post and fluctuation of h(t) in the large-variance area. However, the input variance does not correlate with σ post , which means that the landscape of the internal dynamics controls the output fluctuation. The largest eigenvalue of the Jacobian matrix G = dF dh h=h * represents stability against noise around fixed point h * ; under a constant amplitude of noise, the larger this value is, the larger the fluctuation of the internal dynamics. Fig. 5 shows the correlation between the largest eigenvalues and posterior variance σ post , suggesting that they control the fluctuations of h(t).
Summarizing the above results, two attributes contribute to the control of sampling in RNNs (Fig.7): • Small-variance area: The magnitude of the fluctuations of the internal dynamics is predominantly determined by the fluctuations of the input signal, and the variance of the output signal is controlled by the "direction" of the fluctuations of the internal dynamics.
• Large-variance area: The magnitude of the fluctuations of the internal dynamics is predominantly determined by the landscape of dynamics around the fixed point, and the variance of the output signal is controlled by the "magnitude" of the fluctuations of the internal dynamics.
RNNs can reasonably perform more accurate inferences than FFNNs in which only input fluctuation contributes to controlling sampling.
Since RNNs have a larger number of parameters than FFNNs when the numbers of neurons are fixed, we also tested their accuracy under a fixed number of parameters. The results still indicated the superiority of the RNN, implying that the superiority is not simply caused by the richness of parameters (see Appendix D).

Sampling as inductive bias
This subsection shows the results of a comparison of sampling-based probabilistic inference with point estimation. Here, we used MAP estimation as an example of point estimation and trained NNs to output µ post . Notably, Eq. (1) claims MAP estimation still requires NNs to consider standard deviations σ A , σ B . The loss function L for MAP estimation is defined as mean squared error(MSE): Figure 7: A schematic illustration of the dynamical mechanism of controlling the sampling deviation. The colored dots are fixed points corresponding to an equal mean of the posterior distribution µ post and different variances. The black dashed curves represent typical trajectories or the stability of the fixed points. When the variance of the posterior distribution is small, a transition from a smaller (σ post,1 ) to a larger (σ post,2 ) is controlled by the angle of the readout vector and the direction in which the state around each fixed point perturbs. As a result of rotation, the variance of the projection of the neural state onto the readout vector is enlarged. Meanwhile, in the large-variance area, the transition from σ post,2 to σ post,3 is controlled by the landscape around the fixed points. As the posterior variance increases, the stability of the corresponding fixed points weakens, thereby decreasing the variance of the projection of the state onto the readout vector.
This setting has already been studied and shown to be possible to learn for ANNs (Orhan and Ma, 2017). In this study, we also confirmed the performance of NNs on the point estimation task ( fig. 8(a)). To compare sampling-based and MAP probabilistic inferences, we evaluated accuracies in terms of MSE between time-averaged outputs and mean value of the posterior distribution given various inputs as follows: Remarkably, the results showed the RNN is more accurate in the sampling-based task than in the MAP task ( fig.8(c)). In other words, the sampling-based probabilistic inference on the posterior distribution works as an inductive bias in the estimation of the posterior mean. Notably, this difference in accuracy between MAP estimation and sampling is subtle in the FFNN [ Fig. 8(b)].
In the RNN trained to perform point estimation, each pair (µ post , σ post ) of the mean and standard deviations corresponds to a fixed point h * (µ post , σ post ) similar to the samplingbased task. Since it is implied that the geometry of these fixed points affects the accuracy of the output (Cohen et al., 2020), we analyzed it.   9 shows that h * (µ post , σ post ) takes different positions when σ post varies, even if µ post is constant. By contrast, the output y(t) is required to be fixed when µ post is fixed, regardless of the changes in σ post . To fulfill this requirement, the NNs need readout vector W out to be aligned orthogonal to the direction in which fixed points h * move depending on σ post . Since this condition should be satisfied for every µ post , changes in h * are expected to be small when µ post is fixed and σ post is variable.
Assuming that h * is sufficiently low-dimensional, the varying direction of h * is characterized by PCs. Hence, for a detailed characterization, we projected a set (manifold) of fixed points h * (µ post = −5, 0, 5) given µ post = −5, 0, 5 onto the first and second PCs computed under µ post = 0. If the direction along which the fixed points move for different µ post does not change when σ post varies, the projection of the manifold must also look invariant. As shown in Fig.9, the NN trained on the sampling-based task satisfies these conditions while the geometry of the fixed-point manifold in the point estimation NN is apparently variant to σ post .
Quantitatively, these geometric characteristics can be investigated in terms of absolute inner product of fixed point v | takes values within the range (0, 1); the larger this value is, the more parallel manifolds for different posterior means are aligned. This quantity takes larger values in the NN trained on sampling-based inference ( fig. 10), which means that the manifolds are more nearly parallel to each other than in the NN for point estimation. This characteristic implies a mechanism wherein the NN can output proper values depending only on µ post , independent of σ post , by choosing the readout vector appropriately, and this mechanism underlies the superiority of the RNN trained on sampling to the one trained on MAP estimation.
These geometric characteristics in sampling might be due to the learning strategy that explicitly includes effects of σ post in the output y(t). In summary, this is an example of inductive bias (Baxter, 2000;Whigham, 1995;Helmbold and Long, 2015;Haussler, 1988) in which a constraint leads to better accuracy in estimating µ post .

Discussion
In this study, we trained two types of ANNs, the FFNN and the RNN, on the cuecombination task to investigate their dynamical mechanisms and characteristics of performing sampling-based probabilistic inferences. To achieve this, we made input signals encoding external cues by PPC and trained the ANNs to generate the output as a sampling of posterior probability distribution using the gradient descent scheme.
First, the results showed that training was successful for both ANNs. Hence, samplingbased probabilistic inferences are possible using the ANNs. However, the mechanisms underlying the sampling in FFNN and RNN differ: the FFNN adjusts amplitudes of the fluctuation of the input signals appropriately when they are feed-forwarded into the hidden layer to realize a sampling from the posterior distribution; whereas, in the RNN, dynamics in the hidden layer, which can be decomposed into fixed points and perturbations around them, play a crucial role in the sampling. Moreover, it was revealed that the RNN employs two different mechanisms depending on the posterior variance. When the posterior variance was small, the angle of the fluctuation of the internal state h(t) was considered, whereas the landscape of the system near fixed points was manipulated when the posterior variance was large. It is also suggested that this difference in the sampling mechanisms leads to the superiority of the RNN in terms of accuracy.
Further, we trained the FFNN and RNN on a similar cue-combination task but in a MAP estimation setting, not sampling-based, to compare the sampling-based probabilistic inference with point estimation. The results showed that, in the RNN, the accuracy of estimating mean values µ post of the posterior distribution via sampling was higher than that via point estimation, which could be explained by differences in geometric characteristics, and that might be an example of the roles of the sampling as an inductive bias. The changes in the fixed-point manifolds constructed by varying posterior variance σ post for different µ post were more parallel to each other in the NN trained to perform the sampling than in that trained for point estimation, leading to ease for the readout vector alignment to be invariant to changes in the posterior variance σ post , which accurizes the NN (Susman et al., 2021). This characteristic can be thought to be obtained under constraints in which the NN needs to constantly behave for different µ post .
In this study, we first clarified the utility of sampling in information processes. In addition, it is suggested that the sampling can contribute to good performance in estimating important statistics, such as the MAP inference, not only in the estimation of ambiguities of information. If the sampling mechanisms in this study are equipped in the brain, a comparison of the accuracy between point estimation and sampling-based inference would also show a similar result.
We also highlighted differences between FFNNs and RNNs. In a previous study (Orhan and Ma, 2017), FFNN was mainly trained on the point estimation setting, and differences with RNNs were not discussed. However, considering the sampling, there were clear differences between them in terms of accuracy and mechanism. These results can provide arguments on the significance of recurrent connections among neurons in the brain from another perspective. Particularly, this study suggested important results to investigate what roles dynamical characteristics in the information process play (Orhan and Ma, 2019).
As we would like to investigate the relationships between the sampling mechanism and PPC for the first step, we did not add the internal noise in neural dynamics. However, internal noise is universally present in the brain, and it probably contributes to implementing probabilistic inference. Indeed, previous studies have investigated the sampling inference of RNN driven by the internal noise (Echeveste et al., 2020;Aitchison and Lengyel, 2016). Hence, how internal noise and noise due to PPC each affect sampling needs to be investigated in more detail. In addition, for simplicity, we adopted a model that assumes that PPC is uncorrelated between input neurons. However, since a large body of work shows that neurons can be correlated (Averbeck et al., 2006;Moreno-Bote et al., 2014), it is important to examine PPC that correlates among input neurons.
The model we used for our research is an idealized model, and there are differences in the way the brain actually works. For instance, The models employed in this study were trained using the back-propagation algorithm (Werbos, 1990), and the loss function was KLD, which is an artificial setting. Although it is still a matter of debate as to what kind of training algorithm is equipped in the actual brain (Lillicrap et al., 2020;Whittington and Bogacz, 2019), many reports are claiming that the behaviors of ANNs trained using the back-propagation algorithm are often similar to activities in the brain (Richards et al., 2019;Yang and Wang, 2020;Mante et al., 2013), even though it is said to be physiologically implausible Lillicrap et al., 2016). Therefore, we expect that the results from this study agree with the dynamical features of the brain known from previous physiological studies or those that will be revealed in future studies.

Appendix B: Coordinate Transformation Task
To verify that sampling-based inference is possible for other tasks, we trained the coordinate transformation task introduced in (Beck et al., 2011). This task considers the same setting as the cue-combination task, where signals following two gaussian distributions are input, but the posterior distribution to be inferred is given by a gaussian distribution p post = N (µ post , σ 2 post ) with the following mean and variance: When this task was trained, the distribution of the output became closer to the posterior distribution through learning( Fig.14(a)), and the mean and the standard deviation of the output had values close to the mean and the standard deviation of the posterior distribution( Fig.14(b)). It was also confirmed that the output y(t) behaved stochastically, as shown in Fig.14(c). From these results, it was found that NNs could learn sampling-based inference in the coordinate transformation task setting as well as the cue-combination task. Each scatter corresponds to a pair of input signals (x A , x B ). Here, µ A and µ B satisfies −15 ≤ µ A , µ B ≤ 15. (c) The output y(t) of the network given a pair of input signals. One can see that totally stochastic output, neither regular nor cyclic, appears.

Appendix C: Information efficiency in the NNs
To see how efficient the information processing performed by the networks is, we computed information losses of the FFNN and RNN. Information loss is computed as KLD from the optimal posterior distribution to the histogram of outputs of a network, normalized by mutual information between input cue and label data (Qamar et al., 2013): MI(c A , c B ; s) = log p(s|c A , c B ) − log q trial log p(s|c A , c B ) − log p(s) trial .
The results show that in both of the FFNN and the RNN, the computed information losses are low, which suggest these networks can perform efficient information processing. By comparing the information loss between the two networks, one can see that it is lower in the RNN. This comparison can also be a support for the claim that the RNN performs more efficient sampling-based probabilistic inference. Figure 13: Information losses of the two networks. One can see that both the networks can perform efficient information processing. Especially, the information loss of the RNN is slightly lower than the FFNN. The results suggest that the RNN conducts more efficient information processing compared to the FFNN, from the perspective of information theory. p-value calculated by statistical test was 3 × 10 −20 .

Appendix D: Effect of the size of NNs
To confirm that the difference in accuracy between FFNN and RNN is fundamental one, we trained the cue-combination task in FFNN with different size of NNs and compared the accuracy. The FFNN with 750 internal neurons and the RNN with 300 internal neurons have similar number of parameters.
Although the accuracies are different depending on the size, the difference between FFNN and RNN, especially the accuracy on standard deviation, is remarkable (Fig.12). The result shows that there is a fundamental difference in accuracy between FFNN and RNN as discussed in the main part.