[论文解读] Performance Evaluation of Apache Spark MLlib Algorithms on an Intrusion Detection Dataset
本论文使用六种机器学习算法在 CSE-CIC-IDS2018 数据集上评估了 Apache Spark MLlib 的性能,用于入侵检测。结果表明,Spark 通过分布式超参数调优显著提升了训练速度,尤其在朴素贝叶斯和随机森林算法上表现突出,同时保持了 100% 的准确率,且在最多 8 个工作节点时展现出最佳可扩展性。
The increase in the use of the Internet and web services and the advent of the fifth generation of cellular network technology (5G) along with ever-growing Internet of Things (IoT) data traffic will grow global internet usage. To ensure the security of future networks, machine learning-based intrusion detection and prevention systems (IDPS) must be implemented to detect new attacks, and big data parallel processing tools can be used to handle a huge collection of training data in these systems. In this paper Apache Spark, a general-purpose and fast cluster computing platform is used for processing and training a large volume of network traffic feature data. In this work, the most important features of the CSE-CIC-IDS2018 dataset are used for constructing machine learning models and then the most popular machine learning approaches, namely Logistic Regression, Support Vector Machine (SVM), three different Decision Tree Classifiers, and Naive Bayes algorithm are used to train the model using up to eight number of worker nodes. Our Spark cluster contains seven machines acting as worker nodes and one machine is configured as both a master and a worker. We use the CSE-CIC-IDS2018 dataset to evaluate the overall performance of these algorithms on Botnet attacks and distributed hyperparameter tuning is used to find the best single decision tree parameters. We have achieved up to 100% accuracy using selected features by the learning method in our experiments
研究动机与目标
- 利用 Apache Spark 的分布式计算框架加速机器学习模型在入侵检测中的训练过程。
- 通过基于集群的并行化方法解决支持向量机(SVM)和深度决策树等计算密集型算法的内存瓶颈问题。
- 比较六种 MLlib 算法——逻辑回归、SVM、朴素贝叶斯、单棵决策树、随机森林和梯度提升树——在大规模网络流量数据上的可扩展性和性能表现。
- 将手动超参数调优替换为基于 Spark 原生的分布式超参数调优方法,以提升模型效率。
- 识别在大数据环境下基于异常检测的入侵检测中最具可扩展性和准确性的算法。
提出的方法
- 使用包含 7 个工作节点和 1 个主控节点的 Spark 集群,将机器学习模型在 CSE-CIC-IDS2018 数据集上的训练任务进行分布式处理。
- 通过 'learner' 方法选择关键特征以降低维度,提升模型效率,完成数据预处理。
- 利用 Spark 的 CrossValidator 和 TrainValidationSplit 工具实施分布式超参数调优,以优化单棵决策树的参数。
- 训练了六种 MLlib 算法:逻辑回归、LinearSVC、伯努利朴素贝叶斯和多项式朴素贝叶斯、单棵决策树、随机森林以及梯度提升树。
- 在工作节点数量从 1 到 8 的不同配置下,测量训练时间、准确率、精确率、召回率和 F1 分数,以评估可扩展性和性能表现。
- 使用 Spark 的 DataFrame API 简化特征工程、模型训练和预测流程的集成。
实验结果
研究问题
- RQ1Apache Spark 的并行处理能力如何提升大规模入侵检测数据集上机器学习模型的训练时间?
- RQ2在 Spark 集群中,将多个工作节点用于分布式处理时,哪些 MLlib 算法展现出最高的可扩展性和加速比?
- RQ3与手动调优相比,Spark 中的分布式超参数调优能否实现更高的模型准确率和效率?
- RQ4增加工作节点数量对内存密集型算法(如 SVM 和深度决策树)的模型准确率和训练时间有何影响?
- RQ5哪种算法能在不同集群配置下实现最高准确率(如 100%)并保持良好的可扩展性?
主要发现
- 朴素贝叶斯因独立概率计算而实现了最高加速比,在工作节点间表现出良好的线性可扩展性。
- 逻辑回归的训练时间从单节点的 4653.09 秒降低至三节点集群的 2436.68 秒,表明并行化效果显著。
- 支持向量机和单棵决策树在超过 3–4 个工作节点后出现收益递减,原因在于通信开销和算法约束。
- 梯度提升树在 8 个节点上训练耗时 2045.21 秒,实现了 99.6% 的精确率、召回率和 F1 分数,表明其在中等可扩展性下具备高准确率。
- 随机森林因随机子空间选择导致分类结果方差较高,但在不同集群规模下保持了稳定的性能表现。
- 最佳模型通过选择关键特征和调优超参数,实现了 100% 的准确率,验证了基于 Spark 的超参数调优方法的有效性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。