Secure aggregation in federated learning is a cryptographic method that allows a server to combine model updates without reading each participant's individual update. Instead of exposing local gradients or model parameters, clients protect their contributions through masking or other cryptographic techniques. The server recovers the combined result, while individual updates remain confidential under the protocol's security assumptions.
This protection addresses a critical weakness in Federated Learning: keeping raw training data on local devices does not automatically prevent sensitive information from leaking through model updates. Secure aggregation adds protection at the point where those updates leave the clients and enter the shared training process.
How Secure Aggregation Works
Secure aggregation changes how the server receives and combines local model updates.
In ordinary federated training, each client computes an update using its private dataset and sends that update to the aggregation server. The server can inspect each contribution before calculating the global result.
With secure aggregation, clients protect their updates before transmission. The server receives protected contributions and follows a cryptographic protocol to recover their combined value.
A typical training round follows this process:
Client selection: The server establishes the participating clients and distributes the current global model.
Cryptographic setup: Participants establish the keys and protected information needed for aggregation.
Local training: Each client trains the model using its private dataset.
Update masking: Clients apply cryptographic masks to their model updates.
Protected transmission: Masked updates are submitted to the aggregation server.
Secure summation: The protocol removes the combined masking effect and reveals the aggregate.
Global model update: The server uses the recovered aggregate to update the shared model.
The server does not need to recover each client's original update to calculate the combined result.
The design becomes clearer when the masking process is examined directly.
Pairwise Masking
Pairwise masking uses shared random values between participating clients.
Each pair generates a common mask. One participant adds the mask to its update, while the other subtracts the same value.
When the server combines the protected updates, the paired masks cancel.
The original sum remains available, but the individual contributions are concealed.
In a real protocol, clients generate cryptographic masks from shared secrets using secure key establishment and pseudorandom generation. The protection depends on those secrets remaining unavailable to unauthorized parties.
Secure Aggregation Numerical Example
Consider three clients training a shared prediction model.
Their original updates for one model parameter are:
Client A: 4
Client B: 7
Client C: 9
Without secure aggregation, the server receives these three values directly.
Now consider three pairwise masks:
Client A and Client B share a mask of 6. Client A adds 6, and Client B subtracts 6.
Client A and Client C share a mask of 2. Client A subtracts 2, and Client C adds 2.
Client B and Client C share a mask of 5. Client B adds 5, and Client C subtracts 5.
After applying the masks, the transmitted values become:
Client A: 4 + 6 − 2 = 8
Client B: 7 − 6 + 5 = 6
Client C: 9 + 2 − 5 = 6
The server calculates:
8 + 6 + 6 = 20
The original updates also total 20.
The server can therefore calculate the average:
20 ÷ 3 = 6.67
The masking process preserves the aggregate without directly revealing the original values of 4, 7, and 9.
This example illustrates mask cancellation. Production protocols operate on model parameter vectors and use cryptographic keys, finite arithmetic, and recovery procedures rather than publicly known numerical masks.
Privacy Protection in Secure Aggregation
The most important distinction in a secure aggregation system is between protecting individual contributions and protecting the information revealed by their combined result.
A server still needs certain information to coordinate training. Hiding model updates does not automatically conceal participation records, message timing, or the resulting global model.
The following table shows what a coordinator can access in a correctly configured secure aggregation system.

