[EXPERT ONLY] pytorch expert for Graph neural network message passing

Job ID: 36517933

Budget: $10 – $50 USD

run successfully,with test result in a reasonable range.

here is the GINEConv function defined by pytorch geometric: https://pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/nn/conv/gin_conv.html#GINEConv .

I want to change it . this base function is aggregate information from all source nodes to target nodes in graph.

But I need it only aggregate information from source nodes that are within a certain range dependent on the edge relation, and this range has to be trained.

For instance if edge relation is 1, then this function will aggregate information from k hop neighbours nodes, this k is an integer in range [1-7] which can be learned. edge relation can be 1,2,3.

The function will in the end explore and return the value what is the best for edge_relation 1 or 2 or 3 the corresponding k for message aggregate, like edge relation, it can aggregate within 2 hop nodes information and edge relation is 2 then can aggregate within 3 hop node information.

for instance, the message aggregation according to max_hop: {1: 3, 2:4, 3:5}.

Specifically, for nodes whose edge_relation is 1, the message of node will pass to other 1,2,3 hop away nodes, and this process using edge features (edge_attr).

for nodes whose edge_relation is 2, the message of node will pass to other 1,2,3,4 hop away nodes, and this process using edge features (edge_attr).

I need this max_hop dictionary is learned, which means for different edge relation : 1,2,3 , it can learn how much distance it should pass message to and give the suitable max hop dictionary, in the format {1: N, 2: M, 3: Q}, N, M , Q are integers in range [1 to 9]. use this customized message passing for zinc, molhiv and peptides-func datasets, result of test should around 0.07 ,0.81 , 0.70 respectively**.

need to edit the graphmlpmixer model in the model.py. change the existing message passing mechanism based on the edge attribute, I have source code and mostly use pytorch, pytorch geometric, and ogb library. Use ZInc, Molhiv, Peptides-func datasets

this line 'edge_attr = data.edge_attr' in the model.py file in the core folder, will give you edge relation which is 1, or 2 , or 3, and after this line ' edge_attr = self.edge_encoder(edge_attr)', this become a edge feature which is 128 dimensions with various values. I suggest you save 'e = data.edge_attr' and 'edge_encoding_attribute = self.edge_encoder(edge_attr)', so in the forward function you can put 'e' as the edge_relation , which is the key in the max_hop dictionary, and use 'edge_encoding_attribute' as the edge_attr to pass to the forward functioin as the edge features.

all the source code is in : https://github.com/XiaoxinHe/Graph-MLPMixer, model.py is in core folder.

I want test result and the three datasets and return the learned max hop dictionary.

If you read this JD, start your bid with 'Pytorch expert', thanks.