CLEAR-IDS: Leakage-Free Adaptive Resampling and Diversity-Weighted Explainable Ensemble Learning for Network Intrusion Detection
Abstract
Reliable network intrusion detection requires more than high aggregate accuracy because data leakage, severe class imbalance, unstable feature selection, redundant ensemble decisions, and poorly calibrated probabilities can produce optimistic yet operationally weak results. This study presents CLEAR-IDS, a cross-fold leakage-free explainable framework that integrates fold-contained preprocessing, stability-aware multi-attribution feature selection, class-aware adaptive resampling, diversity-weighted ensemble learning, threshold optimization, and multi-level explanations. The framework was evaluated on the official UNSW-NB15 partitions using stratified five-fold model development and an untouched test set. SHAP, permutation importance, and mutual information were combined with redundancy control; Borderline-SMOTE, SMOTE-ENN, SMOTE-Tomek, ADASYN, and no resampling were assessed only within training folds; and random forest, XGBoost, and multilayer perceptron models were aggregated according to out-of-fold quali