ISplitModel<T>
Interfaces · AiDotNet.FederatedLearning.Vertical
Represents a split neural network for vertical federated learning.
Known implementations: SplitNeuralNetwork<T>
For Beginners
A split neural network is divided into two parts:
How It Works
The “split point” is where the network is divided. Below the split, computation is local and private. Above the split, computation uses combined information from all parties.
During training, forward passes flow upward (bottom -> top) and gradients flow downward (top -> bottom). Only the embeddings and their gradients cross party boundaries, never the raw features.
Properties
| Property | Summary |
|---|---|
VflAggregationMode AggregationMode { get; } |
Gets the aggregation mode used to combine party embeddings. |
int NumberOfParties { get; } |
Gets the number of parties this split model is configured for. |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<Tensor<T>> BackwardTopModel(Tensor<T> lossGradient, IReadOnlyList<Tensor<T>> partyEmbeddings) |
Computes the top model backward pass and returns gradients for each party’s embedding. |
IReadOnlyList<Tensor<T>> GetTopModelParameters() |
Gets the current parameters of the top model for checkpointing. |
Tensor<T> AggregateEmbeddings(IReadOnlyList<Tensor<T>> partyEmbeddings) |
Aggregates embeddings from multiple parties according to the configured aggregation mode. |
Tensor<T> ForwardTopModel(Tensor<T> combinedEmbeddings) |
Computes the top model forward pass on the combined embeddings. |
void SetTopModelParameters(IReadOnlyList<Tensor<T>> parameters) |
Sets the top model parameters (for loading checkpoints or unlearning). |
void UpdateTopModelParameters(double learningRate) |
Updates the top model parameters using the computed gradients. |