---
title: "Leveraging AI for Threat Detection | FiveStudy"
description: "Why AI is needed to sort millions of network log events, how it scores each as a likelihood of being malicious, and how the alert threshold trades missed attacks against false alarms."
url: https://fivestudy.com/guides/ap-cybersecurity-3-5-b-leveraging-ai-for-threat-detection
---

[AP Cybersecurity](https://fivestudy.com/ap-cybersecurity) · Study guide

# Leveraging AI for Threat Detection

[Figure: FiveStudy]

FiveStudy

AP® Cybersecurity · Unit 3 · Network Security, Firewalls & Detection

AP® Cybersecurity · Unit 3 · Network Security, Firewalls & Detection

# Leveraging AI for Threat Detection

Why networks need AI to sort their logs, how AI scores each event as a likelihood, and how organizations choose the threshold for an alert.

1. Too much data for people 2. How AI classifies traffic 3. Probabilities, not verdicts 4. Choosing the threshold 5. Worked examples 6. Common mistakes

## 1 Too much data for people

Computers log every action users take. Firewalls, intrusion detection and prevention systems, and other network sensors log all the traffic passing through various points in a network. A medium-sized organization's network logs millions, or even tens of millions, of data points per day. Even a large team of people cannot analyze that much data.

## 2 How AI classifies traffic

Threat detection teams build AI algorithms that analyze large amounts of data and **classify** the patterns as **malicious** or **normal**. The model learns from examples of both and then judges new activity: an unusual login time, an odd amount of data leaving at night, a computer contacting addresses it never has before.

## 3 Probabilities, not verdicts

AI models for threat detection are based on probability calculations. Instead of a yes or no, they report a **percentage** showing how likely it is that something is malicious: “this connection is 84% likely to be malicious.” A score is a judgment, not proof. Some harmless events score high, and some attacks score low.

## 4 Choosing the threshold

Each organization sets its own **threshold**: the percentage at which a score becomes an alert.

- **Threshold too high:** real attacks with moderate scores go undetected.
- **Threshold too low:** the security team is overwhelmed with false alerts.

**Figure 1.** Events at or above the threshold raise alerts. Raise the threshold and real attacks slip under it; lower it and harmless events flood the team.

| Threshold | Alerts | Real attacks caught | False alerts | Real attacks missed |
| --- | --- | --- | --- | --- |
| 90% | 2 | 2 | 0 | 2 |
| 75% | 4 | 3 | 1 | 1 |
| 50% | 7 | 4 | 3 | 0 |
| 20% | 10 | 4 | 6 | 0 |

Scale matters: a threshold that lets through only 0.01% of 20 million daily events still produces 2,000 alerts a day. Organizations balance the cost of missing an attack against how many alerts their team can investigate.

The key idea

AI makes huge log volumes manageable by scoring each event's likelihood of being malicious. Where the organization sets the alert threshold trades missed attacks against false alarms.

## 5 Worked examples

Worked Example 1 Read the threshold

### Twelve scored events

Use the twelve events in Figure 1 (four real attacks at 97, 93, 78, and 58%). At a 75% threshold, how many alerts are raised, how many are real, and how many attacks are missed?

1. 1

   Events at or above 75%: 97, 93, 84, 78. That is 4 alerts.

2. 2

   Real attacks among them: 97, 93, 78. That is 3 caught; 84 is a false alert.

3. 3

   Real attacks below 75%: the one at 58. 1 missed.

**Answer:** 4 alerts, 3 real, 1 false, 1 attack missed.

Worked Example 2 Too low

### The team that stopped reading alerts

A small team sets its AI threshold to 20%. Within a week, they receive hundreds of alerts a day and start closing them without looking. What went wrong?

1. 1

   A low threshold catches more real attacks, but also flags many harmless events.

2. 2

   In the sample of twelve, a 20% threshold raises 10 alerts for only 4 real attacks.

3. 3

   At real network scale, that becomes more alerts than the team can investigate, so they stop taking them seriously.

**Answer:** The threshold was too low for the team's capacity. Raise it, tune the model, or add staff.

Worked Example 3 Too high

### The quiet dashboard

Another organization sets its threshold at 95% to avoid false alarms. Months later, an investigation finds an attacker who was active the whole time; their activity scored between 60% and 80%. What does this show?

1. 1

   At 95%, only the most obvious activity raises alerts.

2. 2

   The attacker's moderate scores never crossed the threshold.

3. 3

   A threshold set too high lets real attacks go undetected.

**Answer:** The threshold was too high. The quiet dashboard hid a real attack.

Worked Example 4 Why AI at all

### Counting events

A company's network logs 20 million events a day. Why is AI needed, and what does the threshold control?

1. 1

   No team could review 20 million events by hand each day.

2. 2

   AI scores each event and only those at or above the threshold become alerts.

3. 3

   Even if just 0.01% cross the threshold, that is 20,000,000 × 0.0001 = 2,000 alerts a day, so the threshold has to match what the team can handle.

**Answer:** AI turns an impossible volume into a reviewable list; the threshold decides how long that list is.

## 6 Common mistakes

Common Mistake 1 · Treating an AI score as proof

An 84% score means “likely,” not “confirmed.” People investigate alerts to decide.

Common Mistake 2 · Thinking a lower threshold is always safer

It catches more attacks, but floods the team with false alerts until real ones get ignored.

Common Mistake 3 · Thinking a higher threshold is always cleaner

Fewer alerts can mean more missed attacks. Silence is not the same as safety.

Explain a threshold choice like this

“The AI reports a percentage likelihood that each event is malicious, and the organization sets the threshold for alerts. If the threshold is too high, attacks scoring below it go undetected; if it is too low, the team is overwhelmed with false alerts. The threshold should balance catching attacks with what the team can investigate.”

Explain that AI outputs a likelihood, then describe the trade-off on both sides of the threshold.

FiveStudy AP® Cybersecurity · Leveraging AI for Threat Detection
