## 3 Bayesian Attractor Model  
Bayesian inference-based approaches are widely used in modelling the brain's cognitive abilities and human behaviors when making decisions. They can model the brain's ability to extract perceptual information from noisy sensory data. The BAM combines the concept of Bayesian inference and attractor selection, which allows changing decisions based on the changes in real-time noisy sensory data and computes an explicit measure of confidence that can be compared numerically when making decisions. During the accumulation of data by observations, the brain updates the posterior probability of attractors. This part of the model is called the cognitive process. Then, the brain makes a decision among the attractors when the posterior probability (confidence) of a decision (attractor) is high enough. This part of the model is called the decision-making process. [PERSON] et al. [8] presents a detailed description of the BAM. Here, we present the basics of the BAM as follows:  
The BAM has several fixed points \(\phi_{i}\), each of which corresponds to a decision alternative \(i\) with the long-term average \(\vec{\mu}_{i}\). The decision state is stored in variable \(\vec{z}\), which is updated according to an internal generative model. When a new observation is made at time \(t\), the BAM calculates the posterior distribution of the state variable \(\vec{z}_{t}\) denoted by \(p(\vec{z}_{t}\mid\vec{X}_{\Delta t:t})\) using the observations until time \(t\) denoted by \(\vec{X}_{\Delta t:t}\) where \(\Delta t\) is the step size of the observation time. The BAM uses a different generative model than the pure attractor model. Unlike the pure attractor model, where there is no feedback from the decision state to the sensory evidence, the decision state in the BAM affects both the internal predictions and gain. The generative model in the BAM, which assumes that the observations are governed by the Hopfield dynamics, updates the decision state \(\vec{z}\) at time \(t\) by the equation  
\[\vec{z}_{t}-\vec{z}_{t-\Delta t}=\Delta tf(\vec{z}_{t-\Delta t})+\sqrt{ \Delta t}\vec{w}_{t}, \tag{1}\]  
where \(f(\vec{z})\) is the Hopfield dynamics, and \(\vec{w}_{t}\) is the Gaussian noise variable with distribution \(\vec{w}_{t}\sim\mathcal{N}(\vec{O},\vec{Q})\), where \(\vec{Q}=(q^{2}/\Delta t)\vec{I}\) is the covariance of the noise process, and \(q\) is the parameter for dynamics uncertainty. The noise \(\vec{w}_{t}\) shows the propensity of the state variables to change. Higher noise means more frequent switches between the decision alternatives. Given a decision state \(\vec{z}\), the probability distribution over observations is predicted by  
The BAM infers the posterior distribution \(p(\vec{z}_{t}\mid\vec{X}_{\Delta t:t-\Delta t})\approx\mathcal{N}(\hat{\vec{z}}_{t}, \hat{\vec{P}}_{t})\) of state variable \(\vec{z}_{t}\) by using the unscented Kalman filter (UKF) [41]. While other filters like the extended Kalman filter (EKF) could be used, the UKF was selected as it has a good tradeoff between approximation deviation and computational time. The unscented transform is used to approximate the decision state and the predicted distribution of the corresponding next sensory observation.