## 3 Methodology
### Uncertainty-Aware Self-Training
#### 3.3.2 Reliable Pseudo-Label Selection with Uncertainty and Confidence  
A new strategy for selecting data based on uncertainty and confidence is developed to reduce the noise contained in pseudo-labels. According to previous works [38], we utilize information gained about the model parameters to estimate model uncertainty and sample pseudo-labels. Formally, for a single input sentence \(X_{i}\in P\), we have  
\[\operatorname{B}\left(\widetilde{y}_{i},W\middle|x_{i},U\right)=\operatorname {H}\left(\widetilde{y}_{i}\middle|x_{i},U\right)-\operatorname{E}_{p(W|U)} \left[\operatorname{H}\left(\widetilde{y}_{i}\middle|x_{i},W\right)\right] \tag{9}\]  
where \(\operatorname{H}(\cdot),\widetilde{y}_{i}\in\widetilde{Y}_{i}\), and \(x_{i}\in X_{i}\) indicate the entropy function, label, and character, respectively. \(\operatorname{E}(\cdot)\) denotes the expectation function. \(\operatorname{B}\left(\widetilde{y}_{i},W\middle|x_{i},U\right)\) denotes the difference between the final entropy (\(\operatorname{H}\left(\widetilde{y}_{i}\middle|x_{i},U\right)\)) and current entropy (\(\operatorname{H}\left(\widetilde{y}_{i}\middle|x_{i},W\right)\)). \(p\left(W|U\right)\) is the posterior distribution.  
However, the calculation of the above formula is tricky due to the complex and costly calculation of the posterior distribution. Therefore, to perform the approximation, we assume that the dropout distribution \(q_{\Theta}(W)\) can replace the prior distribution \(p(W|\mathrm{U})\). We sample the \(T\)-masked parameter \(\widetilde{W}_{t}\sim q_{\Theta}(W)\), and calculate the approximate value of \(\mathrm{B}\left(\widetilde{y}_{i},W\big{|}x_{i},\mathrm{U}\right)\) as follows:  
\[\hat{\mathrm{B}}\left(\widetilde{y}_{i},W\big{|}x_{i},\mathrm{U}\right)=- \sum_{c\in y}\left(\frac{1}{T}\sum_{t=1}^{T}\hat{p}_{c}^{t}\right)\log\left( \frac{1}{T}\sum_{t=1}^{T}\hat{p}_{c}^{t}\right)+\frac{1}{T}\sum_{t=1}^{T}\sum _{c\in y}\hat{p}_{c}^{t}\log\left(\hat{p}_{c}^{t}\right) \tag{10}\]  
where \(\hat{p}_{c}^{t}=p(\widetilde{y}_{i}=c|f^{\widetilde{W}_{t}}(x_{i}))\) denotes the predicted probability for \(x_{i}\) from the t-th masked model with parameter \(\widetilde{W}_{t}\).  
In order to facilitate the subsequent sampling operations, we use \(\mathit{score}_{i}^{\mathit{nc}}\) to denote certainty:  
\[\mathit{score}_{i}^{\mathit{ct}}=1-\hat{\mathrm{B}}\left(\widetilde{y}_{i},W \big{|}x_{i},\mathrm{U}\right) \tag{11}\]  
Then, we use the prediction probability of the model as the evaluation criterion of confidence. Specifically, we average the predicted probabilities of the T-masked model:  
\[\mathit{score}_{i}^{\mathit{cf}}=\frac{1}{T}\sum_{t=1}^{T}p(y=\widetilde{y}_{ i}|f^{\widetilde{W}_{t}}(x_{i})) \tag{12}\]  
To select the reliable pseudo-labels, we consider the confidence and certainty values together. Let \(G_{i}=\{g_{1},g_{2}\dots g_{n}\}\) be a binary vector that represents the pseudo-labels that were selected in the sample \(x_{i}\); if \(\widetilde{y}_{i}\) is selected, \(g_{i}=1\); otherwise, \(g_{i}=0\). To obtain this vector, follow the formula below:  
\[g_{ij}=\begin{cases}0,&\mathit{score}_{ij}^{\mathit{cf}}\cdot\mathit{score} _{ij}^{\mathit{ee}}<\kappa\\ 1,&\mathit{score}_{ij}^{\mathit{cf}}\cdot\mathit{score}_{ij}^{\mathit{ee}} \geq\kappa\end{cases} \tag{13}\]  
where \(\kappa\in(0,1)\) denotes the common threshold for uncertainty and confidence.