{"id":{"repo_id":"usf","oai_identifier":"oai:digitalcommons.usf.edu:etd-12223"},"canonical_url":"https://search.ndltd.org/etd/usf/oai:digitalcommons.usf.edu:etd-12223","repository":{"repo_id":"usf","name":"University of South Florida","base_url":"https://digitalcommons.usf.edu/do/oai/"},"display":{"title":"LLMs in Network Intrusion Detection – A Comprehensive Analysis","abstract":"Network Intrusion Detection Systems (NIDS) play a critical role in identifying and mitigating malicious activities within computer networks. With the rapid evolution of natural language processing (NLP), Large Language Models (LLMs) have emerged as transformative tools across various domains. LLMs, such as OpenAI’s GPT series and Meta’s LLaMA models,have demonstrated remarkable performance in tasks like language generation, reasoning, and classification. Their ability to understand and process vast amounts of data has enabled groundbreaking advancements in areas like healthcare, finance, and cybersecurity. Recent trends highlight their potential to handle unstructured data, perform complex reasoning, and adapt to a wide range of applications, making them a promising technology for enhancing NIDS. This thesis explores the application of advanced NLP techniques, particularly LLMs, to enhance NIDS performance. We investigate multiple approaches, including the use of Masked Language Models (MLMs) such as BERT, RoBERTa, and DistilBERT, as well as large-scale generative models like Gemma (2B, 9B, and 27B parameter versions) for intrusion detection tasks. Our study begins by implementing standard machine learning models - k-Nearest Neighbors (kNN), Random Forest, XGBoost, Support Vector Machines (SVM), and Logistic Regression on two benchmark datasets: NSL-KDD and CICIoT2023. These models establish a performance baseline for NIDS tasks. Subsequently, we apply MLMs to classify network traffic, both as standalone classifiers and as feature extractors, by converting the datasets into dense embeddings and using them with standard models. To further analyze the efficacy of LLMs, we conduct experiments by prompting Gemma models with sampled datasets of varying sizes (1000, 5000, 10,000 rows). The experiments encompass different prompting strategies, including Zero-Shot, One-Shot, In-Context Learning, In-Context Learning with Coverage-Based selection algorithm, and Chain-of-Thought reasoning. Each experiment is conducted with two variants: one using selected features and another using the entire feature set. Our analysis focuses on how model size, data representation, and prompting methods impact classification performance.","abstract_html":"Network Intrusion Detection Systems (NIDS) play a critical role in identifying and mitigating malicious activities within computer networks. With the rapid evolution of natural language processing (NLP), Large Language Models (LLMs) have emerged as transformative tools across various domains. LLMs, such as OpenAI’s GPT series and Meta’s LLaMA models,have demonstrated remarkable performance in tasks like language generation, reasoning, and classification. Their ability to understand and process vast amounts of data has enabled groundbreaking advancements in areas like healthcare, finance, and cybersecurity. Recent trends highlight their potential to handle unstructured data, perform complex reasoning, and adapt to a wide range of applications, making them a promising technology for enhancing NIDS. This thesis explores the application of advanced NLP techniques, particularly LLMs, to enhance NIDS performance. We investigate multiple approaches, including the use of Masked Language Models (MLMs) such as BERT, RoBERTa, and DistilBERT, as well as large-scale generative models like Gemma (2B, 9B, and 27B parameter versions) for intrusion detection tasks. Our study begins by implementing standard machine learning models - k-Nearest Neighbors (kNN), Random Forest, XGBoost, Support Vector Machines (SVM), and Logistic Regression on two benchmark datasets: NSL-KDD and CICIoT2023. These models establish a performance baseline for NIDS tasks. Subsequently, we apply MLMs to classify network traffic, both as standalone classifiers and as feature extractors, by converting the datasets into dense embeddings and using them with standard models. To further analyze the efficacy of LLMs, we conduct experiments by prompting Gemma models with sampled datasets of varying sizes (1000, 5000, 10,000 rows). The experiments encompass different prompting strategies, including Zero-Shot, One-Shot, In-Context Learning, In-Context Learning with Coverage-Based selection algorithm, and Chain-of-Thought reasoning. Each experiment is conducted with two variants: one using selected features and another using the entire feature set. Our analysis focuses on how model size, data representation, and prompting methods impact classification performance.","abstract_has_math":false,"creators":["Balaji, Sudharshan"],"institution":"University of South Florida","degree_name":"Master of Science (M.S.)","degree_level":"Thesis","degree_discipline":"Computer Science and Engineering","degree_department":null,"school":null,"contributors":["Ning Wang, Ph.D.","Ankur Mali, Ph.D.","Nasir Ghani, Ph.D.","Guangjing Wang, Ph.D."],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025-03-09T08:00:00Z","date_published":"2025-03-09T08:00:00Z","updated_at":"2026-11-19T08:49:32Z","subjects":["Anomaly Detection","Cybersecurity","Deep Learning","Network Security","Threat Detection","Computer Sciences"],"languages":[],"rights":[],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://digitalcommons.usf.edu/etd/10920","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://digitalcommons.usf.edu/etd/10920","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://digitalcommons.usf.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Adigitalcommons.usf.edu%3Aetd-12223","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Ning Wang, Ph.D.","Ankur Mali, Ph.D.","Nasir Ghani, Ph.D.","Guangjing Wang, Ph.D."]},{"key":"dc:creator","label":"Author","values":["Balaji, Sudharshan"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2025-03-09T08:00:00Z"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science and Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Thesis","M.S."]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science (M.S.)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of South Florida"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Anomaly Detection","Cybersecurity","Deep Learning","Network Security","Threat Detection","Computer Sciences"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://digitalcommons.usf.edu/etd/10920"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Network Intrusion Detection Systems (NIDS) play a critical role in identifying and mitigating malicious activities within computer networks. With the rapid evolution of natural language processing (NLP), Large Language Models (LLMs) have emerged as transformative tools across various domains. LLMs, such as OpenAI’s GPT series and Meta’s LLaMA models,have demonstrated remarkable performance in tasks like language generation, reasoning, and classification. Their ability to understand and process vast amounts of data has enabled groundbreaking advancements in areas like healthcare, finance, and cybersecurity. Recent trends highlight their potential to handle unstructured data, perform complex reasoning, and adapt to a wide range of applications, making them a promising technology for enhancing NIDS. This thesis explores the application of advanced NLP techniques, particularly LLMs, to enhance NIDS performance. We investigate multiple approaches, including the use of Masked Language Models (MLMs) such as BERT, RoBERTa, and DistilBERT, as well as large-scale generative models like Gemma (2B, 9B, and 27B parameter versions) for intrusion detection tasks. Our study begins by implementing standard machine learning models - k-Nearest Neighbors (kNN), Random Forest, XGBoost, Support Vector Machines (SVM), and Logistic Regression on two benchmark datasets: NSL-KDD and CICIoT2023. These models establish a performance baseline for NIDS tasks. Subsequently, we apply MLMs to classify network traffic, both as standalone classifiers and as feature extractors, by converting the datasets into dense embeddings and using them with standard models. To further analyze the efficacy of LLMs, we conduct experiments by prompting Gemma models with sampled datasets of varying sizes (1000, 5000, 10,000 rows). The experiments encompass different prompting strategies, including Zero-Shot, One-Shot, In-Context Learning, In-Context Learning with Coverage-Based selection algorithm, and Chain-of-Thought reasoning. Each experiment is conducted with two variants: one using selected features and another using the entire feature set. Our analysis focuses on how model size, data representation, and prompting methods impact classification performance."]},{"key":"dc:title","label":"Title","values":["LLMs in Network Intrusion Detection – A Comprehensive Analysis"]}]}],"canonical_facts":{"dc:contributor":["Ning Wang, Ph.D.","Ankur Mali, Ph.D.","Nasir Ghani, Ph.D.","Guangjing Wang, Ph.D."],"dc:creator":["Balaji, Sudharshan"],"dc:date":["2025-03-09T08:00:00Z"],"dc:description":["Network Intrusion Detection Systems (NIDS) play a critical role in identifying and mitigating malicious activities within computer networks. With the rapid evolution of natural language processing (NLP), Large Language Models (LLMs) have emerged as transformative tools across various domains. LLMs, such as OpenAI’s GPT series and Meta’s LLaMA models,have demonstrated remarkable performance in tasks like language generation, reasoning, and classification. Their ability to understand and process vast amounts of data has enabled groundbreaking advancements in areas like healthcare, finance, and cybersecurity. Recent trends highlight their potential to handle unstructured data, perform complex reasoning, and adapt to a wide range of applications, making them a promising technology for enhancing NIDS. This thesis explores the application of advanced NLP techniques, particularly LLMs, to enhance NIDS performance. We investigate multiple approaches, including the use of Masked Language Models (MLMs) such as BERT, RoBERTa, and DistilBERT, as well as large-scale generative models like Gemma (2B, 9B, and 27B parameter versions) for intrusion detection tasks. Our study begins by implementing standard machine learning models - k-Nearest Neighbors (kNN), Random Forest, XGBoost, Support Vector Machines (SVM), and Logistic Regression on two benchmark datasets: NSL-KDD and CICIoT2023. These models establish a performance baseline for NIDS tasks. Subsequently, we apply MLMs to classify network traffic, both as standalone classifiers and as feature extractors, by converting the datasets into dense embeddings and using them with standard models. To further analyze the efficacy of LLMs, we conduct experiments by prompting Gemma models with sampled datasets of varying sizes (1000, 5000, 10,000 rows). The experiments encompass different prompting strategies, including Zero-Shot, One-Shot, In-Context Learning, In-Context Learning with Coverage-Based selection algorithm, and Chain-of-Thought reasoning. Each experiment is conducted with two variants: one using selected features and another using the entire feature set. Our analysis focuses on how model size, data representation, and prompting methods impact classification performance."],"dc:identifier":["https://digitalcommons.usf.edu/etd/10920"],"dc:subject":["Anomaly Detection","Cybersecurity","Deep Learning","Network Security","Threat Detection","Computer Sciences"],"dc:title":["LLMs in Network Intrusion Detection – A Comprehensive Analysis"],"thesis:degree_discipline":["Computer Science and Engineering"],"thesis:degree_level":["Thesis","M.S."],"thesis:degree_name":["Master of Science (M.S.)"],"thesis:institution_name":["University of South Florida"]},"updated_at":"2026-11-19T08:49:32Z"}