# ADLBiLSTM: A Semantic Generation Algorithm for Multi-Grammar Network Access Control Policies
## 2 Related Work  
Early security policies primarily relied on static, predefined rule sets [11], which were typically configured by security experts based on the specific needs and environments of the organization. In this case, semantic generation primarily involves converting rules into machine-readable formats for implementation in network devices or security systems, which relies heavily on manual operations. Increasingly complex security needs have gradually transformed simple rule sets into more advanced formal methods. [PERSON] et al. [12] using first-order logic (FOL) to formalize firewall rules. [PERSON] et al. [13] proposed an algorithm that converts firewall rules into conjunctive normal form (CNF) or disjunctive normal form (DNF) Boolean expressions. To represent and understand security policies more effectively, semantic models such as firewall decision diagram models [14] and ordered binary decision diagram (OBDD)-based models [15] have been introduced. These models not only enhance the expressive power of policies but also improve the flexibility and complexity of policy evaluation. However, manual optimization is still required during policy semantic generation to ensure that it accurately reflects the organization's security intentions. To address this issue, [10] designed a verified stateless firewall policy compiler, but this compiler can only perform semantic generation for specific security policies and requires reprocessing of data when dealing with security policies of other syntaxes. With the development of big data and artificial intelligence technologies, security policies are gradually relying on these technologies for optimization and automatic generation [16]. The accuracy of semantic generation is crucial when generating semantics for many different types of security policies. Deep learning has demonstrated its unique advantages in this scenario, as it can extract useful information and patterns from vast datasets for in-depth learning. The advancements in the field of natural language processing (NLP) [17] have provided technical support for the semantic generation of security policies, with sequence labeling techniques being one of its key components. This technology possesses robust capabilities in information extraction, text understanding, and semantic analysis, enabling it to identify and label crucial concepts and entities from unstructured text, providing a solid foundation for automatic semantic generation. Long short-term memory neural networks (LSTMs), which are a form of recurrent neural networks (RNNs), are widely used in NLP [18; 19; 20; 21]. RNNs face issues such as gradient vanishing and exploding when dealing with long sequences, making it difficult to capture long-term dependencies. LSTMs alleviate these problems through their gating mechanism and memory cells, but standard LSTMs are unidirectional, limiting their ability to capture contextual information. Therefore, researchers have begun to explore more effective network structures. [PERSON] et al. [22] first proposed the BiLSTM-CRF structure, which uses a bidirectional LSTM (BiLSTM) plus a conditional random field (CRF) to solve the problem of text tagging. In the article, they compared long short-term memory networks (LSTMs), bidirectional long short-term memory networks (BiLSTMs), and BiLSTM-CRF for natural language tagging. This network structure is still one of the mainstream methods today. Subsequently, [PERSON] et al. [23] first introduced the attention mechanism into NLP tasks, an innovation that enabled the model to better allocate attention when processing long sentences, improving processing effectiveness. However, the structure of these models is relatively simple, and the feature extraction for complex data is not comprehensive. Therefore, [PERSON] et al.