BNN-UPC / ignnition

Framework for fast prototyping of Graph Neural Networks
Apache License 2.0
51 stars 16 forks source link

Feature exists in dataset, but still it says not found. #130

Open itsUtkarsh2306 opened 1 week ago

itsUtkarsh2306 commented 1 week ago

I was trying to build a model where I was taking below model_descriptions.yaml `# Definition of the entities entities:

MiquelFerriol commented 1 week ago

Dear @itsUtkarsh2306,

The main issue seems to stem from how you're trying to initialize the state for the "path" entity. In your model_descriptions.yaml, you're assigning the state of the "path" entity using features like traffic, bandwidth, and latency. However, these features are properties of the edges (or links) between nodes, not the nodes themselves.

In IGNNITION (and most GNNs), the concept of an initial state is typically assigned to nodes rather than edges. This is because nodes are the entities that hold a hidden state, which gets updated during the message-passing process, while edges act as the relationships between nodes and usually don't maintain a hidden state on their own.

Possible Solutions:

  1. Transform Edges into Nodes: If you need the "path" to hold its own hidden state and evolve through the network, you could model the links (paths) as separate nodes in the graph, creating a bipartite or tripartite graph structure. This way, both your original nodes and the "path" nodes can store and update their own states.
  2. Use Edge Features: If you don't need to transform the edges into nodes but still want to use edge features, you can incorporate those edge features during the message-passing process in the GNN. You can include edge features like bandwidth, traffic, and latency as part of the computation when messages are passed between nodes.
itsUtkarsh2306 commented 1 week ago

Thanks for your response. I now understand that traffic, bandwidth, and latency are edge features. Could you please provide a sample that demonstrates how to incorporate these edge features into the message-passing process in a GNN? I'm still a bit unclear on that part. Additionally, it would be really helpful if you could provide a model_description.yaml file as an example for building a model focused on edge delay prediction.