While Differential Privacy adds noise to achieve privacy, Secure Multi-Party Computation (SMC) takes a cryptographic approach. The fundamental goal of SMC in federated learning is to allow the central server to compute the aggregate of client updates (typically the sum or weighted average) without learning any individual client's update. Imagine multiple parties, each holding a private input (their model update ui), wanting to compute a joint function (the sum ∑ui) without revealing their inputs to each other or to the aggregating server.
Many practical SMC protocols for secure aggregation rely on the concept of secret sharing. The general idea is to split each client's private update vector ui into multiple pieces, called shares. These shares are distributed in such a way that:
A common and relatively efficient technique for secure summation is additive secret sharing. Let's walk through a simplified protocol involving N clients and a server, designed to compute S=∑i=1Nui without the server learning any ui.
Pairwise Mask Generation: Before sending updates, each pair of clients (i,j) with i<j needs to agree on a large random number (or vector) mij. This mask must be known only to clients i and j. This can be achieved using techniques like Diffie-Hellman key exchange to establish pairwise symmetric keys, which then seed pseudo-random number generators (PRNGs) on both clients to generate the same mij independently.
Client-Side Masking: Each client i masks its update vector ui using the pairwise masks it shares with other clients. It computes a masked update ui′:
ui′=ui+j>i∑mij−j<i∑mji(modM)Here, M is a large integer defining the finite field or ring over which the computations are performed. The additions and subtractions are typically element-wise for vectors. Essentially, client i adds masks it generated with clients having higher indices and subtracts masks generated by clients with lower indices.
Sending to Server: Each client i sends only its masked update ui′ to the server.
Server-Side Aggregation: The server simply sums the masked updates it receives:
S′=i=1∑Nui′(modM)Mask Cancellation: Let's examine the sum S′. When the server sums the ui′, every mask mij (where i<j) appears exactly twice: once positively in ui′ (from the term +∑k>imik) and once negatively in uj′ (from the term −∑k<jmjk). Therefore, all masks cancel each other out in the final sum:
S′=i=1∑N(ui+j>i∑mij−j<i∑mji)=i=1∑Nui+i=1∑Nj>i∑mij−i=1∑Nj<i∑mji(modM)Since every mij appears once positively and once negatively, the sum simplifies to:
S′=i=1∑Nui=S(modM)The server obtains the exact sum S without ever seeing any individual ui.
Interaction flow for secure aggregation using additive secret sharing. Clients establish pairwise secrets (dashed lines), mask their updates locally, and send masked updates (blue arrows) to the server. The server sums these, and the masks cancel out, revealing only the aggregate sum (yellow arrow).
This additive sharing scheme provides security against an honest-but-curious server. The server follows the protocol correctly but might try to infer information from the messages it receives (the ui′). Since ui′ is effectively ui plus a sum/difference of random values unknown to the server (as each mij involves a client j=i), ui′ reveals no information about ui to the server, assuming the masks are cryptographically random.
However, this basic scheme has limitations:
Shamir's Secret Sharing (SSS) is another foundational technique adaptable for SMC. In (t,n)-SSS, a secret is split into n shares such that any t shares can reconstruct the secret, but t−1 shares reveal nothing. This can be used for aggregation by having clients share their updates using SSS. Aggregation can be performed on the shares (due to the homomorphic properties of polynomial interpolation used in SSS). SSS provides inherent robustness against up to n−t dropouts (if t clients successfully submit shares) and security against collusion of up to t−1 parties. However, SSS typically involves more complex operations (polynomial evaluation/interpolation) compared to simple additive sharing.
Secure Multi-Party Computation offers a powerful set of tools for achieving strong privacy during the aggregation phase of federated learning. While introducing overhead and complexity, protocols based on secret sharing allow the server to compute the necessary aggregate model update without accessing the sensitive individual contributions from any participating client, addressing a significant privacy vulnerability in standard federated learning. Designing practical SMC-based FL systems involves carefully balancing security guarantees against computational and communication costs, and handling real-world issues like client dropouts.
© 2025 ApX Machine Learning