# An ELECTRA-Based Model for Power Safety Named Entity Recognition
## 3 Results
### Experimental Results  
The experimental results are shown in Table 4, the RS-ELECTRA-BiLSTM-CRF model has shown excellent performance in the power safety NER task. This model outperforms the other three models on the power safety dataset, achieving a precision of 92%, a recall rate of 93%, and an F1-score of 93%. In comparison, the BiLSTM-CRF model only achieves an F1-score of 87%. This is because it struggles to capture semantic connections in the text context. The RS-ELECTRA model and BERT model, through replacement-style masked language modeling and masked language modeling, can learn the features of the context well, thus overcoming the effects of polysemous words and noise words, and obtaining the complete features of the sentences. In addition, the BERT-BiLSTM-CRF model achieved an accuracy of 90%, a recall of 91%, and an F1 score of 90%. The model proposed in this paper improved these by 2.2%, 2.1%, and 3.3%, respectively. This is because the improved ELECTRA model can more effectively extract semantic information and contextual relationships from the text, making it more robust in understanding text. To further analyze the performance disparities in entity recognition for different models, this paper computed the Precision, Recall, and F1-score for each entity type using the BiLSTM-CRF, BERT-BiLSTM-CRF, and RS-ELECTRA-BiLSTM-CRF models. The results are shown in Table 5 and Figure 4. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Model** & **Precision** & **Recall** & **F1-Score** \\ \hline BiLSTM-CRF & 0.86 & 0.88 & 0.87 \\ \hline BERT-BiLSTM-CRF & 0.90 & 0.91 & 0.90 \\ \hline RS-ELECTRA-BiLSTM-CRF & 0.92 & 0.93 & 0.93 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Experimental results of each model. \begin{table}
\begin{tabular}{l l} \hline \hline
**Hyperparameter** & **Hyperparameter Setting** \\ \hline learning-rate & \(2\times 10^{-5}\) \\ \hline optimizer & Adam \\ \hline batch size & 32 \\ \hline epoch & 1000 \\ \hline dropout & 0.1 \\ \hline max seq length & 128 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Experimental parameter setting. Table 5 shows that the model proposed in this paper has achieved improvements in the recognition of various entity types. Especially, the \"equipment\" type achieved an F1 score of 0.96, the \"component\" type achieved an F1 score of 0.98 and the \"operation\" type achieved an F1 score of 0.96. In addition, when compared with BERT-BiLSTM-CRF, the F1 values of types improved by 4.3%, 4.2% and 5.3%, respectively. This model has exhibited the best performance in the vocabulary of the electrical engineering field. This improvement is because of the Electra model using the RTD task, where the generator model attempts to replace words in the input with other words, and the discriminator model determines whether the words have been replaced. This method helps the model better understand differences in words, especially specialized words, as it must distinguish between original and replaced words. As can be seen from Figure 4, the accuracy, recall and F1 values of the \"equipment\" type is significantly higher than that of the \"status\" type. The dataset shows that the \"equipment\" type comprises 7690 entities, while the \"status\" type comprises only 2692. This difference indicates that some entity types are more common in the dataset. Generally, high-frequency entity types have higher prediction accuracy because the model has more samples to learn from during training, allowing it to capture the features of these entity types more effectively. In contrast, low-frequency entity types may not have enough samples for the model to learn their features adequately, resulting in lower prediction accuracy. However, for the 'Result' type, which comprises 5383 entities, the performance remains relatively low. This is because the \"result\" entity type is highly context-dependent and requires understanding specific contexts or sentence structures, making it difficult for the model to accurately recognize without sufficient context.