# HFDF-EffNetV2: A Lightweight, Noise-Robust Model for Fault Diagnosis in Rolling Bearings
## 3 Results
### HFDF-EffNetV2
#### 3.1.3. HFDF Strategy  
The HFDF strategy is proposed in this study to alleviate the issue of low confidence and susceptibility to local overfitting due to insufficient learning of fault features in lightweight models when facing confusable fault types and small samples. It is based on the concept of multi-granularity image classification [37]. This strategy employs global average pooling (GAP), the FC layer, and the SoftMax activation function at different stages of the model; these are followed by a weighted summation to output the classification probability. The goal is to fully utilize fault information at different levels to enhance the model's diagnostic confidence and, consequently, improve diagnostic accuracy. This is implemented as shown in Equations (6)-(9), with the probabilities of the two branch outputs denoted as \(\mathrm{p}_{\mathrm{i}}^{1}\) and \(\mathrm{p}_{\mathrm{i}}^{2}\) to distinguish between them. \[ \begin{cases}\mathrm{p}_{\mathrm{i}}^{1}=\big{(}\frac{\mathrm{e}^{\langle \mathrm{x}_{\mathrm{i}}^{1}\rangle}}{\sum_{\mathrm{j=1}}^{\mathrm{n}}\mathrm{ e}^{\langle\mathrm{x}_{\mathrm{i}}^{1}\rangle}}\big{)}\\ \mathrm{p}_{\mathrm{i}}^{2}=\big{(}\frac{\mathrm{e}^{\langle\mathrm{x}_{ \mathrm{i}}^{2}\rangle}}{\sum_{\mathrm{j=1}}^{\mathrm{n}}\mathrm{e}^{\langle \mathrm{x}_{\mathrm{j}}^{2}\rangle}}\big{)}\end{cases}  \tag{6}\]  
\[ \begin{cases}\omega_{1}=\max(\mathrm{p}_{\mathrm{i}}^{1})\\ \omega_{2}=\max(\mathrm{p}_{\mathrm{i}}^{2})\end{cases}  \tag{7}\]  
\[ \begin{cases}\alpha_{1}=\big{(}\omega_{1}+\omega_{2}\big{)}\\ \alpha_{2}=\big{(}\omega_{1}+\omega_{2}\big{)}\end{cases}  \tag{8}\]  
\[\mathrm{Predict}=\operatorname*{argmax}_{\mathrm{x}\in\mathcal{X}}\big{(} \alpha_{\mathrm{p}}\mathrm{p}_{\mathrm{i}}^{1}+\alpha_{\mathrm{2}}\mathrm{p}_ {\mathrm{i}}^{2}\big{)} \tag{9}\]  
where \(\mathrm{p}_{\mathrm{i}}\) is the probability of class i; \(\mathrm{x}_{\mathrm{i}}\) is the i-th element of the input vectors. Aiming to resolve the issue that traditional One-Hot encoding tends to make the model overconfident, the proposed method incorporates a label-smoothing [38] strategy into the  
Figure 6: BSMBConv-MLCA structure. CE loss. The probability distribution after label smoothing is shown in Equation (10), as follows:  
\[y_{i}=\left\{ \begin{array}{ll}(1-e),&\text{if }(i=y)\\ \frac{e}{K-I},&\text{if }(i\
eq y)\end{array} \right. \tag{10}\]  
where \(e\) is the label-smoothing factor and K is the total number of categories. To enable layerwise importance quantification, we designed a DAWCE loss function based on focal loss (FL) [39]. The FL function introduces the weight factor \(\alpha\) to adjust the contribution of samples, as well as a modulation factor \((1-p_{t})^{\sigma}\) to guide the model to focus on the confusable samples, where \(\alpha\) takes the value \((0,1)\) and \(\sigma\) takes the value \([0,+\infty)\). This study introduces \(\omega_{1}\) and \(\omega_{2}\) to construct adaptive adjustment coefficients, which help regulate the feature-learning process between different layers, thereby enabling the model to adaptively change weights when facing different categories of samples. Where \(\sigma\) is \((2-\omega)\), when the model has high confidence in a category, \(\sigma\) decreases, thereby suppressing the gradient update strength for such samples; conversely, when the model has low confidence in a category, \(\sigma\) increases, thereby enhancing the loss and accelerating the gradient update for such samples. Additionally, based on Equation (8), this study designed the dynamic weight factors \(\alpha_{1}\) and \(\alpha_{2}\) to dynamically adjust the contributions of the two branch losses to the overall loss. These weights reflect the model's confidence in each branch. During training, \(\alpha_{1}\) and \(\alpha_{2}\) are adjusted based on the confidence of their respective branches, ensuring that the model avoids overfitting to categories with excessively high confidence within a branch. This adjustment helps prevent the over-tuning of the branch's parameters.