If an aggregation group contains too few independent contributors, the combined result can reveal substantial information about individual participants.
This becomes particularly important in institutional federations, where the number of contributing organizations is limited.
A secure design must therefore consider both cryptographic protection and the information that legitimate outputs reveal.
Secure Aggregation Protocols
Secure aggregation is a family of cryptographic protocols rather than one universal algorithm.
The protocols share a common objective: computing a combined result without exposing the individual inputs required to produce it.
Their differences involve key management, communication requirements, resistance to participant dropout, and security assumptions.
SecAgg and SecAgg+
SecAgg is a foundational secure aggregation protocol introduced in research by Bonawitz and collaborators.
It combines cryptographic masking with secret sharing to protect individual contributions while supporting aggregation when participants disconnect.
SecAgg+ builds on this approach with a more efficient participant communication structure.
In Flower, both protocols are supported through dedicated aggregation workflows.
The SecAgg+ workflow coordinates cryptographic setup, key sharing, collection of masked vectors, and the final unmasking process.
Its configuration includes parameters controlling secret shares and the reconstruction threshold.
These parameters are important because they determine which recovery operations the protocol can complete and under what participation conditions.
Secret Sharing
Secret sharing divides protected information into separate pieces called shares.
A threshold sharing scheme allows a secret to be reconstructed only when a sufficient number of valid shares are available.
In secure aggregation, this mechanism supports controlled recovery of cryptographic material required to complete an aggregation round.
Individual clients do not need to reveal their original training updates for the server to recover the permitted aggregate.
The threshold and recovery rules must be selected together with the system's privacy assumptions.
Homomorphic Encryption
Homomorphic encryption provides another cryptographic approach to protecting model updates during aggregation.
It allows supported calculations to be performed on encrypted values without exposing their underlying plaintext.
For additive aggregation, encrypted contributions can be combined into an encrypted sum.
The system then needs an authorized mechanism to decrypt the combined result without making individual contributions available.
This requires an appropriate key management and decryption arrangement.
Homomorphic encryption is an alternative building block for protected aggregation, not a requirement of every SecAgg protocol.
The appropriate design depends on the participating entities, cryptographic trust assumptions, available computing resources, and required operations.
Client Dropout and Secure Aggregation Reliability
A secure aggregation protocol must account for clients that stop participating after the cryptographic setup begins.
This creates a problem for pairwise masking.
Suppose Client A establishes a shared mask with Client B, but Client B disconnects before submitting its protected update.
Client A's contribution still contains the corresponding mask. Client B's matching contribution is absent.
The pair no longer cancels automatically during summation.
Without a recovery mechanism, the server cannot recover the intended aggregate from the remaining masked values.
Threshold Based Mask Recovery
Dropout resilient protocols address this problem through secret sharing and controlled mask recovery.
Before aggregation, clients distribute protected shares of the cryptographic material needed for recovery.
When a participant disconnects, the remaining eligible clients can provide the required recovery shares.
If the protocol's threshold and security conditions are satisfied, the coordinator can remove the unmatched masking contributions and calculate the aggregate of the surviving participants.
The recovery mechanism must distinguish between clients that submitted valid masked updates and clients that disconnected before contributing.
Otherwise, recovering the wrong cryptographic material could compromise an individual contribution.
Participation Thresholds
The minimum number of participating clients affects both privacy and reliability.
A threshold that is too restrictive can cause training rounds to fail when participants disconnect.
A threshold that permits insufficient independent participation can weaken the privacy protection provided by aggregation.
The correct configuration must satisfy the chosen protocol's threat model and the federation's expected participation conditions.
This is particularly important for device populations with changing connectivity and institutional collaborations with a small number of known participants.
Secure Aggregation vs Differential Privacy
Secure aggregation and differential privacy protect different parts of the learning process.
Secure aggregation protects individual model updates while they are being combined.
Differential privacy limits how much information the released result can reveal about individual training records or participants, according to a defined privacy guarantee.
Consider a server that receives a securely aggregated model update from thousands of devices.
The server cannot directly inspect the individual protected contributions under the protocol's security assumptions.
However, the resulting model can still contain information learned from its training data.
Secure aggregation alone does not establish a formal guarantee against that information being inferred from the trained model.
Differential privacy addresses this separate concern by introducing carefully calibrated randomness into a computation.
In federated training, a properly designed system can combine differential privacy with secure aggregation.
Clients contribute protected updates, while the training procedure enforces a defined privacy budget for the released model.
The two techniques are complementary, but their guarantees depend on the actual implementation and threat model.
Security Limitations of Secure Aggregation
A secure aggregation system should be evaluated according to what its protocol guarantees, not simply whether it uses encryption.
Several security concerns remain outside the confidentiality of individual updates.
Client Collusion
Secure aggregation protocols define how many participants can cooperate with an adversary before their security guarantees fail.
If an attacker controls the server and enough participating clients to violate the protocol's threshold assumptions, the confidentiality of other contributions can be compromised.
The relevant security question is therefore not just whether messages are masked.
It is whether the protocol remains secure against the number and type of compromised participants included in its threat model.
Malicious Model Updates
Secure aggregation conceals individual updates. It does not automatically establish that those updates are accurate or trustworthy.
A malicious participant can submit a manipulated contribution designed to influence the global model.
Because the server does not inspect the unmasked individual updates, conventional checks that depend on viewing each contribution cannot be applied unchanged.
Protecting confidentiality and defending against model poisoning require compatible but distinct security mechanisms.
Aggregation Integrity
Confidentiality also does not guarantee that a server calculated the correct aggregate.
A malicious coordinator can attempt to omit contributions, manipulate protocol messages, or return an incorrect result.
Protocols that require verifiable aggregation introduce additional mechanisms for checking the integrity of the computation.
The implementation should distinguish protection against an observer from protection against a participant who actively deviates from the protocol.
Communication and Computation Costs
Secure aggregation requires additional operations beyond ordinary model averaging.
These include cryptographic key establishment, protected message exchange, mask generation, and recovery communication.
The exact overhead depends on the protocol, number of clients, model dimensions, and dropout conditions.
For resource constrained devices, communication volume and computational requirements affect the practicality of deployment.
For institutional federations, the more important consideration can be whether the participating organizations support the required key management and coordination procedures.
Security requirements and operational requirements must be evaluated together.
Secure Aggregation in Practical Federated Systems
Secure aggregation becomes valuable when a project needs collaborative training but cannot allow the coordinator to inspect individual model updates.
A mobile keyboard prediction system provides one example.
Devices train on locally generated text interaction data. Secure aggregation allows the system to combine protected updates without exposing each participating device's original contribution to the coordinator.
Healthcare collaborations offer another application.
Hospitals can participate in shared model training while preserving the confidentiality of individual institutional updates.
However, the smaller participant population requires particular attention to the information revealed by each aggregate.
The practical evaluation should establish:
Protected information: Identify the model updates and metadata that require confidentiality.
Threat model: Define the capabilities of the server and compromised participants.
Minimum participation: Establish the required number of independent contributors.
Dropout tolerance: Test recovery under the expected failure conditions.
Aggregation correctness: Verify the combined result against an authorized reference computation.
Performance requirements: Measure communication, computational cost, and training completion rates.
Testing should include both successful aggregation and controlled failures.
A protocol that returns the correct aggregate under ideal conditions has not demonstrated resilience to disconnections, malicious behavior, or a compromised coordination environment.
The security assessment is complete only when the implementation is evaluated against its declared assumptions and operating conditions.
Final Thoughts
Secure aggregation in federated learning protects individual model updates by allowing participants to contribute to a shared computation without revealing their original values to the aggregation server.
Pairwise masking, secret sharing, and dropout recovery make this possible while preserving the combined result required for model training.
The technology provides a defined form of input privacy, not complete protection against every information disclosure or security attack.
An effective implementation must account for participant selection, cryptographic assumptions, aggregation integrity, and the privacy of the resulting model.
FAQ
Can we use secure aggregation with just two hospitals?
A protocol can calculate the protected sum of two contributions, but confidentiality against either participating hospital is limited. If one hospital knows its own update and learns the exact aggregate, it can calculate the other hospital's contribution. Meaningful privacy against such inference requires an appropriate participant population or additional protections.
Does secure aggregation work with floating point model weights?
Yes. Protocols operating over finite integer fields encode floating point model values through quantization or fixed precision representations. The implementation must choose scaling, precision, and modulus parameters that preserve the required numerical accuracy and prevent unintended arithmetic overflow.
Can we find out which client sent a bad model update?
Not by directly inspecting individual updates under standard secure aggregation. Identifying invalid contributions requires additional mechanisms, such as authenticated submissions, cryptographic validity proofs, or privacy compatible verification procedures. These mechanisms must preserve the confidentiality guarantees of the aggregation protocol.
Can different clients use different model architectures?
Standard secure aggregation of parameter vectors requires compatible vector dimensions and encoding. Clients using incompatible model architectures need an agreed transformation, shared parameter representation, or a different collaborative training design before their contributions can be securely combined.
Can we reuse the same masks in every training round?
Reusing masking material without an approved cryptographic design can reveal relationships between protected updates. Secure aggregation implementations must follow their protocol's requirements for key derivation, randomness, and separation between training rounds. Cryptographic material should not be reused outside those specified rules.
Seen first.



