GNN Class¶
Graph neural network class supporting GCN and GINE architectures with node and edge feature uncertainty via GraphStar sets.
Constructors¶
gnn = GNN(layers) % Layers only
gnn = GNN(layers, A_norm) % GCN mode
gnn = GNN(layers, A_norm, adj_list, E) % GINE mode
gnn = GNN(layers, A_norm, adj_list, E, edge_weights) % GINE with edge weights
layers– cell array of GCNLayer, GINELayer, ReluLayer, etc.A_norm– normalized adjacency matrix (N x N)adj_list– edge list [src, dst] (M x 2)E– edge feature matrix (M x d_e) or EdgeGraphStaredge_weights– optional edge weight vector
Properties¶
Property |
Type |
Description |
|---|---|---|
|
cell array |
GCN/GINE and activation layers |
|
matrix |
Normalized adjacency matrix |
|
matrix |
Edge list (M x 2) |
|
matrix |
Edge feature matrix |
|
vector |
Optional edge weights |
Methods¶
Method |
Description |
|---|---|
|
Evaluate GNN on node feature matrix X (N x F_in). Returns output node features. |
|
Compute reachable set. Input/output: GraphStar. |
|
Update graph structure (allows weight reuse across different graphs). |
Example¶
layers = {GCNLayer(W1, b1), ReluLayer(), GCNLayer(W2, b2)};
gnn = GNN(layers, A_norm);
Y = gnn.evaluate(X_test);
GS = GraphStar(X, -eps_matrix, eps_matrix);
reachOptions.reachMethod = 'approx-star';
output_sets = gnn.reach(GS, reachOptions);