Evaluating Large Language Models for Anomaly Detection with Cost-Efficient Sampling: A Generalized Framework

Cybersecurity threats, particularly zero-day attacks, pose significant risks to organisations. Traditional machine learning (ML) models struggle to adapt to novel threats outside of their training data. Large Language Models (LLMs), with their adaptability and semantic reasoning, offer potential for detecting anomalies in network traffic. This paper assesses whether LLMs can effectively support anomaly detection when deployed in industrial contexts with real-time constraints and large-scale data streams. To lower computational costs, we propose two-level stratified sampling and optimised prompt engineering to reduce data volume by over 80%, while still preserving key malicious patterns. Comparing LLaMA in zero-shot and few-shot modes to ML baselines using the CICIDS2017 dataset, we find LLMs fall short on volumetric attacks. We discuss strategies to improve LLMs for cost-effective production use.

Authors

Institutions

Publication Details

Published
2025-06-23
DOI
https://doi.org/10.1109/blackseacom65655.2025.11193960
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluating Large Language Models for Anomaly Detection with Cost-Efficient Sampling: A Generalized Framework

Ievgeniia Kuzminykh, Bogdan Ghita, Andrii Astrakhantsev, Duy Anh Phạm
Topic Modeling
article

Evaluating Large Language Models for Anomaly Detection with Cost-Efficient Sampling: A Generalized Framework

Ievgeniia Kuzminykh, Bogdan Ghita, Andrii Astrakhantsev, Duy Anh Phạm
article en

Abstract

Cybersecurity threats, particularly zero-day attacks, pose significant risks to organisations. Traditional machine learning (ML) models struggle to adapt to novel threats outside of their training data. Large Language Models (LLMs), with their adaptability and semantic reasoning, offer potential for detecting anomalies in network traffic. This paper assesses whether LLMs can effectively support anomaly detection when deployed in industrial contexts with real-time constraints and large-scale data streams. To lower computational costs, we propose two-level stratified sampling and optimised prompt engineering to reduce data volume by over 80%, while still preserving key malicious patterns. Comparing LLaMA in zero-shot and few-shot modes to ML baselines using the CICIDS2017 dataset, we find LLMs fall short on volumetric attacks. We discuss strategies to improve LLMs for cost-effective production use.

King's College London (GB), National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute” (UA), University of Plymouth (GB)
Openalex Percentile: Top 85%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Evaluating Large Language Models for Anomaly Detection with Cost-Efficient Sampling: A Generalized Framework — Ievgeniia Kuzminykh, Bogdan Ghita, et al. · (2025) | TGRS Research Map | TGRS