Skip to content

MiST: Mid-training of large language models for cybersecurityMiST: Mid-Training LLMs for Cybersecurity

arXiv· arXiv:2609.18496· Conference on Empirical Methods in Natural Language Processing 2026· Oded Ovadia, Elad Ben Zaken, Elad Guttman, Orly Moreno KadoshDreamIndexed by this site · 28 days ago· Originally publishedAI updates

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose MiST: synthesizing cybersecurity mid-training data from expert-curated seed corpora; the cybersecurity average of the 8B/32B models is +13.1/+8.6 percentage points over the Qwen baseline.

Questions
Cybersecurity language is specialized, corpora are scarce and local deployment is often required, making it hard for general LLMs to meet the need. The authors argue that the common practice—continued pre-training (CPT) on large-scale raw domain text—emphasizes token scale rather than corpus composition, limiting its effectiveness.
Methods
Proposes MiST: first build a small expert-curated cybersecurity seed corpus, then use Qwen-30B-A3B to synthesize mid-training data through processes such as rewriting, educationalization, QA, and security analysis, and filter it, followed by SFT and general DPO, plus three layers of decontamination.
Experiments and results
On 13 cybersecurity tasks, MiST-8B-DPO averages 61.7 and MiST-32B-DPO 63.2, +13.1/+8.6 percentage points over the Qwen baselines; it outperforms cybersecurity models of the same scale, general capabilities are retained, and it provides a better initialization for downstream SFT and GRPO reinforcement learning.
Limitations and future work
The authors note: the evaluation is limited to knowledge-intensive tasks and does not cover operational scenarios such as log analysis, incident triage or tool use; the RL experiments cover only three structured tasks; synthetic data may introduce bias and generation and verification use models from the same family; n-gram decontamination cannot rule out paraphrased leakage.
Experimental setupMiST-8B-SFT、MiST-8B-DPO et al. · CTI-Bench (CTI-MCQ, CTI-RCM)、SECURE (MAET, CWET, KCV) et al. · accuracy、paired accuracy (P-C) et al.
Evaluated models
MiST-8B-SFTMiST-8B-DPOMiST-32B-SFTMiST-32B-DPO
Benchmarks
CTI-Bench (CTI-MCQ, CTI-RCM)SECURE (MAET, CWET, KCV)SecEvalMMLU-CyberPrimeVul (P-C, P-C CoT)AthenaBench (CKT, ATE, RMS, TAA)MMLUARC-ChallengeGSM8KIFEvalCyberSecEval MITRE
Metrics
accuracypaired accuracy (P-C)safe-response ratevalidation accuracyKL divergence
AI summaryMiST is a set of 8B and 32B cybersecurity models that improve average accuracy on public cybersecurity benchmarks by 13.1 and 8.6 percentage points, respectively, over the corresponding Qwen baselines. It uses mid-training to bridge general pretraining and cybersecurity training, converting expert-reviewed seed corpora into high-quality domain synthetic data. Ablations show the gains come from the mid-training and supervised fine-tuning stages, and MiST also provides a stronger initialization for downstream fine-tuning and reinforcement learning.

MiST is a set of 8B and 32B cybersecurity models that improve average accuracy on public cybersecurity benchmarks by 13.1 and 8.6 percentage points, respectively, over the corresponding Qwen baselines. It uses mid-training to bridge general pretraining and cybersecurity training, converting expert-reviewed seed corpora into high-quality domain synthetic data. Ablations show the gains come from the mid-training and supervised fine-tuning stages, and MiST also provides a stronger initialization for downstream fine-tuning and reinforcement learning.

Related events and news

1 events · 1 news mentions

News that mentions this paper

