Abstract: The growing complexity and volume of modern network traffic, driven by the rise of connected devices and cloud services, present significant challenges to traditional classification methods. These methods often fail to adapt to the dynamic and multifaceted nature of today’s network environments, which can compromise security and efficiency. In this paper, we present a novel approach that leverages Large Language Models (LLMs) to classify network traffic. Our proposed methodology utilizes the advanced capabilities of LLMs to understand and categorize network traffic based on their inherent patterns, enhancing the accuracy and efficiency of network analysis. First, we preprocess network traffic data by organizing it into formats compatible with LLMs. Next, we evaluate various LLMs, employing different prompts to determine their effectiveness in accurately classifying network traffic. Finally, we demonstrate the application of this LLM-driven approach in real-world scenarios, showcasing its potential to revolutionize network traffic classification. Our approach achieves an average F1-score of 0.952. In comparison with traditional machine learning-based methods, particularly Naïve Bayes, SVM, and MLP, our method outperforms them. It highlights the significant advancements in network traffic analysis achievable through the integration of LLMs, paving the way for more robust and intelligent network security solutions.
Loading