One-Way Hashing and Federated Learning for Privacy-Preserving Healthcare Analytics in Resource-Constrained Settings
Keywords:
data privacy, Nigeria Data Protection Act, Privacy-preserving machine learning (PPML), SHA-256, Membership InferenceAbstract
Machine learning is increasingly applied to Nigerian patient records, yet facility data security is weak, and no lightweight privacy-preserving framework aligned with the Nigeria Data Protection Act (NDPA) 2023 and its General Application and Implementation Directive (GAID) 2025 has been evaluated locally. This study developed and evaluated a framework that combines per-facility salted SHA-256 hashing of patient identifiers with federated learning. Following a design science approach, the study trained logistic regression, random forest, and multilayer perceptron models on 10,000 synthetic records distributed across twelve simulated facilities under centralised, federated, federated-with-hashing, and federated-with-differential-privacy (ε = 1.0) configurations, using repeated stratified five-fold cross-validation. Utility, susceptibility to membership inference and linkage attacks, and computational cost were assessed, and the analysis was repeated on 10,000 de-identified antiretroviral therapy records from 54 facilities in the Federal Capital Territory, Nasarawa State and Katsina State. Hashing left every prediction unchanged in every fold on both datasets. While the salt remained secret, it reduced linkage attack success from 100% to 2.6% on the synthetic data and to 5.0% on the real data, produced no collisions among 110,000 identifiers, and cost about 0.001 ms per record; once the salt was leaked, the protection was lost. Hashing did not affect membership inference, which was driven by model memorisation (centralised Random Forest attack balanced accuracy 0.930 on synthetic and 0.700 on real data). On the real data, where models predicted an administrative 28-day treatment-continuity status with AUC-ROC up to 0.84, partly by exploiting documentation patterns, federation cost 0.015–0.025 in AUC-ROC and differential privacy 0.087–0.195 in accuracy. Salted hashing is an effective, low-cost safeguard against identifier linkage, but it is not a comprehensive privacy guarantee for federated analytics: in deployment it should be implemented as keyed hashing (HMAC-SHA-256) under managed keys and combined with secure aggregation and defences against membership inference and model-update leakage.