NikoTakSecuring the Web, One Threat at a Time.

False Positives and Machine Learning, Part 1

A false positive (FP) is when a security system treats legitimate activity as an attack. It sounds like a minor annoyance, but the costs add up:

A common suggestion is to find an "optimal ratio" between false positives and false negatives (FNs), based on what each one costs in money. I don't think this approach works. In Part 2 I'll describe what I measure instead.

Machine learning for security

ML algorithms used in security fall roughly into two groups.

Shallow learning (SL):

Deep learning (DL):

To compare approaches, we use the standard metrics:

False Positive Rate = FP / (FP + TN)
Accuracy = (TP + TN) / (FP + TP + FN + TN)

Existing methods

The research literature has several approaches to reducing FPs:

From research to production

Many of these methods look good in papers and then run into problems in production:

In Part 2 I'll go into how we handle these in practice.