et al. 2021), symptom perception 
(Pezzulo et al. 2019), depression (Barrett et  al. 2016), and many 
others (Khalsa et al. 2018, Paulus et al. 2019). Intuitively, assign-
ing excessively high weight to noisy sensations yields an incorrect 
inference that tracks the noise rather than the correct state of 
the estimated variable system (i.e. overfitting), whereas assigning 
excessively low weight to sensations (or excessively high weight to 
prior knowledge) makes the system poorly responsive to incom-
ing observations that might signal a change in the state of the 
system—and both are examples of aberrant inference (Friston 
et al. 2014).
Figure 2 provides a formal illustration of the above by plot-
ting some examples of Bayesian inference using generative models 
under various levels of precision of the model components. For 
simplicity, we focus on a simplified example of inference of an 
interoceptive variable: one’s heart rate. Heart rate is a “hidden 
variable” in Bayesian parlance since it is not directly observable 
but needs to be inferred through two sources of information: 
prior knowledge about the most likely heart rate and sensory 
(heartbeat) observations. The top panel of Fig. 2 shows a series 
of (noisy) heartbeat observations. In the beginning, they are 
in the normal range for an adult (time steps 1–10), then they 
increase significantly, simulating tachycardia (time steps 11–20), 
then they go back to the normal range (time steps 21–30), then 
they decrease significantly, simulating bradycardia (time steps 
31–40), and finally, they go back to the normal range (time steps 
41–50).
The second panel of Fig. 2 shows the Shannon surprise of 
an inference model that estimates the current heart rate using 
the two standard components of a generative model. The for-
mer component is the prior, which encodes the person’s a priori 
probabilistic belief (i.e. probability distribution) about her “nor-
mal” heart rate range; here, the prior is a Gaussian centered on 
67 and has a precision of 0.11. The latter component is the likeli-
hood, which encodes the probabilistic mapping between sensory 
(heartbeat) observations and the hidden state (heart rate); here, 
the likelihood is a Gaussian centered on the current heart rate 
with an additional bias of 15 pulses, and the panel shows the 
results for 10 values for precision obtained by subdividing the 
range [0.1,10] into equal intervals. The results shown in the second 
panel of Fig. 2 show that Shannon surprise increases dramatically 
during episodes of tachycardia and bradycardia, which are far 
from the normal range. The pattern of results is the same across 
all levels of likelihood precision. However, the inference with a 
very high precision (a precision of 10) tracks more closely the noise 
sensory signals and can therefore lead to more extreme results.
The third panel shows the Bayesian surprise (or the Kullback-
Leibler divergence between posterior and prior probability distri-
butions) over time. This is a measure of how much dissimilar the 
posterior and the prior are, and it always decreases as a result of 
inference, but note that it decreases much more rapidly when the 
precision of the likelihood is 10, which is another indication that 
the posterior is “overfitting,” meaning that the inference result is 
excessively biased by the likelihood distribution.
Finally, the two bottom series of panels are organized in two 
(left and right) columns, which show the first five time steps of 
inference for the two cases with high precision (of 10) and low pre-
cision (of 0.1) of the likelihood, respectively. In these plots, the prior 
distributions are in blue, the posterior distributions are in green, 
and the likelihoods are in red. It is possible to note that in the left 
(high precision) panels, the posterior inference closely follows the 
likelihood (it “overfits”) after five time steps and the inferred heart