Threat Detection
Machine learning in cybersecurity: why traditional ML still does the heavy lifting
Machine learning in cybersecurity means models that learn from data either what an attack looks like or what normal looks like, and flag what matches the first or breaks the second. These traditional models run on every event inside your EDR, email security and SIEM. LLMs help after the alert, not before it.

Published 7 min read
Machine learning in cybersecurity is the use of models that learn from data what an attack looks like, or what normal activity looks like, and flag whatever matches the first or breaks the second. The first kind are supervised classifiers: the malware and phishing models inside your EDR and email security. The second kind are anomaly detection models: the baselines in your SIEM that notice a sign-in, a download or a connection that doesn't fit. They score every event, fast and cheaply, which is the part of threat detection LLMs can't take over. LLMs earn their place after the alert, in triage, queries and the team's knowledge base.
The two kinds of machine learning that find attacks
Almost every machine learning threat detection in production today belongs to one of two families.
Supervised learning: classifiers that recognise malicious activity. The model is trained on examples already labelled good or bad, and learns to tell them apart. This is how EDR decides a file is malware and how email security decides a message is phishing. Elastic's Domain Generation Algorithm (DGA) Detection integration is a clear case: a supervised model scores each DNS lookup for how likely the domain was generated by malware, and one of its rules flags domains known from the SUNBURST attack on SolarWinds. Classifiers are good at what they have been shown, and nobody on your team has to train them.
Unsupervised learning: anomaly detection. Here there are no labels. The model learns what normal looks like for each user, host or account, and scores how far new activity departs from it. Microsoft Sentinel builds these baselines from an entity's own history, from its peers and from the organisation as a whole, and gives each anomaly a score between 0 and 1. Anomaly detection can catch what nobody has labelled yet, which is its value, and it can't tell unusual from malicious, which is its limit.
Where traditional ML earns its keep
On real projects, four kinds of detection repay the effort.
- Sign-in baselines. A user signing in from a new country, at an odd hour or far more often than usual, compared with that user's own history and with colleagues in the same role. This is the core of user and entity behaviour analytics (UEBA), and it is where stolen credentials show up first.
- The classifiers built into your tools. The supervised models in EDR and email security do most of the daily work. They catch the malware and phishing nobody wrote a rule for, and they cost you nothing to train.
- Beaconing and timing. Malware that has taken over a machine calls home, often at regular intervals. Sentinel's beaconing detection measures the time between connections from the same source to the same destination and flags repeating patterns. It is time series anomaly detection applied to network, DNS and proxy logs: a laptop that contacts the same address every 60 seconds, all night, is worth a look.
- Volume and spend. Baselines on cloud API calls, downloads, uploads and data transfer for each account. A key that normally makes a few hundred calls a day and suddenly makes forty thousand, or a user who uploads ten times their usual volume, is a stolen key or an exfiltration that no rule named in advance.
What each method detects well, and what it misses
| Method | Detects well | Misses |
|---|---|---|
| Supervised classifiers | Known malware families and their variants, phishing that resembles past phishing, generated domains | Attacks unlike anything in the training data; labels that have aged |
| Clustering and peer groups | A user acting unlike everyone else in the same role or team | Small teams with no real peers; legitimate one-off jobs |
| Time series models | Regular beaconing, sudden spikes in volume or cost | Slow, low-volume theft; jittered callbacks; month-end and other seasonal peaks |
| Behavioural baselines (UEBA) | Account takeover, unusual access to sensitive data | An insider who stays within their normal pattern; anyone whose role just changed |
No row of that table covers everything, which is why the methods are combined with written rules rather than chosen instead of them.
Why ML detection disappoints
The SANS 2025 Detection and Response Survey found that 53% of organisations use machine learning for threat detection, and 39% now call it "very useful", up from 22% a year earlier. In the same survey, false positives were the leading detection challenge, cited by 73% of respondents, and nearly 17% did not know whether their organisation used ML at all. Microsoft itself discontinued two of Sentinel's DGA anomaly rules on 8 March 2026, "due to low quality of results". Machine learning is no exception to the rule that a detection has to be earned.
When ML detection lets clients down, it is usually for one of five reasons:
- Everything switched on at once. Every anomaly rule is enabled untuned, the queue fills with noise, and analysts learn to close anomalies without reading them. Microsoft's own documentation calls anomalies "notoriously noisy".
- Baselines learned from the wrong period. Sentinel's anomaly rules typically train for 7 to 21 days. If those days include a month-end close, a migration or an attacker already inside, the model learns the wrong normal.
- No explanation. If nobody can say why the model flagged an event, analysts don't trust it, and an alert nobody trusts is not acted on.
- ML expected to replace rules. A known technique with a clear pattern is caught more reliably by a written rule mapped to MITRE ATT&CK than by waiting for it to look unusual.
- Never tuned again. The model goes live, the business changes around it, and nobody recalibrates it.
How often to retune machine learning detections
The last mistake is the most common, and the fix is a schedule:
- Weekly for the first month after a model goes live: review the false positives and adjust thresholds. Then monthly.
- A quarterly review of every ML detection: what fired, what turned out to be true, and what to retune or switch off.
- After any change that moves "normal": a migration, a merger, a new office, a shift to remote work, a new SaaS application. Each one makes the old baseline wrong.
- When precision drops: track each detection's true-positive rate, and when it falls below a level agreed in advance, retune it or retire it.
Where LLMs help, and where they don't
LLMs are good with language, and a security team produces a lot of it. Used after the alert, they save real time:
- Triage summaries. The alert, the user, the host and the related events, summarised so the analyst decides faster. The analyst still decides.
- Writing queries. Drafting or translating detection queries in KQL, SPL or ES|QL, which an engineer reviews and tests before they are used.
- Runbooks and reports. First drafts of runbooks, handover documents and incident write-ups from the analyst's notes.
- The team's knowledge base. Answering analysts' questions from past incidents, runbooks and asset notes; drafting a knowledge base entry from each closed incident, so the lesson is written down; turning threat reports into notes and candidate detections for an engineer to review.
What they should not do is score raw events. At log volume, an LLM is too slow and too expensive, and it can give a different answer to the same question on a second run. Detection needs the opposite. LLMs also still struggle with deep security analysis: CyberSOCEval, a benchmark published in 2025 by Meta and CrowdStrike, found large gaps in how current models handle malware analysis and threat intelligence reasoning, with the benchmark nowhere near saturated. That is a good reason to keep a person reviewing what they produce.
LLMs added to the SOC are also new systems to protect. Securing the LLM itself is its own work, and attacks on AI systems are a separate subject from the ML that detects attacks.
Rule, model or LLM: how to choose
Four questions settle most cases:
- Is it a known technique with a clear pattern? Write a rule, map it to MITRE ATT&CK, test it and version it.
- Is it "unusual for this user or host"? Use a baseline or anomaly model, because no fixed threshold fits everyone.
- Is it an anomaly on its own? Let it feed rules and investigations as context. Microsoft makes the same point: one anomaly is a weak signal, while several at different stages of an attack make a clear one. A single anomaly rarely deserves an alert of its own.
- Is it work on an alert that already exists? That is where the LLM goes. It works on the few alerts, never on the millions of events before them.
Where GUILDA fits
Our threat detection and SIEM implementation puts this into practice on Microsoft Sentinel, Splunk, Elastic Security or Wazuh. We connect the log sources that matter, write detection rules mapped to MITRE ATT&CK, switch on the platform's anomaly detections where they fit and tune them, and hand everything over with runbooks and a retuning schedule. Your team operates it afterwards.
When the detection you need depends on your own data, such as fraud patterns in your transactions or unusual readings from your equipment, the model is built and trained for you under AI and ML implementation.
Frequently asked questions
Will LLMs replace machine learning in threat detection?
Not on the detection itself. A SIEM sees millions of events a day, and each one has to be scored in milliseconds, at almost no cost, with the same answer every time. Classifiers and anomaly models do that. LLMs are useful once an alert exists, to summarise it, draft the query that checks it, or find the past incident that looks like it.
How long does an anomaly model need before it is useful?
It needs enough history to know what normal is. Microsoft says its Sentinel anomaly rules typically train for 7 to 21 days. After that, plan on weekly tuning for the first month, because the first baseline is rarely right for every user and host.
Do we need data scientists to use machine learning for detection?
Usually not. Most of the useful models come inside the tools you already run, from malware and phishing classifiers in EDR and email security to the anomaly rules in your SIEM. What you need is someone who tunes them and decides what each one is for. A model trained on your own data is a different project.
Will GUILDA monitor our alerts?
No. We implement the SIEM, write and tune the detections, and hand them over with runbooks. Your team operates them afterwards. We don't run a security operations centre or watch your systems around the clock.
Sources
- SANS 2025 Detection and Response Survey: Unseen Threats Have Security Teams Rethinking Detection, SANS Institute, 2025
- Anomalies detected by the Microsoft Sentinel machine learning engine, Microsoft, 2026
- Use customizable anomalies to detect threats in Microsoft Sentinel, Microsoft, 2026
- Machine Learning Detected DGA activity using a known SUNBURST DNS domain, Elastic, 2026
- CyberSOCEval: Benchmarking LLMs Capabilities for Malware Analysis and Threat Intelligence Reasoning, Meta and CrowdStrike, 2025
SIEM implementation and threat detection
We deploy a SIEM, connect the log sources that matter, write detection rules mapped to MITRE ATT&CK and hand the platform over with runbooks. Your team operates it afterwards; we don't run a monitoring service.
Explore Threat Detection & SIEM ImplementationRelated reading
Threat Detection
Behavioral biometrics with ML: PERSONA, a multimodal view of every user, device and AI agent
Behavioral biometrics identifies a user by how they act, not by what they know or carry. Combined with a device fingerprint and session context, and built with machine learning, it gives a profile that shows when an account, a device or an AI agent stops behaving like itself. PERSONA is our name for that profile.
7 min read
Threat Detection
Bot detection by rhythm: how Fourier transforms and frequency analysis expose bots
Most bot detection judges each request on its own, so a patient bot gets through. Scripts and malware keep time, and people do not. This article explains how a Fourier transform turns that timing into a visible peak, how jitter tries to hide it, and where rhythm fits beside the other signals.
6 min read
Tell us what you need to detect
Name your systems and the requirement behind the project. We reply within two business days.