# A Sentence-Matching Model Based on Multi-Granularity Contextual Key Semantic Interaction
## 4 Experimental Results and Analysis
### Ablation Study  
To further evaluate the effectiveness of each module, this study included an ablation study on the model based on Ernie 3.0-nano using the BQ dataset. This study involved removing specific modules to assess their impact on performance, as displayed in Table 3. In the table, the symbol \"\(\sqrt{\  
Additionally, to verify the effectiveness of the multi-granularity feature extraction module, its removal resulted in a decrease of 0.37% in model accuracy. This study also explored the replacement of this module with different convolutional methods, as depicted in Table 5. It was observed that a single-scale CNN can only capture features at a specific scale, limiting its ability to incorporate a broader range of semantic information. Conversely, a multi-scale CNN compensates for this limitation by capturing semantic information at multiple scales, while a multi-level CNN focuses on capturing higher-level semantic information. These two approaches possess distinct capabilities in capturing different semantic features. The multi-scale CNN extracts a wider range of semantic information, while the multi-level CNN delves into deeper semantic layers. By combining both approaches, the model achieves improved performance as they complement each other in capturing diverse semantic features. This study also examined the impact of attention mechanisms on the model's performance. By removing self-attention and directly fusing the multi-granularity contextual features with the aligned features from cross-attention, the model's accuracy declined by 0.34%. This decrease can be attributed to the absence of important semantic information at various granularities. Similarly, removing cross-attention and fusing the multi-granularity contextual features with the output features from self-attention led to a decrease in model accuracy by 0.31%. This reduction occurred because the model solely focused on its own semantic information and lacked interaction between sentences. Furthermore, simultaneous removal of cross-attention and the multi-path interaction fusion module, relying solely on key semantic information at different granularities, resulted in a decrease in model accuracy by 0.48%. This finding indicates that aligning crucial semantic information between sentences and considering semantic interactions at various granularities significantly contribute to enhancing semantic matching capabilities. Additionally, solely removing the multi-way interaction fusion module resulted in a decrease of 0.43% in accuracy. Furthermore, to further validate the effectiveness of different comparison methods, as presented in Table 6, using only the concatenation of sentence semantic features achieved an accuracy of 83.35%. Using only semantic difference information led to an accuracy of 82.91%, and using only semantic similarity information resulted in an accuracy of 83.05%. These results indicate that combining all three types of comparison methods is an effective approach for capturing matching interactions. Moreover, the impact of feature fusion in different directions on performance was explored. In the table, \",\" represents concatenation along the column direction of the tensor, expanding the hidden state dimension, while \",\" represents concatenation along the row direction of the tensor, expanding the sentence length. The results showed that concatenation in the row direction did not effectively merge the compared information from multiple ways, which failed to reflect the interaction between sentences and resulted in decreased performance. Lastly, a comparative experiment was conducted to validate the impact of the CLS token vector on model performance, as presented in Table 7. The experiment involved using different prediction modules. The results demonstrated that the best performance is achieved when the CLS token vector is concatenated with the output vector from the max-pooling operation.