NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Actionable Cyber Threat Intelligence using Knowledge Graphs and Large Language Models

Romy Fieblinger, Md Tanvirul Alam, Nidhi Rastogi · DOI

Abstract

Cyber Threat Intelligence (CTI) is essential for proactive defense, yet the majority of actionable data remains trapped in unstructured formats such as blog posts, PDF reports, and news articles. This paper presents a framework for transforming these messy, unstructured sources into structured, queryable Knowledge Graphs (KGs) using Large Language Models (LLMs). By evaluating few-shot prompting, the "Guidance" framework, and parameter-efficient fine-tuning (QLoRA), we demonstrate that specialized open-source models can effectively extract threat "triples" to facilitate link prediction for future attack patterns.

1. Introduction

Modern cybersecurity teams are increasingly overwhelmed by the volume of threat data. According to a SANS survey, security analysts spend over 40% of their time manually processing information about threat actor behaviors, tools, and targets. While traditional machine learning has been applied to automate this process, these methods often suffer from high false-positive rates and rigid schemas that fail to capture the nuanced context of cyber attacks.

This research addresses the challenge of leveraging the reasoning capabilities of LLMs to extract Subject-Predicate-Object relationships (e.g., [SpyNote, isA, Trojan]) from raw text. By constructing a Knowledge Graph from these extracted triples, we aim to move beyond simple data collection toward predictive intelligence, where the graph can be used to anticipate the next moves of a threat actor.

2. Methodology

We evaluated several open-source LLMs, specifically the Llama 2 series (7B, 13B, 70B), Mistral 7B, and Zephyr 7B. To optimize the extraction of structured CTI data, three primary strategies were tested:

  1. Prompt Engineering: Utilizing few-shot learning by providing the model with specific examples of the desired output format within the prompt.
  2. Guidance Framework: Implementing a specialized library to enforce strict output constraints (such as regular expressions) during the generation process, ensuring the model adheres to a valid data structure.
  3. Fine-Tuning (QLoRA): Applying Quantized Low-Rank Adaptation to specialize models on a domain-specific CTI dataset. This parameter-efficient approach allows for high performance on niche cybersecurity tasks without the computational cost of full model retraining.

Following the construction of the Knowledge Graph, we applied link prediction algorithms, including TuckER and NodePiece, to evaluate the graph's ability to predict missing relationships or future attack vectors.

3. Datasets

The study utilized two distinct datasets to validate the framework:

  • Annotated CTI Dataset: A curated set of 120 reports related to 36 Android malware families (spanning 2015–2022), manually labeled to establish a ground truth for training and evaluation.
  • Large-Scale Dataset: Approximately 12,000 unstructured, open-access CTI reports, segmented into roughly 80,000 paragraphs for large-scale processing and graph construction.

4. Key Insights and Analysis

4.1 The Role of Constrained Generation

The "Guidance" framework proved significantly more effective than simple prompt engineering. By constraining the model's output space, we reduced the cognitive load on the model, leading to more accurate and consistently formatted results.

4.2 Ontology and Hallucination

Providing examples alone was insufficient to prevent models from "hallucinating" non-existent relationship types. To maintain data integrity, it was necessary to embed a specific ontology—a predefined list of allowed entities and relationships—directly into the model's instructions.

4.3 Fine-Tuning vs. Generalization

For the specific task of Knowledge Graph construction, the fine-tuned Llama 2 7B model emerged as the most accurate. It demonstrated superior performance in identifying entity types, such as correctly labeling "Adwind" as a Malware entity and the "US" as a Location entity, compared to larger, non-specialized models.

5. Results

The experimental results highlight the efficacy of the fine-tuning approach:

  • Extraction Quality: The fine-tuned Llama 2 7B model achieved a ROUGE-1 score of 0.6264, outperforming base models relying solely on prompting.
  • Knowledge Graph Utility: In link prediction tasks, the LLM-derived graph outperformed previous state-of-the-art methods like LADDER, showing a 9.26% increase in Hits@30 (the frequency with which the correct answer appears in the top 30 predictions).
  • Human Validation: Qualitative assessments indicated that fine-tuning improved the "correctness" of sampled triples from 39% to 77% compared to standard extraction methods.

6. Limitations and Future Work

Despite the success of the framework, several challenges remain. LLMs still struggle with the inherent noise of unprocessed web data, suggesting a need for more robust pre-processing filters. Furthermore, while the models extracted triples effectively, they did not always align perfectly with industry-standard frameworks like MITRE ATT&CK. Future research will focus on aligning LLM outputs with these standardized taxonomies and expanding the training datasets to improve generalization across diverse cyber threat landscapes.

Summary updated

BibTeX
@inproceedings{fieblinger2024actionable,
  author = {Romy Fieblinger and Md Tanvirul Alam and Nidhi Rastogi},
  title = {{Actionable Cyber Threat Intelligence using Knowledge Graphs and Large Language Models}},
  booktitle = {EuroS\&P Workshops},
  year = {2024},
  url = {https://openreview.net/forum?id=fm4OJk1PcV},
}
Figure