SplitNeuralNetwork<T>

Models & Types ยท AiDotNet.FederatedLearning.Vertical

Implements a split neural network for vertical federated learning.

Inheritance: FederatedLearningComponentBase<T> โ†’ SplitNeuralNetwork<T>

Implements: ISplitModel<T>

For Beginners

In VFL, the neural network is split into two parts:

How It Works

The top model is a simple multi-layer perceptron (MLP) that takes the aggregated embeddings as input and produces predictions.

Aggregation modes: Party embeddings can be combined via concatenation (default), element-wise sum, attention weighting, or learned gating.

Constructors

Constructor Summary
SplitNeuralNetwork(int numberOfParties, int embeddingDimensionPerParty, int outputDimension, SplitModelOptions options, int? seed) Initializes a new instance of SplitNeuralNetwork.

Properties

Property Summary
VflAggregationMode AggregationMode { get; }
int NumberOfParties { get; }

Methods

Method Summary
IReadOnlyList<Tensor<T>> BackwardTopModel(Tensor<T> lossGradient, IReadOnlyList<Tensor<T>> partyEmbeddings)
IReadOnlyList<Tensor<T>> GetTopModelParameters()
Tensor<T> AggregateEmbeddings(IReadOnlyList<Tensor<T>> partyEmbeddings)
Tensor<T> ForwardTopModel(Tensor<T> combinedEmbeddings)
void SetTopModelParameters(IReadOnlyList<Tensor<T>> parameters)
void UpdateFromGradient(Tensor<T> lossGradient, double learningRate) Updates the top model parameters given the loss gradient.
void UpdateTopModelParameters(double learningRate)