# ADLBiLSTM: A Semantic Generation Algorithm for Multi-Grammar Network Access Control Policies
## 4 Experiments
### Semantic Generation for ACLs  
ACL policies include extended ACL and standard ACL, so this experiment separately generated the semantics of these data to verify the performance of the model. Table 4 presents the semantic generation results of the four models when processing standard ACL security policies with different syntaxes. The syntactical structure of standard ACL is relatively simple, and the length of the policies is also shorter. Therefore, the model proposed in this paper exhibits higher accuracy in extracting features of standard ACL. Especially for the standard ACLs of Huawei and Ruijie, the model achieved higher precision, which fully demonstrated the good performance of the model in processing security policies with clear and concise structures. This result not only verified the effectiveness of the model's feature extraction ability but also further proved the applicability of the self-attention mechanism and the double-layer BiLSTM network structure in the semantic generation task. By comparing the performance of different models on standard ACL, we found th \begin{table}
\begin{tabular}{c c} \hline \hline
**Network Structure** & **Name** \\ \hline BiLSTM + CRF & Baseline \\ \hline Double-layer BiLSTM + CRF & Baseline + DL-BiLSTM \\ \hline Self-attention + BiLSTM + CRF & Baseline + Self-attention \\ \hline Self-attention+ double-layer BiLSTM + CRF & Ours \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Experimental group design. the self-attention mechanism and double-layer BiLSTM has significant advantages in extracting and understanding concise syntactical structures. This advantage enabled the model to capture key information more accurately and generate semantic representations that conformed to the original meaning. Table 5 shows the detailed results of semantic generation for security policies of extended ACL with different syntaxes using the four models. Compared to standard ACL, the syntactical structure of extended ACL is more complex and the length is longer. From the table, we can observe that for extended ACL, adding BiLSTM and the self-attention mechanism to the baseline both improved the performance of semantic generation for security policies. However, the model proposed in this paper significantly enhanced the \(P\), \(R\), and \(F1\) scores. Taking Cisco's extended ACL as an example, \(P\) increased from 34.92% to 99.74%, \(R\) increased from 45.99% to 99.74%, and \(F1\) increased from 39.48% to 99.74%. Our model achieved good results when generating semantics for Huawei's extended ACL and Ruijie's ACL, and the generated results achieved high precision. The self-attention mechanism can focus on the most important parts of the original data, which is helpful for processing structured and logical texts such as ACL. However, security policies often involve not only individual rules or conditions but also the relationships between these rules or conditions and their positions and roles in the entire security policy. Therefore, adding an additional layer of BiLSTM further enhanced the ability to extract contextual features of security policies. By combining the self-attention mechanism and double-layer BiLSTM, the model not only focused on the most important information but also understood the position and role of this information in the entire security policy, further improving the performance of the model. Figure 3 shows the number of correct semantic generations made by these four models for both standard ACLs and extended ACLs. As can be seen from the figure, compared to the baseline, the other three models significantly improved the number of correct semantic generations. For standard ACLs with simple grammatical structures and shorter sentences, the difference in the number of correct semantic generations among the three models was not obvious. However, for more complex extended ACLs, the gap between these three models was more pronounced. Overall, our model outperformed other models in terms of semantic generation performance.