pub struct SecureAggregationConfig {
pub num_clients: usize,
pub gradient_dim: usize,
pub round_seed: u64,
pub quantization_scale: f64,
pub modulus: i64,
pub support_dropouts: bool,
}Expand description
Configuration for the Bonawitz-style secure aggregation protocol.
All clients in a round must agree on the same configuration so that the
derived pairwise masks line up. The round_seed field acts as a public
salt that lets the same fleet of clients run independent aggregation
rounds (different round_seeds produce independent pairwise masks).
Fields§
§num_clients: usizeTotal number of clients expected to participate in the round.
gradient_dim: usizeDimensionality of the gradient vectors being aggregated.
round_seed: u64Public, per-round salt mixed into every pairwise seed derivation.
quantization_scale: f64Quantisation scale. Gradients are quantised by round(g * scale)
before being lifted into the modular group; a larger scale gives
finer fixed-point precision at the cost of needing a larger modulus
to avoid wraparound.
modulus: i64Modulus p of the additive group Z_p used for masking and
aggregation. Must be substantially larger than
quantization_scale * num_clients * max_gradient_magnitude to
avoid information-destroying wraparound.
support_dropouts: boolWhether to support dropout reconstruction at the server.
Trait Implementations§
Source§impl Clone for SecureAggregationConfig
impl Clone for SecureAggregationConfig
Source§fn clone(&self) -> SecureAggregationConfig
fn clone(&self) -> SecureAggregationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecureAggregationConfig
impl Debug for SecureAggregationConfig
Source§impl Default for SecureAggregationConfig
impl Default for SecureAggregationConfig
Source§impl<'de> Deserialize<'de> for SecureAggregationConfig
impl<'de> Deserialize<'de> for SecureAggregationConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SecureAggregationConfig
impl RefUnwindSafe for SecureAggregationConfig
impl Send for SecureAggregationConfig
impl Sync for SecureAggregationConfig
impl Unpin for SecureAggregationConfig
impl UnsafeUnpin for SecureAggregationConfig
impl UnwindSafe for SecureAggregationConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.