Abstract:To address the dual challenges of data privacy and project heterogeneity in cross-project software defect prediction, this study proposes a framework named PRIDE-SDP. The core contribution of the proposed framework lies in the deep integration of three key techniques. First, a personalized federated learning paradigm is adopted to customize dedicated prediction models for heterogeneous projects. Second, an (ε, δ)-differential privacy mechanism with rigorous mathematical guarantees is integrated to ensure that data remains local. Third, a dedicated temporal-contextual fusion network (TCFN) is designed to efficiently capture software metric features. Experiments conducted on six dataset groups covering 27 open-source projects and 3 enterprise projects validate the effectiveness of the proposed framework. Compared with state-of-the-art cross-project defect prediction baselines, PRIDE-SDP achieves an average improvement of 10.7% in AUC and 7.3% in F1-score. More pronounced performance gains are observed on enterprise datasets, where average improvements of 45.2% in MCC, 29.5% in Effort@20%, and 35.4% in F1-score are obtained over all advanced baseline methods. Meanwhile, under strong privacy guarantees, the framework’s average performance retention rate remains above 98% of the optimal performance, and the attack accuracy in membership inference attack experiments is reduced by more than 36% on average. Experimental results demonstrate that PRIDE-SDP effectively balances high predictive performance with privacy protection and personalized adaptation capabilities.