Inference on homeostatic belief precision

.


Introduction
Biological organisms face the fundamental challenge of ensuring homeostasis: their physical states have to be kept within certain ranges in order to avoid violating boundary conditions of life. In a dynamically changing world, this requires adaptive behavior, driven by computations which take into account current and future states of both the body and the external environment. To achieve this, brain-body interactions (BBI) are essential. BBI consist of complex mechanisms for conveying information about numerous dimensions of bodily state (e.g., temperature, osmolality and oxygenation of blood, levels of metabolically and immunologically important molecules; for reviews, see (Critchley & Harrison, 2013;Khalsa et al., 2018)) from the body to the brain, and using this information to deploy regulatory mechanisms in a reactive manner (homeostatic control) or in an anticipatory fashion (allostatic control; Sterling, 2012).
It has been suggested that deciphering the mechanisms of BBI is not only important for understanding the physiological aspects of homeostatic/allostatic regulation, but that human cognition is grounded and constrained by the fundamental necessity of ensuring bodily homeostasis (Stephan et al., 2016;Turner, 2019;Ziemke, 2016). For this reason, BBI play a key role in theories of mental and psychosomatic disorders (e.g. Badoud & Tsakiris, 2017;Barca & Pezzulo, 2020;Bonaz et al., 2021;Garfinkel et al., 2016;Henningsen et al., 2018;Khalsa et al., 2018;Paulus, Feinstein, & Khalsa, 2019;Petzschner, Weber, Gard, & Stephan, 2017;Quadt, Critchley, & Garfinkel, 2018;Schulz et al., 2020;Smith, Badcock, & Friston, 2021;Stephan et al., 2016). (Here, we refer to "psychosomatic disorders" as including both the perception of aversive bodily states in the absence of objectifiable pathology and the occurrence of somatic disorders due to unsuitable descending regulatory signals from the brain.) From a clinical perspective, it would therefore be highly desirable to have methods that can assess characteristics of BBI in human patients, in a non-invasive and quantitative fashion, as a basis for differentiating between alternative disease mechanisms (differential diagnosis). Additionally, it is possible that the same interoceptive dysfunction may be present in multiple clinical conditions (Smith et al., 2020).
A major challenge is that most (albeit not all) instantiations of BBI are organized as closed loops where homeostatic/allostatic actions change the state of bodily variables whose changes triggered regulation in the first place. This means that, in disease, pathological changes can propagate within the closed loops between body and brain, and it is difficult to distinguish between primary and secondary pathological changes. One potential approach to address this problem are "computational assays": these are generative models of measured (physiological and/or cognitive) data which can be inverted to infer on likely mechanisms (Stephan & Mathys, 2014).
Computational assays of BBI do not exist yet. They differ from their counterparts in cognition or neurophysiology (Browning et al., 2020;Stephan, Iglesias, Heinzle, & Diaconescu, 2015) in that they need to consider the closed-loop problem and account for both physiological (bodily) and neuronal/cognitive (brain) data. The development of suitably structured computational assays together with controlled perturbations of bodily states has been proposed as a major goal for computational psychosomatics (Petzschner et al., 2017). In this paper, we present an initial methodological step in this direction.
BBI comprise multiple processes (Petzschner et al., 2017;Petzschner, Garfinkel, Paulus, Koch, & Khalsa, 2021), including afferent signaling from the body (interosensation), inference on the underlying bodily states (interoception), predicting their future revolution (forecasting), regulatory processes (homeostatic and allostatic control), and monitoring the performance of BBI loops (metacognition). In this paper, we do not consider all components of BBI but focus on the question how one might estimate a single, but fundamental, property of regulatory processes: the sensitivity of autonomic reflexes to (viscero)sensory inputs from the body. This sensitivity is conceptualized via the precision of probabilistic representations (homeostatic beliefs) at the lowest level of hierarchically arranged systems for allostatic control, as understood from a Bayesian (active inference) perspective.
In order to estimate homeostatic belief precision, we present a novel approach that is based on a generic framework of BBI and homeostatic/ allostatic control, the "Bayesian Allostat" (BA) model by Stephan et al. (2016). Clearly, this is not the only framework of BBI and homeostatic/allostatic control that could be used; in particular, other schemes based on active inference offer sophisticated proposals for studying BBI (Allen, Levy, Parr, & Friston, 2019;Gu, Hof, Friston, & Fan, 2013;Paulus et al., 2019;Pezzulo, Rigoli, & Friston, 2015;Seth, 2013;Seth & Friston, 2016;Smith et al., 2020). For our purposes, the advantage of the BA framework is that it provides a mathematically explicit proposal for the lowest level of a hierarchical control system, i.e. a reflex arc, while not requiring a specification of the processes that govern inference and forecasting processes at higher levels.
In brief, the BA model by Stephan et al. (2016) assumes that the brain represents homeostatic setpoints in a probabilistic fashion -i.e. as probability distributions or "homeostatic beliefs" about desired bodily states -and "defends" these beliefs against deviations (induced by perturbations that induce dyshomeostasis) by eliciting regulatory actions. Here, action selection follows the same principle as in active inference (Friston, Daunizeau, Kilner, & Kiebel, 2010): actions are chosen to fulfill beliefs (here, homeostatic beliefs about bodily states), thus minimizing the brain's surprise (in an information-theoretic sense) about sensory inputs. In the context of bodily regulation, this principle minimises the variability of bodily states and keeps them close to homeostatic setpoints; in other words, the entropy of bodily states is minimized (for a more detailed discussion, see Stephan et al., 2016). For bodily regulation, actions could comprise, for example, descending neural signals to the autonomic nervous system or the emission of hormones via hypothalamus and the pituitary gland.
Unlike active inference, the BA model does not specify the algorithmic nature of allostatic control but describes how the outcomes of (unspecified) allostatic computations lead to actions: via a change of the parameters (sufficient statistics) of homeostatic beliefs represented in autonomic effector regions that govern reflex arcs for bodily regulation. For example, given a forecasting mechanism that identifies future perturbations of homeostasis and threats of bodily integrity, changing the expectation (mean) of homeostatic beliefs triggers anticipatory regulatory actions automatically. Furthermore, and of particular importance for this paper, changing the precision of homeostatic beliefs (i.e., the inverse variance of the desired range of bodily states) determines how rapidly cerebral regulatory actions will kick in when sensory inputs indicate a deviation of actual from expected bodily states (prediction error). (For a visualization of these mechanisms, see Fig. 2 below.).
Here, we focus on the specific question how one might estimate the precision of homeostatic beliefswhich, in the BA model, determine the sensitivity of reflexes arcs and thus the deployment of regulatory actions from measurements of bodily states and/or regulatory signals. Changes of the precision of homeostatic beliefs are particularly important in situations where a perturbation or threat of bodily integrity can be predicted but not its exact nature or direction. In this situation, a targeted anticipatory action is precluded: in the absence of predictions about what exactly will happen, any anticipatory action that shifts setpoints could make matters worse. However, a remaining allostatic control option is to change the precision of homeostatic beliefs, which alters the reactivity of reflex arcs and thus the emission of regulatory responses in response to sensory inputs from the body. Notably, in this paper, we are not concerned with the characterization of anticipatory allostatic processes per se. Instead, we propose ways of estimating changes of homeostatic belief precision that transform such anticipatory processes into actions, by altering the sensitivity of autonomic reflexes to interoceptive signals.
The paper is structured as follows. We first present a brief mathematical summary of the BA model by Stephan et al. (2016) which represents the backbone of our approach. We then analyze the problem of inference in the context of this model. Based on this analysis, we introduce two methods for estimating homeostatic belief precision from measurements of both bodily states and regulatory signals. (In the Supplementary Material, we present full derivations and variations of our approach that only require information about bodily states or regulatory signals.) Finally, we illustrate the performance of our methods using simulated data.

