# Regularized Within-Class Precision Matrix Based PLDA in Text-Dependent Speaker Verification
## 2 Preliminaries
### Probabilistic Linear Discriminant Analysis (PLDA)  
The PLDA is a generative probabilistic method that models between-class and within-class variabilities using latent variables. The goal of PLDA is to determine a more discriminative subspace that maximizes between-class variability and minimizes within-class variability. Some variants of PLDA exist [15; 21; 23; 42; 43]. In this paper, we use the PLDA implemented in the [PERSON] toolkit [44], which is the two-covariance PLDA [43] based on [15]. In [PERSON]'s PLDA, a speaker embedding \(\mathbf{x}\) is modeled as follows:  
\[\mathbf{x}=\mathbf{\mu}+\mathbf{A}\mathbf{u} \tag{2}\]  
\[\mathbf{u}|\mathbf{v}\sim N(\mathbf{v},\mathbf{I}) \tag{3}\]  
\[\mathbf{v}\sim N(0,\mathbf{\
abla}) \tag{4}\]  
where \(\mathbf{\mu}\) is the global mean of the embeddings in the original space, \(\mathbf{A}\) is the PLDA projection matrix, \(\mathbf{v}\) represents the class in the projected space, \(\mathbf{u}\) represents an example of that class in the projected space, and \(\mathbf{\
abla}\) is the between-class diagonal covariance in the projected space. The PLDA model parameters \(\{\mathbf{\mu},\ \mathbf{A},\ \mathbf{\
abla}\}\) is estimated by the eigenvalue equation \(\mathbf{\Phi}_{w}^{-1}\mathbf{\Phi}_{b}\mathbf{A}=\mathbf{A}\mathbf{\
abla}\), where \(\mathbf{\Phi}_{b}\) and \(\mathbf{\Phi}_{w}\) are the between-class covariance matrix and within-class covariance matrix, respectively. The expectation-maximization (EM) [45] algorithm is used to estimate \(\mathbf{\Phi}_{b}\) and \(\mathbf{\Phi}_{w}\). Note that the EM algorithm is a greedy algorithm, which guarantees the convergence by updating the parameters iteratively. However, there is no guarantee to converge toward the global optimum. Therefore, the estimated PLDA model cannot guarantee the global optimum. It starts with the initial values of the between-class covariance \(\mathbf{\Phi}_{b}^{(0)}\) and within-class covariance \(\mathbf{\Phi}_{w}^{(0)}\) matrices, which can be directly computed from the training dataset, as follows:  
\[\mathbf{\Phi}_{b}^{(0)}=\sum_{c=1}^{C}(\mathbf{\mu}^{c}-\mathbf{\mu})(\mathbf{ \mu}^{c}-\mathbf{\mu})^{T} \tag{5}\]  
\[\mathbf{\Phi}_{w}^{(0)}=\sum_{c=1}^{C}\frac{1}{N_{c}}\sum_{n=1}^{N_{c}}( \mathbf{x}_{n}^{c}-\mathbf{\mu}^{c})(\mathbf{x}_{n}^{c}-\mathbf{\mu}^{c})^{T} \tag{6}\]  
where \(C\) is the number of speakers in the training dataset, \(\mathbf{\mu}^{c}\) is the mean of the embeddings for the \(c\)-th speaker, \(N_{c}\) is the number of utterances for the \(c\)-th speaker, and \(\mathbf{x}_{n}^{c}\) is the \(n\)-th embedding for the \(c\)-th speaker. A detailed explanation can be found in [15; 46]. The log-likelihood ratio, which literally means the log ratio between two likelihoods and is used as the similarity score in our experiments, between two embeddings, \(\mathbf{x}_{1}\) and \(\mathbf{x}_{2}\), is computed by the following:  
\[\log N\bigg{(}\tilde{\mathbf{u}_{1}}\bigg{|}\frac{\mathbf{\Psi}}{\mathbf{ \Psi}+\mathbf{I}}\tilde{\mathbf{u}_{2}},\ \mathbf{I}+\frac{\mathbf{\Psi}}{\mathbf{\Psi}+\mathbf{I}}\bigg{)}-\log N \bigg{(}\tilde{\mathbf{u}_{1}}|0,\ \mathbf{I}+\mathbf{\Psi}\bigg{)} \tag{7}\]where \(\ddot{\mathbf{u}}_{i}=\mathbf{u}_{i}/\sqrt{\frac{1}{\Psi+1}\mathbf{u}_{i}^{2}}\) is the length normalization of \(\mathbf{u}_{i}\), \(\mathbf{u}_{i}=\mathbf{\Lambda}^{T}(\mathbf{x}_{i}-\mathbf{\mu})\) is the projected embedding, the subscript \(\cdot_{i}\) is an arbitrary index of embedding for distinguishing each other, and \(N(|\mathbf{\mu},\mathbf{\Sigma})\) denotes the Gaussian probability density function with mean \(\mathbf{\mu}\) and covariance \(\mathbf{\Sigma}\). An arbitrary embedding in the original space \(\mathbf{x}_{i}\) is projected into the projected space through the transformation \(\mathbf{u}_{i}=\mathbf{\Lambda}^{T}(\mathbf{x}_{i}-\mathbf{\mu})\). Note that \(\mathbf{x}_{i}\) can be both \(\mathbf{x}_{1}\) and \(\mathbf{x}_{2}\).