SecurityMicrosoft 3659 min read

Anomaly detection thresholds: why they are hard to tune, and what helps

Every anomaly detector compares a number against a threshold. In most tools you did not choose that threshold, you cannot see it, and everything below it is thrown away. This post explains why that causes problems, and what changes when the data below the threshold is kept.

Published by 1Security TeamAugust 27, 2026
Anomaly detection thresholds and alert tuning

This post is about the threshold inside an anomaly detector, and why it causes more trouble than most people expect.

An anomaly detector works like this. Something happens, the detector calculates a number, and it compares that number with a threshold. If the number is above the threshold, you get an alert. If it is below, you get nothing.

In most products there are three problems with that threshold:

  • You didn't choose it. Somebody at the vendor picked a default that had to work for a bank, a marketing agency and a hospital at the same time.
  • You can't see it. It is not shown on the screen, and often it is not in the documentation either.
  • Everything below it is thrown away. It is not hidden or archived. It was never saved.

The first two are inconvenient. The third can cost you during an incident, and most of this post is about it.

A quiet detector and a broken detector look the same

If the threshold is too low, the detector fires all the time. Within a month the team has learned to skim the alerts, and within a quarter they have learned to close them. Everyone recognises this problem. It is called alert fatigue, and many products claim to solve it.

If the threshold is too high, the detector never fires and the screen stays empty.

The difficulty is that an empty screen can mean two things. The tenant may be calm. Or the threshold may be so high that nothing in your tenant could ever reach it. Both cases show exactly the same empty list.

You can't tell them apart by looking at the screen, and you can't tell them apart by waiting. You only find out when there is an incident that the detector should have caught.

We think this is the main reason many security teams don't trust anomaly detection. Their concern is less about accuracy. It is that they have no way to check whether the detector works.

Why people leave the threshold alone

Some products do let you change the threshold. Almost nobody does, and there is a good reason for that.

In most systems a new threshold only applies going forward. If you change it today, you find out what the change meant over the following weeks. If you lower it, you may have signed your team up for a thousand alerts a day, and you will find out on Monday. If you raise it, you may have silenced the one detection that would have mattered, and you will never find out.

So changing the threshold is a guess about the next three months, made without any information. The usual way to reduce the risk is shadow mode. You run the new setting next to the old one for a few weeks and compare the results. This works, but it takes about a quarter, and you have to repeat it every time the tenant changes.

Given all that, leaving the setting alone is the sensible choice. The result is that the vendor's default, which was chosen for an average customer, becomes your security setting.

The data below the threshold is gone for good

A threshold can be changed later. Data that was never saved can't be recovered.

This difference is rarely discussed. When a detector decides that an event is below the threshold, most systems don't store it. There is no record that the event was looked at and rejected. You can't go back and check it against a better setting, because it isn't there.

Here is what that means in a real investigation. You have an incident on a Thursday, and you believe something started the week before. You go to your detection tool and ask what it saw around that time.

If everything below the threshold was thrown away, the answer is "nothing". But that answer doesn't tell you that nothing happened. It only tells you that nothing was high enough to pass a threshold somebody else set eighteen months ago. In a report those two statements look the same, and they mean opposite things.

The weak signals around an incident are very cheap evidence, because they cost nothing to keep. In most tools they are also the first thing to be deleted.

Separating the measurement from the alert decision

The solution starts with noticing that the threshold is doing two separate jobs.

Deciding what is unusual is a measurement. It should be calculated and saved whenever it is meaningful, whether or not anyone wants an alert about it.

Deciding what deserves an alert is a policy choice. It belongs to you. It depends on your industry and on how much your team can handle, and you should be able to see it and change it.

When these two are separate, something useful becomes possible. If every meaningful deviation was saved together with its score, then changing the alert threshold also re-classifies the past.

If you lower the threshold, the system doesn't start collecting data in a new way. It re-labels what it already has. If you raise the threshold again, nothing is deleted. You can see the effect of a change straight away by reading your own history. There is no need to wait a quarter to find out.

What the measurement needs to get right

This only works if the measurement can be trusted. Four design decisions matter most, and you can check them in any product that claims to work this way.

Compare with a median, not an average. One extreme day in the past should not change what counts as normal. A median over the previous days is not affected by a single extreme value.

Leave today out of its own baseline. If today's spike is included in the history it is compared against, it raises the level it has to pass. Detectors that get this wrong stop seeing incidents that last several days.

Measure variation in a way that outliers don't distort. "How far above normal" should be measured against how much the metric normally varies from day to day, and not in units someone picked by hand. Median absolute deviation does this without being pulled around by outliers.

Stay silent until there is enough history. A median calculated over four days doesn't mean anything. It is better to collect data for the first couple of weeks of a new baseline and raise no alerts than to produce alerts from one week of data.

There is a fifth decision, and it is deliberate. Flag spikes and ignore drops. Activity falls for harmless reasons all the time: quiet days, holidays, cleanups, findings that were resolved. If every drop were flagged, the one spike that matters would be hidden among a hundred quiet Fridays.

What this looks like in practice

Suppose deviations are saved from two standard deviations upward, each with a score that can be compared with the others. The alert threshold sits somewhere above that by default.

  • A regulated organisation, such as a bank, a hospital or a law firm, moves the threshold down. Everything the detector ever considered noteworthy now counts as alerted, including in the past. When an auditor asks "would we have seen it?", the team can look it up.
  • A thirty-person startup moves the threshold up. The queue shrinks to the few cases that deserve a person's attention. Nothing is deleted, so everything below the threshold is still there on the day it becomes relevant.
  • Both use the same product, the same data and the same detector. The only difference is where the threshold is set.

It also makes a specific kind of investigation possible. Suppose you think you missed something last week. You lower the threshold, filter to that week, and read what was saved below your old threshold. Afterwards you raise it again. Moving the threshold doesn't destroy anything, in either direction.

One anomaly per spike, not one per day

One more design point decides whether the queue is readable.

A spike that lasts three days is one thing that happened. If the detector sends an alert for each day, a long incident arrives as a series of nearly identical notifications, and people mute it.

The fix is to treat an anomaly as an episode. An episode opens when the metric goes above the threshold. It tracks the peak while the spike continues, and it records when the metric returned to normal. There is one notification for the whole episode.

The end of an episode should only say that the metric went back to normal. It should not mean the incident is closed. If a spike stops overnight, the episode should stay in the open queue until a person acknowledges or dismisses it. Otherwise most one-day spikes would close themselves before anyone read them.

How 1Security does it

Every active policy in a tenant learns its own baseline. Today's count is compared with the median of the previous thirty days, with today left out, and variation is measured with median absolute deviation. Detection stays silent for the first fourteen days of any new history. Only spikes are flagged.

The same method runs at two levels. One is the policy as a whole. The other is a single user, application or AI agent, measured against its own history.

Every meaningful deviation is saved, down to two sigma. If an anomaly is at or above your alert threshold, it is alerted and the policy's recipients are notified. If it is between two sigma and the threshold, it is kept as info. It is stored without a notification, and you can show it with one toggle. Anything below two sigma is ordinary variation and is not stored.

The alert sensitivity control is at the top of the Anomalies screen, where it is easy to find, and not in a settings page. When you move it, anomalies are re-classified against your real history at the moment you look. When you release the slider, the alerted and info counts update immediately and the queues change to match.

Anomalies are episodes. Each one can be open, acknowledged or dismissed. Each row shows the detector that fired, the affected entity, a thirty-day sparkline, the spike, the score, and when it ended.

Frequently asked questions

Does keeping the data below the threshold create noise? Only if it is shown by default. It should be kept in its own tier, with no notifications, until you go looking for it. The purpose is to have it when you need it.

Isn't two sigma too low? As a level for alerting, it is far too low. As a level for saving, it is about right. It is low enough to capture real early signals and high enough that ordinary variation is not stored forever.

Why only spikes? Drops can be malicious too. They can. A log source that goes silent is a real attack pattern. But it is better to detect that with a specific check that a particular signal is missing than to treat every decline in every metric as an anomaly. Mixing the two makes the queue unreadable, and then it catches nothing.

How is this different from UEBA? The statistics are conventional and deliberately simple. The differences are that the threshold is visible, that you can move it, that moving it also applies to the past, and that nothing meaningful is thrown away when the data comes in.


SecurityMicrosoft 365

Latest Blog Posts

Discover more insights about Microsoft 365 security, governance, and compliance.

View all posts

Take control of Microsoft 365 access today

Stop guessing who has access to your sensitive data. With 1Security, you gain the visibility, automations, and confidence needed to protect your Microsoft 365 environment.