What AI Agents Can Learn from the Bayesian Brain

Utpal Kumar   5 minute read      

Brain-inspired belief paths change in strength as observations feed an experiment-and-computer feedback loop.
Conceptual illustration generated with AI assistance.

In plain words: A useful agent should preserve competing explanations, the evidence behind them, and the reasons its beliefs change. Neuroscience, autonomous laboratories, and language-model research offer useful lessons for designing that memory.

A download keeps failing on your laptop. An AI agent suggests that the server is overloaded. You return tomorrow. Does it remember which checks supported that explanation, and what would make it reconsider?

A saved sentence saying “probably a server problem” loses much of the investigation.

My article on expected information gain focused on choosing the next observation. Here, I want to examine what survives between observations: an agent’s changing understanding of the problem.

What the brain suggests

The Bayesian view treats perception as inference about hidden causes. We observe signals and revise expectations about what produced them. An indistinct shape becomes easier to identify when we move closer or turn on a light.

Ernst and Banks (2002) found that people combined visual and touch information much like a statistically efficient estimator, giving greater weight to the more reliable cue. This supports uncertainty-sensitive perception in their task, rather than proving that every brain operation implements Bayes’ rule.

Active inference brings action into this picture. Friston et al. (2015) formalized how actions can pursue preferred outcomes and clarify what is happening. Their expected-free-energy framework includes both goal-directed and information-seeking contributions. Expected information gain is only one part.

A belief should have a history

Return to the download. Suppose exactly one of three persistent causes is responsible:

  • A Wi-Fi problem: initial probability 50%
  • A server problem: 30%
  • A laptop-specific problem: 20%

These probabilities and the following likelihoods are invented for teaching. Real faults can coexist, and practical probabilities need defensible evidence.

Another device successfully downloads the same file over the same Wi-Fi. Suppose our model assigns this result probabilities of 10%, 20%, and 80% under the three explanations, respectively.

Bayes’ rule multiplies each initial probability by how likely the result is under that explanation, then rescales the products to sum to one:

  • Wi-Fi: 0.50 × 0.10 = 0.05
  • Server: 0.30 × 0.20 = 0.06
  • Laptop: 0.20 × 0.80 = 0.16

The total is 0.27. Dividing by it gives updated probabilities of approximately 18.5%, 22.2%, and 59.3%.

The laptop explanation leads, but intermittent server failures remain possible.

If the run ends here, save the probabilities, observation, source, time, and likelihood assumptions. Otherwise, “laptop issue” may harden into a fact when the next run resumes.

Suppose the provider later reports intermittent failures at that endpoint. Depending on how strongly this report distinguishes the explanations, the server could become the leading hypothesis again. The agent should explain the revision and check that both observations concern the same continuing incident.

Copied status reports and repeated errors can share a source or cause. Counting them as independent evidence can manufacture certainty.

What neuroscience actually supports

Zhang et al. (2025) recorded EEG while 25 people repeatedly chose between options with uncertain outcomes in a contextual bandit task. An active-inference model fit choices better than the reinforcement-learning alternatives tested, while EEG measures correlated with model-derived quantities.

Some neural findings were sensitive to correction for multiple comparisons. This supports the framework within a particular experiment; it does not establish a universal brain theory. For engineering, the useful idea is to make an agent’s response to uncertainty explicit and test whether that improves decisions.

Biology offers a working loop

Rapp et al. (2024) reported SAMPLE, an autonomous protein-engineering platform. Gaussian-process models learned relationships between protein sequences and measured properties. Bayesian optimization selected new sequences, an automated laboratory tested them, and the results updated the model.

Four agents explored a defined enzyme-sequence space and found improved thermal tolerance. This demonstrates a working connection between uncertain predictions, physical measurements, and subsequent decisions.

SAMPLE optimized protein properties. It did not implement active inference or demonstrate an LLM discovering molecular mechanisms. Its relevance here is the preserved, revisable model linking one experiment to the next.

Language models can learn better updating

Qiu et al. (2026) tested language models that inferred a user’s preferences from successive choices between flights. Off-the-shelf models often improved little after the first interaction.

