近年來,隨著網絡安全的快速發展,傳統入侵檢測系統(IDS)的局限性逐漸顯現,而深度學習(DL)在增強檢測能力方面展現了巨大的潛力。在本文中,我們介紹了一個名為輕量虛擬深度Q網絡(LV-DQN)的創新框架,該框架針對網絡安全領域的神經網絡架構搜索(NAS)進行了優化。LV-DQN使用虛擬空間概念來減少神經網絡結構的搜索空間,從而降低計算複雜性並提高學習效率。該框架包括兩個創新優化策略:搜尋中對參數量大的架構進行懲罰壓縮和真實精度補償,旨在發現入侵檢測最佳輕量化的神經架構。我們將LV-DQN應用於多個現實世界的網絡入侵數據集,展示其卓越的性能和實用性。結果顯示,LV-DQN不僅達到了高精度,而且保持了輕量化的模型規模,適合計算資源有限的實時應用。這種方法簡化了繁重的手動神經網絡配置過程,並解決了傳統NAS方法中廣泛評估和高計算需求的挑戰,為動態的網絡安全領域提供了一個實用的解決方案。 ;Recent advancements in cybersecurity have highlighted the limitations of traditional intrusion detection systems (IDS) and the potential of deep learning (DL) to enhance detection capabilities. In this paper, we introduce the Lightweight Virtual Deep Q-Network (LV-DQN), a groundbreaking framework for neural architecture search (NAS) tailored for cybersecurity. LV-DQN employs a Virtual Space concept to reduce the search space of neural network structures, minimizing computation complexity and enhancing learning efficiency. The framework includes two innovative optimization strategies: lightweight penalty and real-accuracy compensation, designed to streamline the discovery of optimal, lightweight neural architectures for intrusion detection. We apply LV-DQN to several real-world network intrusion datasets, demonstrating its superior performance and practicality. The results show that LV-DQN not only achieves high accuracy but also maintains a compact model size, making it suitable for real-time applications where computational resources are limited. This approach simplifies the labor-intensive process of manual neural network configuration and addresses the challenges of extensive evaluation and high computational demands in traditional NAS methods, offering a practical solution for the dynamic field of cybersecurity.