FederatedLearningMetadata
Models & Types · AiDotNet.Models
Contains metadata and metrics about federated learning training progress and results.
How It Works
This class tracks various metrics throughout the federated learning process to help monitor training progress, diagnose issues, and evaluate model quality.
For Beginners: Metadata is like a training diary that records what happened during federated learning - how long it took, how accurate the model became, which clients participated, etc.
Think of this as a comprehensive training report containing:
- Performance metrics: Accuracy, loss, convergence
- Resource usage: Time, communication costs
- Participation: Which clients contributed
- Privacy tracking: Privacy budget consumption
For example, after training you might see:
- Total rounds: 50 (out of max 100)
- Final accuracy: 92.5%
- Training time: 2 hours
- Total clients participated: 100
- Privacy budget used: ε=5.0 (out of 10.0 total)
Constructors
| Constructor | Summary |
|---|---|
FederatedLearningMetadata() |
Properties
| Property | Summary |
|---|---|
Dictionary<int, double> CumulativeContributionScores { get; set; } |
Gets or sets the cumulative contribution scores across all rounds. |
FederatedAdvancedMetadata AdvancedCapabilities { get; set; } |
Results from the advanced federated capabilities configured via ConfigureFederatedLearning(...) (client contribution, fairness, drift, private-set-intersection, TEE attestation, zero-knowledge proofs, secure MPC, and unlearning readiness)… |
List<RoundMetadata> RoundMetrics { get; set; } |
Gets or sets the per-round detailed metrics. |
List<double> AccuracyHistory { get; set; } |
Gets or sets the history of accuracy values across all rounds. |
List<double> LossHistory { get; set; } |
Gets or sets the history of loss values across all rounds. |
List<int> IdentifiedFreeRiders { get; set; } |
Gets or sets the IDs of clients identified as free-riders. |
bool CompressionEnabled { get; set; } |
Gets or sets whether compression was enabled for client updates. |
bool Converged { get; set; } |
Gets or sets whether training converged before reaching maximum rounds. |
bool DifferentialPrivacyEnabled { get; set; } |
Gets or sets whether differential privacy was enabled. |
bool FairnessConstraintsEnabled { get; set; } |
Gets or sets whether fairness constraints were applied during training. |
bool HomomorphicEncryptionEnabled { get; set; } |
Gets or sets whether homomorphic encryption was enabled. |
bool MetaLearningEnabled { get; set; } |
Gets or sets whether federated meta-learning was enabled. |
bool PersonalizationEnabled { get; set; } |
Gets or sets whether personalization was enabled. |
bool SecureAggregationEnabled { get; set; } |
Gets or sets whether secure aggregation was enabled. |
bool UnlearningPerformed { get; set; } |
Gets or sets whether federated unlearning was performed. |
double AverageClientsPerRound { get; set; } |
Gets or sets the average number of clients selected per round. |
double AverageRoundTimeSeconds { get; set; } |
Gets or sets the average time per round in seconds. |
double FinalAccuracy { get; set; } |
Gets or sets the final global model accuracy on validation data. |
double FinalLoss { get; set; } |
Gets or sets the final global model loss value. |
double MetaLearningRateUsed { get; set; } |
Gets or sets the meta learning rate used by the server update rule. |
double PersonalizedParameterFraction { get; set; } |
Gets or sets the fraction of parameters treated as personalized for head-split strategies. |
double ReportedDelta { get; set; } |
Gets or sets the delta used when reporting ReportedEpsilonAtDelta. |
double ReportedEpsilonAtDelta { get; set; } |
Gets or sets the reported epsilon at the reported delta (when supported by the accountant). |
double TotalCommunicationMB { get; set; } |
Gets or sets the total communication cost in megabytes. |
double TotalPrivacyBudgetConsumed { get; set; } |
Gets or sets the total privacy budget (epsilon) consumed. |
double TotalPrivacyDeltaConsumed { get; set; } |
Gets or sets the total privacy delta consumed (basic composition reporting). |
double TotalTrainingTimeSeconds { get; set; } |
Gets or sets the total training time in seconds. |
int ConvergenceRound { get; set; } |
Gets or sets the round at which convergence was detected. |
int DriftDetectedRounds { get; set; } |
Gets or sets the number of rounds in which global drift was detected. |
int MetaLearningInnerEpochsUsed { get; set; } |
Gets or sets the inner (client) adaptation epochs used for meta-learning. |
int PersonalizationLocalAdaptationEpochs { get; set; } |
Gets or sets the number of post-aggregation local adaptation epochs (if configured). |
int RoundsCompleted { get; set; } |
Gets or sets the number of federated learning rounds completed. |
int SecureAggregationMinimumUploaderCountUsed { get; set; } |
Gets or sets the minimum uploader count used by secure aggregation (dropout-resilient modes). |
int SecureAggregationReconstructionThresholdUsed { get; set; } |
Gets or sets the reconstruction threshold used by secure aggregation (dropout-resilient modes). |
int TotalClientsParticipated { get; set; } |
Gets or sets the total number of clients that participated across all rounds. |
int UnlearningRequestsProcessed { get; set; } |
Gets or sets the number of unlearning requests processed. |
string AggregationStrategyUsed { get; set; } |
Gets or sets the aggregation strategy used during training. |
string AsyncModeUsed { get; set; } |
Gets or sets the asynchronous federated learning mode used (if any). |
string CompressionStrategyUsed { get; set; } |
Gets or sets the compression strategy used for client updates (if enabled). |
string DriftDetectionMethodUsed { get; set; } |
Gets or sets the drift detection method used. |
string FairnessConstraintUsed { get; set; } |
Gets or sets the fairness constraint type used. |
string HeterogeneityCorrectionUsed { get; set; } |
Gets or sets the heterogeneity correction method used (if any). |
string HomomorphicEncryptionModeUsed { get; set; } |
Gets or sets the HE mode used (HEOnly or Hybrid). |
string HomomorphicEncryptionProviderUsed { get; set; } |
Gets or sets the HE provider used. |
string HomomorphicEncryptionSchemeUsed { get; set; } |
Gets or sets the HE scheme used (CKKS or BFV). |
string MetaLearningStrategyUsed { get; set; } |
Gets or sets the federated meta-learning strategy used (Reptile/PerFedAvg/FedMAML). |
string Notes { get; set; } |
Gets or sets additional notes or observations about the training run. |
string PersonalizationStrategyUsed { get; set; } |
Gets or sets the personalization strategy used (FedPer, FedRep, Ditto, pFedMe, Clustered). |
string PrivacyAccountantUsed { get; set; } |
Gets or sets which privacy accountant was used for reporting. |
string SecureAggregationModeUsed { get; set; } |
Gets or sets which secure aggregation mode was used. |
string ServerOptimizerUsed { get; set; } |
Gets or sets the server-side federated optimizer used (FedOpt family). |
Fields
| Field | Summary |
|---|---|
string MetadataKey |
The recommended key for storing federated learning metadata inside Properties. |