Conceptcore
Base-rate fallacy in intrusion detection
Also called Axelsson base-rate bound.
Because intrusions are rare, Bayes' rule makes most alarms false unless the false alarm rate is tiny: in Axelsson's example, about 1 in 100,000 just to make half of the alarms real.
An intrusion detector looks at a very large number of events, such as audit records, connections or packets, and only a tiny fraction of them belong to intrusions. Because of this, a detector with a false alarm rate that looks small can still give mostly false alarms. The error of judging a detector by its false alarm rate alone, without the base rate of intrusions, is the base-rate fallacy. Axelsson (1999, 2000) showed with Bayes' theorem that this, not the detection rate, is the main limit on intrusion detection: with his example numbers, the false alarm rate must be about for half of the alarms to be real.
In plain words
Suppose that one record in fifty thousand is part of an attack, and your detector wrongly flags one normal record in a thousand. Then for each attack record there are about fifty thousand normal records, and about fifty of them are flagged. Even if the detector finds every attack record, about 50 of every 51 alarms are false. The analyst who reads the alarms soon learns to ignore them. A detector is useful only if its false alarm rate is small compared with the base rate of attacks, and the base rate is very small.
The idea
The setting. Each event is an intrusion () or not (), and the detector raises an alarm () or not. The detector has a detection rate and a false alarm rate , which can be measured on labeled test data. The base rate is a property of the site, not of the detector. The quantity the operator needs is the probability that an alarm is real, , which Axelsson calls the Bayesian detection rate. It is the precision of the detector, in the terms of precision and recall.
The statement (Bayes' rule). For and ,
This follows from the definition of conditional probability: , with by the law of total probability.
Consequences. The formula holds for every detector and every site, with no other assumption than that , and are the true rates on the events of the site.
- if and only if , that is . Since , half of the alarms can be real only if , which is about when is small. So the false alarm rate must be of the order of the base rate, whatever the detection rate.
- When is much larger than , . A detector that halves almost doubles the fraction of real alarms. A detector that raises from 0.7 to 1 gains only a factor of .
- The other side, , the probability that an event with no alarm is normal, is close to 1 for any reasonable detector, because most events are normal. For the same reason a high accuracy says nothing when is small: a detector that never raises an alarm is correct on a fraction of the events.
The unit of counting. and must be counted on the same unit, such as records, connections, sessions or hosts. A detector that works on packets has a far smaller base rate than one that works on sessions, so the same gives far more false alarms per day.
What is outside the statement. The statement is about rates. It assumes that the events are judged one by one with fixed rates. Correlation between alarms, alarms grouped into one incident, and an adversary who changes the base rate are not in it.
Examples
Axelsson's site. A site produces audit records a day. There are 2 intrusions a day, and each intrusion shows in 10 records, so 20 records a day are intrusive and . The table gives for two detection rates:
| false alarm rate | with | with | false alarms a day |
|---|---|---|---|
| 0.0138 | 0.0196 | about 1000 | |
| 0.1228 | 0.1667 | about 100 | |
| 0.5833 | 0.6667 | about 10 | |
| 0.9333 | 0.9524 | about 1 |
With and , the formula gives . For the false alarm rate must be at most , which is for and for . The "one in a hundred thousand" of this page is a result of these example numbers: a site with a smaller base rate needs a smaller false alarm rate.
A detector measured at 1%. Many anomaly detectors in research papers are tuned to a false alarm rate of about 1%, as when the threshold of a payload model or of an autoencoder is the 99% quantile of normal scores. At Axelsson's site this is false alarms a day against at most 20 real ones, so .
Website fingerprinting. The same argument applies to traffic analysis. A classifier that tells which of a set of monitored web sites a user visits may have a high accuracy in a closed world of test sites. But if the monitored sites are a tiny fraction of all the sites that users visit, most of its positive answers in the open world are false, as the page on website fingerprinting explains.
Where it is used
- Evaluation of detectors. A detector should be reported with its false alarm rate at the unit of counting that it uses, with the expected number of false alarms a day at a stated base rate, or with its precision, not with its accuracy alone. ROC curves are useful only in their far left part, where is of the order of .
- Design of detectors. The argument favors detectors with very low false alarm rates, such as misuse detection with specific signatures, and a design where an anomaly detector is a first filter and a more specific check follows.
- Choice of the threshold. For one detector, the Neyman and Pearson lemma gives the most powerful test at each false alarm rate. The base rate tells which rate is acceptable, and so where to put the threshold of a detector of anomalies.
- The difficulty of anomaly detection. Sommer and Paxson (2010) list the cost of false alarms, together with the variety of normal traffic and the lack of good training data, as the reasons why anomaly detection is rare in real networks.
- Malware detection. A detector that scans many files, of which very few are malicious, faces the same limit, as the malware detection problem notes.
References
- Stefan Axelsson, The base-rate fallacy and the difficulty of intrusion detection, ACM Transactions on Information and System Security 3(3), pages 186 to 205, 2000, the application of Bayes' rule to intrusion detection, the example site with 1,000,000 audit records a day and 2 intrusions of 10 records each, and the Bayesian detection rate as a function of the false alarm rate
- Stefan Axelsson, The base-rate fallacy and its implications for the difficulty of intrusion detection, ACM CCS 1999, pages 1 to 7, the first version of the argument
- Robin Sommer and Vern Paxson, Outside the closed world, on using machine learning for network intrusion detection, IEEE Symposium on Security and Privacy 2010, pages 305 to 316, the high cost of false alarms in network intrusion detection, with the base rate as one of the reasons
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag H4XWZG Edit this page History Report an error Markdown