ShapleyValueEvaluator<T>

Models & Types · AiDotNet.FederatedLearning.Fairness

Exact Shapley value evaluator: computes each client’s marginal contribution across all coalitions.

Inheritance: FederatedLearningComponentBase<T> → ShapleyValueEvaluator<T>

Implements: IClientContributionEvaluator<T>

For Beginners

The Shapley value (from game theory, Nobel Prize 2012) is the fairest way to divide credit among participants. It answers: “On average, how much does each client improve the model when added to any possible subset of other clients?”

How It Works

How it works:

Warning: Exact Shapley requires evaluating 2^N coalitions, making it impractical for more than ~15 clients. Use DataShapleyEvaluator for larger federations.

Constructors

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

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)