Although Deep Neural Networks (DNNs) have achieved significant success across various industries, their erroneous behaviors have raised widespread concerns. In safety-critical domains where DNNs are deployed, certain types of specific misclassifications (i.e., instances of one specific class being misclassified as another) can lead to catastrophic consequences and urgently need to be corrected. However, existing repair approaches often neglect the adverse impact of general feature extraction patterns on distinguishing specific classes, resulting in limited correction of specific misclassifications. Furthermore, most approaches correct errors by directly adjusting the global decision boundary, which inevitably disturbs the well-trained boundaries and leads to significant accuracy loss. In this article, we propose SMiR, an effective repair framework for addressing specific misclassifications with marginal accuracy loss. Rather than patching the original model, our method localizes and recovers the distorted feature dimensions to mitigate their negative impact on the distinction between specific classes. Moreover, SMiR narrows the scope of repair to the filtered suspect set, protecting other well-trained decision boundaries from disturbance. On average, our approach repairs 27% \(\sim\) 36.2% more specific misclassifications than the baselines, while introducing only 7.8% \(\sim\) 70.9% as many new errors. Besides, SMiR maintains state-of-the-art performance on safety-critical datasets.
In recent years, deep learning-based vulnerability detection has drawn wide attention for its data-driven ability to analyze code semantics and learn vulnerability patterns without predefined models. However, data distribution differences across projects limit model generalization. Transfer learning provides a solution, yet most studies ignore expert-designed metrics. This paper proposes Decpvd, a data-driven cross-project software vulnerability detection method based on a dual-feature stacking ensemble. It builds an adaptive and transferable model using only code and vulnerability label data from source and target projects. It extracts code semantic features via Gated Graph Neural Networks, incorporates expert metrics from tools, performs cross-domain data-driven modeling with TrAdaBoost, and adaptively fuses the two features through stacking, overcoming fixed-weight fusion limitations. Experiments on six cross-project groups from three real datasets (FFmpeg, LibTIFF, LibPNG) show that Decpvd achieves an average AUC of 0.814, significantly outperforming mainstream baselines.