<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Koyna Marwah</title>
    <description>The latest articles on DEV Community by Koyna Marwah (@koyna_marwah_8121ea934f94).</description>
    <link>https://dev.to/koyna_marwah_8121ea934f94</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3865605%2F845c920c-d4c3-4e49-85db-bfe74e40bdd3.png</url>
      <title>DEV Community: Koyna Marwah</title>
      <link>https://dev.to/koyna_marwah_8121ea934f94</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/koyna_marwah_8121ea934f94"/>
    <language>en</language>
    <item>
      <title>Anomaly-Based Intrusion Detection System Using RAG</title>
      <dc:creator>Koyna Marwah</dc:creator>
      <pubDate>Tue, 07 Apr 2026 11:16:41 +0000</pubDate>
      <link>https://dev.to/koyna_marwah_8121ea934f94/anomaly-based-intrusion-detection-system-using-rag-4i66</link>
      <guid>https://dev.to/koyna_marwah_8121ea934f94/anomaly-based-intrusion-detection-system-using-rag-4i66</guid>
      <description>&lt;p&gt;The world today requires people to maintain their online security because those vital protection systems no longer exist as voluntary options. The security systems that existed before now face difficulties because they have to deal with the increasing frequency of cyber threats and network attacks. The article presents a new method for preventing network breaches which uses Retrieval-Augmented Generation (RAG) technology to develop security systems that use machine learning and large language models to provide better protection through intelligent monitoring.&lt;/p&gt;

&lt;p&gt;Introduction&lt;br&gt;
The frequency of cyber attacks together with network intrusions has escalated because hackers have developed more advanced techniques. Organizations- whether small businesses or large enterprises—face constant threats of unauthorized access, data breaches, and system takeovers. A network intrusion refers to any suspicious or unauthorized activity within a computer network. The attackers use this method to execute their attacks which result in severe destruction because attackers achieve operational interruptions together with stolen confidential information and monetary damage.&lt;/p&gt;

&lt;p&gt;Traditional Intrusion Detection Systems (IDS) use predefined rules together with static machine learning models as their main detection method. The systems provide valuable functions yet their designs restrict flexibility while their decision-making process stays unclear which prevents analysts from using their outputs. &lt;/p&gt;

&lt;p&gt;Problem Statement &lt;br&gt;
Existing intrusion detection systems experience multiple limitations which affect their performance. 1. The system requires previous threat information which makes it difficult to detect newly emerging threats. 3. The system produces too many false alerts which results in unnecessary security notifications. 4. The system provides no clear explanations which create obstacles for security personnel during their decision-making process. A system needs to exist which can 1. The system needs to detect unusual activities that happen during actual time. 2. The system needs to recognize emerging attack methods. 3. The system needs to deliver straightforward human-oriented explanations.&lt;/p&gt;

&lt;p&gt;Dataset Overview&lt;br&gt;
This project uses the NSL-KDD dataset, a widely recognized benchmark in network security research.&lt;br&gt;
Key Details:&lt;br&gt;
Type: Structured tabular data&lt;br&gt;
Records: 148,000+ network connections&lt;br&gt;
Features: 41 attributes + 1 label&lt;br&gt;
Classes: Normal, DoS, Probe, R2L, U2R&lt;/p&gt;

&lt;p&gt;Each row represents a network connection with attributes such as:&lt;br&gt;
Duration&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Protocol type (TCP/UDP)&lt;/li&gt;
&lt;li&gt;Source and destination bytes&lt;/li&gt;
&lt;li&gt;Service type (HTTP, FTP, etc.)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Existing Research &amp;amp; Gap&lt;br&gt;
The research study investigates how Large Language Models (LLMs) function as intrusion detection systems to provide better system explanations. The methods face limitations because they lack effective retrieval-based context utilization and face difficulties with their past attack pattern comparison and multiple systems function as black boxes which restrict their operational understanding.&lt;/p&gt;

&lt;p&gt;The IDS-Agent system needs advanced reasoning capabilities but its system requires better methods to retrieve information and achieve knowledge base expansion throughout its operation.&lt;/p&gt;

&lt;p&gt;Proposed Solution&lt;br&gt;
This project presents an Anomaly-Based Intrusion Detection System which implements RAG technology for its operation.&lt;br&gt;
The system operates through following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Preprocessing
The dataset undergoes cleaning and transformation through process which handles missing values and encodes categorical data&lt;/li&gt;
&lt;li&gt;Knowledge Base Creation
The system stores historical attack data in a vector database which uses ChromaDB technology&lt;/li&gt;
&lt;li&gt;Retrieval Step
The system retrieves five past records which show the highest similarity to a new network input&lt;/li&gt;
&lt;li&gt;LLM Classification
The language model performs two tasks through its classification process
The model identifies content as normal or attack
The system delivers a comprehensive system explanation&lt;/li&gt;
&lt;li&gt;Evaluation
The study assesses system performance through traditional models like Random Forest by using accuracy and precision and recall and F1 -score metrics for evaluation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Key Advantages The system identifies both existing attacks and new attacks which have not been observed before The system delivers explanations which humans can understand The system identifies false threats with greater accuracy The system helps analysts make better choices through its improved decision-making capabilities The system uses retrieval and reasoning methods to create enhanced context understanding&lt;/p&gt;

&lt;p&gt;Objectives The NSL-KDD dataset needs to be prepared and cleaned The team will create a knowledge base which contains information about various attacks The team will create a detection system which employs RAG technology The team will test and evaluate systems against traditional models to assess their performance capabilities.&lt;/p&gt;

&lt;p&gt;Results &amp;amp; Insights&lt;br&gt;
The system achieves better intrusion detection results through its combined retrieval and reasoning methods. The system detects security threats while it shows the reasons which lead to the connection being identified as dangerous.&lt;br&gt;
The system establishes strong practical value for cybersecurity field work because it enables users to understand both the detection process and the reasons behind detected threats.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
The RAG-based intrusion detection system which we developed represents a crucial advancement for cybersecurity defenses. The system provides accurate results through its dual approach which combines past knowledge with intelligent reasoning to create results that are both understandable and adaptable to specific situations.&lt;br&gt;
The evolution of cyber threats requires systems like these to develop secure and trustworthy network environments which will enable better protection against emerging security risks.&lt;/p&gt;

&lt;p&gt;Future Scope&lt;br&gt;
The system will establish connections between network monitoring systems that operate in real time. &lt;br&gt;
The system will conduct tests using extensive datasets that include various types of data.&lt;br&gt;
The system will undergo testing to evaluate its performance against the advanced KAN model. &lt;br&gt;
Security systems will use the system in large corporate environments for protection.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
