## 2 KGs Extraction
### Pre-Construction Preparation
#### 2.1.2 Relation Extraction  
Relation extraction identifies the semantic connections between entities to generate triple structures (subject-relation-object), which form the basic structure of the knowledge graph. Techniques such as bidirectional relation-guided attention have been used to create a complementary effect between entity recognition and relation extraction [11]. In the cybersecurity domain, a method combining BERT-based NER with a GCN to extract attack behaviors significantly improved the accuracy of threat behavior recognition [12]. In various domains (e.g., healthcare, security, software, and education), BERT-based NER has become a core technology for KG construction. Recent approaches have incorporated Retrieval-Augmented Generation (RAG) into KG applications to integrate engineering knowledge from texts. This method employs token classification and sequence-to-sequence (Seq2 Seq) models to extract explicit engineering facts from the KG [13]. In contrast, the AutoAlign technique leverages large language models to automate the alignment process of knowledge graphs, significantly reducing the need for manual intervention [14]. Domain-specific studies include methods for extracting the relationships between ketamine and the gut microbiota from the literature and pathway data [15], approaches that capture diverse features using multi-channel convolutions in triple embeddings [16], methods for constructing a processed knowledge graph [17], approaches based on hierarchical transformers and dual quaternions [18], and triple extraction via sentence transformers utilizing dependency parsing [19]. Generative approaches extend and refine the KG by directly generating triple structures from learned data distributions, while sampling techniques effectively extract substructures from large graphs to balance accuracy and computational cost. For example, a multi-information preprocessing event extraction approach using BiLSTM-CRF with attention extracts events from academic texts to construct a KG [20]. Document-level dynamic graph attention integrates distributed information from an entire document using a two-stage graph strategy to improve the relation accuracy [21]. Seq2 EG employs a sequence-to-sequence transformer to generate event graphs and incorporate complex event structures into the KG [22]. In addition, methods such as biomedical relation comparison, cognitively inspired multi-task frameworks [23], and KG linking through self-supervised learning have been proposed. SelfKG [24] leverages a novel self-supervised contrastive learning strategy that does not require labeled entity pairs by focusing on pushing away many negative samples. By employing a relative similarity metric along with self-negative sampling and multiple negative queues (inspired by momentum contrast techniques), SelfKG demonstrates that accurate entity alignment across different KGs can be achieved without any manual supervision. This approach not only reduces the labeling cost, but also achieves performance comparable to that of state-of-the-art supervised methods. along with the ERGM method--a multi-stage joint extraction technique that includes global entity matching [25]--and KG-based methods for automating complex scenarios, such as emergency planning or water resource management [26]. While Large Language Models (LLMs) have demonstrated state-of-the-art performance in extracting entity-relation tuples, they can occasionally generate \"hallucinated\" relationships that are not grounded in the source text. For example, a model may infer a causal link between two entities that are merely co-mentioned but lack any actual causal or logical connection. To mitigate such issues, recent studies have explored automated validation steps--such as cross-referencing extracted relationships against an external knowledge base or domain-specific rules--to filter out spurious links.