SecureAggregationOptions

Options & Configuration · AiDotNet.Models.Options

Configuration options for secure aggregation in federated learning (Bonawitz et al. 2017).

Inheritance: ModelOptions → SecureAggregationOptions

For Beginners

Secure aggregation hides each client’s update from the server so the server can only see the final combined result. These options pick how many clients must stay connected for a round to succeed and how precisely model values are represented while they are masked. The defaults work for typical models; change them only if your parameters exceed ClipBound in magnitude or you need more precision.

How It Works

Reference: K. Bonawitz, V. Ivanov, B. Kreuter, A. Marcedone, H. B. McMahan, S. Patel, D. Ramage, A. Segal and K. Seth, “Practical Secure Aggregation for Privacy-Preserving Machine Learning”, ACM CCS 2017 (honest-but-curious version).

Client updates are fixed-point encoded into the ring Z_R, R = 2^BitWidth, masked with pairwise and self masks that cancel exactly in modular arithmetic, and the server recovers the exact sum of the survivors’ encodings as long as at least ReconstructionThreshold clients complete every round.

Model size: the masked vector has one ring element per model parameter, so each client sends 8 * parameterCount bytes per round at the default 64-bit width, plus O(n) key shares; mask expansion costs one PRG stream of that length per pair of clients. The parameter count does not affect the overflow bound, but the client count does: n * round(ClipBound * 2^FractionalBits) must stay below 2^(BitWidth-1), so the defaults (64 bits, 24 fractional bits, clip 65536) fit fewer than 2^23 clients. For more clients, lower ClipBound or FractionalBits.

Constructors

Constructor Summary
SecureAggregationOptions() Initializes a new instance with the defaults: disabled, full participation, the default encoding.
SecureAggregationOptions(SecureAggregationOptions other) Initializes a new instance by copying every setting from another instance.

Properties

Property Summary
ISecureAggregationPrg Prg { get; set; } Gets or sets the pseudorandom generator that expands mask seeds.
SecureAggregationMode Mode { get; set; } Gets or sets which secure aggregation mode is used.
bool Enabled { get; set; } Gets or sets whether secure aggregation is enabled.
double ClipBound { get; set; } Gets or sets the clipping bound C: each (weighted) parameter is clipped to [-C, C] before encoding.
int BitWidth { get; set; } Gets or sets the ring bit width b; masked values live in Z_R with R = 2^b.
int FractionalBits { get; set; } Gets or sets the number of fractional bits f of the fixed-point encoding (scale 2^f).
int ReconstructionThreshold { get; set; } Gets or sets the Shamir threshold t used by ThresholdDropoutResilient.