← Lab /AI/ML

Domain-adapted LLMs fail to consistently outperform general models for STRIDE threat modeling

Domain-adapted language models do not consistently achieve higher performance than general-purpose models on structured threat-modelling tasks

AI/ML arXiv 11 May 2026 Measurement Simulation evidence

Published as “Threat Modelling using Domain-Adapted Language Models: Empirical Evaluation and Insights”

Why it matters

Current open-source LLMs can assist STRIDE threat modeling but require careful prompting and validation to avoid unreliable classifications.

Summary

Domain-adapted LLMs do not consistently beat general-purpose models on STRIDE threat classification; the best result was a 68.75% penalized F1 from Llama-3.1-8B-Instruct using few-shot prompting without a chat template. Larger 8B models generally performed best, while few-shot prompting helped most models but hurt the smallest 1B models. Invalid and malformed outputs were common, especially without chat templates, and none of the models expressed uncertainty.

What they found 1

  1. The highest penalized F1-score (68.75%) was achieved by Llama-3.1-8B-Instruct with few-shot prompting and no chat template.

    “The highest penalized F1-score was achieved by Llama-3.1-8B-Instruct [22] under FS prompting without the chat template, reaching 68.75%.”

Caveats 6

  • Few-shot prompting decreased performance for the smallest 1B models (-0.15% change).
  • Invalid outputs were more frequent without chat templates, reducing overall reliability.
  • No model gracefully expressed uncertainty or abstained when classification was ambiguous.
  • This suggests that domain-adaptive training reaches a point of diminishing returns when the underlying general-purpose model has already acquired substantial cybersecurity and telecommunications knowledge during large-scale pretraining.
  • none of the models evaluated in our experiments failed gracefully by explicitly expressing uncertainty, abstaining, or indicating that the classification could not be determined.
  • Invalid outputs were more common among smaller models and in settings where the model was prompted without its chat template.

What’s new here 4

  • Systematic comparison of domain-adapted versus general-purpose LLMs on structured STRIDE threat classification.
  • Evaluation of both greedy deterministic decoding and stochastic sampling to assess output stability.
  • Analysis of how prompting style (zero-shot vs few-shot) and chat-template usage affect both accuracy and output validity.
  • Quantification of invalid output rates (IOR) and their impact on a penalized F1 metric.