PrototypicalContributionEvaluator<T>

Models & Types · AiDotNet.FederatedLearning.Fairness

Prototypical contribution evaluator: measures client value using prototype representations.

Inheritance: FederatedLearningComponentBase<T> → PrototypicalContributionEvaluator<T>

Implements: IClientContributionEvaluator<T>

For Beginners

Instead of expensive Shapley value computation (which requires testing many model combinations), this method uses a shortcut: compare what each client “knows” (represented as prototype vectors — like a summary of their data) against the global model. Clients whose prototypes align well with the global direction but also bring unique information score highest.

How It Works

How it works:

Advantage: Constant cost per round O(N * D), where N = clients, D = model size. Much cheaper than Shapley for large federations.

Constructors

Constructor Summary
PrototypicalContributionEvaluator(ContributionEvaluationOptions options) Initializes a new instance of PrototypicalContributionEvaluator.

Properties

Property Summary
string MethodName { get; }

Methods

Method Summary
Dictionary<int, double> EvaluateContributions(Dictionary<int, Tensor<T>> clientModels, Tensor<T> globalModel, Dictionary<int, List<Tensor<T>>> clientHistories)
HashSet<int> IdentifyFreeRiders(Dictionary<int, double> contributionScores)