caojiangxia / bigi Goto Github PK
View Code? Open in Web Editor NEW[WSDM 2021]Bipartite Graph Embedding via Mutual Information Maximization
Home Page: https://arxiv.org/abs/2012.05442
License: MIT License
[WSDM 2021]Bipartite Graph Embedding via Mutual Information Maximization
Home Page: https://arxiv.org/abs/2012.05442
License: MIT License
Thanks for your great repo.
I tried to train the model for a big graph (about 7M edges in training data).
When I was Training on a single GPU, training time wasn't efficient, so I decided to try multi-gpu, but I got this error:
File "/home/BiGI/BiGI_src/train_rec.py", line 163, in <module>
loss = trainer.reconstruct(UV, VU, adj, corruption_UV, corruption_VU, fake_adj, user_feature, item_feature, batch) # [ [user_list], [item_list], [neg_item_list] ]
File "/home/BiGI/BiGI_src/model/trainer.py", line 152, in reconstruct
self.update_bipartite(user_feature, item_feature, CUV, CVU, fake_adj, fake = 1)
File "/home/BiGI/BiGI_src/model/trainer.py", line 131, in update_bipartite
self.user_hidden_out, self.item_hidden_out = self.model(user_feature, item_feature, UV_adj, VU_adj, adj)
File "/home/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 158, in forward
inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 175, in scatter
return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 44, in scatter_kwargs
inputs = scatter(inputs, target_gpus, dim) if inputs else []
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 36, in scatter
res = scatter_map(inputs)
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 23, in scatter_map
return list(zip(*map(scatter_map, obj)))
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/scatter_gather.py", line 19, in scatter_map
return Scatter.apply(target_gpus, None, dim, obj)
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/_functions.py", line 96, in forward
outputs = comm.scatter(input, target_gpus, chunk_sizes, ctx.dim, streams)
File "/home/.local/lib/python3.8/site-packages/torch/nn/parallel/comm.py", line 189, in scatter
return tuple(torch._C._scatter(tensor, devices, chunk_sizes, dim, streams))
RuntimeError: Tensors of type SparseTensorImpl do not have strides
Process finished with exit code 1
How do you train the model on large graphs? Do you have any idea or code for multi-GPU training?
你好,我是合工大的一名研究生,很想学习一下你们的工作。
如果方便的话,能否分享一下你们的论文。我的联系方式: [email protected],谢谢~
really interested in this paper,may I asked when the code will be released?
Hi, thanks for your repo. I wonder how you implemented the h-hop enclosing subgraph. Now I only see you set a mask, but how you got the mask? Thanks
I want to train on a custom dataset for a recommendation task.
The dataset is based on user/group data that users participate in some groups.
The problem is how I should split data for test and train?
when I randomly select some node and edge, I will face this error:
File "/home/BiGI/BiGI_src/utils/GraphMaker.py", line 135, in preprocessing UV_adj = sp.coo_matrix((np.ones(UV_edges.shape[0]), (UV_edges[:, 0], UV_edges[:, 1])), File "/home/.local/lib/python3.8/site-packages/scipy/sparse/coo.py", line 196, in __init__ self._check() File "/home/.local/lib/python3.8/site-packages/scipy/sparse/coo.py", line 283, in _check raise ValueError('row index exceeds matrix dimensions') ValueError: row index exceeds matrix dimensions
Hello, thank you for the great paper and work.
I cannot find the test code that loads the trained model and evaluate the performance.
After training the model, is there a code to test the saved model?
Thanks again. 👍
如果是两次run,metapath的选取是怎样的呢?想知道DMGI实验更加具体一点的细节。
感谢作者的回复。
original question:
For DMGI model, we can get single type of node embedding per run of DMGI, but there are two kinds of node in bipartite graph. In experiment, DMGI baseline conducted item AND user node for performance testing. So my question is to know more about the metapath selection in DMGI baseline and confirm if it runs twice to get both user and item embeddings of DMGI.
Thank you so much in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.