CyberMaskQA: A Privacy-Aware Benchmark for Large Language Models in Cybersecurity Question AnsweringCyberMaskQA: A Privacy-Aware Benchmark for Evaluating Large Language Models in Cybersecurity Question Answering
The authors propose CyberMaskQA; on 250 questions, Llama's average MCQA accuracy is 78.0%, and the authors state that masking and QA are inversely related.
- Cybersecurity QA requires incident response and vulnerability analysis in organizational contexts containing identifiers such as IPs, hostnames, and accounts; cloud processing is often infeasible in regulated environments. Existing benchmarks mostly test factual knowledge, and the authors state that annotated data that simultaneously evaluates operational reasoning and privacy preservation is lacking.
- The authors build CyberMaskQA with a four-stage pipeline: collect standards and anonymization procedures and write base scenarios, expand context with Claude Sonnet 4.5, mask sensitive entities after verification with Gemini 3 Flash and human checks, then expand from 250 questions to 2000.
- On CyberMaskQA-250, Llama-3.1-8B has an MCQA average accuracy of 78.0%, while Ministral-3-8B is at 40.8%. The latter has a mask recall of 92.5% and precision of 61.7%. The authors state the two are inversely related, with Figure 9 annotating R = -0.52.
- The paper does not have a dedicated limitations section. The Conclusion states that architectures that can simultaneously optimize utility and confidentiality are needed. The evaluation consists of 250 questions, four open-source models, and one-shot accuracy and mask precision/recall; it does not report the number of repetitions, temperature, or scores on the 2000-question set.
- Evaluated models
- Llama-3.1-8B-InstructInternLM3-8B-InstructQwen2.5-7B-InstructMinistral-3-8BGPT-5.2 Instant
- Benchmarks
- CyberMaskQA-250CyberMaskQA-2000
- Metrics
- accuracyprecisionrecall
The researchers propose CyberMaskQA, a privacy-aware cybersecurity question-answering benchmark for simultaneously evaluating large language models' operational reasoning and privacy-preservation capabilities. The benchmark is generated through manually constructed base scenarios combined with LLM-driven semantic expansion, establishing explicit causal dependencies between assets and permissions, and annotating each instance with precise private entity labels to support controlled information disclosure. Evaluation of question-answering accuracy and masking performance shows that the benchmark can be used to develop deployable context-aware cybersecurity models and study the privacy-utility trade-off; the dataset and generation framework will be released after the paper is accepted.
Paper analysis
What problem does this paper attempt to solve?
The authors state that existing cybersecurity QA benchmarks lack organizational context and privacy annotations, so they propose CyberMaskQA.
How to evaluate cybersecurity question answering in organizational contexts with sensitive identifiers, while also measuring privacy preservation.
- Scenario: The authors state that tasks like incident severity judgment and alert prioritization depend on asset roles, network segmentation, and user permissions; logs and configurations contain identifiers such as IPs, hostnames, and user accounts, and in regulated environments using cloud models is often unsafe or infeasible. Table I describes the required context as asset roles, criticality, and system dependencies.
- Existing gaps: The authors state that most benchmarks come from textbooks, standards, and public documents, mainly testing factual knowledge rather than runtime reasoning. PRIV-QA and CON-QA have privacy mechanisms, but the data are separate or narrow in scope, insufficiently covering scenarios that require both contextual reasoning and privacy preservation.
- Authors' observation: The authors state that models trained only on public data tend to fit context-independent heuristics and struggle to generalize to deployments relying on institutional context.
- Proposed benchmark: The authors propose CyberMaskQA pipeline: human base scenarios plus LLM semantic expansion, with private entities annotated for each sample to enable controlled disclosure. The initial set is CyberMaskQA-250, then expanded to CyberMaskQA-2000. The authors plan to release the dataset and generation framework after the paper is accepted.
What related research exists?
Related benchmarks either test factual knowledge or lack annotated masks; the authors use Table II to locate the gap in joint evaluation.
The introduction and Related Work divide related work into cybersecurity QA data and frameworks with privacy mechanisms; Table II additionally lists the sizes of several datasets.
Cybersecurity QA datasets
- CyberMetric (Tihanyi et al., 2024): Uses GPT-3.5 and RAG to generate multiple-choice questions from NIST standards and textbooks, with sizes from 80 to 10K. The authors state it mainly evaluates factual knowledge and does not include institutional context or privacy-sensitive information.
- CyberBench (Liu, Shi, and Buford, 2024): Ten datasets and four task types, including named entity recognition, summarization, multiple-choice QA, and text classification. The authors state that tasks are separated, preventing integrated evaluation, and it does not support contextual reasoning or privacy evaluation.
- AttackQA (Krishna, 2024): The text states approximately 25K QA pairs with rationales, about 80% synthesized with Llama3-8B based on MITRE ATT&CK, with quality control by larger LLMs. The authors state it lacks masking annotations for sensitive information. Table II's rightmost column records 25355.
Privacy-related data and frameworks
- SensitiveQA / PRIV-QA (Li et al., 2025): The text states there are 50k Chinese and 7k English open-ended dialogues containing PII, with PII unannotated and closed-source. Table II's rightmost column records 7214, inconsistent with the text's scale; the scale follows the table's 7214. The authors state it is not multiple-choice, making evaluation more complex.
- CON-QA (Singh et al., 2025): The introduction states it performs privacy-preserving QA in the contract domain using cloud LLMs. The authors group PRIV-QA and CON-QA together, stating these methods rely on mutually separate or narrowly scoped data.
- Other datasets in Table II: SecQA (Liu, 2023), CyberLLaMa (Zhang et al., 2025), pii-masking-300k (Ai4Privacy, 2024). The rightmost column sizes are 242, 42404, and 300000, respectively. The text does not expand criticisms for each. For masking metrics, the authors state they follow prior work [12], [15].
Baselines and comparisons
- Baseline methods: The evaluation does not introduce other QA systems or detectors; it directly reports results of four open-source models on CyberMaskQA-250.
- Comparison datasets: Table II lists CyberMaskQA alongside the above datasets. After transcription, some columns may be misaligned; here only the comparisons explicitly stated in the text and the rightmost size numbers of each row are adopted. For the CyberMaskQA row, the human verification and total size correspond to 250 and 2000 in the text, respectively.
The authors state that no prior dataset simultaneously has cybersecurity QA, operational context, and explicit privacy annotations in the same framework; CyberMaskQA uses multiple-choice questions dependent on institutional context and provides annotations and masked versions for PII and operational information.
How does the paper address this problem?
Four-stage pipeline: basic questions, context expansion, entity masking, then expansion to 2000 questions.
CyberMaskQA uses a four-stage pipeline that expands manually constructed base scenarios into multiple-choice questions with organizational context, standard answers, and sensitive entity annotations, then generates masked versions. Figure 1 gives an overview.
Documents, Schema, and Base Scenarios
- Documents: Base questions align with NIST Special Publications (the text cites SP 800-53 as an example), CIS Critical Security Controls, OWASP (the text cites OWASP Top 10 as an example), ISO/IEC, GDPR (the text cites Article 33 as an example), HIPAA, and anonymized operational procedures from a university IT environment.
- Schema: Each item contains Context (e.g., CSV logs), Question, Answer Options (A–D), Correct Answer, Entities, and Masked Fields. Figure 2 shows a schema example.
- Base scale: The authors construct 30 base scenarios. Correct answers are designed to depend directly on the provided context.
Four Domains
- Identity & Access Management: permission lifecycle, role-based access control, and least privilege. CyberMaskQA-250 has 76 items and 840 annotated private entities.
- Threat Detection & Incident Analysis: identifying suspicious patterns from technical logs; the text cites SQL injection and XSS as examples. 48 items and 418 entities.
- Incident Response & Escalation: assessing severity and subsequent compliance steps against HIPAA, GDPR, etc. 47 items and 282 entities.
- Security Posture & Prevention: network architecture, mobile device management, and security training priorities. 79 items and 601 entities. The authors state that the number of items differs across categories because real-world scenarios differ across domains.
Context Expansion and Validation
- Generation: Claude Sonnet 4.5 generates diverse enterprise contexts while preserving the underlying logical dependencies. Figure 4 shows different variants of the same base question.
- Perturbation test: The authors deliberately alter questions and answers, for a total of 10 items. GPT-5.2 Instant missed 3, while Gemini 3 Flash flagged all perturbations as incorrect. Gemini 3 Flash was then used to review all generated items and flag suspicious ones.
- Manual validation: Humans re-check flagged items and review all generated questions, deleting 10 of 260 items. The three aspects are: whether the policy is consistent with Stage 1 standards and has only one logically valid answer; whether scenarios are too similar; and whether IPs, usernames, etc., fit the scenario. The correction in Figure 5 replaces the IP when the location and IP are inconsistent.
Masking
- Labels: Table III lists USER ACCOUNT, IP ADDRESS, URL, FILE PATH, HOSTNAME, SOFTWARE, OS, HARDWARE, GROUP, IDENTIFIER, LOCATION, DATE. Users can specify which types to mask and choose fully masked, unmasked, or mixed versions.
- Replacement: Claude 4.5 Sonnet receives 3 manually masked examples, replaces sensitive entities in the Context, Question, and options according to the schema, and preserves a mapping table from original values to labels. The full prompt is not given in the text.
- Validation: Humans first flag mask correctness and logic issues, then Gemini 3 Flash is used to find omissions, and then humans re-check flagged items. 115 of 250 items had masking failures and were manually corrected. The authors call one type of error Foundational Carry Over: sensitive values missed in base questions propagate to derived variants; correcting the base question avoids repeated failures in related variants.
Scaling to 2000 Questions
- Scale: The base question bank is expanded to 60 items; each is expanded into 30–40 contexts, more than the 10 contexts used in the 250-question stage.
- RAG: The model reads standards such as OWASP and NIST, guidelines, and attack reports, generating base questions in batches of 10 until 70 new ones are written. The prompt is adjusted based on prior human feedback; issues named in the text include IP-location alignment, avoiding duplicate questions, and placeholder values.
- Mask reuse: The expanded set uses the same masking pipeline, with the prompt adjusted based on feedback. Issues named in the text include the correspondence between [GROUP] and job roles, member references, and handling of [LOCATION].
What experiments did the paper conduct?
Four open-source instruction models perform one-shot QA and masking on CyberMaskQA-250; the authors state that accuracy and privacy preservation are inversely related.
Experimental Setup
- Models tested: Llama-3.1-8B-Instruct, InternLM3-8B-Instruct, Mistral-3-8B-Instruct, Qwen2.5-7B-Instruct. Section IV.A uses these names; Figures 6–9 label the third model as Ministral-3-8B. The results below follow the figure names. The authors state that these open-source models can perform local inference in resource-constrained edge environments to avoid sending sensitive data to external cloud services.
- Data: The evaluation set is CyberMaskQA-250, 250 multiple-choice questions. The four category sizes are described in Section III.A. Section IV does not report model results on CyberMaskQA-2000.
- Protocol: Both MCQA and masking are one-shot, with a pair of examples given before a new question. MCQA requires outputting only A, B, C, or D. Masking requires outputting JSON, replacing sensitive entities in the Context, Question, and options with placeholders such as [IP_ADDRESS], which the authors state is consistent with prior dataset [16].
- Metrics: MCQA uses accuracy. Precision is the number of correctly masked entities divided by all entities masked by the model; recall is the number of correctly masked entities divided by all ground-truth entities. The paper does not mention an LLM judge, nor does it report temperature, number of repetitions, or whether the MCQA input is the original context or the masked context.
- Comparison: There is no baseline from other question-answering methods; the four models serve as references for each other.
Main Results
The MCQA accuracies stated in Section IV.B are as follows. Figure 6 also contains numbers not tied to models and categories in the text; these are not filled into the table.
Model Average Accuracy Threat Detection & Incident Analysis Llama-3.1-8B 78.0% 95.8% InternLM3-8B 76.4% 89.6% Qwen2.5-7B 75.2% 89.6% Ministral-3-8B 40.8% Not reported - The authors state that Llama-3.1-8B has an average accuracy of 78.0%, followed by InternLM3-8B at 76.4% and Qwen2.5-7B at 75.2%; Ministral-3-8B is at 40.8%. The authors believe this may be related to its training bias toward long-form text generation rather than constrained single-token classification: it often writes lengthy reasoning before the letter, which causes extraction failure even when the reasoning is correct.
- The authors state that most models perform highest on Threat Detection & Incident Analysis, possibly because the contextual evidence is clearer and requires less inference. For this category, the text gives Llama 95.8%, InternLM 89.6%, and Qwen 89.6%.
- The authors state that Identity & Access Management is the hardest because answers require integrating user groups, permission mappings, and resource requirements across documents. The text does not give accuracy for this category.
Relationship Between Masking and QA
- Overall: The authors state that Ministral-3-8B has the highest average recall at 92.5% and precision at 61.7%, attributing this to over-masking. They state that it emphasizes leaking less privacy under the prompt rather than reducing masking of non-sensitive information.
- By category: The authors state that masking is better for Threat Detection & Incident Analysis because it often relies on a single, unambiguous signal; usernames, employee IDs, and IPs in Identity & Access Management have fixed formats, making masking more consistent; Security Posture & Prevention is harder because policy text mixes organizational language with common nouns. The remaining numbers in Figure 7 do not align with models in the transcription and are not listed.
- Inverse relationship: The authors state that Llama-3.1-8B, which has the highest MCQA accuracy, has the weakest masking, while Ministral-3-8B, which has the lowest MCQA, has stronger masking. Figure 9 annotates the trend between QA accuracy and mask recall as R = -0.52. The authors believe QA benefits from precise reasoning, while masking favors conservative generation. The authors also state that Ministral-3-8B and Qwen2.5-7B favor high recall with lower precision, while Llama-3.1-8B favors precision at the expense of recall; the operating point depends on which cost is higher: privacy leakage or unusable output.
Entity-Level Masking
- Format: The authors state that, averaged over the four LLMs, format-stable IP_ADDRESS and FILE_PATH are higher, while format-variable IDENTIFIER and GROUP are lower (Figure 8). The transcribed bars cannot be matched to numbers one by one, so they are not copied individually.
- IDENTIFIER: The authors state that it has no uniform format; model recall is 79–95%, and they mask non-sensitive numeric strings as well, resulting in low precision. The authors believe this type of masking may require rule-based post-processing rather than relying solely on LLM judgment.
- Example and high-recall categories: The authors cite Q93, stating that Llama correctly masked the user account but also masked the action label, while failing to mask the IP and timestamp. The authors state that FILE_PATH and DATE recall is above 95%.
Other Ablations and Analyses
- The paper does not report ablations on prompts, mask label subsets, number of examples, or model size.
- Perturbation validation: out of 10 items, GPT-5.2 Instant missed 3, while Gemini 3 Flash flagged all (Section III.B).
- Manual mask correction: 115 of 250 items failed (Section III.C); the authors use Foundational Carry Over to describe missed labels propagating from base questions to variants.
- Generated item pruning: 10 items removed from 260 (Section III.B).
What are some points that can be further explored?
The paper has no dedicated limitations section; the Conclusion states that architectures that simultaneously optimize utility and confidentiality are needed.
Limitations and Future Directions Noted by the Authors
- The paper has no dedicated Limitations or Future Work section. The Discussion explains the difference between QA and masking without framing any design choice as a limitation of the work.
- The Conclusion states that the two objectives depend on different capabilities and calls for architectural approaches that can simultaneously optimize operational utility and data confidentiality.
Experimental Coverage
- Model scores come from four open-source instruction models on CyberMaskQA-250: Llama-3.1-8B-Instruct, InternLM3-8B-Instruct, Mistral-3-8B-Instruct, and Qwen2.5-7B-Instruct (Section IV.A).
- The reported metrics are MCQA accuracy, and mask precision and recall; both tasks are one-shot (Section IV.A).
- The 250 questions cover four domains; the number of items and private entities per category are given in Section III.A; mask labels are the 12 categories in Table III.
- The construction stage uses Claude Sonnet 4.5 to generate contexts and masks, Gemini 3 Flash for item and mask validation, and a 10-item perturbation comparison between GPT-5.2 Instant and Gemini 3 Flash (Sections III.B–C).
- The paper does not report the number of evaluation repetitions, sampling temperature, LLM judge, or human agreement, nor does it state whether the MCQA input is the original or masked context. Section IV does not report model scores on CyberMaskQA-2000.
Summarize the main content of the paper
CyberMaskQA jointly evaluates contextual cybersecurity QA and masking; the authors state that accuracy and privacy are inversely related across four models.
The authors construct a privacy-aware cybersecurity QA benchmark, CyberMaskQA, to simultaneously examine multiple-choice reasoning that depends on organizational context, and sensitive entity masking.
- Problem: Decisions such as incident classification and alert prioritization depend on organization-specific assets, permissions, and topology, and these materials contain identifiers such as IPs and accounts. The authors state that public factual benchmarks cannot measure this reasoning, and cloud processing of sensitive operational data is often infeasible.
- Approach: The pipeline turns standards and anonymization procedures into 30 base scenarios, expands context with Claude Sonnet 4.5, obtains 250 questions via Gemini 3 Flash and human verification, then masks according to 12 category labels and expands to 2000 questions. Each question is four-choice with entity annotations and masked fields.
- QA: In the one-shot setting on CyberMaskQA-250, Llama-3.1-8B achieves an average MCQA accuracy of 78.0%, InternLM3-8B 76.4%, Qwen2.5-7B 75.2%, and Ministral-3-8B 40.8%. For threat detection, the text gives Llama, InternLM, and Qwen as 95.8%, 89.6%, and 89.6%, respectively.
- Masking: Ministral-3-8B has an average recall of 92.5% and precision of 61.7%. The authors state that models with higher accuracy have weaker masking, and vice versa; the trend in Figure 9 is R = -0.52. The authors also state that FILE_PATH and DATE recall is above 95%, and IDENTIFIER recall is 79–95% but with low precision.
- Authors' conclusion: The authors state that there is a consistent trade-off between reasoning performance and privacy preservation on edge models, and that the two objectives depend on different capabilities, thus requiring architectures that can simultaneously optimize operational utility and data confidentiality. The authors plan to release the dataset and generation framework after the paper is accepted.