## 2 Basic Theory
### Sparse Dictionary Learning
#### 2.2.2 Dictionary Learning  
Dictionary Learning is a critical process within the framework of Sparse Representation, where the goal is to learn an optimal set of atoms that constitute the dictionary \(D\). This learning process is designed to tailor the dictionary to the specific characteristics of the signal or data set at hand, thus enabling a more efficient and representative sparse representation [27].  
In mathematical terms, Dictionary Learning seeks to solve the optimization problem:  
\[\underset{D,\ \alpha}{\text{minimize}}\||X-D\alpha||_{F}^{2}\quad\text{ subject to}\quad\left\|\alpha_{i}\right\|_{0}\leq T\quad\forall i \tag{10}\]  
where \(X\) represents the data matrix, \(D\) is the dictionary to be learned, \(\alpha\) is the sparse coefficient matrix, \(||\cdot||_{F}\) denotes the Frobenius norm, \(||\alpha_{i}||_{0}\) represents the \(l_{0}\) norm of the i-th column of \(\alpha\), indicating the number of non-zero entries, and \(T\) is the sparsity threshold.  
Sparse dictionaries can be categorized into Analysis Dictionary and Learning Dictionaries. The Analysis Dictionary is constructed using predefined mathematical functions, while the Learning Dictionary is designed to learn the most representative atoms directly from the data. This article used the K-SVD Learning Dictionary algorithm to carry out PD signal denoising.  
The K-SVD algorithm was introduced by [PERSON], [PERSON], and [PERSON] in 2006, and it is generalized by the K-Means algorithm [28]. In the initial phase of sparse coding, the dictionary \(D\) can proceed under the assumption that it is static. This stage of the optimization process focuses on seeking sparse representations, with the associated coefficients aggregated in the matrix \(\alpha\). The term encapsulating the sparsity constraint can thus be reformulated as follows:  
\[min_{D,\ \alpha}||X-D\alpha||_{F}^{2}=\sum_{i=1}^{N}||x_{i}-D\alpha_{i}||_{2}^{2} \tag{11}\]  
Therefore, Formula (11) can be decoupled to \(N\) distinct problems as follows:  
\[\underset{a_{i}}{\text{minimize}}\Big{\{}\left\||x_{i}-D\alpha_{i}||_{2}^{2} \right\}\quad\text{subject to}\quad\left\|\alpha_{i}\right\|_{0}\leq T_{0}, \quad\text{for}\ i=1,2,...,N \tag{12}\]  
Here, this problem can be addressed by the pursuit algorithms such as OMP.  
Secondly, both \(D\) and \(\alpha\) can be assumed fixed, and the process of updating the dictionary is with the nonzero. If only one column in the dictionary \(d_{k}\) is put in the question andthe coefficients that correspond to it, the k-th row in \(\alpha\), denoted as \(x_{T}^{k}\), the penalty term can be rewritten as  
\[\|\mathbf{X}-\mathbf{D}\alpha\|_{F}^{2} =\|\mathbf{X}-\sum_{j=1}^{k}d_{j}x_{j}^{T}\|_{F}^{2} \tag{13}\] \[=\|(\mathbf{X}-\sum_{j\
eq k}d_{j}x_{j}^{T})-d_{k}x_{k}^{T}\|_{F}^ {2}\] \[=\|\mathbf{E}_{k}-d_{k}x_{k}^{T}\|_{F}^{2}\]  
Here, the SVD algorithm can be employed to find alternatives for \(\alpha\) and \(d_{k}\); SVD is adept at finding the closest rank-1 matrix to \(E_{k}\) in the Frobenius norm, effectively minimizing the error as defined in Equation (13). By applying SVD decomposition \(E_{k}^{R}=U\Delta V^{T}\), it can select the updated dictionary column \(d_{k}\) to be the first column of \(U\). The coefficient vector \(x_{T}^{k}\) can be updated to be the first column of V multiplied by the leading singular value \(\Delta(1,1)\). This method maintains the structure of the dictionary while optimizing the approximation of the error matrix \(E_{k}\).