public class GNNMiner extends SocialGraphMiner
SocialGraphMiner
based on
a Graph Neural Network (GNN) architecture. Its parameters can be adjusted using a number of
setter methods.SocialGraphMiner.InteractionType, SocialGraphMiner.SocialGraphMinerParameters
Constructor | Description |
---|---|
GNNMiner(eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork contextualEgoNetwork) |
Instantiates a
GNNMiner on a given contextual ego network. |
Modifier and Type | Method | Description |
---|---|---|
SocialGraphMiner.SocialGraphMinerParameters |
constructModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction) |
|
double |
getConfidence(eu.h2020.helios_social.core.contextualegonetwork.Context context) |
|
void |
newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction,
SocialGraphMiner.SocialGraphMinerParameters params,
SocialGraphMiner.InteractionType interactionType) |
|
double |
predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context,
eu.h2020.helios_social.core.contextualegonetwork.Node destinationNode) |
Predicts the weight of performing a SEND interaction between the given context's ego and a destination node
within a given context.
|
double |
predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context,
eu.h2020.helios_social.core.contextualegonetwork.Node u,
eu.h2020.helios_social.core.contextualegonetwork.Node v) |
|
GNNMiner |
setDeniability(double plausibleDeniability,
double differentialPrivacy) |
Enables plausible deniability and differential privacy handling by permuting the ego and its alter's parameters
with a random noise proportional to a given constant and their norm.
|
GNNMiner |
setEdgePointsLearningMultiplier(double incomming,
double outgoing) |
|
GNNMiner |
setEmbeddingExchangeProtocol(EmbeddingExchangeProtocol embeddingExchangeProtocol) |
|
GNNMiner |
setLearningRate(double learningRate) |
The learning rate (default is 1) from which GNNMiner training starts.
|
GNNMiner |
setLearningRateDegradation(double learningRateDegradation) |
Performs a fixed degradation of the learning rate over training epochs by multiplying the latter
with a given factor (default is 0.95) after each epoch.
|
GNNMiner |
setMaxTrainingEpoch(int maxEpoch) |
Limits the number of training epochs (default is 1000) over which to
train the GNNMiner.
|
GNNMiner |
setMinTrainingRelativeLoss(double convergenceRelativeLoss) |
When the GNNMiner is being trained, training stops at epochs where
abs(previous epoch loss - this epoch loss) < convergenceRelativeLoss*(this epoch loss)
where losses are weighted cross entropy ones.
|
GNNMiner |
setRegularizationAbsorbsion(double regularizationAbsorbsion) |
Multiplies regularization tensors with this value before setting them as regularization;
value of 1 (default) produces regularization of calculated alter embeddings towards the
embeddings calculated on alter devices.
|
GNNMiner |
setRegularizationWeight(double regularizationWeight) |
The regularization weight (default 0.1) to apply during training of the GNNMiner.
|
GNNMiner |
setSpectralAlignment(boolean enableSpectralAlignment) |
Faster convergence to more robust embeddings of evolving user preferences by trying to align
the dimensions of received embeddings towards with their locally understood spectral representation (default
is false).
|
GNNMiner |
setTrainingExampleDegradation(double trainingExampleDegradation) |
Degrades example weights each time a new one is generated through
SocialGraphMiner.newInteraction(eu.h2020.helios_social.core.contextualegonetwork.Interaction, java.lang.String, eu.h2020.helios_social.modules.socialgraphmining.SocialGraphMiner.InteractionType) by calling
ContextTrainingExampleData.degrade(double, double) to multiply previous weights with the given degradation factor
(default is 0.5). |
GNNMiner |
setTrainingExamplePropagation(boolean enableTrainingExamplePropagation) |
Sets whether to propagate training examples to communicating devices (this behavior is de-activeated by default).
|
GNNMiner |
setTrainingExampleRemovalThreshold(double trainingExampleRemovalThreshold) |
Sets the threshold weight at which old training examples are removed (default is 0.1).
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContextualEgoNetwork, getModelParameterObject, getModelParameters, newInteraction, recommendInteractions, setSendPermision
public GNNMiner(eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork contextualEgoNetwork)
GNNMiner
on a given contextual ego network.contextualEgoNetwork
- The contextual ego network on which the miner runs and stores information.public GNNMiner setLearningRate(double learningRate)
SocialGraphMiner.newInteraction(eu.h2020.helios_social.core.contextualegonetwork.Interaction, java.lang.String, eu.h2020.helios_social.modules.socialgraphmining.SocialGraphMiner.InteractionType)
from this value and can be potentially be adapted by
setLearningRateDegradation(double)
over training epochs.learningRate
- The learning rate to restart from. Should be positive.this
GNNMiner instance.GNNNodeData.setLearningRate(double)
public GNNMiner setEmbeddingExchangeProtocol(EmbeddingExchangeProtocol embeddingExchangeProtocol)
public GNNMiner setEdgePointsLearningMultiplier(double incomming, double outgoing)
public GNNMiner setLearningRateDegradation(double learningRateDegradation)
learningRateDegradation
- The rate at which learning rate degrade. Should lie in the range (0,1].this
GNNMiner instance.setLearningRate(double)
public GNNMiner setRegularizationWeight(double regularizationWeight)
regularizationWeight
- The regularization weight to set.this
GNNMiner instance.GNNNodeData.setRegularizationWeight(double)
,
setRegularizationAbsorbsion(double)
public GNNMiner setRegularizationAbsorbsion(double regularizationAbsorbsion)
setRegularizationWeight(double)
.regularizationAbsorbsion
- A value in the range [0,1].this
GNNMiner instance.public GNNMiner setMaxTrainingEpoch(int maxEpoch)
maxEpoch
- The maximum epoch at which to train.this
GNNMiner instance.public GNNMiner setMinTrainingRelativeLoss(double convergenceRelativeLoss)
convergenceRelativeLoss
- The relative loss at which to stop training.this
GNNMiner instance.public GNNMiner setTrainingExampleDegradation(double trainingExampleDegradation)
SocialGraphMiner.newInteraction(eu.h2020.helios_social.core.contextualegonetwork.Interaction, java.lang.String, eu.h2020.helios_social.modules.socialgraphmining.SocialGraphMiner.InteractionType)
by calling
ContextTrainingExampleData.degrade(double, double)
to multiply previous weights with the given degradation factor
(default is 0.5).trainingExampleDegradation
- The factor with which to multiply each 8previous example weightthis
GNNMiner instance.setTrainingExampleRemovalThreshold(double)
public GNNMiner setTrainingExampleRemovalThreshold(double trainingExampleRemovalThreshold)
setTrainingExampleDegradation(double)
remains constant throughout training iterations, training examples are removed if
degradation^n < trainingExampleRemovalThreshold
where n the number of (positive) examples provided after the examined one with SocialGraphMiner.newInteraction(eu.h2020.helios_social.core.contextualegonetwork.Interaction, java.lang.String, eu.h2020.helios_social.modules.socialgraphmining.SocialGraphMiner.InteractionType)
.trainingExampleRemovalThreshold
- The weight threshold at which to remove GNN training examples which is passed as
the second argument to ContextTrainingExampleData.degrade(double, double)
calls.this
GNNMiner instance.public GNNMiner setDeniability(double plausibleDeniability, double differentialPrivacy)
plausibleDeniability
- The permutation of the ego's parameters.differentialPrivacy
- The permutation of the neighbor's parameters.this
GNNMiner instance.public GNNMiner setTrainingExamplePropagation(boolean enableTrainingExamplePropagation)
setDeniability(double, double)
.enableTrainingExamplePropagation
- Whether to propagate training examples or not.this
GNNMiner instance.public GNNMiner setSpectralAlignment(boolean enableSpectralAlignment)
enableSpectralAlignment
- Whether to enable spectral alignment of learned embeddings between devices.this
GNNMiner instance.public void newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction, SocialGraphMiner.SocialGraphMinerParameters params, SocialGraphMiner.InteractionType interactionType)
newInteractionParameters
in class SocialGraphMiner
public double getConfidence(eu.h2020.helios_social.core.contextualegonetwork.Context context)
public SocialGraphMiner.SocialGraphMinerParameters constructModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction)
public double predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context, eu.h2020.helios_social.core.contextualegonetwork.Node u, eu.h2020.helios_social.core.contextualegonetwork.Node v)
public double predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context, eu.h2020.helios_social.core.contextualegonetwork.Node destinationNode)
SocialGraphMiner
predictNewInteraction
in class SocialGraphMiner
context
- The context in which to perform the prediction.destinationNode
- The destination node of the interaction.