Entropy 2025, 27, 62 29 of 33
ing the temporal dynamics of belief changes in experimental participants. Dynamic belief
trajectories can then be related to other (for example, physiological) measures, as is usual
in model-based neuroscience [65]. This method can also, in principle, be used for fitting
models to other types of experimentally observable systems, like animals, organoids [66],
and simulated or emergent systems [67]. The package can also be used for agent-based
modelling in general, for repeating earlier analyses with sampling based model-fitting
and for comparing POMDP-based AIF models directly to other types of models.
Since they implement full approximate Bayesian inferences, AIF models are compu-
tationally more demanding than many approaches traditionally used in cognitive and
agent-based modelling, in particular when the dimensionality of the generative model is
large. This means that models with highly multidimensional or complex behaviour and
large numbers of agents can be computationally infeasible to implement, especially given
the additional computational demands introduced by fitting these models to empirical
data. Avenues for addressing this implicit scaling problem were proposed in the context of
machine learning applications [68,69], and with the use of simplifying assumptions—the
use of which are ubiquitous in computational modelling—AIF has been used to model
multi-agent phenomena, such as opinion dynamics [15,70], coordinated foraging [71] and
fish school movements [12]. It remains to be explored how AIF models can be applied to
highly complex natural phenomena, such as a concrete election, which underscores the
need for efficient but flexible and accessible software tools in the field.
There are many ways in which ActiveInference can be improved. It would be useful
to extend the set of dynamic belief states to include prediction errors since they are often
used for model-based neuroscience. This would entail departing from discrete state-space
(i.e., POMDP) models to consider continuous state-space models apt for Bayesian filtering
or predictive coding (see below). An alternative would be to generate prediction errors
from belief updating under discrete models, where prediction errors can be read as the
(KL) divergence between posterior and prior beliefs (i.e., complexity or information gain).
A simple interface could be added for creating custom parametrisations of the requisite
parameters that could be parametrised with Boltzmann or Gibbs distributions, as opposed
to Dirichlet distributions. Parameter learning could be extended to all generative model
parameters, as well as in parametrised forms (e.g., so that the Boltzmann parameter or
temperature of the parameters that are learned); similarly for the precision over expected
free energies γ. Preference priors should also be implementable for environmental states,
in addition to observations, and A can be made action dependent.
A library of pre-made canonical POMDP models could be created so that users can eas-
ily implement them directly. Alternatives to the fixed-point iteration method for updating
posteriors over environmental states could be included, like the marginal message passing
algorithm. There are various ways in which the package can be made more computationally
efficient, and it could be compared with other software implementations. There are plenty
of utility and plotting functions that could be added to the package to make it easier to
use and to facilitate integration with the model-fitting packages it relies on; for example,
to allow for combining the models with linear regressions to compare parameters values
of different populations in a single model. More complex types of POMDP models can
also be added, like hierarchical and temporally deep POMDPs. Model structure learning
could be considered, where different model structures are compared and chosen between