Neurosymbolic Learning for Advanced Persistent Threat Detection under Extreme Class Imbalance

This paper proposes a neurosymbolic architecture combining an optimized BERT model with Logic Tensor Networks and specialized imbalance-mitigation techniques to achieve high-performance, explainable detection of Advanced Persistent Threats in wireless IoT networks, demonstrating a 95.27% binary F1 score and 0.14% false positive rate on the SCVIC-APT2021 dataset.

Quhura Fathima, Neda Moghim, Mostafa Taghizade Firouzjaee, Christo K. Thomas, Ross Gore, Walid Saad

Published 2026-03-03
📖 5 min read🧠 Deep dive

Imagine you are the security guard for a massive, bustling city made entirely of smart devices (like smart thermostats, industrial sensors, and connected cameras). This is the Internet of Things (IoT).

Your job is to spot a very specific type of criminal: the Advanced Persistent Threat (APT). Unlike a common thief who breaks a window and runs away, an APT is a master spy. They sneak in quietly, blend in with the crowd, move from building to building, and steal secrets over weeks or months without anyone noticing.

The problem? The city is huge. For every one spy, there are 98 normal, innocent citizens. If you try to spot the spy by just looking for "weird behavior," your computer brain gets overwhelmed by the sheer number of normal people. It's like trying to find a single red needle in a haystack of a billion blue needles.

This paper introduces a new security system called Neurosymbolic Learning (specifically BERT-LTN) to solve this. Here is how it works, broken down into simple concepts:

1. The Problem: The "Needle in a Haystack" and the "Black Box"

Traditional security systems are like brute-force scanners. They look at everything and try to guess if it's bad.

  • The Imbalance Issue: Because 98% of traffic is normal, these systems get lazy. They just say "Everything is fine" all the time because that's statistically correct most of the time. They miss the spies.
  • The Black Box Issue: Even when they do catch a spy, they can't explain why. It's like a guard shouting, "Stop that person!" but having no idea which rule they broke. In a real security situation, you need to know why to trust the alarm.

2. The Solution: A Two-Part Detective Team

The authors created a hybrid system that combines two types of "brains":

Part A: The Pattern Recognizer (BERT)

Think of BERT as a super-smart, experienced detective who has read millions of books.

  • How it works: It looks at the flow of data (like the size of packages, how fast they move, and the time between them) and tries to find complex patterns. It's great at saying, "Hey, this sequence of events feels suspicious."
  • The Twist: Usually, this detective is a "black box." You don't know what it's looking at. But in this system, the authors forced the detective to show its work.

Part B: The Logic Teacher (LTN)

Think of LTN as a strict logic teacher who speaks in clear rules.

  • How it works: Instead of just guessing, this part uses logic statements like: "If the data packet is huge AND the port is unusual, THEN it is likely an attack."
  • The Magic: It teaches the detective (BERT) to pay attention to specific clues that make sense to humans. It ensures the detective isn't just guessing based on random noise, but is actually following logical rules.

3. The Strategy: The "Two-Stage Filter"

Since the spies are so rare, the system uses a clever two-step process to avoid getting overwhelmed:

  • Stage 1: The Bouncer (Binary Detection)
    The system first asks a simple question: "Is this a normal citizen or a potential spy?"

    • It ignores the tiny details and just looks for the big red flags.
    • If it says "Normal," the person walks right through.
    • If it says "Suspicious," they get pulled aside for a deeper check.
    • Why this helps: It filters out 98% of the innocent crowd immediately, so the system doesn't waste energy on them.
  • Stage 2: The Interrogator (APT Categorization)
    Only for the people pulled aside, the system asks: "Okay, what kind of spy is this?"

    • Is it a Reconnaissance spy (scouting the area)?
    • Is it a Data Exfiltration spy (stealing files)?
    • Is it a Lateral Movement spy (moving between buildings)?
    • Why this helps: Now the system only has to distinguish between different types of spies, which is much easier than distinguishing spies from innocent people.

4. The Results: Fast, Accurate, and Honest

The authors tested this system on a real dataset of IoT traffic. Here is what they found:

  • It rarely cries wolf: It has an incredibly low False Positive Rate (0.14%). This means if the alarm goes off, you can be almost 100% sure it's real. This is crucial because if a security system screams "Fire!" every time someone opens a door, people will stop listening to it.
  • It catches the spies: It successfully identified 95% of the actual attacks.
  • It explains itself: This is the biggest win. Because of the "Logic Teacher" (LTN), the system can tell you exactly why it flagged someone.
    • Example: "I flagged this because the 'Forward Packet Size' was huge, and the 'PSH Flag' was weird."
    • This allows human security experts to trust the system and understand the attack without needing a PhD in AI.

The Big Picture

Imagine a security system that doesn't just scream "Danger!" but instead hands you a report saying: "I stopped this person because they were carrying a backpack that was 50% heavier than normal, and they were walking in a zig-zag pattern."

This paper proves that by combining a pattern-matching AI (which is good at spotting weirdness) with logical rules (which are good at explaining things), we can build security systems that are not only smart enough to catch the most elusive hackers but also transparent enough for humans to trust and use in the real world.

Get papers like this in your inbox

Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.

Try Digest →