University of Oulu

Free energy principle inspired image recognition with convolutional neural networks

Saved in:
Author: Antikainen, Saku1; Paananen, Olli1; Tölli, Lassi1
Organizations: 1University of Oulu, Faculty of Information Technology and Electrical Engineering, Department of Computer Science and Engineering, Computer Science
Format: ebook
Version: published version
Access: open
Online Access: PDF Full Text (PDF, 2.3 MB)
Pages: 46
Persistent link:
Language: English
Published: Oulu : S. Antikainen; O. Paananen; L. Tölli, 2022
Publish Date: 2022-06-27
Thesis type: Bachelor's thesis
Tutor: Timperi, Kalle


Since its inception, the field of neuroscience has studied the way the human brain perceives and learns about its environment. Several theories have been created in an effort to understand these phenomena and few have garnered as much interest as Karl Friston’s free energy principle (FEP). The free energy principle states that any self-organizing system that is at equilibrium with its environment must minimize its free energy. The principle is essentially a mathematical formulation of how adaptive systems (that is, biological agents, like animals or brains) resist a natural tendency to disorder. Friston’s principle provides a framework that explains not only how the brain functions, but how any stable system organizes itself. Unsurprisingly a theory of this magnitude has created a lot of debate and received fair share of criticism. Whether or not Friston’s principle is correct or not, it has been proven to be a functional framework in the context of machine learning.

The goal of this thesis is to provide an example of a practical implementation of the FEP in the form of a Bayesian Neural Network (BNN), execute image classification on it, and compare its performance to another neural network, Convolutional Neural Network (CNN). Both of these networks are trained with a few different datasets and we are comparing the accuracies and training times of these networks.

We begin with an introduction to the key concepts that will help the reader to better understand the topic of this paper. We then present some related work on this topic and continue to introduce the architecture of the CNN and BNN models. In the subsequent section we showcase the results of the training for both the BNN and the CNN. We also provide an analysis of the results of the thesis and discuss possible future work. The final conclusions section contains a summary of the project. The results from the experiments suggest that a CNN is overall more accurate in classifying images. This does not mean that a BNN is useless since the BNN can express uncertainty which is something a CNN is incapable of.

see all

Copyright information: © Saku Antikainen; Olli Paananen; Lassi Tölli, 2022. Except otherwise noted, the reuse of this document is authorised under a Creative Commons Attribution 4.0 International (CC-BY 4.0) licence ( This means that reuse is allowed provided appropriate credit is given and any changes are indicated. For any use or reproduction of elements that are not owned by the author(s), permission may need to be directly from the respective right holders.