Fine-tuning three model families on interactions generated by a Bayesian assistant improved adaptation, with transfer to hotel recommendations and a web-shopping task. Bayesian-teacher examples outperformed examples from an oracle supplying correct choices.

Training on decisions made under uncertainty can therefore be more useful than training only on perfect choices. These behavioral results do not establish an inspectable posterior inside the models, or generalization to arbitrary investigations. A generated “80% confident” is not automatically a Bayesian posterior; its reliability needs independent testing.

What I would put inside the harness

The following is an engineering proposal, not a complete architecture validated by those studies. I would add a structured belief record to the agentic harness.

Separate observations from explanations. “The download failed” is an observation. “The server is overloaded” is an explanation. Preserve alternatives and supporting evidence.

Give probabilities a source. Use a statistical model, historical measurements, or labeled assumptions. Let tested code perform updates. Without defensible likelihoods, keep qualitative alternatives instead of invented percentages.

Preserve evidence across runs. Record sources, timestamps, settings, and dependencies between observations. Check what changed before resuming. An earlier conclusion is not a fresh measurement.

Make revisions visible. Save old and new beliefs with the evidence that changed them. If every explanation fits poorly, revisit the hypothesis set. Even bad explanations can receive probabilities summing to one.

Connect learning to a decision. Consider whether more evidence could change the next action, alongside cost, permissions, and stopping conditions.

The language model can propose explanations and interpret outputs. The surrounding software should preserve evidence and enforce constraints. Updating this record need not change the model’s weights.

Test the benefit

Compare this design with ordinary text memory, using the same tools and budget. Include delayed evidence, duplicate reports, misleading clues, and changing causes. Check conclusions, unnecessary repeated work, and revisions after a restart. Evaluate probability calibration across many cases with known outcomes. For example, events assigned a 70% probability should occur about 70% of the time.

The lesson I would borrow from the Bayesian brain is simple: keep uncertainty available for the next decision. An agent’s memory should make it easier to reconsider yesterday’s answer.

References

Ernst, M. O., & Banks, M. S. (2002). Humans integrate visual and haptic information in a statistically optimal fashion. Nature, 415(6870), 429–433. https://doi.org/10.1038/415429a

Friston, K., Rigoli, F., Ognibene, D., Mathys, C., Fitzgerald, T., & Pezzulo, G. (2015). Active inference and epistemic value. Cognitive Neuroscience, 6(4), 187–214. https://doi.org/10.1080/17588928.2015.1020053

Qiu, L., Sha, F., Allen, K., Kim, Y., Linzen, T., & van Steenkiste, S. (2026). Bayesian teaching enables probabilistic reasoning in large language models. Nature Communications, 17(1), Article 1238. https://doi.org/10.1038/s41467-025-67998-6

Rapp, J. T., Bremer, B. J., & Romero, P. A. (2024). Self-driving laboratories to autonomously navigate the protein fitness landscape. Nature Chemical Engineering, 1(1), 97–107. https://doi.org/10.1038/s44286-023-00002-4

Zhang, S., Tian, Y., Liu, Q., & Wu, H. (2025). The neural correlates of novelty and variability in human decision-making under an active inference framework. eLife, 13, Article RP92892. https://doi.org/10.7554/eLife.92892.4

Prepared by Utpal Kumar with AI assistance.

Disclaimer of liability

The information provided by the Earth Inversion is made available for educational purposes only.

Whilst we endeavor to keep the information up-to-date and correct. Earth Inversion makes no representations or warranties of any kind, express or implied about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services or related graphics content on the website for any purpose.

UNDER NO CIRCUMSTANCE SHALL WE HAVE ANY LIABILITY TO YOU FOR ANY LOSS OR DAMAGE OF ANY KIND INCURRED AS A RESULT OF THE USE OF THE SITE OR RELIANCE ON ANY INFORMATION PROVIDED ON THE SITE. ANY RELIANCE YOU PLACED ON SUCH MATERIAL IS THEREFORE STRICTLY AT YOUR OWN RISK.


Leave a comment