Skip to content

Menu

WorksComputer Science

Framing Spatial Hearing within the Free Energy Principle: A Hierarchical Model of Perceptual Learning

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_h5cgheht. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Spatial hearing relies on dynamic internal representations to decode spatial information from ever-changing acoustic conditions. A fundamental example is sound localisation, where listeners infer the direction of an invisible sound. Bayesian inference provides a computational account of such a localisation process; however, modelling efforts are largely limited to static listening scenarios. Instead, the free energy principle (FEP) describes perception, learning, and action as joint minimisation of variational free energy (VFE), providing a principled framework to account for dynamic conditions. Here, we take a first step toward applying the FEP to spatial hearing. We characterise how listeners' beliefs evolve across trials, in which they estimated sound direction and received subsequent visual feedback on each trial. Listeners are described by a hierarchical generative model where visual feedback drives gradient descent on VFE, updating beliefs over three independent quantities: lateral and polar localisation precisions and hemifield disambiguation. The model captures individual learning trajectories and reveals components with different dynamics: lateral precision improves, as does hemifield disambiguation, consistent with increased sensitivity of the auditory pathway in decoding vertical direction. Notably, polar precision also increases, most for listeners with the lowest initial precision, suggesting that the observed vertical improvement is driven by both hemifield disambiguation and polar precision. This work establishes spatial hearing as a tractable domain for FEP and motivates future closed-loop experiments with full action-perception cycles.

Introduction. Understanding how the auditory system decodes spatial information is a central challenge in hearing research, yet computational accounts largely focus on static scenarios [12, 4], leaving its dynamic, experience-dependent nature under-explored [3]. Auditory spatial perception is inherently plastic [9] and localisation involves both perception and action [14], making the FEP, a unified computational account of perception, learning, and action [8, 16], a natural framework. Localisation improves across trials with visual feedback [11], yet no mechanistic account exists of how individual beliefs evolve trial by trial. Here, we use the FEP [5] to model perceptual learning as belief revision, decomposing localisation improvement into three components with distinct timescales, validated on behavioural data from [11].

Problem formulation. On each trial ii, the listener estimates the direction of an invisible sound source φt\varphi_t and produces a pointing response φr\varphi_r, followed by visual feedback at φt\varphi_t. Directions are expressed in interaural-polar coordinates φ=(α,β)\varphi= (\alpha, \beta) [15], separating the contributions of auditory cues to behavioural error (Figure 1): the lateral angle α\alpha, informed by interaural time and level differences, defines the cone of confusion, within which the polar angle β\beta is decoded from spectral-shape cues [14]. With uniform priors on φr\varphi_r and φt\varphi_t, the listener model factorises as p(φr∣φt,θ)=p(αr∣αt,θ) p(βr∣αr,βt,θ)p(\varphi_r|\varphi_t, \theta) = p(\alpha_r|\alpha_t, \theta)\,p(\beta_r|\alpha_r, \beta_t, \theta) where θ\theta captures the listener’s beliefs about lateral and polar precisions, and hemifield disambiguation (i.e., front–back confusions [14]).

Figure 1. Interaural-polar coordinate system [15]. The source direction is defined by φ=(α,β)\varphi= (\alpha, \beta): lateral angle α\alpha identifies the interaural axis and the cone of confusion (green circle); polar angle β\beta defines elevation within that cone. Reference points: front (0∘,0∘)(0^{\circ}, 0^{\circ}), back (0∘,180∘)(0^{\circ}, 180^{\circ}), sides (±90∘,0∘)(\pm90^{\circ}, 0^{\circ}).

We employ a parametric formulation to preserve differentiability within FEP. The lateral component is a von Mises distribution with location αt\alpha_t and concentration κL\kappa_L (i.e., lateral precision). The polar component is a two-component von Mises mixture with concentration κP\kappa_P (i.e., polar precision), locations βt\beta_t and π−βt\pi- \beta_t (i.e., correct and incorrect hemifields) and hemifield weight ww; κP\kappa_P is scaled by cos⁡2(αr)\cos^2(\alpha_r), reflecting the reduced relevance of spectral cues at lateral extremes, where the interaural cone collapses (Figure 1) [15, 13].

