## 3 Materials and Methods
### Sample Noise Detection Based on Confidence Learning
#### 3.1.2 Application Method  
The framework of the lightweight expression recognition system is shown in Figure 1.  
The application idea of confidence learning sample noise detection in the system is shown in Figure 2. By adjusting the noise to optimize the training dataset, the dependence of the lightweight model on the specific training set can be reduced and the recognition ability in the actual emotional interaction can be enhanced. Figure 1: Block diagram of the system. In the optimization of expression recognition dataset, there are the following main problems:  
1. The existing noise-cleaning mechanism cannot meet the demand. If the noise samples are cleared at the scale of \(10^{-1}\)[15; 26], it is easy to cause the loss of a large number of high-quality facial expression image samples in large-scale datasets. If the sample noise is too low, the model is over-fitting;
2. The identification of noise samples is inadequate. There are also some noise samples in the sample set which are not judged as noise by the confidence learning mechanism. This paper introduces hyper-parameters aiming at the above problems. Hyper-parameters are parameters defined and valued before model learning in machine learning, such as the learning rate, the number of network layers, the number of hidden units, and the kernel size of layers in CNN [27] that are used to manually adjust the learning effect. The concept can be applied to the confidence learning process to more flexibly adjust the noise detection range according to the application requirements without increasing the complexity of the model, so it is suitable for lightweight systems. Specifically, to solve problem 1, sample labels were revised to reduce sample loss [14]. However, the revision discriminant threshold of noise detection is strongly dependent on the noise detection model. Therefore, modified self-confidence is proposed in this paper, which mainly includes two aspects: First, the self-confidence of a certain type of label is the probability mean. In order to improve the reliability of the mean, the low outliers are eliminated by the triple standard deviation method to reduce the impact of extreme data. Then, \(p(j;x)\) in Equation (5) needs to meet the following Formula (6):  
\[p(j;x)>t_{j}-3\cdot\sqrt{\sum_{x\in X_{p-i}}\left(p(j;x)-t_{j}\right)^{2}} \tag{6}\]  
Secondly, the sample revision threshold is increased according to a certain proportion to reduce the influence of model recognition unreliability and noise detection range. In this paper, a set of distrust coefficients (DC) is introduced which is denoted as \(\mathbf{DC}\), then there is \(\mathbf{DC}\in\mathbb{R}^{7}\). The seven values in the coefficient vector are multiplied by the self-confidence of the seven expression categories in the detection model, respectively. Each coefficient has a lower limit of 1 and an upper limit of \(\max_{j}\), and the following inequality 7 holds:  
\[\max_{j}=\frac{\max_{x}\left(p(j;x)\right)}{t_{j}} \tag{7}\]  
To solve problem 2, potential noise samples were mined and cleared of the sample set that had been recognized incorrectly by the detection model but not recognized as noise in a certain proportion. In this paper, a Random Noise Reduction Coefficient (RC) denoted as \(RC\) is introduced and \(0\leq RC\leq 1\). In order to ensure small sample loss and test objectivity, the magnitude is generally no more than \(10^{-2}\). The application process of the above method is shown in Figure 3.  
Three steps are mainly included in the process:  
* Raw processing. The lightweight CNN model selected is trained on the initial sample set. All predictions including the probability of each facial expression for each sample can be calculated by the trained original model. Two groups from the sample set can  
Figure 2: The Idea of the application. be divided according to the comparison between the predicted label and the origin label.