DOI: 10.3390/bdcc10100337 ISSN: 2504-2289

Overcoming Memory Bottlenecks in Homomorphic Federated Learning: A Chunk-Based Serverless MapReduce Approach

Afonso Cruz, Carlos Marques, Vasco Carvalho, Fernando Almeida

Federated Learning (FL) enables collaborative model training across decentralized organizations without direct data sharing, yet communicating raw gradient updates remains susceptible to reconstruction and membership inference attacks. Fully Homomorphic Encryption (FHE) provides cryptographic privacy during aggregation, but ciphertext expansion triggers Out-of-Memory (OOM, Exit Code 137) terminations across edge nodes and serverless execution environments. This article presents FHE-Cloud, an edge-to-cloud framework that reformulates monolithic homomorphic aggregation as an event-driven serverless MapReduce workflow. Model weights are partitioned into 4096-parameter vectors aligned with the Single Instruction, Multiple Data (SIMD) slot capacity of the Residue Number System (RNS) variant of the Cheon–Kim–Kim–Song (CKKS) scheme (N=8192), parallelizing homomorphic summations across stateless AWS Lambda instances orchestrated via Amazon S3 and EventBridge. Evaluated on decentralized medical image classification (PneumoniaMNIST) under a non-independent and identically distributed (non-IID) Dirichlet distribution (αDir=0.5), FHE-Cloud bounds peak Lambda memory consumption to 123.9±1.8 MB, achieves a mean warm-start aggregation latency of 330.4±12.4 ms, and prevents memory exhaustion at edge and cloud tiers. The framework attains 84.13% global accuracy, indicating that serverless chunking preserves aggregation fidelity within the evaluated workload’s precision envelope while substantially reducing idle infrastructure expenditure relative to always-on provisioning.