# CourseKG: An Educational Knowledge Graph Based on Course Information for Precision Teaching
## 4 Experiments
### Entity Recognition Results  
In the proposed entity recognition model BERT-BiGRU-MHSA-CRF, the model parameters were initially configured during the training phase. The batch size, which determines the size of the batch for each iteration, was set to 64, taking into account the dataset size and its influence on the gradient descent direction. To balance convergence speed and model fitting effectiveness, the learning rate was set to 0.0001, and the Adam optimizer was utilized. A dropout rate of 0.5 was employed. The model underwent training for 100 epochs, incorporating an early stopping strategy. The labeled datasets were partitioned into test and training sets at a ratio of 1:4. The parameters for the baseline models followed specifications from their original papers or initial implementations. To evaluate the performance of the proposed BERT-BiGRU-MHSA-CRF, it was compared with two baseline methods: BERT-BiLSTM-CRF and BERT-GRU-CRF. The results of the proposed model and baselines are presented in Table 4.  
Following the most recent studies, four evaluation metrics were selected to evaluate the models, namely, accuracy (_Acc_), recall, precision, and F1-score, and they were calculated by  
\[Acc =\frac{TP+TN}{TP+TN+FP+FN} \tag{8}\] \[Recall =\frac{TP}{TP+FN}\] (9) \[Precision =\frac{TP}{TP+FP}\] (10) \[F1\text{-}score =2\cdot\frac{Precision\cdot Recall}{Precision+Recall} \tag{11}\]  
where \(TN\) represents the number of true negatives, \(TP\) denotes the number of true positives, \(FN\) corresponds to the number of false negatives, and \(FP\) signifies the number of false positives. The experimental findings suggested that all models demonstrated effective performance on the dataset. The BiGRU method, which combines forward and backward GRU units to capture information both preceding and following a given sentence, exhibited enhanced utilization of contextual information. Specifically, the experimental results indicated superior performance of the BiGRU method compared to the BiLSTM method. Furthermore, the integration of a CRF layer facilitated automatic learning of sentence-level constraints and incorporation of constraint labels into the BiGRU output, thereby enhancing entity recognition performance. The accuracy and F1-score values achieved by the BERT-BiGRU-CRF model were 85.33% and 81.19%, respectively. Moreover, the addition of the MHSA module to the BERT-BiGRU-CRF model allowed for improved utilization of global information. Analysis revealed that the model augmented with the MHSA module exhibited increases in accuracy and F1-score values by 3.3% and 5.3%, respectively, underscoring the positive contribution of MHSA to named-entity recognition performance. Owing to the absence of education-specific data, the conventional BERT model faced challenges in effectively extracting features from sequences. Education data had unique characteristics that could not be overlooked. This study used a fine-tuned BERT model, which enriched the contextual semantics in the vertical domain and provided domain \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Acc (\%)** & **Precision (\%)** & **Recall (\%)** & **F1-Score (\%)** \\ \hline BERT-BiLSTM-CRF & 81.55 & 72.76 & 80.12 & 76.26 \\ BERT-BiGRU-CRF & 85.33 & 80.06 & 80.32 & 80.19 \\ BERT-BiGRU-MHSA-CRF(ours) & **88.63** & **80.96** & **90.56** & **85.49** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison results of the three methods. The best results are emphasized in **bold**. awareness, resulting in the best performance in educational entity recognition among all methods, having the accuracy and F1-score values of 88.36% and 85.49%, respectively. Several measures were taken to prevent overfitting. First, we introduced regularization techniques to limit the complexity of model parameters and prevent overfitting to the training data. Secondly, we used an appropriate dropout value in the network to reduce the dependence between neurons and improve the generalization ability of the model.