Skip to main content
Kent Academic Repository

CyberLLMInstruct: A Pseudo-malicious Dataset Revealing Safety-performance Trade-offs in Cyber Security LLM Fine-tuning

ElZemity, Adel, Arief, Budi, Li, Shujun (2025) CyberLLMInstruct: A Pseudo-malicious Dataset Revealing Safety-performance Trade-offs in Cyber Security LLM Fine-tuning. In: 18th ACM Workshop on Artificial Intelligence and Security (AISec 2025), 17 October 2025, Taipei, Taiwan. (doi:10.1145/3733799.3762968) (KAR id:113336)

Abstract

The integration of large language models (LLMs) into cyber security applications presents both opportunities and critical safety risks. We introduce CyberLLMInstruct, a dataset of 54,928 pseudo-malicious instruction-response pairs spanning cyber security tasks including malware analysis, phishing simulations, and zero-day vulnerabilities. Our comprehensive evaluation using seven open-source LLMs reveals a critical trade-off: while fine-tuning improves cyber security task performance (achieving up to 92.50% accuracy on CyberMetric), it severely compromises safety resilience across all tested models and attack vectors (e.g., Llama 3.1 8B’s security score against prompt injection drops from 0.95 to 0.15). The dataset incorporates diverse sources including CTF challenges, academic papers, industry reports, and CVE databases to ensure comprehensive coverage of cyber security domains. Our findings highlight the unique challenges of securing LLMs in adversarial domains and establish the critical need for developing fine-tuning methodologies that balance performance gains with safety preservation in security-sensitive domains.

Item Type: Conference or workshop item (Proceeding)
DOI/Identification number: 10.1145/3733799.3762968
Uncontrolled keywords: large language models, cyber security, dataset, fine-tuning, adversarial testing, model safety, pseudo-malicious data
Subjects: Q Science > QA Mathematics (inc Computing science)
Institutional Unit: Institutes > Institute of Cyber Security for Society
Former Institutional Unit:
There are no former institutional units.
Funders: Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Depositing User: Budi Arief
Date Deposited: 06 Mar 2026 15:15 UTC
Last Modified: 06 Mar 2026 15:15 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/113336 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views of this page since July 2020. For more details click on the image.