arXiv:2610.20284cs.CROct 2026

Manuscript Offprint

arXiv:2610.20284

Towards Efficient Threat Intelligence Instruction Tuning via Quality-Aware and Optimal Transport-Guided Data Selection

Jiyu Tian, Mingchu Li, Xiangwei Chen, Liming Chen

Abstract

High-quality data is essential for improving instruction tuning in threat intelligence analysis. However, existing methods for generating cybersecurity instruction data lack reliable quality assessment mechanisms, and gradient influence-based data selection methods primarily focus on single-sample matching, failing to cover diverse and complex security capabilities. To address these issues, we propose CTI-TDS, a Targeted Data Selection method for instruction tuning in Cyber Threat Intelligence analysis. Specifically, we first filter high-quality CTI instructions by integrating instruction style consistency and security knowledge verification. Furthermore, we formulate gradient influence as a distribution alignment problem, learning a gradient subspace of target tasks and applying entropic regularized optimal transport to optimize distribution matching between training samples and target tasks, enabling diversity-aware data selection. We conduct extensive experiments on CTIBench across multiple large language models. Experimental results demonstrate that when fine-tuning with only a small set of high-value instruction data, CTI-TDS outperforms existing data selection methods and achieves competitive performance on threat intelligence analysis tasks. We will release the source code upon acceptance.

1 Introduction

Cyber Threat Intelligence (CTI) analysis aims to identify attack patterns, track threat behaviors, and predict potential risks from massive security data, serving as a critical component of defense systems (Sun et al. 2023; Bouwman et al. 2025; Rashad et al. 2026). Large language models (LLMs) have demonstrated powerful semantic understanding and knowledge reasoning capabilities, providing a new pathway for automating threat intelligence analysis (Levi et al. 2025; Apostu et al. 2026; Cheng et al. 2026; Zhou et al. 2026; Levi et al. 2026). However, general-purpose LLMs lack domain-specific cybersecurity knowledge and struggle to understand complex security tasks such as vulnerability correlation analysis, attack technique identification, and threat attribution. Therefore, it is essential to equip LLMs with specialized capabilities for CTI analysis through instruction tuning (Yu et al. 2025; Kim, Tansu, and Emil 2026).

Effective instruction tuning highly depends on the quality and coverage of training data (Zhou et al. 2023; Wang et al. 2023; Yu, Das, and Xiong 2024). Existing approaches leverage large-scale domain knowledge bases and task templates to generate massive threat intelligence instructions (Alam et al. 2024; Yu et al. 2025; Cheng et al. 2026). However, automatically generated data still faces two major challenges. First, the quality of generated data is difficult to guarantee. Different prompt templates may produce responses with varying linguistic styles, leading to deviations between the generated data and the expected output patterns of target models (Li et al. 2025). Meanwhile, generated content in the cybersecurity may suffer from issues with factual consistency, such as incorrect vulnerability descriptions and inaccurate mappings of attack techniques (Yu et al. 2025). Furthermore, simply increasing data volume does not necessarily lead to optimal instruction tuning performance (Xia et al. 2024; Gharehhasanloo et al. 2025; Chen et al. 2026). CTI tasks involve diverse cybersecurity capabilities, including vulnerability analysis, CVE-CWE mapping and attack technique identification (Alam et al. 2024; Cheng et al. 2026). Thus, selecting a data subset that maximizes model capability improvement under a limited data budget remains challenging.

Recently, targeted data selection methods have improved the efficiency of instruction tuning by evaluating the influence of training samples on target tasks and selecting high-value data (Zhao et al. 2025; Han and Huang 2026; Jiang et al. 2026). For example, LESS (Xia et al. 2024) selects samples relevant to target tasks based on gradient influence estimation, while GIST (Min et al. 2026) further learns the target task gradient subspace to obtain low-dimensional representations, thereby reducing computational costs and improving selection efficiency. However, these methods mainly rely on sample-level gradient similarity for ranking and only consider the matching relationship between individual samples and target tasks, making it difficult to capture the relationship between the overall training data and the capability distribution of target tasks. In the CTI scenario, selecting only samples with similar gradient directions may concentrate cybersecurity knowledge on a limited set of capability dimensions, weakening the model's ability to generalize across diverse security tasks. Therefore, effective data selection methods should jointly consider data quality and cybersecurity capability coverage.

To address the challenges above, we propose CTI-TDS,

Copyright © 2027, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.

a quality-aware and optimal transport-guided data selection framework for CTI instruction tuning. Specifically, we first tackle the quality deviation issue in automatically generated CTI instructions by introducing a few target model instruction-response pairs as style constraints, while leveraging security knowledge resources to verify critical factual information in the generated responses, thereby filtering candidate data that meets the requirements of target CTI tasks. Furthermore, to address the imbalanced capability distribution, we leverage gradients from target CTI tasks to learn a task-relevant subspace, and establish a matching relationship between the candidate data distribution and the target task capability distribution via entropic regularized optimal transport, enabling us to select a training subset that exhibits both task relevance and capability coverage. We conducted extensive experiments using Qwen2.5-7B-Instruct (QwenTeam 2024) and Llama3.1-8B-Instruct on the CTIBench (Alam et al. 2024) benchmark tasks. Experimental results demonstrate that CTI-TDS can improve model performance across various CTI analysis tasks while reducing the size of training data, validating the effectiveness of quality-aware data filtering and gradient distribution alignment strategies in security-domain instruction tuning. Our contributions are as follows:

• We propose a quality assessment method for security-domain instructions that integrates response style consistency and security knowledge verification to reduce stylistic deviation and factual errors in automatically generated data.

• We design a gradient-influence-based data selection approach that leverages low-dimensional gradient subspace modeling and entropic regularized optimal transport to enhance selection diversity while preserving task relevance.

• We construct CTISec-Instruct-50K, a CTI instruction tuning dataset containing 50K samples, and validate the effectiveness of CTI-TDS across multiple LLMs and CTI analysis tasks.

References (28)