IVerticalParty<T>
Interfaces · AiDotNet.FederatedLearning.Vertical
Represents a party in vertical federated learning that holds a subset of features.
Known implementations: VerticalPartyClient<T>, VerticalPartyLabelHolder<T>
For Beginners
In vertical FL, each party holds different features (columns) for the same entities (rows). For example, a bank has income and credit score columns, while a hospital has diagnosis and prescription columns. Each party runs a local “bottom model” on its features to produce an embedding (a compressed representation).
How It Works
The party interface abstracts away the local computation: the VFL trainer asks each party to compute forward passes on its local data and backward passes using gradients received from the coordinator.
Properties
| Property | Summary |
|---|---|
bool IsLabelHolder { get; } |
Gets whether this party holds the labels for supervised learning. |
int EmbeddingDimension { get; } |
Gets the output dimension of this party’s bottom model (embedding size). |
int FeatureCount { get; } |
Gets the number of features held by this party. |
string PartyId { get; } |
Gets the unique identifier for this party. |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<Tensor<T>> GetParameters() |
Gets the current parameters of this party’s bottom model for checkpointing. |
IReadOnlyList<string> GetEntityIds() |
Gets the entity IDs that this party has data for. |
Tensor<T> ComputeForward(IReadOnlyList<int> alignedIndices) |
Computes the forward pass of this party’s bottom model on the given entity indices. |
void ApplyBackward(Tensor<T> gradients, double learningRate) |
Applies the backward pass using gradients received from the coordinator. |
void SetParameters(IReadOnlyList<Tensor<T>> parameters) |
Sets the parameters of this party’s bottom model (for loading checkpoints or unlearning). |