Threat Modelling using Domain-Adapted Language Models: Empirical Evaluation and Insights
This paper presents a comprehensive empirical evaluation of domain-adapted Large and Small Language Models for 5G STRIDE threat modelling, revealing that neither domain adaptation nor model scaling consistently ensures reliable performance, thereby highlighting fundamental limitations in current LLMs for structured security tasks and the need for enhanced reasoning and grounding.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a group of different-sized robots how to act as security guards for a complex 5G phone network. Your goal is to get them to look at a specific security threat (like a hacker pretending to be a cell tower) and sort it into one of six specific "bins" labeled STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege).
This paper is like a report card from a test where the researchers tried out eight different robots to see which one was the best at this job.
Here is the breakdown of their experiment and what they found, using simple analogies:
1. The Contestants: Generalists vs. Specialists
The researchers tested two types of robots:
- The Generalists: These are standard, smart robots trained on everything (books, code, news). They are like a librarian who knows a little bit about everything.
- The Specialists: These are the same robots, but they were given extra "crash courses" specifically on telecommunications and cybersecurity. They are like that same librarian who also spent the last year reading only 5G manuals and hacker guides.
The Big Question: Does giving the robot a specialized crash course make it better at sorting security threats than just letting it use its general knowledge?
The Result: Surprisingly, no. The "Specialist" robots didn't consistently beat the "Generalist" ones. Sometimes the specialists were better, but often they were just as good (or sometimes worse) than the generalists. It turns out that just knowing the vocabulary of the field isn't enough; the robot needs to know how to think about the problem, not just the facts.
2. Size Matters (But It's Not Everything)
The researchers tested robots of different sizes:
- Tiny Robots (1 Billion parameters): Like a smart toddler.
- Medium Robots (3 Billion parameters): Like a teenager.
- Big Robots (8 Billion parameters): Like a seasoned adult.
The Result: The Big Robots generally did the best job. They were more accurate and made fewer mistakes. However, the paper warns that just making the robot bigger doesn't guarantee perfection. Even the biggest robots still got confused, missed some threats, or gave answers that didn't make sense. Being big helps, but it's not a magic wand.
3. The "Cheat Sheet" (Prompting)
The researchers tried two ways of asking the robots the questions:
- Zero-Shot (ZS): Just asking the question directly, like "What bin does this go in?"
- Few-Shot (FS): Giving the robot a few examples first, like "Here is a threat that goes in the 'Spoofing' bin. Here is one for 'Tampering'. Now, where does this new one go?"
The Result: Giving the examples (Few-Shot) usually helped the robots get more of the answers right, especially the bigger ones. It was like showing a student a few practice problems before the test. However, for the tiny robots, the examples sometimes confused them, making them perform worse.
4. The "Stress Test" (Decoding Strategies)
The researchers asked the robots to answer the same question in two ways:
- Greedy Decoding: The robot picks the single most obvious answer every time. It's like a robot that always chooses the first path it sees.
- Stochastic Sampling: The robot is allowed to be a little random. It picks from a list of "good" answers. If you ask it 10 times, it might give you 10 slightly different answers.
The Result: The Stochastic method was a great way to see how unstable the robots were. The tiny robots were very jittery; if you asked them the same question 10 times, they might give 10 different answers. The big robots were much more consistent. This showed that for security work, you need a robot that doesn't flip-flop on its answers.
5. The "Garbage" Problem (Invalid Outputs)
This was a major finding. The researchers didn't just count right or wrong answers; they also looked for nonsense.
- Some robots ignored the rules and wrote long essays instead of just picking a bin.
- Some robots made up new bins that didn't exist (hallucinations).
- Some robots gave an answer in the bin but then wrote an explanation that contradicted it (e.g., "This is Spoofing" but then wrote "This is actually Tampering").
- Some robots just gave up and wrote code or blank space.
The Result: The Invalid Output Rate was high, especially for smaller robots and when they weren't given a strict format (like a chat template). The paper concludes that you cannot trust these robots to work alone yet. Even if they get the right answer 60% of the time, if the other 40% of the time they are writing gibberish or contradicting themselves, a human still has to check every single answer.
The Bottom Line
The paper concludes that:
- Specialized training alone isn't enough. You can't just feed a robot security books and expect it to be a security expert; it needs to be trained on how to solve the specific puzzle of threat modeling.
- Bigger is better, but not perfect. Bigger robots are more reliable, but they still make mistakes.
- How you ask matters. Giving examples and strict formatting helps, but it doesn't fix broken robots.
- Reliability is key. For security work, a robot that is 80% accurate but 20% "crazy" is dangerous. We need robots that are consistent and follow instructions perfectly, and current technology isn't quite there yet.
In short: These AI models are promising tools for security, but right now, they are like interns who are smart but prone to daydreaming. They need a human supervisor to double-check their work before it's used in the real world.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.