Belief revision follows from minimising variational free energy F\mathcal{F} with respect to θ=(κL,κP,w)\theta= (\kappa_L, \kappa_P, w). With a flat prior and Laplace approximation [6], F\mathcal{F} reduces to −log⁡p(φr∣φt,θ)-\log p(\varphi_r|\varphi_t, \theta), so belief revision amounts to online likelihood ascent: a deliberately minimal instance of the FEP, covering perception and learning but not action (Figure 2). Each belief takes a natural-gradient step [2] after every trial, scaled by the inverse Fisher information to update components living on different scales consistently (problem formulation available in Appendix § 1.1). Updates are sequential, producing a trajectory that batch optimisation cannot recover. Per subject (N=5N = 5), learning rates (ηL,ηP,ηw)(\eta_L, \eta_P, \eta_w) were estimated by maximum likelihood [1], and θ0\theta_0 from the baseline block [11] (Appendix § 1.2).

Architecture of the hierarchical FEP agent

Figure 2. Architecture of the hierarchical FEP agent. Level 1 encodes the listener’s generative model of auditory space as a von Mises mixture (polar) and a single von Mises (lateral). Level 2 revises the agent’s beliefs θ=(κL,κP,w)\theta= (\kappa_L, \kappa_P, w) via natural-gradient descent on variational free energy F\mathcal{F}, using visual feedback φt=(αt,βt)\varphi_t = (\alpha_t, \beta_t) as a high-precision teaching signal. Initial beliefs are estimated from baseline block available from the original experiment (naive localisation without feedback [11]) by maximum likelihood. Learning rates (ηL,ηP,ηw)(\eta_L, \eta_P, \eta_w) are fitted per subject.

Results and Discussion. The model captures group-average trajectories (R2=0.75,0.83,0.79R^2 = 0.75, 0.83, 0.79 for lateral, polar and hemifield errors, Figure 3, top). Individual parameter trajectories (Figure 3, bottom) differ across components: κL\kappa_L rises for most subjects; κP\kappa_P rises, proportionally more for lower baseline κP\kappa_P; ww increases steadily (median ηL,ηP,ηw=0.010,0.015,0.014\eta_L, \eta_P, \eta_w = 0.010, 0.015, 0.014; Appendix § 1.3). These distinct trajectories are consistent with previously reported mechanisms, including sensorimotor recalibration [11], stable spectral cue-to-direction mappings acquired through natural listening [7], and increased sensitivity to altered spectral cues [10]. Notably, behavioural polar dispersion decreases and κP\kappa_P rises under the cos⁡2\cos^2 weighting: the improvement seen in aggregate statistics stems from hemifield disambiguation and sharper polar precision (Figure 3, middle column).

Figure 3. Top: Group-average behavioural trajectories, manual condition (n=5n=5). Solid: empirical (mean ±\pm 1 standard error (SE) ribbon); dashed: FEP model. Left to right: lateral dispersion (standard deviation (SD) of lateral error, ∘^\circ); polar dispersion (SD of polar error excluding hemifield errors, cos⁡2αt\cos^{2} \alpha_t-weighted, ∘^\circ); hemifield error rate (proportion of responses deviating more than 90∘90^\circ from the target, cos⁡2αt\cos^{2} \alpha_t-weighted, %). The model captures the direction and shape of all three metrics. Bottom: Individual parameter trajectories, manual group (n=5n=5), truncated to 750 trials (LOESS-smoothed, span =0.5=0.5; thin coloured lines: individual subjects; thick black line: mean ±\pm 1 SE ribbon).

Our approach has limitations: a small cohort and a perception-only loop in which pointing is a read-out and feedback is external. Two extensions would cast spatial hearing as full active inference: informative priors on θ\theta, yielding posterior uncertainty on κP\kappa_P, and head movements as policies, resolving hemifield ambiguity by action rather than by learning.

