Crystal Graphs w/ GeometricFlux.jl

Stefan_Bringuier
Tue, 06 Feb 2024 00:25:40 +0000
Machine Learning

I’m fairly new to GeometricFlux.jl and working on trying to implement the Crystal Graph CNN approach by Xie and Grossman. I have the following FeaturedGraph, target pair dataset. I guess what I’m wondering is 1.) How should one do the batching? Does DataLoader(train_data, batchsize=3, shuffle=true, collate=true) make sense? 2.) In the CGCNN paper the edge features tied to a node are concatenated, how should I do that?

Tuple{GraphSignals.FeaturedGraph{GraphSignals.SparseGraph{false, SparseArrays.SparseMatrixCSC{Int64, Int64}, Vector{Int64}, Int64}, GraphSignals.NodeSignal{Matrix{Float64}}, GraphSignals.EdgeSignal{Matrix{Float64}}, GraphSignals.NullGraphSignal, GraphSignals.NullDomain}, Float64}
FeaturedGraph:
	Undirected graph with (#V=22, #E=179) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
3.6833
FeaturedGraph:
	Undirected graph with (#V=40, #E=400) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
1.6222
FeaturedGraph:
	Undirected graph with (#V=12, #E=58) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
1.5476
FeaturedGraph:
	Undirected graph with (#V=80, #E=1111) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
2.1634
FeaturedGraph:
	Undirected graph with (#V=9, #E=45) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
3.2824
FeaturedGraph:
	Undirected graph with (#V=19, #E=170) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
1.8759
FeaturedGraph:
	Undirected graph with (#V=16, #E=84) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
1.4667
FeaturedGraph:
	Undirected graph with (#V=48, #E=720) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
3.7994
FeaturedGraph:
	Undirected graph with (#V=6, #E=21) in adjacency matrix
	Node feature:	ℝ^92 <NodeSignal{Matrix{Float64}}>
	Edge feature:	ℝ^10 <EdgeSignal{Matrix{Float64}}>
0.0
...

Any guidance on general tips on setting up and training GNN with GeometricFlux.jl is much appreciatd.

1 post - 1 participant