Giter Club home page Giter Club logo

unignn's People

Contributors

oneforward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unignn's Issues

UniGAT: inconsistency between paper formulations and code implementation

In your paper, the UniGAT computes the similarity alpha_ie between node i and the incident edge e. Then the attention is applied to passing messages from edges to nodes based on the alpha_ie.
image

However, the implementation seems to be different from the UniGAT in your paper. Only edge information is used for computing alpha_ie. Node information is not included. self.att_e is used instead of node information. Why?

UniGNN/model/UniGNN.py

Lines 246 to 282 in bea1fb5

def forward(self, X, vertex, edges):
H, C, N = self.heads, self.out_channels, X.shape[0]
# X0 = X # NOTE: reserved for skip connection
X0 = self.W(X)
X = X0.view(N, H, C)
Xve = X[vertex] # [nnz, H, C]
Xe = scatter(Xve, edges, dim=0, reduce=self.args.first_aggregate) # [E, H, C]
alpha_e = (Xe * self.att_e).sum(-1) # [E, H, 1]
a_ev = alpha_e[edges]
alpha = a_ev # Recommed to use this
alpha = self.leaky_relu(alpha)
alpha = softmax(alpha, vertex, num_nodes=N)
alpha = self.attn_drop( alpha )
alpha = alpha.unsqueeze(-1)
Xev = Xe[edges] # [nnz, H, C]
Xev = Xev * alpha
Xv = scatter(Xev, vertex, dim=0, reduce='sum', dim_size=N) # [N, H, C]
X = Xv
X = X.view(N, H * C)
if self.args.use_norm:
X = normalize_l2(X)
if self.skip_sum:
X = X + X0
# NOTE: concat heads or mean heads?
# NOTE: skip concat here?
return X

a problem in train.py "from data import data" in line 57, which package is used in the work?

I am very interested in this work and the method for hypergraph-based gnn is of great attraction to me.
However, there exists a minor issue, and I am confused about it.

After I read this paper, I clone the code and ran it in bash with 'python train.py --data=coauthorship --dataset=dblp --model-name=UniSAGE' , but the error ' ModuleNotFoundError: No module named 'data'' occurs.
I tried 'pip install data', but the package so-called 'data' is different from the one in this work, which has not 'data'/'data.load'......
So, I would like to know the source of the 'data' package, it seems like an individual-created .py file?
train.py "from data import data" in line 57, which package is used in work?

I'm looking forward to your answer, thank you!
Best wishes!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.