arXiv(opens in a new tab)cs.CRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.26844

Are We Shooting Flies with Cannons? Trade-off Analysis for AI-based 5G Intrusion Detection

Federica Uccello, Simin Nadjm-Tehrani

Federica Uccello*, Simin Nadjm-Tehrani*

  • Department of Computer and Information Science

Linköping University

Sweden

{federica.uccello, simin.nadjm-tehrani}@liu.se

Abstract—The increasing adoption of Artificial Intelligence (AI) in network intrusion detection raises the question of whether complex and computationally expensive models are justified for this task. In this work, we investigate the trade-off between detection performance and computational cost for intrusion detection in 5G network telemetry. We compare traditional machine learning (ML) models, including XGBoost as a representative of tree ensemble, and TabNet for tabular deep neural network (DNN), with a large language model (LLM) used as a general-purpose intrusion detector. The LLM is evaluated under both zero-shot and few-shot prompting configurations. We evaluate the models in terms of detection performance, inference time, and CPU time as a proxy for energy efficiency. Using a relatively large available 5G dataset, we show that traditional ML models consistently achieve near-perfect detection performance with negligible inference time, while LLM-based approaches perform significantly worse and incur orders-of-magnitude higher CPU usage. Few-shot prompting improves recall, but at the cost of lower accuracy and further increased CPU time, without closing the performance gap. These findings indicate that, for tabular intrusion detection in 5G networks, XGBoost offers a substantially better performance-cost trade-off than DNNs and LLMs, highlighting the importance of selecting models based on task suitability rather than increasing complexity.

Index Terms—5G Mobile Communication, Intrusion Detection, Large Language Models, Anomaly Detection, Energy Efficiency

I. INTRODUCTION

The latest developments in 5G and beyond have come at the cost of increased attack surface, motivating the development of new security solutions. According to recent ENISA threat landscape reports, the telecommunications sector remains one of the primary targets of cyber attacks [1], [2]. In this context, Machine learning (ML) techniques are increasingly posed for adoption, particularly for analyzing network telemetry data represented in tabular form and handling the high volume and complexity of modern network traffic [3].

Recently, the rapid advancement and widespread adoption of large language models (LLMs) have led to a growing interest in applying these models to a broad range of tasks in various domains, including cybersecurity [4], [5]. Despite their promising capabilities, training and running such models require significant resources, raising concerns about their environmental impact, including increased electricity consumption, carbon emissions, and hardware resource utilization [6].

In this work, we hypothesize that LLM-based approaches do not provide a favorable trade-off between detection performance and computational cost compared to traditional ML models, including tree ensembles and deep neural networks (DNNs), when applied to tabular 5G network intrusion detection.

The contributions of the paper are as follows:

• We perform a comparative evaluation of representative tree ensembles, DNNs, and general-purpose LLMs for intrusion detection in 5G network telemetry.

• We analyze the impact of prompting strategies by comparing zero-shot and few-shot configurations for the LLM.

• We investigate trade-offs in terms of detection performance, inference time, and CPU time as a proxy for energy efficiency.

The remainder of this paper is organized as follows. Section II overviews the related work; Section III provides background concepts; Section IV describes the aim and method; Section V presents the experimental setup; Section VI reports the results, which are discussed in Section VII, along with threats to validity. Finally, Section VIII concludes the paper with remarks on future directions.

References (24)

  • Enisa threat landscape 2025
  • Telecom security incidents 2024
  • Machine learning for 5G/B5G mobile and wireless communications: Potential, limitations, and future directions
  • Generative AI in cybersecurity: A comprehensive review of LLM applications and vulnerabilities
  • Mission explainable: From feature attribution to mitigation in 5G anomaly detection
  • A review of green artificial intelligence: Towards a more sustainable future
  • A fast network intrusion detection system using adaptive synthetic oversampling and lightgbm
  • Intrusion detection system based on machine learning using least square support vector machine
  • Anomaly-based error and intrusion detection in tabular data: No DNN outperforms tree-based classifiers
  • Llm-based continuous intrusion detection framework for next-gen networks
  • FedLLMGuard: A federated large language model for anomaly detection in 5g networks
  • Measuring and improving the energy efficiency of large language models inference
  • A survey of ensemble learning: Concepts, algorithms, applications, and prospects
  • Deep neural networks and tabular data: A survey
  • Large language models (LLMs): survey, technical frameworks, and future challenges
  • XGBoost: A scalable tree boosting system
  • Artificial intelligence advances in anomaly detection for telecom networks
  • 5G-NIDD: A comprehensive network intrusion detection dataset generated over 5G wireless network (opens the publisher in a new tab)
  • Same task, more tokens: the impact of input length on the reasoning performance of large language models
  • Language models are few-shot learners
  • On detection latencies of network intrusion detectors—discussion and application
  • Efficient llms training and inference: An introduction
  • A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions
  • A comprehensive survey of small language models in the era of large language models: Techniques, enhancements, applications, collaboration with LLMs, and trustworthiness