GraphNeighborhoodPrivacy<T>

Models & Types · AiDotNet.FederatedLearning.Graph

Applies local differential privacy (LDP) to neighborhood queries to prevent topology leakage.

Inheritance: FederatedLearningComponentBase<T> → GraphNeighborhoodPrivacy<T>

For Beginners

GNN embeddings encode information about a node’s neighborhood structure. If shared naively, an adversary could reconstruct the local graph topology. This class adds calibrated noise to neighborhood aggregations before they leave a client, ensuring that individual edges cannot be inferred from the shared embeddings.

How It Works

Mechanism:

Privacy guarantee: (epsilon, delta)-differential privacy for individual edges. Lower epsilon = stronger privacy but more noise.

Constructors

Constructor Summary
GraphNeighborhoodPrivacy(double epsilon, double delta, double sensitivity) Initializes a new instance of GraphNeighborhoodPrivacy.

Methods

Method Summary
Tensor<T> ClipAndNoiseNeighborhood(Tensor<T> aggregatedFeatures, double clipNorm) Clips and adds noise to an aggregated neighborhood feature vector.
Tensor<T> PrivatizeEmbeddings(Tensor<T> embeddings, int embeddingDim) Adds calibrated Gaussian noise to node embeddings to protect neighborhood structure.
bool RandomizedResponseEdge(bool edgeExists) Applies randomized response to edge existence queries.
double[] PerturbDegrees(int[] degrees) Perturbs node degree information with Laplace noise.