Introduction
The cybersecurity landscape is characterized by an overwhelming volume of data. Analysts must synthesize information from disparate sources, such as Common Vulnerabilities and Exposures (CVE), Common Platform Enumeration (CPE), and Common Weakness Enumeration (CWE), to understand and mitigate threats. While Large Language Models (LLMs) excel at natural language processing, they often struggle with "multi-hop" reasoning—the ability to trace logical chains across multiple related entities. Conversely, Knowledge Graphs (KGs) provide structured precision but are difficult to construct from unstructured text. This paper presents a hybrid framework that leverages LLMs to build KGs, which in turn "ground" the LLM’s reasoning to prevent hallucinations and enhance technical depth.
The Proposed Framework
The authors propose a three-stage pipeline designed to bridge the gap between unstructured text and structured reasoning.
1. Text Mining
Using LLaMA 3.3 70B, the system parses vulnerability reports to identify "causal factors." Unlike simple entity extraction, this stage captures actors, actions, objects, and properties involved in security flaws. Techniques such as co-reference and acronym resolution ensure entity consistency (e.g., mapping "MS" to "Microsoft").
2. KG Construction and Augmentation
Extracted data is transformed into Resource Description Framework (RDF) triples based on a custom schema. To enrich the internal security data, the graph is augmented with DBpedia. This links specific software products to broader contextual information, such as parent companies or industry sectors, providing a more comprehensive view of the threat landscape.
3. Hybrid Reasoning
For user queries, the system generates a SPARQL query to retrieve a relevant subgraph from the KG. This structured context is then provided to the LLM, which synthesizes a final, grounded answer.
Key Insights and KG Structure
A core innovation of this framework is the explicit modeling of causality. By capturing states and properties rather than just simple links, the system can address complex "how" and "why" questions.
The augmentation with DBpedia, while beneficial for connectivity, introduces the risk of "semantic drift." If the LLM misidentifies a concept during expansion (e.g., confusing a software "bridge" with a physical one), it can introduce noise. However, when successful, this enrichment significantly improves the completeness of the reasoning process.
Evaluation and Results
The framework was evaluated using a dataset of 1,000 CWE entries and 3,000 Question-Answer pairs, with Gemma 3 27B serving as the evaluation model. The "Graph-LLM" approach demonstrated substantial improvements over a baseline LLM using only plain-text descriptions:
- Accuracy: Increased from 0.648 to 0.802.
- Completeness: More than doubled, rising from 0.266 to 0.630.
- Link Prediction: The augmented KG achieved a Mean Rank of 395.06, outperforming the structured baseline of 426.32.
Conclusion and Future Work
The integration of KGs with LLMs provides a powerful tool for cybersecurity analysis, particularly in improving the exhaustiveness of automated answers. Future research will focus on mitigating semantic drift during DBpedia augmentation through more advanced disambiguation techniques and testing the system against complex, multi-step attack scenarios.
Summary updated