Implement model (and some factor) coder with evolving (#52)

* store code into FBImplementation

* fix path related bugs

* fix a bug

* fix factor related small bugs

* re-submit all model related code

* new code to model coder

* finish the model evolving code

---------

Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
Xu Yang
2024-07-10 15:45:43 +08:00
committed by GitHub
parent 63f7bf23da
commit 22e1aa3330
24 changed files with 1243 additions and 291 deletions
@@ -22,7 +22,7 @@ class ModelImpValEval:
- If the model structure is similar, the output will change in similar way when we change the input.
Challenge:
- The key difference between it and implementing factors is that we have parameters in the layers (Factor operators often have no parameters or are given parameters).
- The key difference between it and implementing models is that we have parameters in the layers (Model operators often have no parameters or are given parameters).
- we try to initialize the model param in similar value. So only the model structure is different.
Comparing the correlation of following sequences
@@ -41,9 +41,8 @@ class ModelImpValEval:
for _ in range(round_n):
# run different model initial parameters.
for init_val in [-0.2, -0.1, 0.1, 0.2]:
data, exec_config = get_data_conf(init_val)
gt_res = gt.execute(data=data, config=exec_config)
res = gen.execute(data=data, config=exec_config)
_, gt_res = gt.execute(input_value=init_val, param_init_value=init_val)
_, res = gen.execute(input_value=init_val, param_init_value=init_val)
eval_pairs.append((res, gt_res))
# flat and concat the output
@@ -9,7 +9,8 @@
"h^{(l-1)}_v": "The feature representation of node v at layer (l-1)",
"N_u": "The set of neighbored nodes centered at node u"
},
"key": "pmlp"
"key": "pmlp",
"model_type": "TimeSeries"
},
"LINKX": {
"description": "A scalable model for node classification that separately embeds adjacency and node features, combines them with MLPs, and applies simple transformations.",
@@ -22,7 +23,8 @@
"h_X": "Embedding of the node features",
"MLP_f": "Final multilayer perceptron for prediction"
},
"key": "linkx"
"key": "linkx",
"model_type": "TimeSeries"
},
"GPSConv": {
"description": "A scalable and powerful graph transformer with linear complexity, capable of handling large graphs with state-of-the-art results across diverse benchmarks.",
@@ -34,7 +36,8 @@
"MPNN^{(l)}": "The message-passing neural network function at layer l",
"GlobalAttn^{(l)}": "The global attention function at layer l"
},
"key": "gpsconv"
"key": "gpsconv",
"model_type": "TimeSeries"
},
"ViSNet": {
"description": "ViSNet is an equivariant geometry-enhanced graph neural network designed for efficient molecular modeling[^1^][1][^2^][2]. It utilizes a Vector-Scalar interactive message passing mechanism to extract and utilize geometric features with low computational costs, achieving state-of-the-art performance on multiple molecular dynamics benchmarks.",
@@ -44,7 +47,8 @@
"\\mathbf{e}_u": "Edge embedding associated with atom u",
"\\mathbf{v}_u": "Direction unit vector for atom u"
},
"key": "visnet"
"key": "visnet",
"model_type": "TimeSeries"
},
"Dir-GNN": {
"description": "A framework for deep learning on directed graphs that extends MPNNs to incorporate edge directionality.",
@@ -54,7 +58,8 @@
"m^{(k)}_{i,\\leftarrow}": "The aggregated incoming messages to node i at layer k",
"m^{(k)}_{i,\\rightarrow}": "The aggregated outgoing messages from node i at layer k"
},
"key": "dirgnn"
"key": "dirgnn",
"model_type": "TimeSeries"
},
"A-DGN": {
"description": "A framework for stable and non-dissipative DGN design, conceived through the lens of ordinary differential equations (ODEs). It ensures long-range information preservation between nodes and prevents gradient vanishing or explosion during training.",
@@ -69,6 +74,7 @@
"X(t)": "The node feature matrix of the whole graph at time t",
"N_u": "The set of neighboring nodes of u"
},
"key": "A-DGN"
"key": "A-DGN",
"model_type": "TimeSeries"
}
}
}