The Bayesian Allostat (BA) model
The approach presented in this paper is based on a probabilistic model of BBI and allostasis that was previously introduced in the context of the "allostatic self-efficacy" theory of fatigue and depression (Stephan et al., 2016). Here, we refer to this model as the "Bayesian Allostat" (BA) model. The BA model is based on the fundamental principle of homeostasis: living systems interact with their environment in order to keep their physical states within certain ranges that do not violate biophysical boundary conditions of life (e.g. conditions that would prevent certain chemical reactions). In other words, living systems attempt to minimize the entropy of their internal states, at the expense of increased entropy outside the system (Schrödinger, 1943).
The key difference of the BA model to classical textbook models of homeostatic control is that setpoints are neither assumed to be fixed entities nor that they are deterministic. Instead, in accordance with the general notion of the "Bayesian brain" (Friston, 2005;Knill & Pouget, 2004), the BA model assumes that setpoints (1) are represented by the brain in a probabilistic fashion and (2) that setpoints can change dynamically. In other words, the BA model views setpoints as potentially time-varying probability distributions over bodily states. From the cognitive neuroscience perspective, these distributions can be thought of as beliefs, held by the brain, about the states which the body should inhabit or, equivalently, as hypotheses about the states the body should be in. In this setting, minimizing the entropy of bodily states (by choosing appropriate regulatory actions) corresponds to minimizing interoceptive surprise (i.e. information-theoretic (Shannon) surprise about sensory inputs that the brain receives about bodily states) or, equivalently, maximizing the evidence for the hypothesis of being in homeostasis. Generally, the BA model is conceptually related to (and partially inspired by) the framework of active inference (Adams, Shipp, & Friston, 2013) but is (deliberately) less specific and differs in a number of aspects. For example, it does not specify how exactly perceptual inference and allostatic predictions take place, and it does not make any assumptions about specific approximations to surprise (such as the free energy approximation in active inference; Friston, 2009). Instead, it focuses on a generic description of a modular cognitive architecture that describes how homeostatic reflex arcs are controlled by allostatic predictions, as explained in the following.
The basic architecture of the BA model consists of 2 intertwined loops, a lower and a higher level (see Fig. 1). (Strictly speaking, the model includes a third, metacognitive, level which, however, is not of relevance for this paper; see Stephan et al. (2016) for details.) The lower level consists of a closed-loop reflex arc between a given bodily state x and a brain structure that (1) receives sensory inputs (y) about this bodily state, (2) compares it to a probabilistic setpoint (homeostatic belief), resulting in a precision-weighted prediction error (pwPE) that determine the emission of (3) descending regulatory signals, with the goal of minimizing interoceptive surprise or, put differently, that future sensory inputs become more similar to what is expected under the homeostatic belief. The higher level, which receives the same sensory inputs, is thought to perform inference (about current bodily states) and forecasting (about future bodily states) as a basis for anticipatory control signals that change the homeostatic belief at the lower level and thus alters the reactivity of the reflex arc. Notably, the existing formulation of the BA model only provides a mathematical formulation of the lower level and leaves the exact implementation of the higher level open. This modular structure is useful for the purpose of this paper -to develop estimators of the precision of homeostatic beliefs --since it allows us to focus on the simpler lower level (which can be modeled with relatively few assumptions) without having to make any assumptions about the operations and mathematical formulations of the more complex higher level.
The lower level of the BA model consists of three components: a likelihood function that describes how bodily states lead to noisy sensory inputs received by the brain, a prior distribution over bodily states (homeostatic beliefs), and an "action function" describing how regulatory actions change bodily states. (For simplicity, in the following, we will consider the case of a single bodily state.) Importantly, the form of these functions in the BA is fairly general, and relatively few assumptions are necessary. Specifically, the assumptions made are that (1) homeostatic setpoints are represented probabilistically in the brain as probability distributions, (2) these probability distributions as well as sensory noise have a Gaussian form, and (3) the action function takes the form of a gradient descent. We emphasize that the statistical approach presented below does not require any additional assumptions and holds regardless of the choice of implementation details, such as the choice of observation functions, time constants, etc. In the following, we briefly summarize the key components of the BA model. In the BA model, the homeostatic belief (prior distribution over bodily state) is assumed to be represented by a Gaussian distribution with mean μ prior and variance (inverse precision) π − 1 prior : Through afferent channels, the brain receives a noisy measurement of the bodily states x, i.e. the vicerosensory input y: Here, g denotes the mapping from bodily states to sensory inputs which the brain receives (i.e. a signal-generating or forward function, part of the likelihood in the brain's generative model; compare Fig. 1) and η d,t representing sensory channel noise (white Gaussian noise with variance To maintain homeostasis, the brain deploys regulatory processes in a reactive manner in forms of action sequences a, which aim to reduce any discrepancy between the actual sensory input and the input that is expected under the homeostatic belief. The action corresponds to a gradient descent on interoceptive (Shannon) surprise and depends on the precision-weighted prediction error, i.e. π t leading to a change of bodily state x: In Eq. (4), for generality, λ represents the time constant of the specific regulatory action considered and f denotes a mapping from regulatory action to changes in x; please see Stephan et al. (2016) for details. Importantly, for the method of estimating homeostatic belief precision we propose below, these quantities do not need to be known as long as measurements of the actions are available.
In this work, we consider the prior belief precision π prior in Eq. (1) to be a dynamic quantity (that changes in time according to allostatic predictions) and denote it as π t referencing the discrete time point t. A visualization of the model's behavior can be seen in Fig. 2. The goal of this paper is to establish statistical methods for inferring the timevarying belief precision based on measurements of actions a and/or states x.

Analyzing the problem of inferring belief precision in the BA model
Writing the BA model as a Bayesian network results in the structure displayed by Fig. 3. The belief precision π t , action a t and vicerosensory input y t form a v-structure which is encoded as . In other words, the belief precision π t and the sensory input y t are not independent if the action sequence a t is observed. Thus, observing the action states a t ′ and the state variable x t ′ ∀t ′ ∈ [1, ..., t], opens up the structure which enables the inference of the belief precision π t from the action a t− 1 via (a t− 1 →x t →y t →a t ←π t ).
We start by computing the statistics of the measured noisy action a m t (denoted by the superscript m) as follows: For a detailed derivation, please see Appendix A.1.
Solving Eq. (5) for the precision π results in an ill-posed problem →∞, meaning the belief precision is not recoverable from the expectation of the action sequence under the condition that E[x]→μ prior . On the other hand, the variance of the action is determined by the scaled precision of the sensory data noise ϕ and the belief precision squared. To infer the belief precision π t , we propose a Standard Deviation based Precision Estimation (StdPE) method that utilizes Eq. (6) and is described in the next section.

Standard deviation based precision estimation (StdPE)
Assuming that (1) the regulatory actions are sampled from a differentiable continuous function with its derivative being bound by some constant and that (2) multiple measurements of actions can be obtained to increase the measurement precision π a →∞, the belief precision π t can be estimated up to a scale factor ̅̅̅ ̅ ϕ √ (see Appendix A.2 for mathematical details). Notably, this only requires measurements of actions a -without any knowledge or assumptions about other variables like the sensory data precision π d , the time constant λ, the mapping g from bodily states to sensory inputs, or the function f determining the influence of actions  Stephan et al. (2016). The x-axis denotes time, the y-axis arbitrary units. The upper panel shows an arbitrary physiological state х. The second and third panels show an approximation to interoceptive surprise (in terms of squared precision-weighted prediction error, pwPE2) and the associated action signal ɑ, respectively. The bottom panel displays the time-varying belief precision. The initial two-thirds of these panels show how external perturbations and their anticipation lead to both reactive and anticipatory actions, accompanied by changes in interoceptive surprise (see Stephan et al. (2016) for details). For this paper, the period between ① and ② is important: here, homeostatic belief precision increases in response to an anticipated perturbation whose nature (direction) is unknown. It can be seen that once homeostatic belief precision increases, both interoceptive surprise and action signals increase drastically, reflecting the heightened reactivity of the reflex arc and its attempt to control very small fluctuations in sensory input. Prior to a real perturbation, this amounts to an attempt of controlling sensory noise. On the other hand, once the perturbation occurs (spike between ① and ② in upper panel), control is exerted much more swiftly compared to previous perturbations during the simulation. Technical details: In the bottom panel, between time points ① and ②, belief precision rises and falls according to a biased second order damped harmonic oscillator given by h(z) = d 2 z dt 2 + 2γ dz dt + ω 2 z + b, with b denoting a bias term that centers the function around a given time point. The harmonic function is modified such that h(z) = 0 for all terms before and after the minima and maxima to preserve the continuity of its derivative. For the simulations π d = 2, π a = 100, λ = 50, f = g = I were chosen. on bodily states: Here, N is the size of the causal window, i.e. a window chosen such that it only contains the N data points from before the time point t. For the full derivation, please see Appendix A.2.
In essence, the precision is inferred by sliding a window over the data and computing the standard deviation of the windowed region. The standard deviation of the windowed action can be taken as an estimate for the scaled point-wise standard deviation of the last action point. It should be noted that the causal window we chose allows for the method to be performed in real time with the belief precision being inferred as new data arrives. When the method is applied for offline inference from previously acquired data, the window can be centered around the time frame t to reduce latency through sudden rises.
Although perhaps obvious, it is worth mentioning that the reliance of StdPE on variance in the data means that the approach would fail in the limit of ϕ→∞ (see Appendix A.1). However, this is not a practical concern because it would require that either the sensory signal received by the brain (π d ) is completely free of noise or that the mapping g (from bodily states to sensory inputs) becomes extremely steep. Neither of these conditions can be plausibly expected to be fulfilled.
Eq. (7) provides an estimate of belief precision up to the scaling factor ̅̅̅ ̅ ϕ √ . While, under certain conditions, this is already useful for practical application (see Discussions for details), it is also possible, in principle, to obtain an exact estimate of belief precision. In the Supplementary Material we propose a method to estimate ϕ from simultaneous measurements of x and y which enables exact estimates of the belief precision π t .

Log-evidence based precision estimation (LEPE)
A second strategy to infer the belief precision is to identify that value of belief precision which best explains the measured action sequence, in terms of maximizing its (log) evidence. In this section, we summarize the Log-Evidence Based Precision Estimation (LEPE) approach; the full derivation can be found in the Supplementary Material.
Assuming that the belief precision is constant within a given time window, the log-evidence can be computed from the joint probability distribution of all actions using the chain-rule. Thus, the belief precision π t is inferred as the argument that maximizes the log-evidence. In other words, the estimated belief precision is taken from the most likely a posteriori distribution of the last action sequence.
It is worth emphasizing that while StdPE can be used to determine belief precision up to a scale factor without having to make any assumptions, for LEPE, one must know or assume sensory input precision π d as well as the mapping g from bodily states x to the sensory inputs y which the brain receives (please see Eq. (2) and the term ϕ in the derivation of LEPE in the Supplementary Material).

Results
In this section we provide simulations that demonstrate the two inference methods introduced in the Methods section, along with further investigations of the chosen parameters for the model and inference method. For simulations, we follow Stephan et al. (2016) and chose the state-input mapping (g) and action-state mapping (f) as identity functions, the time constant of the regulatory action λ = 50, the precision of the action measurement π a = 100 and the precision of the sensory channel π d = 2. The window size for each method is chosen as N = 15 time steps unless stated otherwise for a simulation with 2000 time steps. All simulations have been implemented in MATLAB R2019a (Math-Works Inc., Natwick, MA, USA). The code is publicly available at github. com/ouenal/inference-on-homeostatic-belief-precision. Fig. 4 shows the results of the StdPE method applied to the simulated case presented in Section 2.1.

Results for StdPE
In Fig. 4.a, the belief precision is estimated up to a scale factor with an unknown scale factor ϕ. For an easier visual comparison, both the ground truth and the estimation are normalized onto the [0, 1] interval based on the means of their top-10 minimum and maximum values. As shown in this plot, StdPE can successfully infer the belief precision up to a scale factor.
The exact estimation of the belief precision π t is shown in Fig. 4.b where we set the scale factor ϕ to its simulated value. The results demonstrate that, in this specific simulation scenario, StdPE recovers the time-varying homeostatic belief precision accurately. Fig. 4 also shows the estimated belief precision for the simulated case using the LEPE method. As LEPE requires that the scale factor ϕ is set to some value, in Fig. 4.a., we use an arbitrary guess (ϕ = 1, %50 of its true value), and normalize the resulting belief precision estimation as in Section 3.1. In Fig. 4.b. we show the results where the scaled precision of the sensory data noise ϕ is set to its true value (ϕ = 2). It can be seen that, in the chosen simulation scenario, LEPE infers the belief precision up to a scale factor when ϕ is unknown (but a value is guessed), and to its exact value when ϕ is known.

A more challenging simulation
In this section we provide the graphical results for a more challenging simulation with more frequent precision changes while retaining the mean state prior μ prior curve and external perturbations to the system.
The simulated model is shown in Fig. 5 with the results for an unknown scale factor ϕ in Fig. 6.a and a known ϕ in Fig. 6.b.

Quantitative comparison of StdPE and LEPE
To quantitatively assess the quality of estimation, we compute the Mean Absolute Percentage Error (MAPE) of the estimated belief precision against its ground truth. The MAPE is given by: with the estimated belief precision π t , ground truth belief precision π gt t and total time steps T. MAPE states the percentile error of each As seen, StdPE performs well for a wide range of SNR values, with MAPE < 18% across all simulations. Similarly LEPE performs well for low SNR values of < 0.25, however, as SNR increases, so does the estimation error. As an inverse relation between estimation error and SNR is highly counterintuitive, it is important to clarify why this is observed.  For the derivation of LEPE, it is assumed that through numerous measurements of the action a, the measurement noise is reduced sufficiently that it can be ignored. In the simulations, this is represented as π a = 100. The simplification to a quadratic equation assumes that ϕπ − 1 a →0 and ϕ 2 π − 1 a →0 hold. The second assumption, however, gets less appropriate if the sensory channel precision π d increases to very high values, as the scale factor is given by ϕ = π d (∂ x g) 2 . In this case, the second assumption will, at some point, fail which then renders LEPE inaccurate. We further show an additional investigation for the chosen window size N in Fig. 7 (bottom panel). As expected, a small window size fails to correctly identify the variance due to a lack of available data points. This is reflected by the initial rapid decrease in the MAPE as the window size increases. In contrast to this observation, a window size that is too large has the drawback of not being able to capture incoming precision changes. As the belief precision changes, the measured variance is affected by the previous measurements which can cause a latency in the estimation if the window size approaches the time scale of signal changes, or an underestimation of the belief precision if the signal length is smaller than the window size.

Discussion
In this technical note, we have introduced two statistical techniques for estimating the precision of homeostatic beliefs in the context of the Bayesian Allostat (BA) model by Stephan et al. (2016). We have illustrated the application of these methods to simulated data where ground truth (i.e. the actual temporal trajectory of belief precision) was known and examined their behavior across different levels of SNR. In the following, we discuss limitations and strengths of the current approach, how these could be applied to experimental measurements, and how it might be improved in the future.
First, we wish to emphasize that the present paper should be seen as an early -and still rather incomplete -step towards computational assays of BBI. This is true both conceptually -because we cover only a single aspect of BBI, i.e. homeostatic belief precision -and because our approach has only been tested on synthetic data so far, evaluating whether a known ground truth (the temporal trajectory of homeostatic Fig. 6. Belief precision inference results for StdPE and LEPE on Simulation 2 (Fig. 4). Shown are the ground truth belief precision in black and the estimated belief precision in red for StdPE, and in blue for LEPE. Best viewed in color. (a) Scaled belief precision estimation. While StdPE can be used directly to estimate the belief precision up to a scale factor, LEPE requires a value to be guessed for ϕ. In the given example this value is set to ϕ = 1 (simulation with ϕ = √2).  It can be seen that the window size N must be sufficiently large enough that the variance can be accurately estimated.
belief precision) can be recovered from simulated data. We would have liked to test our approach on empirical data but, unfortunately, do not yet have a suitable dataset that allows for a meaningful practical demonstration. This is because, as we explain below in more detail, applying our approach in practice usually requires measurements of regulatory (action) signals at a minimum. These measurements are not easy to obtain with standard methods (see below), should be acquired with a sufficient sampling rate (relative to the time constant of the reflex arc) and of sufficient duration to result in a larger number of data points. Furthermore, these data should be acquired under an experimental manipulation that elicits allostatic (i.e. anticipatory) control in response to an upcoming bodily perturbation of unknown direction whose predictability has a known start point and a known duration. The third condition is necessary to ensure one has well-defined predictions against which the method can be tested, i.e. a clearly defined temporal interval in which changes in homeostatic belief precision are expected. As explained in more detail below, while it is not impossible to apply the proposed approach when only measurements of bodily states are available, this would require additional experimental measurements in order to determine λ (the time constant of regulatory action) and f (the mapping from action to changes in bodily states).
The BA model and our statistical estimation approaches that rest on it are fairly general, and relatively few assumptions are necessary. However, one fundamental assumption of our model must be kept in mind: the notion that homeostatic setpoints are represented probabilistically in the brain. To our knowledge, this general assumption -which derives from the general "Bayesian brain" notion that the brain constructs representations of the world which reflect uncertainty (Knill & Pouget, 2004) -has not yet been examined in empirical (i.e. neurophysiological) studies. If this assumption turns out to be wrong and homeostatic setpoints are found to be represented by the brain as quantities without uncertainty, our model would lose its conceptual foundation.
Beyond the limitations discussed above, the methods we propose also have notable strengths: they are mathematically simple, extremely fast, and do not require complex optimization algorithms. Furthermore, the generic BA model they refer to is not limited to specific applications or particular process models of allostatic control, but applies to all types of BBI that represent a closed loop between sensory inputs and regulatory action. This generality may also create opportunities for testing predictions from specific process models such as active inference. As explained above, the BA model suggests two ways how allostatic predictions can be transformed into actions that regulate bodily states: (i) shifting the expectation (mean) of homeostatic beliefs, or (ii) changing their precision. The former case elicits anticipatory action while the latter changes the sensitivity of reflex arcs to sensory input from the body (i.e. the case considered by this paper). Changes in precision can also be detected by models based on active inference; for an example, see Smith et al. (2020). Predictions from a specific active inference model could thus potentially be cross-validated by the approach presented in this paper, for example, by comparing ratios in estimated precision before and after experimental interventions designed to elicit changes in the precision (not expectations) of homeostatic beliefs.
In practice, given the robust behavior of StdPE in our simulations across a wide range of SNR and since it requires less information, we recommend primarily using StdPE, instead of LEPE. In the following, we would like to describe how StdPE could be applied in practice, depending on which measurements are available. Generally, three different use cases can be distinguished: (i) Measurements of regulatory (action) signals only are available: Having measurements of action signals is sufficient to compute homeostatic belief precision up to a scaling factor ̅̅̅ ̅ ϕ √ (see Eq. (7)). This scaling factor depends on quantities that can be assumed to be stable within an individual, at least under the same measurement conditions (i.e. the precision of sensory inputs from the body, π d , and the mathematical form of the mapping from bodily states to sensory input, g(x); see Eq. (A.6) in the Appendix). Therefore, estimating homeostatic belief precision based on measurements of action signals alone could be useful to investigate the impact of therapeutic interventions (e.g. psychotherapy) within the same individual. By contrast, since ϕ could differ across subjects, estimates of homeostatic belief precision obtained from regulatory signals alone should not be compared across individuals.
(ii) Measurements of bodily states only are available: Computing homeostatic belief precision using the StdPE approach rests on information about action signals (see Eq. (7)). If only measurements of bodily state are available, one could, in principle, compute the action signal according to Eq. (16) in the Supplementary Material. However, this would require knowledge or assumptions about two unknown variables: (i) λ, the time constant of regulatory action, and (ii) f, the mapping from action to changes in bodily states. Both quantities would need to be known or estimated, for example, based on separate experimental measurements of regulatory signals and the ensuing changes in bodily states. (iii) Measurements of both regulatory (action) signals and bodily states are available: In this case, homeostatic belief precision can be computed fully (not only proportionally, as in the first case). Specifically, Section 2 (Eqs. (11)(12)(13)(14)(15)) in the Supplementary Material describes how the scaling factor ϕ could be estimated that is required by Eq. (7) in the main text (Please note that, as shown in the Supplementary Material, estimating ϕ also requires measurements of the sensory inputs y.).
Following this summary of different use cases,we now turn to the question what kind of bodily states and regulatory signals could be measured with existing and emerging techniques.
There are several bodily states that can be measured easily and repeatedly in time, in a manner that is non-invasive and safe, and whose homeostatic regulation is reasonably well understood. For example, this includes a number of cardiac and vascular variables that can be measured continuously, such as blood pressure, heart rate, or heart rate variability (HRV) (for a review of HRV, see (Acharya, Joseph, Kannathal, Lim, & Suri, 2006)). Similarly, a wide range of respiratory variables can be assessed, including frequency of breathing, tidal volume, inspiratory pressure, or partial pressure of oxygen or carbon dioxide. Electrodermal activity is another potentially interesting measure that can be obtained continuously and with relatively small technical effort (for review, see (Posada-Quintero & Chon, 2020)). Finally, time-varying concentrations of hormones from somatic glands, such as catecholamines or cortisol produced by the suprarenal gland, can be measured in discrete time steps on the order of minutes, using continuous blood sampling techniques; for examples, see (Bhake et al., 2019;Ward et al., 1983).
Measurements that reflect descending regulatory processes are technically considerably more challenging, although both neuronal and endocrine candidate signals exist. On the endocrine side, one could consider repeated plasma level measurements of pituitary hormones which determine activity of bodily glands, such as ACTH (e.g. (Sharma, Aoun, Wigham, Weist, & Veldhuis, 2014)). With regard to neural signals, it would be necessary to obtain recordings from structures that are purely efferent in function and, ideally, specifically affect a bodily state of interest. In principle, it is possible to directly record from sympathetic nerves in humans. This approach, called microneurography, involves the insertion of microelectrodes into a postganglionic sympathetic nerve bundle and can differentiate between sympathetic activity related to regulation of blood pressure versus thermoregulation (for review, see (Hart et al., 2017)). However, this approach is invasive and requires highly trained specialists. A less invasive approach would entail imaging techniques to record activity from organ-specific autonomic ganglia or pre-ganglionic nuclei in the spinal cord. To our knowledge, non-invasive imaging of autonomic ganglia in humans has not been achieved yet. However, the new technique of optoacoustic imaging (e.g. (Gottschalk et al., 2019)) has interesting potential in this regard and, following appropriate validation, might be able to record activity in accessible autonomic ganglia. Imaging autonomic nuclei in the spinal cord should, in principle, be feasible using high-resolution spinal fMRI (for review, see (Tinnermann, Büchel, & Cohen-Adad, 2020)). However, we are not aware that such studies have already been conducted, and it is not clear which degree of organ-specificity can be achieved. Finally, it would be possible to use high-resolution fMRI to record activity from brainstem nuclei known to send regulatory efferents to the autonomic nervous system (e.g. periaqueductal gray, dorsal nucleus of vagus nerve, nucleus ambiguus). Here, the challenge is that, from the perspective of the BA model, visceromotor nuclei would be expected to contain both neurons representing setpoints (homeostatic beliefs) and neurons computing precision-weighted prediction errors (that drive regulatory efferent signals). This assumption is not experimentally verified, to our knowledge, but if it were correct, it would mean that fMRI signals from visceromotor nuclei could not be used in a "raw" fashion but would first need to be partitioned (e.g. using computational models) into signal components that are specific for homeostatic setpoints and for prediction errors, respectively.
Once suitable experimental measures of bodily states and regulatory signals are available, the approach presented in this paper might have useful clinical applications. Before discussing these, it is worth remembering that, according to the BA model, the precision of homeostatic beliefs determines how quickly and vigourously the brain will respond to bodily inputs that signal dyshomeostasis. If this precision is low, regulatory action is sluggish and there is a risk that severe perturbations of bodily states may not be corrected sufficiently quickly. On the other hand, a high homeostatic belief precision enables the brain to respond very rapidly; simply speaking, this is because the range of "permissible" (expected) bodily states becomes very narrow and even small changes in bodily states lead to reflex-like actions that "defend" the homeostatic belief. This, however, comes at the cost that regulation now becomes sensitive to small changes in sensory inputs from the body, and sensory noise alone may be sufficient to drive the system into a state where it continuously emits regulatory actions in the absence of any meaningful perturbations. This scenario is visible in Fig. 2 where high-amplitude action signals, driven by interoceptive surprise, begin to emerge as soon as homeostatic belief precision is tightened in anticipation of an upcoming perturbation (see the red "spike" in the top panel between points ① and ②), leading to a period with massive amounts of regulatory action that is simply driven by sensory noise. This constellation is reminiscent of the symptomatology in affective and psychosomatic disorders, e.g. anxiety or stress disorders, where beliefs about upcoming threats may trigger descending neural and endocrine influences that lead to prolonged activation of the sympathetic nervous system, with possible adverse consequences for cardiovascular, immunological and metabolic systems (compare the concept of "allostatic load" (McEwen, 1998)) Peters, McEwen, and Friston (2017).
With these considerations in mind, the BA model by Stephan et al. (2016) highlights that homeostatic beliefs represent prime targets for psychotherapeutic or psychoeducational interventions. For example, mindfulness-based techniques (compare (Manjaly & Iglesias, 2020)) or hypnotherapeutic interventions with a bodily focus may prove useful to alter homeostatic beliefs and thus change the reactivity of brain-based reflex arcs for homeostatic control. In this context, subject-specific estimates of homeostatic belief precision and its change to controlled perturbations of bodily states might usefully guide clinical decisions. For example, accurate estimates of homeostatic belief precision could be useful for differential diagnosis and choosing individualized treatments, provided reference distributions for a population are known. Another option is to use estimates of homeostatic belief precision for evaluating the success of psychotherapeutic treatments. For the latter case, an estimate of homeostatic belief precision could even be useful when it cannot be computed exactly but only up to a scaling factor (compare Eq. (7) and subsequent discussion). This is because the estimate only depends on quantities (i.e. precision of sensory channels and the mapping from bodily states to sensory inputs; see Eq. (6) and the definition of ϕ directly after Eq. (A.6)) that can be expected to be stable properties of an individual, at least as long measurements are taken for the same bodily state and experimental setting.
The above considerations highlight the clinical potential of accurate estimates of BBI. In this paper, we have presented some early and small steps towards these goals but have only been able to evaluate the proposed methods on synthetic data. How well the proposed methods work in practice remains to be tested empirically once suitable datasets, which fulfill the criteria described above, become available. Using the fact that the sum of Gaussian random variables also follows a Gaussian distribution, the measured regulatory action a m t can be fully described by its expectation and variance. Given that the action states a m t ′ and the state variable x m t ′ ∀t ′ ∈ [1, ..., t − 1] are observed, the statistics of the measured action a m t are computed as: g(x t ) − g ( μ prior,t ) ) ∂ x g denoting the prediction error (i.e. the difference between the actual sensory input and the sensory input expected under the prior mean), scaled by the derivative of the mapping from bodily states to sensory inputs, ∂ x g.

Furthermore,
Var [ a m t |a m with ϕ − 1 = π − 1 d (∂ x g) 2 denoting the transformation of the sensory input precision through the second derivative of g, the mapping from bodily states to sensory inputs (see Supplementary Material on how this term can be estimated). Multiple measurements of the action sequence a t can be used to increase the measurement precision π a , as the sum of white Gaussian noise terms will converge to their mean μ a = 0. When a large number of measurements are available, assuming that the precision of the measurement noise π a →∞, Eq. (A.7) simplifies to: with ̅̅̅ ̅ ϕ √ denoting the scaling factor. Thus the precision at time point t can be estimated as the square root of the variance of the windowed action sequence up to a scaling factor. Details on how this scaling factor can be determined can be found in the Supplementary Material.