Appendix

Code and data are available here:

https://github.com/robaru/iwai2026-fep-spatial-hearing.

Model formulation

Generative model. Directions are expressed in interaural-polar coordinates φ=(α,β)\varphi= (\alpha, \beta) [15]. Circular quantities are modelled with the von Mises distribution

VM(x;μ,κ)=eκcos⁡(x−μ)2πI0(κ)(1)\mathcal{VM}(x; \mu, \kappa) = \frac{e^{\kappa\cos(x-\mu)}}{2\pi I_0(\kappa)} \tag*{(1)}

where I0I_0 is the modified Bessel function of order zero and κ\kappa the concentration (precision). The listener model factorises into a lateral and a polar component, p(φr∣φt,θ)=p(αr∣αt,κL) p(βr∣αr,βt,κP,w)p(\varphi_r \mid\varphi_t, \theta) = p(\alpha_r \mid\alpha_t, \kappa_L)\,p(\beta_r \mid\alpha_r, \beta_t, \kappa_P, w), with

p(αr∣αt,κL)=VM(αr;αt,κL)(2)p(\alpha_r \mid\alpha_t, \kappa_L) = \mathcal{VM}(\alpha_r; \alpha_t, \kappa_L) \tag*{(2)}
p(βr∣αr,βt,κP,w)=wVM(βr;βt,κ~P)+(1−w)VM(βr;π−βt,κ~P)(3)p(\beta_r \mid\alpha_r, \beta_t, \kappa_P, w) = w\mathcal{VM}(\beta_r; \beta_t, \widetilde{\kappa}_P) + (1-w)\mathcal{VM}(\beta_r; \pi-\beta_t, \widetilde{\kappa}_P) \tag*{(3)}

where κ~P=κPcos⁡2(αr)\widetilde{\kappa}_P = \kappa_P \cos^2(\alpha_r) accounts for the geometric compression of the cone of confusion at lateral angles, and w∈(0,1)w \in(0, 1) is the probability of resolving the correct hemifield. The two mixture components share the same concentration: hemifield confusion affects where the response lands, not how tightly it clusters.

Free energy and natural gradient. For a recognition density q(θ)q(\theta) over the beliefs θ=(κL,κP,w)\theta= (\kappa_L, \kappa_P, w), the variational free energy at trial ii is

Fi=KL[q(θ)∥p(θ)]−Eq[log⁡p(φr∣φt,θ)].(4)F_i = \mathrm{KL}[q(\theta) \parallel p(\theta)] - \mathbb{E}_q[\log p(\varphi_r \mid\varphi_t, \theta)]. \tag*{(4)}

Under a Laplace approximation (qq Gaussian centred on the current point estimate θi\theta_i) and a flat prior, the complexity term is constant in θi\theta_i, so Fi=−log⁡p(φr∣φt,θi)+constF_i = -\log p(\varphi_r \mid\varphi_t, \theta_i) + \mathrm{const} [6]. Beliefs are revised by natural-gradient descent [2],

θi+1=θi−η I(θi)−1∇θFi,(5)\theta_{i+1} = \theta_i - \eta\,\mathcal{I}(\theta_i)^{-1}\nabla_\theta F_i, \tag*{(5)}

where η=diag⁡(ηL,ηP,ηw)\eta= \operatorname{diag}(\eta_L, \eta_P, \eta_w) collects the learning rates and I\mathcal{I} is the Fisher information. For a von Mises concentration, I(κ)=A′(κ)=1−A(κ)2−A(κ)/κ\mathcal{I}(\kappa) = A'(\kappa) = 1-A(\kappa)^2-A(\kappa)/\kappa, with A(κ)=I1(κ)/I0(κ)A(\kappa) = I_1(\kappa)/I_0(\kappa) the Bessel ratio, i.e., the expected value of cos⁡(x−μ)\cos(x-\mu). For the hemifield weight, parameterised through its logit ψ=log⁡w1−w\psi= \log\frac{w}{1-w}, I(ψ)=w(1−w)\mathcal{I}(\psi) = w(1-w); in the update, θ\theta therefore denotes (κL,κP,ψ)(\kappa_L, \kappa_P, \psi), with ww recovered through the logistic function, w=σ(ψ)w = \sigma(\psi). Because the likelihood factorises, the three updates are decoupled.

