77 questions
0
votes
1
answer
35
views
Random split of edges in torch_geometric
In this link prediction example, here is how they split the data:
transform = T.Compose([
T.NormalizeFeatures(),
T.ToDevice(device),
T.RandomLinkSplit(num_val=0.05, num_test=0.1, ...
0
votes
0
answers
57
views
GraphMAE self-supervised learning: node attribute (sampled points) reconstruction works in minimal script but fails in full pipeline
I am experimenting with a GraphMAE self-supervised architecture using PyTorch + DGL.
In my task, each graph node represents a CAD entity, and one node attribute stores sampled points (coordinates + ...
3
votes
1
answer
69
views
How to decode a tfrecord based on the available meta data
I have a three tfrecords (train,test valid) from the a deepmind github repo (https://github.com/google-deepmind/deepmind-research/tree/master/meshgraphnets) that I am trying to decode (at the minute ...
0
votes
1
answer
67
views
GNN Link Prediction (GraphSAGE/PyG) - Validation AUC Consistently Below 0.5 Despite Overfitting Control
I'm working on a task dependency prediction problem using Graph Neural Networks with PyTorch Geometric. The goal is to predict directed precedence links (A -> B) between tasks within specific sets (...
0
votes
0
answers
66
views
GNN multinode prediction yeilds constant output when using Y as input
Y : 8 values , 2d vector
X : same as Y
Y_hat : always constant
Data: fully connected graph with always 8 nodes
Model : plain homogeneous GCN
Loss function : MSE
Assumption , The x:Y shall have 1:1 ...
0
votes
1
answer
73
views
How can I non-parametrically generate new geometry with machine learning?
Say, I have a few .stl files and want to non-parametrically generate a new geometry that is "interpolated" between the datset. For that, I plan on using neural networks that follows the ...
3
votes
1
answer
529
views
Link prediction using edge features/attributes in PyTorch geometric
I have a custom homogeneous graph dataset with undirected edges, where each edge has 22 features and each node has 2 features. I would like to perform link prediction on this dataset using the edge ...
0
votes
0
answers
51
views
What model can I use to get a dynamic path from one point to another as an output?
I am working on a drone and want to make it autonomous. As a first step, I decided to make a PyTorch algorithm that can output a path from one point to another. To do that, two random points are ...
0
votes
0
answers
46
views
PyTorch & DGL Matrix Multiplication Error: "mat1 and mat2 shapes cannot be multiplied (1x4581 and 1x4581)"
My code to train the ML model is as follows:
import dgl
from dgl.nn import GraphConv
import torch
import torch.nn as nn
import torch.nn.functional as F
class GCN(nn.Module):
def __init__(self, ...
0
votes
1
answer
123
views
Batch computation of similarity matrices of different sizes (Pytorch)
I am computing node features of dimension D for a B different graphs where the graph i has N_i nodes, hence I have a batch representation as a tensor of dimension (N_1 + ... + N_B)xD. I want to ...
0
votes
0
answers
253
views
ValueError: Total of weights must be finite
I am trying to create a classification algorithm using Graph Neural Networks (GNNs) in Python, but I am encountering an error that I can't resolve.
I have already tried removing NaN values from my ...
1
vote
1
answer
141
views
PyG graph autoencoder loss is frozen, possible Data object assembly issue
I'm trying to use Graph Autoencoder on a custom PyG Data object, but when I attempt to train it, the loss, AUC and AP do not change. The exact same autoencoder works when using PyTorch Geometric's ...
0
votes
0
answers
51
views
Graph convolutional networks does not produce the optimal results with the first run. Need to retrain the model from first run
I do not understand why I need to retrain the model starting with the model produced with the first run to improve the performance. Why increasing the number of epochs does not improve the results ...
1
vote
0
answers
90
views
Integrated Gradients implementation for 2D input in PyTorch
I am trying to implement the Integrated Gradient calculation (described in this article) for a GNN I am working with. Specifically, I am using Eq3 from the paper
My input for the network is a NxM ...
0
votes
0
answers
404
views
Edge Classification using Graph Neural Networks
I am working on a fraudulent transactions detection in SWIFT network using GGN.My graph has banking codes (SWIFT BIC codes) as nodes and the edges represent transactions. I also added an attribute ...
0
votes
1
answer
248
views
Classification using Graph Neural Network
I am working on a fraud detection project using GNN. My graph has banking codes (SWIFT BIC codes) as nodes and the edges represent transactions.
Below are the shapes of my tensors:
Node Features ...
3
votes
3
answers
2k
views
Pytorch Geometric graph batching not using DataLoader for Reinforcement learning
I am using PyTorch Geometric to create a reinforcement learning algorithm, and I would therefore like to avoid using the inbuilt DataLoader as I generate data/observations on the go. However, I am ...
0
votes
1
answer
173
views
Stellargraph GraphSAGE sample google Colab notebook model.predict error
I started working on running sample of stellargraph python module to run GraphSAGE algorithm sample from this link:
https://stellargraph.readthedocs.io/en/stable/demos/node-classification/graphsage-...
2
votes
0
answers
99
views
How to deal with loss gettting clamped in graph neural networks?
I have trained the following model using pytorch on graphs having the same edge index(task is graph classification on Electronic health records where each graph represents the patients data and node ...
0
votes
0
answers
27
views
RuntimeError When Modifying Node Count in Networkx Graph for Graph Neural Network Training
I'm encountering a runtime error while manipulating the node count in a Networkx-generated graph passed through a Graph Neural Network (GNN). Here's my GNN code, which seems independent of the graph's ...
1
vote
0
answers
77
views
Initialization of a python function from C++ code takes too long
I have a C++ script, where I load a python file to execute a function to evaluate a Graph Neural Network. This function gets executed to evaluate data in an event loop, so the script gets executed for ...
0
votes
2
answers
3k
views
what does edge_weight in GCNconv in PyTorch mean and what can I use to obtain the edge weight?
I am working on Graph neural network using PyTorch geometric for node classification task.
I would like to ask for GCNconv layer, I noticed that it supports edge_weight attribute
my questions:
what ...
0
votes
1
answer
605
views
How to make a minibatch with different graphs in GNN
How to make a minibatch with different graphs in GNN so I can aggregate their information respectively in their own graph.
If I have four clips of x([1024,1]), and each clip of x has its own graph(...
1
vote
0
answers
32
views
how to make adjacency matrix for real location for SHARE model?
https://arxiv.org/pdf/1911.10516.pdf this is the link for SHARE(Semi-Supervised Hierarchical Recurrent Graph Neural Network
for City-Wide Parking Availability Prediction).I think this code is useful ...
1
vote
1
answer
2k
views
Can we use GNN on graphs with only edge features?
I'm trying to use GNN to classify phylogeny data (fully bifucated, single directed trees). I converted the trees from phylo format in R to PyTorch dataset. Taking one of the tree as an example:
Data(...
0
votes
1
answer
2k
views
GraphConv vs GCNConv pytorch.geometric
I'm trying to compare 2 models GraphConv and GCNConv for my project. According to the tutorial provided by Pytorch GraphConv preserves central node information by omitting neighbourhood normalisation. ...
0
votes
0
answers
733
views
Graph Neural Network - Node level regression
I am trying to train a graph neural network model and I am having problems regarding the models' architecture. What I have is DataBatch objects that comes from torch_geometric.data library.
In batch ...
0
votes
1
answer
515
views
Creating a graph from research papers
I am working on simple passion project involving graph analytics for research paper.
Basically, I want to create a graph structure connecting research papers and eventually would like to analyze how ...
0
votes
1
answer
722
views
GNN adaptability to different number of node as input graph
I am looking at methods for GNN to process GNN based on entity graph generated on objects on the image. Node represent each object and edge is connected between two nodes if two objects' Euclidean ...
0
votes
1
answer
117
views
NN training error(the index of the batch data out of range)
I want to train a model but facing a problem: in every batch I will select some node for training, and the id of nodes range from 0 to 999. While training I find the code use the id of the node as the ...
1
vote
0
answers
151
views
How do I get the final node embeddings in a GCN?
I'm building a GCN on the UPFD (Fake News Detection) graph dataset. My code performs graph classification. I need to obtain the final node embeddings for further use in my project.
This is the code so ...
0
votes
1
answer
842
views
Value Error visualizing Network using networkx
I was told that using the NetworkX package was helpful in creating complex graphs, so I decided to go ahead and use NetworkX to visualize the logic behind forward propagation where each layer of the ...
0
votes
1
answer
243
views
Bipartite graph to a projection graph
Hi I'm trying to project a bipartite graph (B) using Networkx's projected_graph but due to memory constraints (B has more than 140K nodes), this keeps crashing. I tried a matrix multiplication using a ...
1
vote
0
answers
195
views
How to train a GCN on heterodata object in torch-geometric
I am working on a graph classification task where I need to predict the class (1/0, binary) of tweets based on the features of the tweets and users. I have a HeteroData object that represents the ...
1
vote
0
answers
81
views
Usage of activation function in node classification with GraphNets
I am currently trying to learn how Graph Neural Networks work with Deep Minds Graph-Nets-Library, but I am stuck for days with my understanding of this topic. Maybe someone of you can help me out.
I ...
0
votes
1
answer
956
views
Creating subgraphs with torch_geometric.loader.NeighborLoader while preserving all edges
I have a graph with node and edge features and I want to perform node classification using attention on both nodes and edges. Since my graph is large, I need to create mini-batches. I would like to ...
5
votes
1
answer
3k
views
PyTorch Geometric - How to sample huge graph to train GNN with mini-batching
I want to do node regression on a huge graph (around 1M nodes) using PyTorch Geometric, but I cannot create a Data object because the full graph does not fin in RAM, so I cannot use the DataLoader ...
4
votes
1
answer
2k
views
How to predict links between present and a new node with PyG/GraphSage autoencoder?
I am a newbee in the field of GNN and want to use PyTorch Geometric (PyG) to train a Graph Neural Network (GNN) to predict links (edges) between nodes in a graph using an autoencoder (with a modified ...
1
vote
0
answers
462
views
Convert NetworkX heterogeneous Multigraph into PyTorch Geometric data
I have a heterogeneous graph with different node types and attributes stored as NetworkX Multigraph. I want to train a GNN model on this graph, therefore I need to convert it into PyTorch Geometric ...
2
votes
1
answer
1k
views
torch_geometric.nn radius_graph example giving AttributeError
when trying to execute the example code for radius_graph from torch_geometric
i get the following error:
File "C:\Users\nico_\AppData\Local\Programs\Python\Python38\lib\site-packages\...
0
votes
1
answer
45
views
Theory questions about training the model in terms of optimization
can you please explain, how training the graph neural network or CNN works? in case I have graphs and I choose batch_size = 16 this means, each graph may have a different number of nodes and edges.
Q1
...
1
vote
1
answer
405
views
Tensorflow-GNN model.fit() error while training a skeleton-based GNN (index error)
I am using TFGNN library to build a skeleton based graph neural network for action recognition and while running a simple model I keep getting the following error. The model is simple and it is ...
1
vote
0
answers
327
views
How to create Fully adjacent layer in a GCN with Pytorch
I would like to implement a GNN network with a fully adjacent final layer, which means to say all nodes of the final graph are connected to all other nodes.
It is similiar to as mentioned in this ...
0
votes
1
answer
567
views
Duplication of vertices in Amazon Neptune
I want to create some logic that does the following in Amazon Neptune using Gremlin:
1. Load a row of data that contains customer_id and postcode columns
2. Check if the postcode value from that row ...
0
votes
1
answer
387
views
Issue with training a Graph Convolutional Network
I am trying to use Pytorch to come up with a Graph Neural Network model that allows me to predict links in a network of alliances between organizations. When I try to train my model, I get an "...
0
votes
1
answer
1k
views
How to build a graph for nodes with multiple edges in PyTorch geometric?
Suppose a node represents a bank account and an edge represents a transfer operation between two accounts. There may be multiple transfers between the two accounts. if this, how should I build a graph ...
0
votes
1
answer
196
views
Why are the weights not updating when splitting the model into two `class` in pytorch and torch-geometric?
I tried two different ways to build my model:
First approach: split the model into two class, one is MainModel() and the other is GinEncoder(), and when I call the MainModel(), it would also call ...
0
votes
1
answer
153
views
How to update the weights of a composite model composed of pytorch and torch-geometric?
I made a composite model MainModel which consist of a GinEncoder and a MainModel which containing some Linear layers, and the GinEncoder made by the package torch-geometric, show as following codes :
...
2
votes
1
answer
859
views
Pytorch Geometric gives me an 'edge_index' error
I am trying to use Pytorch Geometric on my own custom Dataset. However I keep getting this error "Please ensure that all indices in 'edge_index' point to valid indices in the interval [0, 13) in ...
4
votes
4
answers
7k
views
Could not import torch_geometric, it says "undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs"
I am trying to find a solution to the error:
OSError: /opt/conda/lib/python3.7/site-packages/torch_sparse/_version_cuda.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs.
arising from the ...