EAAI Journal 2026 Journal Article
A hierarchical domain adaptive explainable vulnerability detection scheme for power systems based on dynamic slicing enhancement
- Fangfang Dang
- Jiyu Zhang
- Kehe Wu
- Shuai Li
- Ying Zhu
Automated vulnerability detection using graph neural networks has demonstrated significant potential, yet models trained on general-source software often exhibit high false-positive rates when applied to specialized power system code due to severe domain shift. To bridge this gap, this paper proposes a novel hierarchical domain adaptive and explainable vulnerability detection framework (HDAvul), specifically designed for power systems, whose core innovation lies in three key components. First, a dynamic slicing mechanism enhanced with power-dedicated semantic edges is introduced to adaptively capture the complete functional context of vulnerabilities, thereby overcoming the semantic fragmentation inherent in traditional fixed-window methods. Second, a hierarchical domain adaptation module is developed, employing multi-granularity adversarial learning to align feature distributions simultaneously at the Node, Slice, and Graph levels to ensure the preservation of intricate structural logic during knowledge transfer. Third, a transparent explanation module is integrated to automatically generate structural vulnerability-triggering paths (VTPs), providing traceable evidence for expert validation in safety-critical environments. Experimental results on real-world power system projects demonstrate that HDAvul achieves a peak F1-Score of 85. 2%, outperforming state-of-the-art domain-free and single-level adaptation baselines, while achieving a superior explanation stability of 89. 0% that confirms its capacity to provide reliable, high-fidelity analysis for securing mission-critical power infrastructure.