# Chinese Named Entity Recognition Based on Multi-Level Representation Learning
## 4 Experimental Design and Analysis
### Performance Analysis of ADMHA  
In this section, we designed comparative experiments to evaluate the performance of ADMHA compared to MHA and to explore the optimization effect of ADMHA with varying numbers of attention heads. In the experiment comparing ADMHA and MHA, all other modules and parameters of the WP-XAG model were kept constant, with only ADMHA replaced by MHA, as shown in Table 6. Bold data indicates the highest value of the corresponding indicator in the table. Furthermore, we conducted experiments to assess the model's performance with different numbers of attention heads (1, 2, 4, 8, and 16) across various datasets. The results of these experiments are detailed in Table 7. Similarly, we use bold values to represent the highest values for the corresponding metrics in the table. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Datasets**} & \multicolumn{3}{c}{**WP-XAG (ADMHA)**} & \multicolumn{3}{c}{**WPMG (MHA)**} \\  & **P** & **R** & **F1** & **P** & **R** & **F1** \\ \hline Resume & 96.94 & 96.84 & **96.89** & 96.22 & 94.74 & 95.03 \\ Weibo & 72.95 & 76.94 & **74.89** & 73.61 & 72.31 & 71.40 \\ CMeEE & 72.87 & 71.53 & **72.19** & 71.39 & 71.82 & 70.93 \\ CLUENER2020 & 80.21 & 81.73 & **80.96** & 75.40 & 83.15 & 78.91 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance comparison experiments (%). Figure 5: Model iteration comparison. As shown in Table 6, by comparing the performance of ADMHA and MHA across the four datasets, it is evident that ADMHA demonstrates a clear advantage on all datasets. First, in the more structured Resume dataset, ADMHA improves the F1-score by 1.86% compared to MHA. This shows that ADMHA, through its adaptive weighting mechanism, dynamically adjusts the importance of different attention heads, enhancing the model's ability to capture fine-grained entities. Second, in the Weibo dataset, which contains a large number of polysemous words and noise, the F1-score increases by 3.49%. This indicates that ADMHA's dynamic weighting mechanism allows it to better handle complex contexts and the semantic variations of polysemous words. In the CMEE dataset, the F1-score improves by 1.26%, as ADMHA can more flexibly model the complex dependencies between nested entities. Finally, in the CLUENER2020 dataset, which contains a rich set of fine-grained entities, ADMHA improves the F1-score by 2.05%, demonstrating its superior flexibility in modeling complex entity relationships compared to MHA. ADMHA's adaptive attention mechanism makes the model more adaptable and flexible when addressing complex dependencies, fine-grained entities, and polysemy issues. As shown in Table 7, the F1-score increases across all datasets as the number of attention heads rises from 1 to 4. This is likely because ADMHA dynamically adjusts the importance of each attention head based on the input data. With more heads, the model can learn diverse semantic features from various subspaces. The adaptive weight mechanism ensures that the model effectively utilizes these diverse features, avoiding the limitations of fixed weight allocation. At four attention heads, ADMHA strikes a balance between capturing both local and global information while avoiding issues like information redundancy or unnecessary computational resource consumption. However, as the number of attention heads increases beyond four, the F1-score begins to decrease. This suggests that despite ADMHA's ability to adaptively adjust the weights of each head, having too many heads can lead to information redundancy. Even with the adaptive mechanism, some heads may fail to capture useful new information, potentially introducing noise instead. Moreover, an excessive number of attention heads may result in an over-parameterized model, which could negatively impact training performance.