Probabilistic modeling for learning-based distance estimation
Andreas BRENDEL, Andy REGENSKY, and Walter KELLERMANN
Multimedia Communications and Signal Processing, Friedrich-Alexander-Universität Erlangen-Nürnberg, Cauerstr. 7, D-91058
Erlangen, Germany, {Andreas.Brendel}@FAU.de.

Abstract
Estimating the position of an acoustic source is an essential step for many signal processing applications. Hence,
many approaches for acoustic source localization have been proposed in recent years, whereby most of them arebased on the estimation of the direction of arrival of a wavefront emitted by the acoustic source relative to an
observing microphone array. In contrast, the estimation of the source-microphone distance is much less investigated. Especially for complex sound fields in acoustic enclosures, a promising approach is to apply machinelearning approaches to learn the mapping of a distance-related feature to the corresponding source-microphone
distance. Here, we focus on a recently proposed method for distance estimation based on the coherent-to-diffuse
power ratio and Gaussian process regression. We investigate the influence of different probabilistic models reflected by the choice of kernel and mean functions of the Gaussian process employed for regression. The
influence of these choices is quantified by experiments.
Keywords: Distance estimation, Gaussian process regression, Coherent-to-Diffuse power Ratio

1

INTRODUCTION

Knowledge about the position of an acoustic source is crucial for many signal processing applications. Therefore, significant research effort has been dedicated to the estimation of the Direction of Arrival (DOA) of
acoustic sources, which is usually based on simplified geometric models [10, 14, 5].
On the other side, the estimation of the source-microphone distance is much less investigated. Two main approaches for acoustic distance estimation can be distinguished: Approaches relying on precise knowledge of theacoustic environment [12, 9] and learning-based approaches [16, 6, 7]. In this contribution, we consider a recently developed method of the second kind: The ratio of the powers of coherent and diffuse signal components
has been proposed as a distance-related feature in [3]. Based on this, a localization strategy for acoustic sensor
networks, where the training of a Gaussian Process Regression (GPR) model and position estimation is realized
in a distributed manner, has been proposed [1, 2]. A fixed budget strategy for the distributed learning of theunderlying nonparametric model has been introduced in [4].
So far [?, 1, 4], the GPR model for the Coherent-to-Diffuse power Ratio (CDR)-based distance and position
estimation consisted of a mean function, which is identical to zero for all feature values and the squared exponential kernel. These choices are commonly made if no prior knowledge about the function to be estimatedcan be incorporated. In this contribution, we want to investigate the influence of alternative choices for themean and the kernel function. Additionally, we introduce priors over the hyperparameters of these functions to
express acquired prior knowledge, which leads to more robust identification of optimal hyperparameters. The
influence of these choices on the performance of the algorithm is quantified in experiments within a simulated
environment.
In the following, we denote matrices and vectors by boldface upper case and lower case letters, respectively.
˜ and estimated quantities with a hat (·).
ˆ [·]i, j denotes the ith row and jth
We mark training data by a tilde (·)
column of a matrix and [·]i denotes the ith entry of a vector.
In the remainder of the paper we introduce the used feature in Sec. 2 and we describe the learning-based
distance estimation technique in Sec. 3. Experimental results are presented in Sec. 4 and the paper is concluded
with Sec. 5.

3289

2

DIFFUSENESS AS DISTANCE-RELATED FEATURE

We consider a single acoustic source emitting the signal s(t), which is recorded by two microphones. The signal
xi (t) observed at microphone i ∈ {1, 2} can be modeled asxi (t) = hi (t) ∗ s(t) + vi (t) = hi,early (t) ∗ s(t) + hi,late (t) ∗ s(t) + vi (t),
{z
}
|
{z
} |

(1)

ni (t)ci (t)

