# Closed-Loop Cognitive-Driven Gain Control of Competing Sounds Using Auditory Attention Decoding
## 2 Methods
### Correlation Coefficient Generation
D. _Auditory Attention Decoding Using State-Space Model:_

As an alternative to the GLM, it has been proposed in Reference [9] to use a SSM to translate the absolute values of the coefficients of the spatio-temporal envelope estimator into probabilistic attention measures. Contrary to Reference [9], in this paper, we propose to use the absolute values of the correlation coefficients

\[\bar{z}_{i}=\mathbf{x}_{i}^{T}\boldsymbol{\alpha},\]5

\[\bar{z}_{i}=\mathbf{x}_{i}^{T}\boldsymbol{\alpha},\]6

instead of the coefficients of the spatio-temporal envelope estimator, which need to be obtained for both the attended and the unattended speaker. Similarly to (14), we model the attention state \(d_{k}\) at time instance \(k\) as a binary random variable, i.e.,

\[\left\{ \begin{array}{ll}d_{k}=1,&\text{attending to speaker 1 at time instance }k\\ d_{k}=2,&\text{attending to speaker 2 at time instance }k\end{array} \right., \tag{33}\]

which is assumed to follow a Bernoulli distribution with probability \(p_{k}\). Similarly to (16), the probability of attending to speaker 1 is given by

\[p_{k}=P(d_{k}=1)=1-P(d_{k}=2)=\frac{1}{1+e^{-z_{k}}}, \tag{34}\]

where the variable \(z_{k}\) is now modeled as an autoregressive (AR) process, i.e.,

\[z_{k}=c_{0}z_{k-1}+w_{k}. \tag{35}\]

The parameter \(c_{0}\) is a hyperparameter ensuring stability of the AR process, and the noise process \(w_{k}\) is assumed to follow a normal distribution with variance \(\eta_{k}\), i.e.,

\[w_{k}\sim\mathcal{N}(0,\eta_{k}), \tag{36}\]

\[\eta_{k}\sim\text{Inverse-Gamma}(a_{0},b_{0}), \tag{37}\]

where \(a_{0}\) and \(b_{0}\) are hyperparameters. The AR model in (35) implies that the variable \(z_{k}\) at time instance \(k\) is predicted from \(z_{k-1}\) at the previous time instance with some uncertainty, which is modeled by the noise process \(w_{k}\). To relate the correlation coefficients \(\rho_{1,k}\) and \(\rho_{2,k}\) in (9) to the attention state \(d_{k}\), we model the probability of the absolute values of the correlation coefficients, given attention to speaker 1 or speaker 2, using a log-normal distribution (Please note that modeling the probabilities of the absolute values of the correlation coefficients with log-normal distributions allows for a closed-form iterative solution [9], compared to modeling the probabilities of the correlation coefficients either with normal or von Mises-Fisher distributions [30]), i.e.,

\[p(\phi_{l,k}\mid d_{k}=l)\sim\text{Log-Normal}(\delta_{a},\mu_{a}),\ \ \ l=1,2, \tag{38}\]

with

\[\delta_{a}\sim\text{Gamma}(\bar{\gamma}_{a},\bar{\
u}_{a}),\ \ p(\mu_{a}\mid \delta_{a})\sim\mathcal{N}(\bar{\mu}_{a},\delta_{a}), \tag{39}\]

where \(\bar{\gamma}_{a}\), \(\bar{\
u}_{a}\) and \(\bar{\mu}_{a}\) denote the hyperparameters of the attended log-normal distribution. Similarly, we model the probability of the absolute values of the correlation coefficients, given no attention to speaker 1 or speaker 2, as

\[p(\phi_{l,k}\mid d_{k}\
eq l)\sim\text{Log-Normal}(\delta_{u},\mu_{u}),\ \ \ l=1,2, \tag{40}\]

with

\[\delta_{u}\sim\text{Gamma}(\bar{\gamma}_{u},\bar{\
u}_{u}),\ \ p(\mu_{u}\mid \delta_{u})\sim\mathcal{N}(\bar{\mu}_{u},\delta_{u}), \tag{41}\]

where \(\bar{\gamma}_{u}\), \(\bar{\
u}_{u}\), and \(\bar{\mu}_{u}\) denote the hyperparameters of the unattended log-normal distribution. Since a small overlap between the attended and the unattended log-normal distributions is desired for a reliable decoding performance, the hyperparameters \(\bar{\gamma}_{\{a,u\}}\), \(\bar{\
u}_{\{a,u\}}\), and \(\bar{\mu}_{\{a,u\}}\) are tuned to minimize the overlap. Aiming at estimating the probability of attending to speaker 1 and speaker 2 at time instance \(k=k^{*}\) (see Figure 4), we now consider the absolute values of the correlation coefficients within a sliding window of length \(K_{\text{SSM}}=K_{P}+K_{A}+1\), with \(K_{P}\) and \(K_{A}\) denoting the number of correlation coefficients prior to and after \(k^{*}\), respectively.