Explainable AI for Network Intrusion Detection Using Security Logs
Network intrusion detection systems (IDS) are a core defensive layer in modern organisations, and machine-learning models now detect attacks with high precision. Their weakness is opacity: a model that outputs only “attack” leaves the security analyst with no way to verify the alert, decide how urgent it is, or recognise a false alarm. This lack of trust is one of the main reasons learned detectors are under-used in practice. This project presents SentryLens, an end-to-end explainable intrusion detection platform built on security logs. Using the NSL-KDD benchmark (125,973 training and 22,544 test connection records, each described by 41 features), we train and compare four classifiers — Logistic Regression, Decision Tree, Random Forest and a soft-voting Hybrid ensemble — and deploy the Random Forest because it supports fast, exact SHAP (SHapley Additive exPlanations) values through the TreeExplainer algorithm. The detector is wrapped in a Flask web application with MySQL-backed user authentication. Analysts can either enter a single connection manually and receive a verdict with a ranked, plain-English SHAP explanation, or upload a CSV/NSL-KDD file and receive verdicts for every row, with attacks highlighted, filtering, search, pagination, downloadable results and — when ground-truth labels are present — accuracy, precision, recall and F1. Evaluated on the official NSL-KDD test file, which deliberately contains attack patterns absent from training, the models reach roughly 75–78% accuracy with very high precision (about 0.92–0.97) and lower recall (about 0.62); the report analyses why this is the expected, honest behaviour on this benchmark and how it differs from the 98–99% figures obtained when the data are pooled and randomly re-split. A key contribution is the explanation layer: it converts SHAP values into a ranked, direction-aware breakdown and a one-sentence summary, and it labels any input value that was auto-filled rather than supplied by the user..
Authors
- Mallareddy Dolly Ashrita
- Kommina Bhargav Naga Sai Dhaniyala Sai Nikitha
Institutions
- Koneru Lakshmaiah Education Foundation (IN)
Publication Details
- Journal
- International Journal of Advanced Research in Science Communication and Technology
- Published
- 2026-12-03
- DOI
- https://doi.org/10.48175/ijarsct-41353
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00