Book a free call

Anomaly Detection Best Practices That Cut False Alarms

Anomaly detection works when thresholds, labels and review habits fit the data. These practices keep real problems visible without flooding your team.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Anomaly Detection Best Practices That Cut False Alarms
On this page

Short answer

Anomaly detection works best when you start with clean labels, pick a method that fits the data shape, set thresholds from measured behaviour, and review flagged cases every day. Test the detector on labelled history before it goes live, track false alarms as a metric, and retune when the data changes.

What is anomaly detection?

Anomaly detection is software that watches a stream of data — transactions, sensor readings, logins, server metrics — and flags the values that do not match normal behaviour. It does not decide what is wrong; it points a person or a rule at the cases worth a look.

The practices below make the difference between a detector that earns trust and one that gets switched off. Use this table as a checklist before you tune anything.

PracticeWhat it doesWhy it matters
Start with labelled historyShows what normal looks likeStops guesswork on thresholds
Pick one method per signalMatches the detector to the dataKeeps scores meaningful
Set thresholds from dataUses measured behaviour, not round numbersCuts false alarms
Review flagged cases dailyFeeds corrections backKeeps the detector honest
Track false alarmsMeasures the cost of being wrongShows when to retune

A detector is only as good as its feedback loop. For the basic idea, see what anomaly detection is and how it works.

How do you pick the right detection method?

Pick the method from the shape of the data, not from what is fashionable. A simple statistical rule beats a neural network when the signal is steady and the history is short.

Use thresholds on a single metric when the normal range is steady, such as response time on a healthy service. Use isolation forests or clustering when several metrics move together and no single value tells the story. Use sequence models when the order of events matters, such as logins or machine cycles.

Start with the simplest method that catches the cases you already know about. If it misses real problems or floods you with noise, move one step up in complexity — and keep the simple version as a baseline to compare against.

How do you set thresholds without drowning in alerts?

Set thresholds from measured behaviour, not from round numbers. Look at the distribution of the metric over the last few weeks and pick a point that sits beyond normal variation, such as three standard deviations from the mean or the 99.5th percentile.

Then check the alert volume that threshold would have produced on past data. If it would have fired fifty times a day, it is too tight. A threshold that fires a handful of times a week is one a team can actually review.

Give different thresholds to different signals. A payment amount deserves a tight limit; a background job that runs at odd hours does not. For the build steps, see how to implement anomaly detection step by step.

How do you keep false positives low?

False positives are the tax a detector charges, and most teams quit paying it. The fix is rarely a better model; it is better context around each alert.

Add rules that suppress known harmless patterns: scheduled jobs, test accounts, seasonal peaks, maintenance windows. Each suppression rule should name its reason and an expiry date, so stale rules do not hide real problems later.

Score alerts by severity instead of treating every flag the same. A small deviation on a low-value metric can wait for the weekly review; a large deviation on a payment flow needs a person now.

Group repeated alerts into one case. When the same sensor trips twenty times in an hour, the team needs one ticket with a count, not twenty tickets. Deduplication keeps the queue short and shows the real scale of the problem at a glance.

How do you test a detector before it goes live?

Test on labelled history: past data where you already know which cases were real problems and which were normal. A detector that cannot find the known problems in old data will not find new ones.

Measure precision and recall on that set: of the cases flagged, how many were real; of the real cases, how many were flagged. Report both numbers. A detector with high recall and low precision is a noise machine; the reverse is a blind spot.

Run the detector in shadow mode for two weeks: it flags cases, but nobody acts on them. Compare its flags with what the team found by hand. Ship only when the flags add cases the team would have missed.

Include the cases the detector got wrong in your test set. A test set that only holds easy wins will flatter the detector and hide its weak spots, so keep adding the misses until the set reflects real work.

How do you monitor a detector in production?

A detector drifts as the data drifts. New products, new customers and new seasons all move the baseline, so a threshold set in January can be wrong by June.

Watch three numbers every week: how many alerts fired, what share were real, and how long each took to review. A rising alert count with a falling real share means the baseline moved and the threshold needs retuning.

Retune on a schedule, not on complaints. A monthly review of thresholds and suppression rules keeps the detector honest. For cost planning, see anomaly detection cost.

Keep a change log for every retune: what changed, why, and what the alert volume did afterwards. Without a log, two retunes can undo each other and nobody knows which setting worked.

Example (hypothetical): a payment team cuts false alarms

Example (hypothetical): a payment team runs a detector over card transactions. It flags 120 transactions a week, and reviewers find that 96 of them — 80% — are normal spending. Each review takes 5 minutes, so the team spends 120 x 5 = 600 minutes, or 10 hours a week, mostly on false alarms.

The team adds suppression rules for known patterns — repeat subscriptions, travel spending, and test cards — and retunes the threshold from the measured distribution. Flags fall to 40 a week, of which 24 are real problems and 16 are false alarms.

Review time drops to 40 x 5 = 200 minutes, or about 3 hours and 20 minutes a week. The team saves about 6 hours and 40 minutes a week, and the reviewers now trust the queue enough to check it first thing each morning. The detector did not get smarter; the rules around it got tighter.

What are the common mistakes?

The most common anomaly detection mistakes are chasing the fanciest model, setting thresholds by guesswork, and never measuring false alarms.

  • No labelled history. Without known good and bad cases, you cannot tell whether the detector works.
  • Thresholds from round numbers. A limit of 100 means nothing if normal traffic sits at 95.
  • No suppression rules. Scheduled jobs and seasonal peaks flood the queue until nobody reads it.
  • Treating every alert the same. A minor deviation and a payment fraud case need different urgency.
  • Set and forget. Data drifts, so a detector that is never retuned slowly goes blind.
  • Acting on flags without review. Auto-blocking on a noisy detector punishes normal users.

Start simple, measure precision and recall, and retune on a schedule. A detector the team trusts beats a clever one they ignore. For a related angle, see generative AI anomaly detection.

Key takeaways

  • Start with labelled history so thresholds come from measured behaviour, not guesses
  • Pick the method from the shape of the data, simplest first, with a baseline to compare
  • Suppress known harmless patterns with named reasons and expiry dates
  • Measure precision and recall on labelled data, and test in shadow mode before launch
  • Watch alert volume and the real share weekly, and retune thresholds on a schedule

Frequently asked questions

What is the best anomaly detection method?

There is no single best method. Simple thresholds fit steady single metrics, isolation forests fit several metrics moving together, and sequence models fit ordered events. Start with the simplest method that finds the problems you already know about.

How do you reduce false positives in anomaly detection?

Add suppression rules for known harmless patterns, set thresholds from the measured distribution, and score alerts by severity. Review flagged cases daily so corrections feed back into the rules and thresholds.

What is a good false positive rate for anomaly detection?

It depends on the cost of a missed case versus the cost of a review. What matters is that you measure it: track how many flagged cases are real each week, and retune when the share of real cases falls.

Should anomaly detection run in real time?

Only when a fast response changes the outcome, such as blocking a fraudulent payment. For most cases, a short delay is fine and lets you add context checks that cut false alarms.

How often should you retune an anomaly detector?

Review thresholds and suppression rules at least monthly, and sooner when alert volume or the share of real alerts moves sharply. Data drifts as products, customers and seasons change, so a threshold set months ago can quietly go wrong.

Can anomaly detection work without labelled data?

Yes, unsupervised methods can flag unusual values without labels. But without some labelled cases you cannot measure precision or recall, so label a small sample by hand before you trust the output.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building an anomaly detector your team will trust? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Machine Learning Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call