← Latest papers
💻 computer science

OntoLogX: Ontology-Guided Knowledge Graph Extraction from Cybersecurity Logs with Large Language Models

OntoLogX is an autonomous AI agent that leverages Large Language Models, retrieval-augmented generation, and ontology-guided iterative correction to transform unstructured cybersecurity logs into coherent, ontology-grounded Knowledge Graphs for accurate mapping to MITRE ATT&CK tactics.

Original authors: Luca Cotti, Idilio Drago, Anisa Rula, Devis Bianchini, Federico Cerutti

Published 2026-04-28
📖 5 min read🧠 Deep dive

Original authors: Luca Cotti, Idilio Drago, Anisa Rula, Devis Bianchini, Federico Cerutti

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a crime, but instead of clear witness statements, you are handed a mountain of shredded notes, scribbled receipts, and garbled radio transmissions from hundreds of different police officers. This is what cybersecurity experts face when they look at system logs. These logs are the digital footprints left behind by computers, but they are messy, unstructured, and often written in a confusing shorthand that varies from one device to another.

The paper introduces OntoLogX, a new "autonomous AI detective" designed to clean up this mess and turn those chaotic notes into a clear, organized map of what happened.

Here is how OntoLogX works, explained through simple analogies:

1. The Problem: The "Shredded Notes"

System logs are like a pile of shredded paper. They contain valuable clues about hackers (who they are, what they tried to do, and how they did it), but the information is scattered, inconsistent, and hard to read. Traditional tools try to sort this by following rigid rules (like a checklist), but hackers are creative and change their tactics, so the checklist often fails.

2. The Solution: The "Smart Translator" (OntoLogX)

OntoLogX is an AI agent that acts like a super-smart translator and organizer. Its job is to take a single, messy log entry and turn it into a structured Knowledge Graph.

  • The Knowledge Graph: Think of this as a family tree or a subway map. Instead of a block of text, it connects specific "dots" (like a user, a computer, a time, and an action) with clear "lines" showing how they relate to each other.
  • The Ontology (The Blueprint): To make sure the map is drawn correctly, OntoLogX uses a lightweight ontology. Imagine this as a strict architectural blueprint or a set of LEGO instructions. It tells the AI exactly what kinds of pieces (nodes) and connections (relationships) are allowed, ensuring the final map makes sense and follows the rules.

3. How It Works: The Three-Step Process

OntoLogX doesn't just guess; it uses a clever three-step routine to ensure accuracy:

  • Step 1: The "Reference Library" (Retrieval Augmented Generation)
    Before the AI tries to translate a new log, it looks into its own memory bank (a database of previously solved logs) to find similar examples. It's like a detective looking at past case files to see how similar crimes were documented. This helps the AI understand the context and avoid reinventing the wheel.

  • Step 2: The "Drafting Phase" (Generation)
    Using the reference examples and the strict "LEGO instructions" (the ontology), the AI generates a draft map. It tries to pull out the key details: Who did it? When? What tool did they use?

  • Step 3: The "Inspector" (Iterative Correction)
    This is the most important safety net. Once the draft is made, a digital inspector (using a tool called SHACL) checks it against the blueprint.

    • If the AI made a mistake (e.g., it connected the wrong dots or missed a required piece), the inspector sends the draft back to the AI with a note: "Fix this."
    • The AI tries again. It repeats this loop until the map is perfect and follows all the rules. If it can't fix it after a few tries, it admits defeat and leaves that entry blank rather than creating a fake map.

4. The Big Picture: Connecting the Dots

Once OntoLogX has cleaned up thousands of individual log entries, it groups them into "sessions" (like grouping all the notes from one specific break-in attempt). It then uses the AI one last time to look at the whole picture and answer a high-level question: "What was the hacker's goal?"

It maps these activities to MITRE ATT&CK, which is like a universal dictionary of hacker tactics. Instead of saying "The hacker ran a command," OntoLogX can say, "This was an Initial Access attempt followed by Privilege Escalation." This turns raw data into actionable intelligence that security teams can actually use.

5. What the Paper Found

The authors tested OntoLogX on two types of data:

  1. Public datasets: To make sure it works on standard, known logs.
  2. Real-world Honeypots: These are fake servers set up to attract hackers. The logs from these are pure "bad guy" activity.

The Results:

  • Accuracy: The system successfully turned messy logs into clean, rule-following maps.
  • Better with Help: The system worked best when it used its "Reference Library" (retrieval) and the "Inspector" (correction). Without these, the AI made more mistakes.
  • Model Matters: Not all AI brains are equal. The system worked best with models that are good at following strict instructions (like code-focused models), rather than models that are better at creative storytelling.
  • Tactic Detection: When predicting what the hackers were trying to do, OntoLogX was much better at spotting complex, multi-step attacks than systems that just read the raw logs directly.

Summary

In short, OntoLogX is a tool that takes the confusing, chaotic language of computer logs and translates it into a clear, structured, and verified map of cyber attacks. It uses a strict rulebook, learns from past examples, and double-checks its own work to ensure that the final intelligence is reliable enough for security experts to act on.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →