GRID: Graph Representation of Intelligence Data for Security Text Knowledge Graph Construction

Liangyi Huang, Zichen Liu, Fei Shao, Shang Ma, Mengshi Zhang, Zihao Chen, Yanfang Ye, Xusheng XiaoarXiv 2026

TL;DR

GRID (Graph Representation of Intelligence Data) is a novel end-to-end framework that trains small, open-source LLMs to extract high-quality security knowledge graphs from long-form cyber threat intelligence text. By reformulating open-ended graph generation into a scripted task bank of multi-select questions and regex matching targets, GRID provides cheap, stable reinforcement learning rewards that drastically outperform expensive, online LLM-as-judge methods.

What Problem Does This Paper Address?

Cyber Threat Intelligence (CTI) reports—like technical blogs and threat summaries—contain critical details about attacker behaviors, vulnerabilities, and malware evolution. To make this unstructured data actionable for security agents, researchers try to organize it into structured Knowledge Graphs (KGs).

Figure 1: Log4Shell (CVE-2021-44228) CTI articles: knowledge graph (left) and attack summary (right)

However, automating this with Large Language Models (LLMs) faces severe bottlenecks:

  1. Domain Knowledge Gap: Smaller, cost-effective open-source LLMs lack specialized security-domain grounding.
  2. Data Scarcity: There are no high-quality public datasets that tightly align real CTI text with corresponding graph outputs for end-to-end training.
  3. Prohibitive Alignment Costs: Training LLMs via Reinforcement Learning (RL) for open-ended generation usually requires an "LLM-as-judge" to evaluate full graphs at every single training step, which is incredibly slow, expensive, and unstable.

Methods

GRID overcomes these challenges through a complete pipeline spanning data annotation, low-cost RL training, and ontology-guided inference.

Overview of GRID (Note: Refer to the paper's architecture diagram for the full pipeline visualization).

Figure 1: Log4Shell (CVE-2021-44228) CTI articles: knowledge graph (left) and attack summary (right)
  • Automatic Article-Graph Alignment: To generate high-quality training data without manual labor, GRID uses a two-stage annotate-and-revise loop. It extracts a traceable knowledge graph from raw text using strict text-provable constraints, then rewrites the original article to strip out any unsupported security mentions while keeping the non-security context intact.
  • The Task Bank Reformulation: Instead of directly rewarding the model for full graph generation during RL, GRID converts the aligned data into a scripted task bank. This bank features two easy-to-check task families:
  • Four-option multi-select questions to check for precision and hallucinations.
  • Triple-level regex targets to validate individual graph edges.
  • Article Complexity Modeling: GRID calculates a scalar complexity score ($C_{article}$) for each text based on length, entity/relation density, and graph connectivity. This allows the framework to implement curriculum learning, training the model from easy to hard instances.
  • Ontology-Guided Inference: During testing, a refined security ontology (inspired by STIX) explicitly guides a fixed, two-prompt inference pipeline to enforce text-provable truth and prevent hallucinated links.

Datasets

The authors evaluated GRID on a unified benchmark of 249 CTI articles compiled across five distinct sources:

  • GRID: 49 newly introduced, manually annotated real-world CTI articles.
  • CASIE: 50 articles.
  • CTINexus: 50 articles.
  • MalKG: 50 articles.
  • SecureNLP: 50 articles.

Articles whose ground-truth knowledge graphs contained fewer than five edges were filtered out to ensure a rigorous evaluation of complex text extraction.

Key Insights and Ideas

  • Deconstructing Open-Ended RL: The core "aha moment" is that open-ended graph extraction can be supervised using deterministic, cheap checks (regex and multiple-choice) rather than fluid LLM scoring. This task bank can be generated once offline and reused across multiple training runs.
  • Text Revision over Graph Forcing: Instead of forcing a model to extract a perfect graph from messy, real-world text, GRID rewrites the text to perfectly match a verified graph. This creates a pristine, distraction-free alignment dataset.
  • Curriculum Matters in RL: Ordering the training data by structural and textual complexity prevents the policy model from collapsing early in the RL process, leading to significantly higher final test scores.

Key Results

The authors post-trained a 4B parameter model (Qwen3-4B-Instruct-2507) using their framework.

  • State-of-the-Art Recall: The primary Task-bank Reward model achieved 84.62% source-averaged precision, 64.91% source-averaged recall, and 68.53% Avg F1 across the five benchmark sources. It achieved the best overall recall and tied for the top F1 score against much larger commercial baselines.
  • Massive Cost Reductions: GRID achieved these results at a fraction of the cost of traditional methods. The offline task-bank generation cost only $60, whereas training a comparison model using an online End2End LLM-as-judge cost $942—and the Task-bank model still beat the End2End judge model by over 10 F1 points.
  • Inference Efficiency: Thanks to its fixed two-prompt pipeline, GRID's token usage during inference is roughly 40% of competing pipelines like CTINexus (which requires five inference steps).
RQ3 ablation curves up to 225 steps

Ablation studies (shown above) confirm that both article rewriting and complexity-ordered training are vital to maximizing training rewards and test performance.

Limitations and Future Work

  • Non-Agent Architecture: GRID focuses strictly on a non-agent extractor. The authors note that agent-loop RL requires a far more complex reward interface, and current open-source agent stacks remain too immature for stable optimization.
  • Model Scale Constraints: Due to hardware limitations (4× RTX 6000 Ada setup), the framework was only evaluated on a 4B parameter backbone. Scaling full-parameter post-training to 8B or 14B models remains an open engineering challenge for future work.

Summary updated

BibTeX
@misc{huang2026grid,
  author = {Liangyi Huang and Zichen Liu and Fei Shao and Shang Ma and Mengshi Zhang and Zihao Chen and Yanfang Ye and Xusheng Xiao},
  title = {{GRID: Graph Representation of Intelligence Data for Security Text Knowledge Graph Construction}},
  year = {2026},
  eprint = {2605.16714},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.16714},
}
Figure