AI安全基准繁多却各有盲区

  • Dark Readingcites the paper's id or link
    AI 安全基准繁多,却没有一个能说明全貌
    The model — dubbed the Mid-trained Security Transformer (MiST) — improved average performance across 13 cybersecurity tasks, consisting mainly of multiple-choice and true-false questions about

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to use a small expert corpus to do cybersecurity mid-training via synthetic data, replacing large-scale raw-text CPT.

    Core question: how to adapt a general LLM to the cybersecurity domain—the authors argue that the mainstream route of continued pre-training (CPT) on large-scale raw text emphasizes token scale rather than corpus composition and is not the most effective approach.

    • Scenario and motivation: cybersecurity analysis requires handling specialized text such as vulnerability records, attack classifications, code and reports; the authors note that high-quality cybersecurity pre-training corpora are scarce, and privacy-sensitive environments usually require local deployment, making it hard to rely on external API models.
    • Shortcomings of existing methods: the authors state that existing domain adaptation generally uses a two-stage approach—CPT on large-scale raw domain text followed by SFT—focusing mainly on expanding the number of domain tokens rather than the composition of training data.
    • Core observation: much cybersecurity knowledge is encoded in compact expert artifacts (vulnerability records, taxonomies, detection rules, threat intelligence reports); the authors argue that converting these sources into an intermediate training distribution may be more effective than simply training on more raw domain text.
    • Proposed approach: MiST (Mid-trained Security Transformer), a set of 8B and 32B models adapted from Qwen checkpoints; the core is to first build a small expert-curated seed corpus, then generate mid-training corpus through multiple synthetic data pipelines, followed by SFT and general DPO.
    • Positioning of the training pipeline: the authors position mid-training as a domain adaptation stage between pre-training and post-training, and explicitly state that DPO uses general preference data and is not the main source of cybersecurity capability.
  2. What related research exists?

    Related work falls into two categories: cybersecurity LLMs and mid-training; baselines are Qwen3-8B/32B and several cybersecurity models of the same scale.

    Cybersecurity LLMs

    • PRIMUS (Yu et al., 2025) and Foundation-Sec-8B (Kassianik et al., 2025; Weerawardhena et al., 2025): perform continued pre-training (CPT) on large-scale raw cybersecurity corpora.
    • DeepHat-V1 (DeepHat, 2025) and Lily-Cybersecurity (SegoLily Labs, 2025): community models that mainly report cybersecurity SFT through model cards.
    • CyberPal.AI / CyberPal 2.0 (Levi et al., 2025a, 2025b) and RedSage (Suryanto et al., 2026): build cybersecurity supervision data from expert sources or add synthetic reasoning traces; RedSage combines large-scale cybersecurity CPT with agent-generated multi-turn SFT data. The paper states that MiST differs in using the synthetic conversion of the expert-curated corpus directly as the mid-training data itself.

    Mid-training

    • Tu et al. (2025): a survey that describes mid-training as a bridge between general pre-training and post-training.
    • Zhang et al. (2025a): argues that mid-training works by making the intermediate data distribution closer to the target domain. The paper also cites evidence from Ben Zaken et al. (2022) on adaptation exposing knowledge already present in pre-trained models to support this view.
    • Large-scale practices such as Olmo et al. (2025) (Wang et al., 2025; Abdin et al., 2024; Wake et al., 2025): Olmo et al. use about 100B tokens for mid-training, mixing newly generated synthetic data with paraphrased pre-training data; the paper notes that this differs from raw CPT, which barely changes the format.

    Baselines and benchmarks

    • Comparison baselines: Qwen3-8B, Qwen3-32B (the direct bases of MiST), as well as GPT-5.4-mini/nano, Qwen3-235B, DeepHat-7B, Foundation-Sec-8B, Lily-Cyber-7B, Qwen3-8B-Primus, RedSage-8B-DPO, Primus-8B/70B, CyberPal2.0-20B (Table 1); plus a raw CPT baseline (Figure 5).
    • Evaluation benchmarks: CTI-Bench, SECURE, SecEval, MMLU-Cyber, PrimeVul, AthenaBench; general benchmarks are MMLU, ARC-C, GSM8K, IFEval.

    The authors position this paper as: treating mid-training as a corpus design problem rather than a token scaling problem, replacing raw domain-text CPT with the synthetic conversion of a compact expert corpus.

  3. How does the paper address this problem?

    Seed corpus → multi-process synthetic data → LLM filtering → mid-training → SFT → general DPO, plus three layers of decontamination.

    Overall approach: MiST does not directly perform raw CPT on a small corpus; instead, it treats the expert-curated seed corpus as material, converts it into mid-training corpus through multiple synthetic data pipelines, and then applies SFT and DPO (Figure 2, Figure 3).

    Seed corpus construction (Section 3.1)

    • Four source categories: vulnerabilities and threat intelligence (NVD CVE records, expert-curated CTI/RSS reports); security knowledge bases and taxonomies (CWE, CAPEC, ATT&CK, D3FEND); operational security artifacts (Sigma rules, Atomic Red Team tests, Splunk ESCU detections, MISP Galaxy clusters); defensive guidance and platform documentation (OWASP, NIST, vendor documentation, an English Wikipedia security subset).
    • Scale: the seed corpus totals 219,661 samples and about 64.7M tokens (Table 12).
    • RSS filtering: GPT-5-Mini is used as a reviewer to score and filter RSS blog posts by degree of English and CTI relevance, reducing 7,916 posts to 2,995 (Section K).

    Synthetic data generation (Section 3.2)

    • Generation model: Qwen-30B-A3B (3B active parameters); the authors state the choice is based on performance and efficiency, and that the seed document context is always provided during generation so that the model mainly acts as a conversion engine.
    • Mid-training pipelines: paraphrasing, educationalization (blog or textbook chapter style), QA (including two rounds of follow-up expansion), and cybersecurity metric and terminology analysis (explaining structured fields such as CVE/CVSS/ATT&CK).
    • Post-training pipelines: multi-turn dialogue (up to seven turns) and persona dialogue (first have the model propose a persona related to the seed document, then simulate its dialogue with a security expert).
    • Quality filtering: Qwen-30B-A3B scores samples on six dimensions from 1–10, and samples with a total score below 8 are removed (Section 3.2.3).

    General data and training (Section 3.3, 3.4)

    • General data: a 50K subset of the Olmo 3 Dolci SFT dataset is mixed into mid-training (replay strategy), and the rest is used for post-training; DPO uses the general Dolci-Instruct-DPO dataset.
    • Data scale: the mid-training corpus totals about 975.7M tokens (educational 63.0%, paraphrasing 18.7%, QA 6.8%, security analysis 7.5%, general instructions 4.1%); SFT is about 1,550.9M tokens, of which general instructions account for 77.3% (Table 12).
    • Initialization: MiST-8B starts from Qwen3-8B-Base; MiST-32B starts from post-trained Qwen3-32B (the authors note that no public Qwen3-32B-Base was available at the time).
    • Hyperparameters: mid-training runs for 2 epochs, maximum sequence length 16,384, AdamW, peak learning rate 5×10−5; ZeRO-2 for 8B and ZeRO-3 for 32B; a single machine with 8× NVIDIA B200 (Table 4).

    Decontamination (Section 4, Section J)

    • Three-layer control: before generation, remove from the seed corpus records that anchor benchmark samples (e.g., CTI-Bench-related CVEs, GHSA code records overlapping with the PrimeVul validation/test set fixing commits); the synthesis pipeline deliberately does not generate MCQ format; apply uniform 13-gram filtering to mid-training, SFT and DPO data.
    • Filtering scale: the decontaminated corpus contains 27,201 benchmark segments and about 467,000 unique 13-grams; about 3.78% of candidate samples in the combined mid-training and SFT corpus are removed. The authors state that this method cannot rule out paraphrased or semantically equivalent leakage.
  4. What experiments did the paper conduct?

    13 cybersecurity tasks plus 4 general benchmarks, along with CPT comparison, ablations, downstream RL/SFT and a preliminary safety evaluation.

    Experimental Setup

    • Models under test: MiST-8B-SFT/DPO, MiST-32B-SFT/DPO; baselines Qwen3-8B, Qwen3-32B; external models GPT-5.4-mini, GPT-5.4-nano, Qwen3-235B, DeepHat-7B, Foundation-Sec-8B, Lily-Cyber-7B, Qwen3-8B-Primus, RedSage-8B-DPO, Primus-8B, Primus-70B, CyberPal2.0-20B (Table 1).
    • Benchmarks: 13 cybersecurity tasks (CTI-Bench's MCQ/RCM, SECURE's MAET/CWET/KCV, SecEval, MMLU-Cyber, PrimeVul's P-C/P-C CoT, AthenaBench's CKT/ATE/RMS/TAA; sizes in Table 6) and 4 general benchmarks (MMLU, ARC-C, GSM8K, IFEval, Table 5).
    • Metrics: mostly accuracy; PrimeVul uses paired accuracy (a pair of vulnerable/fixed functions must both be judged correct to count as correct); GSM8K uses exact match; IFEval uses the official loose setting.
    • Judging method: rule-based answer extraction (regex), no LLM judge; safety evaluation uses the Llama-3.3 judge of Liu et al. (2025b).
    • Inference settings: reasoning/thinking mode is disabled for all models where available; temperature=0.3, top-p=0.95, top-k=20, repetition penalty=1.1 (OpenAI GPT-5 models do not fully support these controls).
    • Number of repetitions: each benchmark is run n=5 times (seeds 0–4), reporting the mean.

    Main Results

    According to Table 1 (mean cybersecurity evaluation score; Mean is the unweighted average of the benchmark columns):

    ModelMeanGroup
    MiST-32B-DPO63.2Ours
    MiST-32B-SFT62.9Ours
    MiST-8B-SFT62.4Ours
    MiST-8B-DPO61.7Ours
    CyberPal2.0-20B58.5Cybersecurity model
    GPT-5.4-mini61.2Large/proprietary
    Qwen3-32B54.6Baseline
    Qwen3-8B48.6Baseline
    • Improvements over baselines: the authors report that MiST-8B-SFT is +13.8 percentage points higher than Qwen3-8B (+28.4% relative), MiST-8B-DPO +13.1 (+27.0%); MiST-32B-SFT is +8.3 higher than Qwen3-32B (+15.2%), MiST-32B-DPO +8.6 (+15.8%).
    • Source of improvements: the authors note that the SFT checkpoints are already close to the final scores, with the main improvements coming from the mid-training and SFT stages rather than DPO; improvements are concentrated in CTI-Bench and Athena, while SECURE and PrimeVul show smaller but mostly positive improvements.
    • Exceptions: in Table 1, MiST is not best in every column; for example, on Athena-TAA, CyberPal2.0-20B scores 57.0, higher than MiST-32B-DPO's 55.2; GPT-5.4-mini's Mean (61.2) is higher than MiST-8B-DPO (except 61.7, which is lower than 61.7 but higher than the other 8B external models).

    General Capabilities and Comparison with Raw CPT

    • General benchmarks (Table 2): MiST-8B-DPO averages 85.8 (Qwen3-8B is 82.5), MiST-32B-DPO averages 90.7 (Qwen3-32B is 89.1); the authors consider general capabilities largely retained or improved, and speculate that the reason is general instruction data mixed into each stage.
    • Comparison with raw CPT (Section 5.3, Figure 5): a raw corpus of about 2.4B tokens (about 2 times the mid-training corpus) is built using PRIMUS-enhanced seed data, with CPT on Qwen3-8B-Base followed by the same SFT; the authors report that MiST outperforms this baseline on almost all benchmarks with fewer training tokens. Figure 5 is a radar chart with text labels giving each model's average score: Qwen3-8B 66.3%, Qwen3-8B-Primus 70.9%, MiST-8B-SFT 80.7% (the averaging basis of this figure differs from Table 1; the paper does not explain the difference).

    Downstream Task Adaptation (Section 5.4)

    • Reinforcement learning (Figure 6, Section L): MiST-8B-DPO and Qwen3-8B are trained with GRPO on three verifiable tasks—CVE-to-CWE, CVE-to-CVSS, and vulnerable code-to-CWE; the authors report that the MiST initialization has higher validation accuracy and smaller KL divergence at every checkpoint (the figure shows curves without specific endpoint values).
    • Task SFT (Table 14, Figure 7): after fine-tuning on PrimeVul, MiST-8B-DPO's P-C rises from 10.3 to 16.3 and P-C CoT from 15.2 to 19.2; MiST-32B-DPO rises from 8.6 to 16.4 and from 15.3 to 21.3; Qwen3-8B-Instruct only goes from 2.2 to 2.8 (P-C), and Qwen3-32B-Instruct from 4.7 to 5.2. The authors state that mid-training provides a better initialization for downstream adaptation.

    Safety Evaluation (Section O)

    • Setup: on the CyberSecEval MITRE benchmark, the safe-response rate of MiST-8B-SFT/DPO is compared with the Qwen3-8B base, scored with the Llama-3.3 judge (the authors explain that this judge is used to reduce false positives of the original judge).
    • Results (Table 15): Qwen3-8B (base) 75.8%, MiST-8B-SFT 89.8%, MiST-8B-DPO 85.3%; the authors state that specialization did not weaken safe handling behavior on this benchmark. The paper does not report sample sizes.
    • Qualitative red teaming: the authors state that in internal safety benchmarks and qualitative red teaming, MiST is comparable to or better than the baselines, without giving numbers.

    Other Ablations and Analyses

    • Mid-training ablation (Table 8): skipping mid-training and going directly to SFT gives a mean of 57.6, 4.8 points lower than full MiST-8B-SFT; on MMLU-Cyber, no mid-training is instead 1.5 points higher.
    • Synthesis pipeline ablation (Table 9): the best single process, paraphrasing, gives 60.3, 2.1 points lower than the full recipe; removing any single process lowers the mean by 1.4–2.8 points.
    • Initialization checkpoint (Table 10): starting from Qwen3-8B-Base is better than starting from post-trained Qwen3-8B (62.4 vs. 60.6 after SFT, 61.7 vs. 60.4 after DPO).
    • Training time (Table 3): the full pipeline takes 7.1 hours for 8B (56.8 GPU hours) and 42.7 hours for 32B (341.3 GPU hours), with SFT accounting for the largest share.
  5. What are some points that can be further explored?

    The authors list four types of limitations: operational scenarios, RL scope, synthetic data bias and decontamination residue; the experiments cover both the 8B and 32B scales.

    Limitations and future directions noted by the authors

    • Operational scenarios not covered (Limitations): the evaluation mainly targets knowledge-intensive security understanding, threat intelligence, vulnerability reasoning and benchmark-style analysis; it does not comprehensively evaluate log and telemetry analysis, incident triage, security code assistance, tool use or long-horizon agent workflows, and the results should not be read directly as readiness for real-world deployment.
    • Limited RL scope (Limitations): the RL experiments cover only a few structured cybersecurity tasks and do not explore reasoning-specialized models, broader RL recipes, tool use or agent reinforcement learning; the authors believe future work should test the benefits of mid-training on more complex multi-step security tasks.
    • Synthetic data risks (Limitations): synthetic data may introduce systematic bias and distribution distortion; generation and verification use the same model family, so the verifier may share blind spots with the generator; the impact of generator choice, prompt design, filtering thresholds and source mix is not quantified.
    • Decontamination residue (Limitations): exact and near-exact matching may miss paraphrased, reformatted or semantically equivalent benchmark content; the authors suggest future evaluations include more held-out, time-split and privately constructed benchmarks.
    • Preliminary safety evaluation (Ethical Considerations): the preliminary safety evaluation in Section O cannot establish safety under adaptive, multi-turn or tool-assisted attacks; release decisions will take dual-use red-teaming results into account.

    Scope of experimental coverage

    • The models tested are the SFT and DPO checkpoints of MiST 8B/32B, compared against 2 Qwen baselines, 9 cybersecurity models and 3 large/proprietary models (Table 1).
    • The evaluation consists of 13 cybersecurity tasks plus 4 general benchmarks, each run 5 times and averaged; reasoning mode is disabled at inference (Section E).
    • Ablations and CPT comparisons are conducted only at the 8B scale (Section F, Section 5.3); downstream RL is validated only with MiST-8B-DPO and Qwen3-8B on 3 tasks (Section L).
    • The safety evaluation covers only MiST 8B checkpoints and a single benchmark (CyberSecEval MITRE); the paper does not report the sample size or number of repetitions for this evaluation (Section O).
    • The paper does not report specific accuracy values for the downstream RL experiments (Figure 6), only curves.
  6. Summarize the main content of the paper

    MiST uses a synthetic mid-training corpus for cybersecurity adaptation, exceeding the Qwen baselines on average and outperforming cybersecurity models of the same scale.

    MiST is a set of 8B/32B cybersecurity models adapted from Qwen checkpoints, and its core claim is to treat mid-training as a corpus design problem: rather than continuing pre-training on large-scale raw security text, it is better to convert a compact expert-curated corpus into synthetic training data.

    • Problem to solve: cybersecurity corpora are scarce and deployment often requires localization, and the authors argue that the mainstream CPT route focuses only on token scale while ignoring corpus composition.
    • Method highlights: build a four-category seed corpus of 219,661 samples (about 64.7M tokens); use Qwen-30B-A3B to generate about 975.7M tokens of mid-training corpus through paraphrasing, educationalization, QA, security analysis and other pipelines, with LLM scoring and filtering (samples with a total score below 8 are removed); then apply SFT and general DPO; three-layer decontamination removes about 3.78% of candidate samples.
    • Main results: on the average of 13 cybersecurity tasks, MiST-8B-DPO scores 61.7 (+13.1 percentage points over Qwen3-8B) and MiST-32B-DPO scores 63.2 (+8.6 over Qwen3-32B), higher than all open-source cybersecurity models of the same scale (Table 1); the general benchmark average does not drop but rises (Table 2).
    • Comparison and adaptation: the authors report that MiST outperforms a 2.4B-token raw CPT baseline with fewer tokens (Figure 5); in downstream PrimeVul SFT and GRPO reinforcement learning, initialization from MiST yields greater gains than Qwen (Table 14, Figure 6).
    • Safety aspect: on CyberSecEval MITRE, the safe-response rate of MiST-8B-DPO is 85.3%, higher than the 75.8% of the Qwen3-8B base (Table 15); the authors also state that this evaluation is preliminary and does not cover adaptive attacks.
    • Authors' conclusion: carefully curated mid-training data can produce generalizable, adaptable open cybersecurity LLMs; the authors acknowledge that the evaluation is limited to knowledge-intensive tasks, and operational scenarios and broader RL settings are left for future work.
Read originalConference on Empirical Methods in Natural Language Processing 2026