{"title":"Federated and Privacy-Preserving Cross-Project Defect Prediction With Heterogeneous Features","authors":"Meetesh Nevendra;Rahul Shrivastava","doi":"10.1109/TSE.2026.3692541","DOIUrl":null,"url":null,"abstract":"Organizations are often reluctant to share defect-labeled source code because of privacy and intellectual property concerns, yet effective cross-project defect prediction (CPDP) depends on learning from diverse projects. This paper introduces FedCPDP, a federated and privacy-preserving framework that enables collaborative defect prediction without exchanging raw project data and without requiring a common feature schema. The approach employs feature hashing to unify heterogeneous metric spaces, integrates federated proximal optimization with representation alignment to mitigate distribution shift, and incorporates differential privacy mechanisms to safeguard sensitive updates. To further enhance robustness, FedCPDP explores adaptive server aggregation strategies (attention and graph-based) and seed ensembling, while addressing class imbalance through focal loss and threshold optimization. The framework is evaluated on thirty benchmark datasets across five CPDP families under leave-one-project-out validation, using both threshold-free and effort-aware metrics. Results show that FedCPDP improves F1 by up to 10-15% over FedAvg and 6-8% over FedDPI, while achieving 8-10% higher <inline-formula><tex-math>$\\boldsymbol{P_{opt}}$</tex-math></inline-formula> under effort-aware evaluation. These gains are statistically significant, confirming that FedCPDP consistently outperforms state-of-the-art methods while uniquely supporting heterogeneous features and offering explicit privacy guarantees. These findings establish FedCPDP as a practical step toward enabling secure and deployable defect prediction in multi-organizational settings.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"52 8","pages":"2268-2281"},"PeriodicalIF":6.0000,"publicationDate":"2026-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11515281/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/3/11 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Organizations are often reluctant to share defect-labeled source code because of privacy and intellectual property concerns, yet effective cross-project defect prediction (CPDP) depends on learning from diverse projects. This paper introduces FedCPDP, a federated and privacy-preserving framework that enables collaborative defect prediction without exchanging raw project data and without requiring a common feature schema. The approach employs feature hashing to unify heterogeneous metric spaces, integrates federated proximal optimization with representation alignment to mitigate distribution shift, and incorporates differential privacy mechanisms to safeguard sensitive updates. To further enhance robustness, FedCPDP explores adaptive server aggregation strategies (attention and graph-based) and seed ensembling, while addressing class imbalance through focal loss and threshold optimization. The framework is evaluated on thirty benchmark datasets across five CPDP families under leave-one-project-out validation, using both threshold-free and effort-aware metrics. Results show that FedCPDP improves F1 by up to 10-15% over FedAvg and 6-8% over FedDPI, while achieving 8-10% higher $\boldsymbol{P_{opt}}$ under effort-aware evaluation. These gains are statistically significant, confirming that FedCPDP consistently outperforms state-of-the-art methods while uniquely supporting heterogeneous features and offering explicit privacy guarantees. These findings establish FedCPDP as a practical step toward enabling secure and deployable defect prediction in multi-organizational settings.
期刊介绍:
IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include:
a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models.
b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects.
c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards.
d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues.
e) System issues: Hardware-software trade-offs.
f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.