Network Intrusion Detection System Based on BERT-MLP Model

Fanhui Duan, Wenchao Cui, Yuqing Ma, Jiajun Hu · 2025

A Network Intrusion Detection System (NIDS) is a tool designed to identify potential cyber threats. In recent years, leveraging machine learning algorithms to develop NIDS has emerged as an effective solution for intrusion detection. However, traditional machine learning-based algorithms, due to their limited adaptability, have not been widely adopted in NIDS. This paper proposes a BERT-MLP-based NIDS model. To address the class imbalance issue in power information system datasets, a Classifier Generative Adversarial Network (ACGAN) is employed. Network traffic data is converted into natural language-like sequences through feature encoding, and the Bidirectional Encoder Representations from Transformers (BERT) is innovatively introduced to extract contextual features from the traffic. A multi-layer perceptron (MLP) is then integrated to construct an end-to-end classification model, which outputs the probability of traffic classification. The proposed method was tested on a power information system dataset, with results demonstrating superior performance in accuracy, precision, recall, and F1-score. These findings validate the model’ s ability to effectively capture spatiotemporal correlation features in traffic sequences, significantly enhance robustness in detecting novel attacks, and provide a new technical pathway for safeguarding power information systems.

Read the paper · More papers on PaperTik