where ∗ denotes linear convolution and vi (t) additive noise. The observed microphone signal can be separated
into a coherent signal component ci (t) and a reverberant/noisy component ni (t), by dividing the Room Impulse
Response (RIR) hi (t) into an early component hi,early (t) and a late component hi,late (t), which are convolved
with the clean speech signal.
In [3], it has been shown that the ratio of the powers of these signal components, ci (t) and ni (t), yields a
distance-dependent feature. To estimate this ratio, we use the CDR [15], which is based on an estimate of thecomplex-valued spatial coherence function of the microphone signals
Φ̂x1 x2 (l, ν)bx (l, ν) = q,ΓΦ̂x1 x1 (l, ν)Φ̂x2 x2 (l, ν)(2)where l ∈ {1, . . . , L} denotes the time index and ν ∈ {1, . . . , F} the frequency index. The cross-Power Spectral
Density (PSD) Φx1 x2 and the auto-PSDs Φx1 x1 and Φx2 x2 are estimated by recursive averaging over timeΦ̂xi x j (l, ν) = λ Φ̂xi x j (l − 1, ν) + (1 − λ )Xi (l, ν)X j∗ (l, ν) with i, j ∈ {1, 2},(3)where λ ∈ [0, 1] denotes a forgetting factor, Xi (l, ν) denotes the ith microphone signal in the Short-Time Fourier
Transform (STFT) domain and (·)∗ denotes complex conjugation. The coherence of a diffuse sound field canbe modeled by [11]sin(2π fν dmic /c),(4)Γn (ν) =2π fν dmic /c
where fν denotes the physical frequency corresponding to frequency bin ν, dmic the microphone spacing and cthe speed of sound. Using the model for the diffuse sound field coherence (4) and the estimated microphonesignal coherence (2), the following DOA-independent CDR estimator can be derived [15]1bx (l, ν)|2[ ν) =
CDR(l,
Γ (ν) Re{Γ̂x (l, ν)} − |Γ...
(5)bx (l, ν)|2 − 1 n
|Γ
!
r


2
2
bx (l, ν)} − |Γbx (l, ν)|2 + 1 − 2 Γn (ν) Re{Γbx (l, ν)} + |Γbx (l, ν)|2 .
...
− (Γn (ν)) Re{ΓFinally, to obtain a robust feature, we average over the diffuseness [ 1CDR(l,ν)+1

over all available time frames

1, . . . , L and the frequency interval indexed by νmin , . . . , νmaxζ=L νmax
1
1.
∑ CDR(l,∑L(νmax − νmin + 1) l=1 ν=ν[ν) + 1min(6)Note that the values of the feature ζ are confined to the interval [0, 1] by construction.

3

LEARNING-BASED DISTANCE ESTIMATIONThe relation of the feature ζ and the actual source-microphone distance r depends on several physical propertiesof the room which are unknown in practice. Therefore, we model the source-microphone distance r to be an unknown function of the observed feature, i.e., g(ζ ) and we aim at learning this unknown relation g : [0, 1] → R≥03290

for the room of interest by GPR, a nonparametric regression approach. The distances of the training set aremodeled to be corrupted by additive Gaussian noise reflecting the uncertainty about the position of the sourcer = g(ζ ) + ε

with ε ∼ N (0, σε2 ).

(7)Furthermore, for incorporating the prior knowledge about this relationship, the unknown function g is modeled
to follow a Gaussian Process (GP)g ∼ GP(m, k),(8)where m : [0, 1] → R≥0 denotes its prior mean function and k : [0, 1] × [0, 1] → R≥0 the chosen kernel function(see Sec. 3.2 and Sec. 3.3 for the discussion of different representatives). Both, m and k map from the featuredomain [0, 1] to nonnegative numbers and depend on hyperparameters (see Sec. 3.1 for their optimal choice)which we stack in the vectors θ m and θ k , respectively.
To infer an unseen distance r from an observed feature value ζ , we have to construct the posterior GP
GP(mD , kD ),(9)where mD denotes the posterior mean function, kD the posterior covariance function, and D the training set
consisting of a vector of feature values ζ˜ and corresponding labels r̃


h i
˜
˜
(10)
D = ζ , r̃ ζ ∈ [0, 1], [r̃]i ∈ R≥0 , i ∈ {1, . . . , N} .
i

We define the kernel matrix of the features of the training set ash i
K = k ζ˜i , ζ˜ jwith 0 ≤ i, j ≤ N(11)and the kernel vector between the features of the training set and the new observation to be

 h 
i
k = k ζ˜ , ζ = k ζ˜i , ζwith 0 ≤ i ≤ N.

(12)

i, j

i

Any finite number of samples drawn from a GP follow a multivariate Gaussian Probability Density Function(PDF). Hence, we can express the joint density of the training labels r̃ and the unseen distance r as
 

 

µ
r̃
µ̃
K̃ + σε2 I
k
∼N
,
,
(13)
r
m(ζ )
kT
k(ζ , ζ )µ ]i = m([ζ˜ ]i ). By using the rules of Gaussian conditionals [13, p. 15-17], we obtain the estimate of thewhere [µ̃unseen distance r̂ by evaluating the posterior mean function mD−1 ˜r̂ = mD (ζ ) = m(ζ ) + r̃T K̃ + σε2 Ik(ζ , ζ ).
(14)
Similarly, we obtain the posterior variance of the estimate
−1 ˜σ̂r̂2 = kD (ζ , ζ ) = k(ζ , ζ ) − kT (ζ˜ , ζ ) K̃ + σε2 Ik(ζ , ζ ).

(15)

3.1 Optimization of Hyperparameters
The joint posterior of the hyperparameters θ m and θ k , given the training features ζ˜ and the training labels r̃,can be written as

 




 p r̃ ζ˜ , θ m , θ k p θ m , θ k ζ˜ 
∝ p r̃|ζ˜ , θ m , θ k p(θθ m , θ k ),(16)
p θ m , θ k r̃, ζ˜ =p r̃ ζ˜3291

where the marginal likelihood is defined by [13]µ (θθ m ), Σ̃Σ(θθ k ) .
p(r̃|ζ˜ , θ m , θ k ) = N µ̃

(17)µ (θθ m ) and Σ̃Σ(θθ k ) = K̃ + σε2 I emphasize that the prior mean vector and the covariance matrix depend on
Here, µ̃
the hyperparameters θ m and θ k , respectively. The dependency on ζ˜ has been omitted for clarity of presentation.
We model the parameters of the mean function θ m and the kernel function θ k to be independent from each
other
nk

nm

p(θθ m , θ k ) = p(θθ m )p(θθ k ) = ∏ p ([θθ m ]i ) ∏ p ([θθ k ] j ) ,

(18)

j=1

i=1

where nm and nk denote the number of hyperparameters of the mean and kernel function, respectively. For
identifying the optimum hyperparameters, we solve the following Maximum A Posteriori (MAP) optimization
problemopt
˜{θθ opt,θ}=argmax
p
θ
,
θ
|r̃,
ζ
.
(19)
m
k
m
k
θ m ,θθ kInstead of solving (19) directly, it is common to maximize the log-posterior1µ (θθ m ))T Σ̃Σ(θθ k )−1 (r̃ − µ̃
µ (θθ m )) . . .
log p θ m , θ k |r̃, ζ˜ = − (r̃ − µ̃
2
nk
nm
 N
1
Σ(θθ k ) − log 2π + ∑ log p ([θθ m ]i ) + ∑ log p ([θθ k ] j ) .
· · · − log det Σ̃
2
2
i=1
j=1

(20)

To maximize the log-posterior w.r.t. the hyperparameters of the mean and the kernel function, a gradient ascentmethod is used. We start with the derivative of the prior mean function with respect to its hyperparameters[θθ m ]iTµ (θθ m ) ∂ log p([θθ m ]i )∂∂ µ̃µ (θθ m ) Σ̃Σ(θθ k )−1
log p(θθ m , θ k |r̃, ζ˜ ) = r̃ − µ̃+.
∂ [θθ m ]i
∂ [θθ m ]i
∂ [θθ m ]i
The derivative of the log-posterior with respect to the kernel’s hyperparameters [θθ k ]i results in ∂ Σ̃
Σ(θθ k )∂1∂ log p([θθ k ]i )Σ(θθ k )−1
log p(θθ m , θ k |r̃, ζ˜ ) = tr β β T − Σ̃+∂ [θθ k ]i2∂ [θθ k ]i∂ [θθ k ]i

(21)

(22)

Σ(θθ k )−1 (r̃ − µ̃
µ (θθ m )).
with β = Σ̃In this contribution, we choose univariate Gaussian priors N (θ |θ0 , σθ2 ), with mean θ0 and variance σθ2 , for theindividual scalar parameters θ for simplicity, i.e., the prior PDFs in (21) and (22) becomep([θθ m ]i ) = N ([θθ m ]i |[θθ m,0 ]i , σ[θ2θ m ]i )andp ([θθ k ] j ) = N ([θθ k ]i |[θθ k,0 ]i , σ[θ2θ k ]i ).

(23)

The derivative of the log prior PDF w.r.t. the hyperparameter θ takes on the form
θ0 − θ
∂log N (θ |θ0 , σθ2 ) =
,
∂θ
σθ2

(24)

0

where θ0 is the expected parameter value and σθ2 is a user-defined parameter. Note that the term (24) acts as aregularizer in the gradient ascent rules (21) and (22).

3292

3.2 Choice of Mean Function
We discuss two different mean functions: the zero function and a linear function. The zero functionm(ζ ) = 0∀ζ ∈ [0, 1](25)

is a common choice if no model of the function underlying the observed data is available and has been usedin [1, 2, 4]. The discussion of the linear functionm(ζ ) = a0 + a1 ζ(26)

is motivated by the fact that the functional relation between the averaged diffuseness feature ζ and the corresponding distance r is monotonously increasing. Hereby, a0 and a1 denote the offset and the slope of the linear
function, i.e., its hyperparameters.
3.3 Choice of Kernel Function
In this section, we investigate the applicability of a set of kernel functions k which all depend solely on theabsolute difference between their two arguments |ζi − ζ j |. All kernel functions are scaled by the signal variance
β , a parameter which controls the deviation of the posterior mean function from the prior mean function. Also
common to all kernel functions presented here is a positive length scale parameter α, which controls the widthof the kernel and hence the smoothness of the posterior mean function.
We start our discussion with the squared exponential kernel function|ζi − ζ j |2with α > 0,
(27)
kSE (ζi , ζ j ) = β exp −2α 2which is the most widely used kernel function. The Matérn class covariance functions
√
µ
√

2µ|ζi − ζ j |2µ|ζi − ζ j |21−µKµkMatérn (ζi , ζ j ) = β
with µ, α > 0
Γ(µ)
α
α

(28)

are defined by the additional positive parameter µ. Hereby, Γ denotes the gamma function and Kµ the modified
Bessel function of the second kind and µth order. Finally, the γ-exponential covariance function is defined,
which contains the squared exponential covariance function as a special case  
|ζi − ζ j | γkγ (ζi , ζ j ) = β exp −with 0 < γ ≤ 2, α > 0,(29)αwith parameter γ.

4

EXPERIMENTAL STUDY

In the following section, we show results for experiments in a simulated enclosure and compare the performanceof the algorithm using the probabilistic models outlined above.
4.1 Methodology
We used the RIR simulator [8] to generate RIRs of a single acoustic source observed by two microphones of
spacing 0.2 m in two acoustic enclosures: Room 1 with dimensions 12 m × 16 m × 10 m and Room 2 with dimensions 6 m × 5 m × 3 m. The Ntrain source positions of the training set are drawn randomly from an interval ofsource-microphone distances [0 m, 3 m] with uniformly distributed angular spread of ±10◦ w.r.t. the microphonearray normal. The Neval = 200 evaluation positions are generated analogously.

3293

4
m

r ∈ [mD − 2σ̂r̂ , mD + 2σ̂r̂ ]mD(ζ , r)(ζ˜ , r̃)

r/[m] →

3

2

1

0

−1

0

0.1

0.2

0.3

0.4

0.5

ζ →
Figure 1. Example for a GP regression function (shown in blue) using the γ-exponential covariance function
and a linear prior mean function (depicted as orange dashed line). Training (red crosses) and test data points(gray stars) have been generated in Room 1 under 30 dB SNR and T60 = 0.8 s.
To simulate microphone recordings, the RIRs are convolved with anechoic speech signals of 21.5 s duration andwhite Gaussian noise is added to simulate sensor noise. The microphone signals are transformed into the STFT
domain using a von Hann window of length 25 ms and 10 ms shift at a sampling frequency of 16 kHz. The
PSDs are estimated using λ = 0.95 and the diffuseness is calculated for the frequency interval [125 Hz, 3468 Hz].
All hyperparameters are initialized by 1 prior to optimization. We set priors on the hyperparameters of thecovariance functions and set the corresponding parameters in (23) to β0 = 7 and σβ20 = 1, α0 = 0.3 and σα20 = 0.1,
and exclusively for the Matérn covariance function to µ0 = 1.9 and σµ20 = 0.6.
We considered acoustic conditions of 10 dB, 20 dB, 30 dB SNR and T60 ∈ {0.4 s, 0.6 s, 0.8 s} reverberation time.
The number of training points has been chosen to be Ntrain ∈ {5, 10, 15, 20}. For each scenario, i.e., SNR, T60
and Ntrain , we repeated the simulations Nruns = 10 times and calculated the Absolute Error (AE) between the
ground-truth distance rgt and the estimated distance r̂
eAE = |r̂ − rgt |.

(30)

4.2 Results
The aim of the proposed algorithm is the estimation of the nonparametric regression function mD : [0, 1] → R≥0 ,which enables the estimation of the acoustic source-microphone distance based on the observed feature value ζ .
A typical result for the regression curve (shown as blue line) is depicted in Figure 1, which has been trained on
samples (shown as red crosses) observed in Room 1 under 30 dB SNR and T60 = 0.8 s reverberation time. The
posterior standard deviation is depicted as a gray area around the posterior mean function, i.e., the regressionfunction. It can be seen that the posterior standard deviation is high at positions where no training points areavailable and is low at positions where a lot of training points are observed. The prior mean function with
optimized parameters is shown as orange dash-dotted line. The prior mean function is close to being a constantbecause all hyperparameters are optimized jointly and the data are already well-explained by the remaining
modeling ability of the GP. Experiments showed that the choice of appropriate priors over the hyperparameters

3294

eAE /[m] →Room 1Room 2

0.5

0.5

0.4

0.4

0.3

0.3

0.2

0.2

0.1

0.1

0

SE

γ
Matérnzero-mean

SE

Matérnlinearγ

0SEγ
Matérnzero-mean

SE

Matérnlinearγ

Figure 2. Boxplots of the AE in Room 1 on the left and in Room 2 on the right, for different acoustic
parameters specified in the text. The results are separated w.r.t. the applied covariance functions (SE, Matérn,γ) and the applied prior mean function (zero-mean and linear).
yields more robust optimization results in the sense that a small deviation in the training data also yields onlya small deviation in the regression function.
Results for the AE (30) eAE in Room 1 and Room 2 are shown in Figure 2 for the applied covariance functions
and the applied prior mean functions discussed in Sec. 3.2 and Sec. 3.3. First of all, it can be seen that the error
for Room 1 is in general much smaller than for the corresponding results of Room 2. This can be explained by
the fact that Room 1 is a very large room fulfilling the modeling assumptions of a diffuse noise field very well.
Hence, the variance of the feature values corresponding to a certain distance is very small and the prediction of
the trained regression function is very accurate. Due to dominant early reflections, the assumption of a diffuse
sound field is not perfectly fulfilled for the smaller Room 2 yielding worse distance estimates.
In terms of the investigated covariance functions, the γ-exponential covariance function provides a small advantage over the competitors in Room 2 whereas the difference between the results is marginal for Room 1.
The use of a linear prior mean function instead of a constant-zero prior mean function yields no further benefit. Hence, the approximative power of GP regression with a constant-zero prior mean function is sufficientfor the modeling task. However, it should be noted that a non-zero prior mean function may be beneficial forregions where no training data exist, as the regression curve tends to return to the prior mean function if notsupported by training data points. However, this effect is only relevant in special situations (unequal distributionof training and test data) and will not be discussed further here.

5

CONCLUSIONS

We investigated the influence of different probabilistic models, represented by the choice of covariance and priormean functions and univariate Gaussian priors on their hyperparameters, on the acoustic source-microphone dis-3295

tance estimation performance of GP regression. To this end, we presented results based on a large numberof experiments in different acoustic conditions and probabilistic models, obtained from microphone signals observed in a simulated environment.
It can be concluded that the choice of a nonzero prior mean function does not improve the results in general.
Furthermore, the distance estimation results are only slightly affected by the choice of the covariance function,
which was discernible for a room of regular size (Room 2) and not noticeable for a very large room (Room 1).

ACKNOWLEDGEMENTS
This work was supported by DFG under contract no <Ke890/10-1> within the Research Unit FOR2457 "Acoustic Sensor Networks".

REFERENCES[1] A. Brendel and W. Kellermann. Distance Estimation of Acoustic Sources using the Coherent-to-Diffuse Power Ratio Basedon Distributed Training. In IEEE Int. Workshop on Acoust. Signal Enhancement, Tokyo, Japan, Sept. 2018.
[2] A. Brendel and W. Kellermann. Learning-based Acoustic Source Localization in Acoustic Sensor Networks using theCoherent-to-Diffuse Power Ratio. In European Signal Process. Conf. (EUSIPCO), Rome, Italy, Sept. 2018.
[3] A. Brendel and W. Kellermann. Learning-Based Acoustic Source-Microphone Distance Estimation Using the Coherent-toDiffuse Power Ratio. In IEEE Int. Conf. on Acoust., Speech and Signal Process. (ICASSP), Calgary, Canada, Apr. 2018.
[4] A. Brendel and W. Kellermann. Distributed Source Localization in Acoustic Sensor Networks using the Coherent-to-Diffuse
Power Ratio. IEEE J. of Select. Topics in Signal Process., pages 1–1, 2019.
[5] J. H. DiBiase. A High-Accuracy, Low-Latency Technique for Talker Localization in Reverberant Environments Using Microphone Arrays. PHD Thesis, Brown University, Providence, Rhode Island, May 2000.
[6] E. Georganti, T. May, S. van de Par, A. Harma, and J. Mourjopoulos. Speaker Distance Detection Using a Single Microphone.
IEEE Trans. on Audio, Speech, and Language Process., 19(7):1949–1961, Sept. 2011.
[7] E. Georganti, T. May, S. van de Par, and J. Mourjopoulos. Sound Source Distance Estimation in Rooms based on Statistical
Properties of Binaural Signals. IEEE Trans. on Audio, Speech, and Language Process., 21(8):1727–1741, Aug. 2013.
[8] E. A. P. Habets. Room Impulse Response Generator. Technical report, International Audio Laboratories, Erlangen, Germany,
Sept. 2010.
[9] Y. Hioka, K. Niwa, S. Sakauchi, K. Furuya, and Y. Haneda. Estimating Direct-to-Reverberant Energy Ratio Using D/RSpatial Correlation Matrix Model. IEEE Trans. on Audio, Speech, and Language Process., 19(8):2374–2384, Nov. 2011.
[10] C. Knapp and G. Carter. The generalized correlation method for estimation of time delay. IEEE Trans. on Acoust., Speech,
and Signal Process., 24(4):320–327, Aug. 1976.
[11] H. Kuttruff. Room acoustics. Spon Press/Taylor & Francis, London & New York, 5th edition, 2009.
[12] E. Larsen, C. Schmitz, C. Lansing, W. O’Brien, B. Wheeler, and A. Feng. Acoustic scene analysis using estimated impulse
responses. In Conf. Rec. of the Thirty-Seventh Asilomar Conf. on Signals, Syst. and Comput., pages 725–729, Pacific Grove,
CA, USA, Nov. 2003.
[13] C. E. Rasmussen and C. K. I. Williams. Gaussian processes for machine learning. Adaptive computation and machinelearning. MIT Press, Cambridge, Mass, 2006.
[14] R. Schmidt. Multiple emitter location and signal parameter estimation. IEEE Trans. on Antennas and Propagation,34(3):276–280, Mar. 1986.
[15] A. Schwarz and W. Kellermann. Coherent-to-Diffuse Power Ratio Estimation for Dereverberation. IEEE/ACM Trans. on
Audio, Speech, and Language Process., 23(6):1006–1018, June 2015.
[16] S. Vesa. Binaural Sound Source Distance Learning in Rooms. IEEE Trans. on Audio, Speech, and Language Process.,
17(8):1498–1507, Nov. 2009.

3296