Table of Contents

Class FederatedPersonalizationOptions

Namespace
AiDotNet.Models.Options
Assembly
AiDotNet.dll

Configuration options for personalized federated learning (PFL).

public sealed class FederatedPersonalizationOptions
Inheritance
FederatedPersonalizationOptions
Inherited Members

Remarks

For Beginners: Personalization means each client can end up with a model that works better for its own data, while still learning shared knowledge from other clients.

This options class controls which personalization algorithm is used (FedPer, FedRep, Ditto, pFedMe, clustered, etc.) and the key hyperparameters for those algorithms.

Properties

ClusterCount

Gets or sets the number of clusters used for clustered personalization.

public int ClusterCount { get; set; }

Property Value

int

DittoLambda

Gets or sets the Ditto regularization strength (lambda).

public double DittoLambda { get; set; }

Property Value

double

Remarks

Higher values keep personalized models closer to the current global model.

Enabled

Gets or sets whether personalization is enabled.

public bool Enabled { get; set; }

Property Value

bool

Remarks

If true and Strategy is not "None", the trainer applies a personalization algorithm.

LocalAdaptationEpochs

Gets or sets the number of extra local adaptation epochs applied after receiving the aggregated global model.

public int LocalAdaptationEpochs { get; set; }

Property Value

int

Remarks

For Beginners: This is an optional "fine-tune" step that can improve local performance. Set to 0 to disable.

PFedMeInnerSteps

Gets or sets the number of inner proximal steps for pFedMe (K).

public int PFedMeInnerSteps { get; set; }

Property Value

int

PFedMeMu

Gets or sets the pFedMe proximal strength (mu).

public double PFedMeMu { get; set; }

Property Value

double

PersonalizedParameterFraction

Gets or sets the fraction of parameters treated as "personalized" (not aggregated globally).

public double PersonalizedParameterFraction { get; set; }

Property Value

double

Remarks

For Beginners: Many PFL methods conceptually "split" a model into:

  • Shared parameters (learned collaboratively)
  • Personalized parameters (kept local per client or per cluster)

When using vector-based models, we approximate this by taking the last N% of the parameter vector.

Strategy

Gets or sets the personalization strategy name.

public string Strategy { get; set; }

Property Value

string

Remarks

Supported built-ins:

  • "None"
  • "FedPer"
  • "FedRep"
  • "Ditto"
  • "pFedMe"
  • "Clustered"