GraphNodeGenerator<T>

Models & Types · AiDotNet.FederatedLearning.Graph

Generates pseudo-node features for missing cross-client neighbors using a learned model.

Inheritance: FederatedLearningComponentBase<T> → GraphNodeGenerator<T>

For Beginners

When a GNN on Client A needs features from a node on Client B (a cross-client neighbor), it can’t directly access them. This generator learns to produce realistic pseudo-node features based on the local graph structure:

How It Works

Training: The generator is trained locally on each client using known edges — it learns to predict a node’s features from its neighbors’ features. Then it’s used to predict features for missing (cross-client) neighbors.

Homophily assumption: Works best on homophilic graphs where connected nodes tend to have similar features (social networks, citation networks). Less effective on heterophilic graphs.

Constructors

Constructor Summary
GraphNodeGenerator(int featureDim, int hiddenDim, double learningRate) Initializes a new instance of GraphNodeGenerator.

Properties

Property Summary
bool IsTrained { get; } Gets a value indicating whether the generator has been trained.

Methods

Method Summary
Tensor<T> Generate(Tensor<T> borderNodeFeatures) Generates a pseudo-node feature vector for a missing cross-client neighbor.
void Train(Tensor<T> adjacency, Tensor<T> nodeFeatures, int featureDim, int epochs) Trains the generator on known node-neighbor pairs from the local subgraph.