# SGM-EMA: Speech Enhancement Method Score-Based Diffusion Model and EMA Mechanism
## 2 Methodology  
### Diffusion Process Based on SDE  
In speech enhancement tasks, clean speech is defined as the original speech signal, which includes only the speaker's voice and excludes any external interference sources. Noisy speech refers to a speech signal that is mixed with other sound sources in addition to the speaker's voice. The diffusion process consists of two stages: the forward process and the reverse process, as shown in Figure 1.  
1. Forward process: The forward process is implemented by gradually adding Gaussian noise to clean speech. However, as the model is specifically designed for Gaussian noise, it may not generalize well to non-Gaussian or more complex real-world noise conditions. Following the approach of [PERSON] et al. [41], we designed a random diffusion process \(\{\mathbf{x}_{t}\}_{t=0}^{\mathrm{T}}\), which is the solution to the following linear stochastic differential equation (SDE): \[\mathrm{d}\mathbf{x}_{t}=\mathbf{f}(\mathbf{x}_{t},\mathbf{y})\mathrm{d}t+g( t)\mathrm{d}\mathbf{w},\] (1) where \(\mathbf{x}_{t}\) represents the current speech state, \(t\in[0,\mathrm{T}]\) is a continuous time step variable describing the process progress, \(\mathbf{y}\) is the noisy or reverberant speech, \(\mathbf{w}\) is the standard Wiener process, \(\mathbf{x}_{0}\) represents the clean speech, and \(\mathbf{x}_{\mathrm{T}}\) represents the Gaussian distribution centered on the noisy speech. We incorporated the noisy speech \(\mathbf{y}\) into the SDE by modifying the drift coefficient to \(\mathbf{f}(\mathbf{x}_{t},\mathbf{y})\coloneqq\gamma(\mathbf{y}-\mathbf{x}_{t})\), where \(\gamma\) is a constant, called stiffness, which controls the transition from \(\mathbf{x}_{0}\) to \(\mathbf{y}\). The diffusion coefficient \(g(\mathrm{t})\) controls the amount of Gaussian white noise injected at each time step and is defined as follows: \[g(t)\coloneqq\sigma_{min}(\sigma_{max}/\sigma_{min})^{t}\sqrt{2 log(\sigma_{ max}/\sigma_{min})},\] (2) where \(\sigma_{min}\) and \(\sigma_{max}\) are parameters that define the noise schedule of the Wiener process. 2. Reverse process: The reverse process gradually removes noise from the noisy signal and estimates a signal close to the original clean speech. According to [PERSON] et al. [41] and [PERSON] et al. [42], the SDE in Equation (1) has a related reverse SDE. This is achieved by solving the following differential equation: \[d\mathbf{x}_{t}=\Big{[}g(t)^{2}\
abla_{\mathbf{x}_{t}}\mathrm{log}\,p_{t}( \mathbf{x}_{t}|\mathbf{y})-\mathbf{f}(\mathbf{x}_{t},\mathbf{y})\Big{]}dt+g( t)d\overline{w},\] (3)  
Figure 1: Speech signal diffusion process. where \(\overline{w}\) is the standard Wiener process evolving backward in time, and the score function \(\
abla_{\mathbf{x}}\text{log}_{pt}(\mathbf{x}_{t}|\mathbf{y})\) is a term approximated by the DNN, called the score model. We denote the score model as \(S_{\theta}(\mathbf{x}_{t},\mathbf{y},t)\), and by substituting the score model into the reverse SDE in Equation (3), we obtain the so-called plug-in reverse SDE:  
\[d\mathbf{x}_{t}=\Big{[}g(t)^{2}S_{\theta}(\mathbf{x}_{t},\mathbf{y},t)- \mathbf{f}(\mathbf{x}_{t},\mathbf{y})\Big{]}dt+g(t)d\overline{w}, \tag{4}\]  
Sampling is then performed as follows:  
\[\mathbf{x}_{T}\sim\mathcal{N}_{\mathbb{C}}\Big{(}\mathbf{x}_{T};\mathbf{y}, \sigma(T)^{2}\mathbf{I}\Big{)}, \tag{5}\]  
where \(\mathbf{x}_{T}\) is the severely corrupted data distribution of the noisy speech \(\mathbf{y}\), \(\mathbf{I}\) is the identity matrix, and \(\mathcal{N}_{\mathbb{C}}\) is the circularly symmetric complex normal distribution. Once the score model has been trained, the reverse SDE defined in Equation (4) can be used to iteratively estimate clean speech using the predictor-corrector sampling algorithm proposed by [PERSON] et al. [41]. 1. Training objective: The objective function for training the score model \(S_{\theta}(\mathbf{x}_{t},\mathbf{y},t)\) is derived as follows.