The Brain as a Bayesian Machine: From Computational Cognitive Neuroscience to Psychotherapy
1. The Brain as a “Bayesian Machine”: Uncertainty, Prediction, and the Illusion of Control
1.1. The Bayesian approach at the intersection of cognitive neuroscience, clinical psychology, and cognitive behavioral therapy
One of the central problems in studying the human brain can be expressed through the following question: how can we understand the world when we never have complete information about it?
Our sensory systems do not provide a complete and/or perfect picture of reality. Visual, auditory, and bodily signals are often incomplete, ambiguous, and dependent on context. We cannot directly “see” another person’s intentions, predict the future, or say with complete certainty what a particular bodily sensation means. The brain must infer the unobservable or hidden causes of reality and the motives behind people’s behavior on the basis of limited data.
This problem is one of the starting points of Bayesian cognitive neuroscience. Biological cognitive systems, such as the brain, operate under uncertainty, and probabilistic models allow us to formally describe how previously acquired knowledge can be combined with, or challenged by, incoming information. This gives rise to the idea that, in light of all this, the brain can be viewed as a “Bayesian machine.”
However, an important scientific clarification is necessary from the outset. This claim should not be understood literally, as though neurons consciously calculate Bayes’ formula. It is more accurate to say that a number of regularities in human perception, learning, and decision-making can be effectively described as Bayesian inference. The extent to which the brain actually represents and implements this particular computational algorithm at the neural level remains a subject of empirical research.
1.2. What does the “Bayesian brain” do?
The idea underlying the Bayesian approach is fairly simple. Imagine that a particular brain has a particular hypothesis about the world. For example: “This situation is dangerous.”
Before any new information is received, this hypothesis already has a certain probability. We call this its prior probability. Then new information—evidence—becomes available. The brain evaluates how compatible this information is with the hypothesis: the likelihood. The result is a revised belief: the posterior probability.
The classical form of Bayes’ theorem is:
P(H | D) = P(D | H) × P(H) / P(D)
Here, P denotes probability, H is the hypothesis, and D is the observed data.
In psychological terms, this can be expressed much more simply:
Previous belief + new experience → revised belief
This simple scheme is extremely important for psychology. We never begin perceiving the world “from scratch.” Our interpretation of the present situation is always influenced, to some extent, by previous experience, learned regularities, expectations, memory, beliefs, and the current context.
1.3. The brain does not merely respond to the world—it also predicts it
The idea of the Bayesian brain is closely related to predictive processing. According to certain predictive coding models, the nervous system generates hierarchical predictions about what should happen next. Higher-level systems send predictions down to lower levels, while the difference between sensory information and the prediction travels upward as a prediction error.
For example, imagine walking through a dark corridor at night and seeing an elongated object in a corner without being able to identify it clearly. The visual information is incomplete. If the presence of a snake seems plausible in that environment, the brain may quickly generate the hypothesis: “It might be a snake.” You move closer and see that it is simply a belt. The new sensory data do not match the prediction. A prediction error arises, allowing the internal model to be updated.
In this sense, perception can be understood not merely as the passive reception of external information, but also as the continuous construction and reconstruction of the most probable hypothesis explaining the world. However, not all prediction errors contribute equally to improving that hypothesis. Another concept is crucial here: precision.
1.4. How precise are my beliefs?
In a Bayesian system, what matters is not only what we predict, but also how confident we are in the precision of those predictions. Precision can loosely be understood as the “degree of confidence” associated with a probability distribution. Mathematically, in Gaussian systems, it is the inverse of the variance.
Precision = 1 / variance
The higher the precision, the greater the influence a particular belief or prediction error may have on subsequent inference. This is where Bayesian cognitive neuroscience forms an interesting bridge to clinical psychology.
Imagine a person who holds the following belief with a very high degree of confidence: “If I make a mistake in front of other people, they will judge me negatively.” The problem here may concern not only the content of the belief, but also its excessively high precision. New information—“I made a mistake, but nobody reacted much”—may then have little influence because the prior prediction is too “strong.” The person may even find an explanation that preserves it: “They were simply too polite to show what they really thought.” Thus, in some cases, a psychological problem can also be understood as a difficulty in updating beliefs.
1.5. Uncertainty as a fundamental cognitive problem
Uncertainty lies at the center of this entire system. The brain must constantly evaluate: What is happening? What is likely to happen? What can I do? What will happen if I make a mistake? How much can I trust my own prediction?
Contemporary computational psychology even proposes distinguishing between different types of uncertainty. Two are particularly important. The first is epistemic uncertainty, which arises from a lack of knowledge. For example: “I do not know what the result of the examination will be.” In this case, it is theoretically possible to obtain new information and reduce that uncertainty. The second is aleatoric uncertainty[1], which arises from the variability or randomness of the world itself. For example, even the best economic model cannot predict the state of the market a year from now with absolute precision. This uncertainty cannot be eliminated completely, even by collecting large amounts of information.
A contemporary Bayesian model of anxiety proposes applying this distinction to clinical psychology as well. At this point, a particularly important idea for clinical psychology and psychotherapy needs to be emphasized: mental health does not require the elimination of uncertainty. Rather, it involves learning to distinguish between uncertainty that can be reduced by gathering information and uncertainty that must be tolerated.
1.6. Anxiety and intolerance of uncertainty
In clinical psychology and cognitive behavioral therapy—hereafter CBT—this phenomenon is studied through the concept of intolerance of uncertainty (IU). Initially, it was primarily viewed as a mechanism underlying generalized anxiety disorder and pathological worry. Today, it is understood as a broader, transdiagnostic factor associated, to varying degrees, with generalized anxiety disorder, obsessive-compulsive disorder, posttraumatic stress disorder, and other problems, mainly within the anxiety spectrum. It is now regarded as one of the central concepts in contemporary psychopathology.
Intolerance of uncertainty is not simply “disliking uncertainty.” It can involve beliefs such as: “I must know for certain what will happen,” “If I do not know for certain, something bad will probably happen,” “I cannot relax until I am completely certain,” and “If a bad outcome is possible, I must prevent it.” In this state, uncertainty itself begins to be perceived as a signal of danger.
Various neurocognitive studies have repeatedly reported positive correlations between high intolerance of uncertainty, strong emotional responses to uncertainty, and increased activity in the anterior insula and the amygdala. However, it would be incorrect to speak of an “uncertainty center” in the brain, because these findings describe the functioning of interconnected neural networks, and the results across studies are not entirely consistent.
1.7. Uncertainty and the need for control
Here, the Bayesian approach naturally connects with another psychological phenomenon that appears mainly in the context of anxiety disorders: the need for control.
The need for control is not inherently pathological. On the contrary, the ability to influence the environment and understand the relationship between one’s actions and their outcomes is highly adaptive from a biological perspective. Controllability can reduce responses to stressful situations and threats, while the opportunity to choose is itself a positive experience.
The problem begins when “It is good to control what I can” becomes “I must control everything that might involve danger.” A person with low tolerance of uncertainty may continually try to reduce uncertainty by checking, seeking reassurance, asking questions, predicting, planning, or avoiding. In the short term, this does work: anxiety decreases. Precisely for this reason, these behavioral patterns are reinforced.
1.8. The illusion of safety
In this context, the role of safety behaviors or protective actions is particularly interesting.
For example, a person with social anxiety disorder may memorize every sentence before a meeting. A person with panic disorder may never leave home without “emergency” medication. Someone with obsessive-compulsive disorder may repeatedly check whether the door is locked. A person with health anxiety may regularly measure their blood pressure. After these actions, the person feels safer. However, an important irrational shift occurs here. If the negative event does not happen, the person does not conclude that their prediction was wrong. Instead, they conclude: “Nothing bad happened because I took precautions.”
As a result, the prior prediction is not updated. This phenomenon can provisionally be called an illusion of safety. It should be noted that this term is not a diagnostic construct, but a clinical description of a situation in which a person’s sense of safety rests on the performance of a safety behavior rather than on actual guarantees or evidence of safety. For this reason, safety behaviors may not only reduce distress in the moment, but also maintain an irrational belief about threat in the long term.
1.9. The illusion of control
A closely related phenomenon is the illusion of control. It arises when a person overestimates the actual causal relationship between their own action and an outcome. An example is believing that checking the locked door three times every time one leaves home is what protects the apartment from burglars.[2] However, the fact that two events occur in succession does not mean that one causes the other.
Clinically, this can create a closed loop:
Uncertainty → anxiety → controlling action or behavior → reduction in anxiety → reinforcement of the behavior → stronger belief that control is necessary
The person gradually learns not to live with uncertainty, but instead to pursue an illusory sense of safety by trying to control every uncertainty and make it controllable.
1.10. How can CBT be understood from a Bayesian perspective?
At this point, the Bayesian approach becomes particularly interesting. Several CBT methods can be reformulated in computational terms. This does not mean that we have already established their specific neural mechanisms. However, it creates an extremely useful research and conceptual framework.
| CBT concept | Bayesian/computational interpretation |
|---|---|
| Dysfunctional belief | A belief with a high prior probability or excessively high precision |
| Cognitive restructuring | Revision of a belief or model |
| Behavioral experiment | Active gathering of information to distinguish between competing hypotheses |
| Exposure | Testing a prediction and learning through prediction error |
| Avoidance | A behavioral strategy that briefly reduces uncertainty or anticipated danger |
| Safety behavior / protective action | An action that briefly reduces uncertainty but may interfere with belief updating |
| Therapeutic homework | Gathering new evidence in real-world conditions |
| Relapse | Reactivation of an old prior probability or behavioral strategy in a particular context |
From this perspective, CBT can be understood not as a method of “replacing negative thoughts with positive ones,” but as a process of scientifically testing one’s own predictions.
For example, imagine a client who believes: “If, at some point during a conversation, I do not know what to say, other people will realize that I lack confidence and competence.” This is the prior. Before meetings, the client spends a long time preparing, mentally rehearses sentences, avoids eye contact, and speaks as little as possible. These are safety behaviors. The meeting ends without any obvious negative event, and the client concludes: “Everything went well because I prepared very thoroughly and was careful.” Thus, the evidence does not contradict the prior.
A CBT behavioral experiment, however, can gradually reduce safety behaviors. For example, the client may refrain from preparing every answer before a conversation. Only then does the client’s prediction become testable. In other words, it becomes possible to test the prior: “If I do not control the conversation, people will judge me negatively.” Afterwards, it becomes possible to compare what was predicted with what actually happened.
This is, essentially, the logic of Bayesian updating.
In any case, the aim of CBT is not to establish 100% certainty about safety. One of the most important features of therapeutic work follows from this. If an anxious client asks, “How can I be certain that this definitely will not happen?”, the therapist’s goal should not be to provide a 100% guarantee. Such a guarantee almost never exists in the real world. If we continually provide certainty, we may inadvertently reinforce the very belief that “To feel calm, I need to be 100% certain that nothing bad will happen.”
A more rational approach may be to ask: “How likely is this event to happen? What evidence supports that estimate? And can I act even if some uncertainty remains?” This is no longer certainty seeking, but probabilistic thinking.
1.11. Training tolerance of uncertainty
From a Bayesian perspective, the aim of psychotherapy can be formulated not as “reducing uncertainty,” but as assessing uncertainty more accurately and behaving more flexibly under uncertain conditions. When uncertainty can be reduced, we begin gathering information. When it lies outside our sphere of influence and cannot be reduced, we need to learn to live with it. In this sense, confronting uncertainty and approaching it—uncertainty exposure—is an important therapeutic method and process.
The person gradually gives up persistent reassurance seeking, checking, avoidance, or excessive control and gains the opportunity to learn through experience: “I can remain uncertain and still continue to act.” Naturally, this is not simply a skill of “relaxing,” but a change in the person’s model of adaptation to the environment.
1.12. The brain as a Bayesian machine: a useful model or a new dogma?
The idea of the Bayesian brain can be extremely appealing. It brings together perception, learning, prediction, decision-making, uncertainty, and, in some models, even action.
Within active inference, an organism not only changes its beliefs to bring them into alignment with the world, but also changes the information it receives through its actions. In these models, actions can have both pragmatic value—obtaining a desired outcome—and epistemic value—reducing uncertainty and acquiring new information. This is, of course, an excellent language for describing psychotherapy as well.
However, it is essential to avoid creating a new neuroscientific dogma. Predictive processing, predictive coding, Bayesian inference, the free-energy principle[3], and active inference are not the same concepts. The fact that a behavior can be described using a Bayesian model does not mean that the neural system implements and embodies that particular algorithm.
Thus, it is scientifically more accurate to say not that the brain has been proven to be a Bayesian machine, but that the human brain solves fundamental problems of inference under uncertainty, and that Bayesian and predictive models are among the most powerful contemporary computational frameworks for describing many of these problems.
Summary
In some respects, human life can be understood as a continuous series of probabilistic predictions. We predict what other people will think of us, whether a bodily sensation is safe, whether a relationship will continue, and whether our work will succeed. When the world refuses to provide us with 100% guarantees, we sometimes try to create them ourselves through checking, avoidance, reassurance seeking, excessive control, or safety behaviors.
However, complete control is most likely not only impossible, but also undesirable. Psychological flexibility involves the ability to manage what is controllable and tolerate uncertainty that cannot be eliminated. In this sense, Bayesian cognitive neuroscience and cognitive behavioral therapy meet at the same point.
The aim of CBT is not to shield a person from uncertainty. It helps them revise overly rigid and irrational predictions about the world, test those predictions through real experience, reduce behaviors that create an illusion of safety, and learn to live in a world where uncertainty is not evidence of danger, but an inevitable feature of reality.
Perhaps this is the most important clinical implication of the Bayesian approach: healthy thinking requires not absolute certainty or guarantees, but a willingness to revise one’s beliefs in light of new data.
References
Blakey, S. M., & Abramowitz, J. S. (2016). The effects of safety behaviors during exposure therapy for anxiety: Critical analysis from an inhibitory learning perspective. Clinical Psychology Review, 49, 1–15.
Dugas, M. J., Koerner, N., & Freeston, M. H. (2026). State of the science: Intolerance of uncertainty. Behavior Therapy, 57(1), 17–36.
Friston, K. (2010). The free-energy principle: A unified brain theory? Nature Reviews Neuroscience, 11, 127–138.
Hedley, F. E., Larsen, E., Mohanty, A., Liu, J. Z., & Jin, J. (2026). Understanding anxiety through uncertainty quantification. British Journal of Psychology, 117(3), 795–808.
Knill, D. C., & Pouget, A. (2004). The Bayesian brain: The role of uncertainty in neural coding and computation. Trends in Neurosciences, 27, 712–719.
Leotti, L. A., Iyengar, S. S., & Ochsner, K. N. (2010). Born to choose: The origins and value of the need for control. Trends in Cognitive Sciences, 14(10), 457–463.
Ma, W. J., Beck, J. M., Latham, P. E., & Pouget, A. (2006). Bayesian inference with probabilistic population codes. Nature Neuroscience, 9, 1432–1438.
Sandhu, T. R., Xiao, B., & Lawson, R. P. (2023). Transdiagnostic computations of uncertainty: Towards a new lens on intolerance of uncertainty. Neuroscience & Biobehavioral Reviews, 148, 105123.
Wilson, E. J., Abbott, M. J., & Norton, A. R. (2023). The impact of psychological treatment on intolerance of uncertainty in generalized anxiety disorder: A systematic review and meta-analysis. Journal of Anxiety Disorders, 97, 102729.
Notes
[1] Uncertainty arising from the inherent randomness or noise within a system or its data, which usually does not disappear simply by collecting more data.
[2] This is, of course, a pattern of thinking characteristic of people with obsessive-compulsive disorder, although variations of it are also present in other anxiety disorders.
[3] The free-energy principle: the idea that biological systems seek to reduce the discrepancy between their predictions and incoming data, as well as uncertainty, by changing either their internal model or their actions. It is a theoretical framework proposed by Karl Friston (born in 1959, a British neuroscientist and theoretical neurobiologist), which attempts to explain how biological systems, including the brain, maintain their stability in uncertain and changing environments. Put simply, the idea is this: the brain constantly predicts what will happen, compares its predictions with incoming sensory data, and attempts to reduce the discrepancy between them.