Update equations. Let VMc=VM(βr;βt,κ~P,i)\mathcal{V}\mathcal{M}_{c} = \mathcal{V}\mathcal{M}(\beta_{r}; \beta_{t}, \tilde{\kappa}_{P,i}) and VMm=VM(βr;π−βt,κ~P,i)\mathcal{V}\mathcal{M}_{m} = \mathcal{V}\mathcal{M}(\beta_{r}; \pi- \beta_{t}, \tilde{\kappa}_{P,i}) denote the correct- and mirror-hemifield components of the polar mixture evaluated at the response on trial ii, with κ~P,i=κP,icos⁡2(αt)\tilde{\kappa}_{P,i} = \kappa_{P,i}\cos^{2}(\alpha_{t}), and pi=wiVMc+(1−wi)VMmp_{i} = w_{i}\mathcal{V}\mathcal{M}_{c} + (1-w_{i})\mathcal{V}\mathcal{M}_{m} the polar mixture likelihood. The updates are

κP,i+1=κP,i+ηPcos⁡2(αt)A′(κP,i)[ri−A(κ~P,i)],(6)\kappa_{P,i+1} = \kappa_{P,i} + \frac{\eta_{P}\cos^{2}(\alpha_{t})}{A'(\kappa_{P,i})}\left[r_{i} - A(\tilde{\kappa}_{P,i})\right], \tag*{(6)}
ψi+1=ψi+ηwVMc−VMmpi,wi+1=σ(ψi+1),(7)\psi_{i+1} = \psi_{i} + \eta_{w}\frac{\mathcal{V}\mathcal{M}_{c} - \mathcal{V}\mathcal{M}_{m}}{p_{i}}, \qquad w_{i+1} = \sigma(\psi_{i+1}), \tag*{(7)}
κL,i+1=κL,i+ηLA′(κL,i)[cos⁡(αr−αt)−A(κL,i)],(8)\kappa_{L,i+1} = \kappa_{L,i} + \frac{\eta_{L}}{A'(\kappa_{L,i})}\left[\cos(\alpha_{r} - \alpha_{t}) - A(\kappa_{L,i})\right], \tag*{(8)}

where σ\sigma is the logistic function and

ri=wicos⁡(βr−βt)VMc+(1−wi)cos⁡(βr−π+βt)VMmpi(9)r_{i} = \frac{w_{i}\cos(\beta_{r} - \beta_{t})\mathcal{V}\mathcal{M}_{c} + (1-w_{i})\cos(\beta_{r} - \pi+ \beta_{t})\mathcal{V}\mathcal{M}_{m}}{p_{i}} \tag*{(9)}

is the responsibility-weighted cosine alignment between response and target. Each bracketed term is a prediction error: the observed alignment minus the alignment expected under the current belief, for κP\kappa_{P} evaluated at the scaled concentration κ~P,i\tilde{\kappa}_{P,i}. The cone of confusion enters twice. At perception time the listener has no access to the true lateral angle, so the generative model above conditions on the inferred cone αr\alpha_{r}. At update time the visual feedback reveals the true direction, so F\mathcal{F} in Eq. (4) is evaluated with the true cone and the κP\kappa_{P} step in Eq. (6) is scaled by cos⁡2(αt)\cos^{2}(\alpha_{t}), the same factor used in the likelihood that fits θ0\theta_{0} and the learning rates. For ww, the Fisher information cancels the logistic derivative exactly, and the logit parameterisation keeps w∈(0,1)w \in(0, 1) without projection.

Parameter estimation

Initial beliefs θ0\theta_{0} were estimated per subject by maximum likelihood from the last 100 trials of the baseline block (naive localisation without feedback [11]). The learning rates (ηL,ηP,ηw)(\eta_{L}, \eta_{P}, \eta_{w}) are the only free parameters of the learning model. They were fitted per subject by minimising the mean negative log-likelihood of the responses in the feedback block under the sequential updates of Eqs. (6)–(8), using Bayesian adaptive direct search [1]. Because the likelihood factorises, (ηP,ηw)(\eta_{P}, \eta_{w}) and ηL\eta_{L} are estimated independently.

Model comparison and robustness

Held-out comparison. To test whether all three learning rates are needed, they were fitted on the odd-numbered feedback trials and the summed log-likelihood was evaluated on the even-numbered trials, with beliefs updated sequentially over all trials in both cases (Table 1, left). Relative to the full model, freezing κP\kappa_{P} (ηP=0\eta_{P} = 0) reduced the held-out log-likelihood by 167 nats in total and freezing ww (ηw=0\eta_{w} = 0) by 82 nats. Hemifield learning was required in every subject (NH12 only marginally), and polar-precision learning in all but NH17, for which ηP\eta_P was indistinguishable from zero (parametric bootstrap, B=100B = 100, 95% interval reaching zero). Over the feedback block, κP\kappa_P rose by 2.8 to 4.5 in the other four subjects (95% intervals excluding zero) and by 0.3 in NH17, with the largest relative gain in the two subjects with the lowest baseline κP\kappa_P (NH15, NH18). A first-half/second-half split gave the same ordering.

Held-out comparisoncos⁡2\cos^2 robustness
SubjectκP,0\kappa_{P,0}ΔLLηP=0\Delta\mathrm{LL}_{\eta_P=0}ΔLLηw=0\Delta\mathrm{LL}_{\eta_w=0}ηP\eta_P (cos⁡2\cos^2)ηP\eta_P (no cos⁡2\cos^2)ΔκP\Delta\kappa_P
NH127.5−5.7−1.10.020 [0.015, 0.033]0.005 [0.002, 0.010]+1.9
NH152.4−54.2−6.50.015 [0.013, 0.026]0.016 [0.013, 0.025]+2.8
NH164.3−39.0−39.00.008 [0.006, 0.012]0.006 [0.005, 0.010]+1.6
NH174.30.0−30.20.002 [0, 0.012]0.006 [0, 0.016]+0.6
NH180.9−68.2−5.00.062 [0.038, 0.084]0.043 [0.034, 0.079]+2.4

Table 1. Table 1. Left: held-out comparison, log-likelihood differences in nats relative to the full model (ΔLL<0\Delta\mathrm{LL} < 0: reduced model predicts worse). Right: cos⁡2\cos^2 robustness, polar-precision learning rate ηP\eta_P with bootstrap 95% interval, with and without the cos⁡2(α)\cos^2(\alpha) scaling, and ΔκP\Delta\kappa_P, the change of κP\kappa_P over the feedback block without scaling.

Robustness to the cos⁡2\cos^2 scaling. The Laplace approximation with a flat prior affects only the curvature of F\mathcal{F}, not the location of the update, so it cannot mask a change in κP\kappa_P. The cos⁡2(α)\cos^2(\alpha) scaling changes the size of polar learning but not its direction (Table 1, right): removing it from likelihood, update and baseline fit lowers the median ηP\eta_P from 0.015 to 0.006, κP\kappa_P still rises by 0.6 to 2.8 over the feedback block, and the unscaled model fits worse with the same number of parameters (summed in-sample ΔLL=−53\Delta\mathrm{LL} = -53 nats, although NH15 and NH17 favour it). The rise of ww and the necessity of hemifield learning are unaffected. The rise of κP\kappa_P is therefore not conditional on the geometric weighting of lateral targets. The unscaled model, however, does not respect the problem geometry: the cone of confusion collapses to a point at lateral positions (α=±90∘\alpha= \pm90^\circ), where the polar angle is undefined, and polar errors become progressively less informative about spectral decoding as ∣α∣|\alpha| increases.

References

  1. [1]Acerbi, L., Ma, W.J.: Practical bayesian optimization for model fitting with bayesian adaptive direct search. In: Proceedings of the 31st International Conference on Neural Information Processing Systems. p. 1834–1844. NIPS’17, Curran Associates Inc., Red Hook, NY, USA (2017)arxiv.org/abs/1705.04405
  2. [2]Amari, S.i.: Natural gradient works efficiently in learning. Neural Computation 10(2), 251–276 (1998). https://doi.org/10.1162/089976698300017746
  3. [3]Barumerli, R., Majdak, P.: FRAMBI: A Software Framework for Auditory Modeling Based on Bayesian Inference. Neuroinformatics 23(2), 20 (Feb 2025). https://doi.org/10.1007/s12021-024-09702-5
  4. [4]Barumerli, R., Majdak, P., Geronazzo, M., Meijer, D., Avanzini, F., Baumgartner, R.: A Bayesian model for human directional localization of broadband static sound sources. Acta Acustica 7, 12 (2023). https://doi.org/10.1051/aacus/2023006
  5. [5]Bogacz, R.: A tutorial on the free-energy framework for modelling perception and learning. Journal of Mathematical Psychology 76, 198–211 (Feb 2017). https://doi.org/10.1016/j.jmp.2015.11.003
  6. [6]Buckley, C.L., Kim, C.S., McGregor, S., Seth, A.K.: The free energy principle for action and perception: A mathematical review. Journal of Mathematical Psychology 81, 55–79 (Dec 2017). https://doi.org/10.1016/j.jmp.2017.09.004
  7. [7]Carlile, S., Leong, P., Hyams, S.: The nature and distribution of errors in sound localization by human listeners. Hearing Research 114(1–2), 179–196 (1997). https://doi.org/10.1016/S0378-5955(97)00161-5
  8. [8]Friston, K.J.: The free-energy principle: a unified brain theory? Nature Reviews Neuroscience 11(2), 127–138 (2010). https://doi.org/10.1038/nrn2787
  9. [9]van der Heijden, K., Rauschecker, J.P., de Gelder, B., Formisano, E.: Cortical mechanisms of spatial hearing. Nature Reviews Neuroscience 20(10), 609–623 (Oct 2019). https://doi.org/10.1038/s41583-019-0206-5
  10. [10]Hofman, P.M., Van Riswick, J.G.A., Van Opstal, A.J.: Relearning sound localization with new ears. Nature Neuroscience 1(5), 417–421 (1998). https://doi.org/10.1038/1633
  11. [11]Majdak, P., Goupell, M.J., Laback, B.: 3-D localization of virtual sound sources: Effects of visual environment, pointing method, and training. Attention, Perception, & Psychophysics 72(2), 454–469 (2010). https://doi.org/10.3758/APP.72.2.454
  12. [12]Majdak, P., Hollomey, C., Baumgartner, R.: AMT 1.x: A framework for reproducible research in auditory modeling. Acta Acustica 6, 19 (2022). https://doi.org/10.1051/aacus/2022011
  13. [13]Mardia, K.V., Jupp, P.E.: Directional statistics. John Wiley & Sons (2009)
  14. [14]Middlebrooks, J.C.: Sound localization. In: Handbook of Clinical Neurology, vol. 129, pp. 99–116. Elsevier (2015). https://doi.org/10.1016/B978-0-444-62630-1.00006-8
  15. [15]Morimoto, M., Aokata, H.: Localization cues of sound sources in the upper hemisphere. Journal of the Acoustical Society of Japan (E) 5(3), 165–173 (1984). https://doi.org/10.1250/ast.5.165
  16. [16]Parr, T., Pezzulo, G., Friston, K.J.: Active Inference: The Free Energy Principle in Mind, Brain, and Behavior. MIT Press (2022). https://doi.org/10.7551/mitpress/12441.001.0001

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type