FederatedAdvancedCapabilities<T>

Models & Types · AiDotNet.FederatedLearning

Drives the advanced federated-learning capabilities (contribution, fairness, drift, PSI, TEE, ZK, MPC, unlearning) at their real points in the federated training lifecycle, on behalf of the trainer, and collects their results into a FederatedAdvancedMetadata.

How It Works

Isolating this from the trainer keeps the training loop small: the trainer accumulates per-round client parameters and calls a handful of hooks; all capability-specific logic lives here and is unit-testable with the real capability implementations. Every capability is optional; the coordinator no-ops for the ones that were not configured.

Constructors

Constructor Summary
FederatedAdvancedCapabilities(IClientContributionEvaluator<T> contribution, IFairnessConstraint<T> fairness, IFederatedDriftDetector<T> drift, IFederatedUnlearner<T> unlearner, ITeeProvider<T> tee, IZkProofSystem zk, ISecureComputationProtocol<T> mpc, IPrivateSetIntersection psi) Creates a coordinator over the configured capabilities (any may be null).

Properties

Property Summary
bool AnyConfigured { get; } Whether any advanced capability is configured (so the trainer can skip the hooks entirely).

Methods

Method Summary
FederatedAdvancedMetadata BuildMetadata() Returns the collected results.
ValueTuple<Vector<T>, UnlearningCertificate>? UnlearnClient(int clientId, Vector<T> globalParameters) Removes a client’s contribution from the trained global model (GDPR right-to-be-forgotten), or null when no unlearner is configured or the client has no recorded history.
void Finalize(IReadOnlyDictionary<int, Vector<T>> finalClientParameters, Vector<T> globalParameters) Runs the end-of-training capabilities: client contribution and fairness evaluation.
void OnRoundComplete(int round, IReadOnlyDictionary<int, Vector<T>> clientParameters, Vector<T> globalParameters, IReadOnlyDictionary<int, double> clientLoss) Runs the per-round capabilities: drift detection, TEE attestation, ZK bound proof, and (once) MPC.
void RecordClientParameters(IReadOnlyDictionary<int, Vector<T>> clientParameters) Accumulates a round’s per-client parameters for later contribution/unlearning analysis.
void RunPrivateSetIntersection(IReadOnlyDictionary<int, IReadOnlyList<string>> clientIdentities) Runs PSI over per-client sample identities to report cross-client overlap (leakage/dedup signal).