Coder Social home page Coder Social logo

pcy1302 / dmgi Goto Github PK

View Code? Open in Web Editor NEW
138.0 5.0 24.0 34 KB

Unsupervised Attributed Multiplex Network Embedding (AAAI 2020)

Python 100.00%
unsupervised-learning network-embedding heterogeneous-information-networks node-embeddings multiplex-network graph infomax

dmgi's People

Contributors

pcy1302 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dmgi's Issues

Other Dataset

Hi, I am excited to see this work which implemented Deep Graph Infomax on Multiplex Network!
And I want to test ACM, DBLP, Amazon Dataset based on your code, can you provide these data sets and code about preprocess about them?
I will be appreciated for your reply as soon as possible, thank you very much!

a little problem about results

hi,sorry to interrupt you again~
we can see you get a so big improvement on amazon dataset !
i run your code on amazon dataset , and search parameters as your paper said "α; β; from 0:0001; 0:001; 0:01; 0:1".
but i am sad i can not get a comparable result as your paper. some details is below:
nmi: my best result is 0.2858 | 0.2954 for DMGI-att and DMGI. your paper is 0.412 and 0.425
macro | micro : my best result is 0.7426 | 0.7462| 0.7380| 0.7414 for DMGI-att and DMGI. your paper is
0.758 | 0.758 | 0.746 | 0.748. We can see my result is very close to you .
sim: my best result is 0.820 and 0.809 for DMGI-att and DMGI. , your paper is 0.825 and 0.816 . we can see my result is also very close to you .

so i am very confused about the performance about the metric nmi. do you meet the same problem or can you give me some suggestions?

Raw ACM and IMDB datasets

If you have the raw datasets of ACM and IMDB, can please share it along with its preprocessing scripts?

Dataset

HI, the web page of ACM & DBLP cannot be opened.Can you update it? Thank u

What is the purpose of the variable 'patience'?

Hello, your work is impressive and has benefited me greatly. I'm a novice in deep learning, and I have some questions about your code.
I noticed that you've set a variable called "patience" in your code, and training stops when the loss increases for 20 consecutive times(parser.add_argument('--patience', type=int, default=20)).

if loss < best:
    best = loss
    cnt_wait = 0
    torch.save(model.state_dict(), 'saved_model/best_{}_{}_{}.pkl'.format(self.args.dataset, self.args.embedder, self.args.metapaths))
else:
    cnt_wait += 1

if cnt_wait == self.args.patience:
    break

Is this strategy reasonable? I haven't come across this in your papers.

A small problem with calling functions in Python

Hello
I am new to Python. According to my project, I invoked ready-made functions and I want to use them. The nature of functions is about finding intra-layer and inter-layer edges in a multiplex graph. But I am not able to call and draw conclusions from these functions. If possible, please guide me. Thanks

The desired code is shared.

class LayerNetwork():

def __init__(self, graphs):

    self.graphs = graphs
    self.total_layers = len(graphs)

    self.get_nodes()
    self.get_edges_within_layers()
    self.get_edges_between_layers()

def get_nodes(self):
    self.nodes = []
    for z, g in enumerate(self.graphs):
        self.nodes.extend([(node, z) for node in g.nodes()])

def get_edges_within_layers(self):
    self.edges_within_layers = []
    for z, g in enumerate(self.graphs):
        self.edges_within_layers.extend([((source, z), (target, z)) for source, target in g.edges()])

def get_edges_between_layers(self):
    self.edges_between_layers = []
    for z1, g in enumerate(self.graphs[:-1]):
        z2 = z1 + 1
        h = self.graphs[z2]
        shared_nodes = set(g.nodes()) & set(h.nodes())
        self.edges_between_layers.extend([((node, z1), (node, z2)) for node in shared_nodes])

Is there a mistake in the paper about loss function?

Hi, thanks for you great work here!
I read the paper Deep Graph Infomax, DGI introduce a discriminator $D$ to maximize the mutual information. (Eq(1) in the paper). And it say this term should be maximized.
But in your final loss function, there is no minus sign in front of it.

I haven't understood DGI much, so I wonder if I got it wrong or there is a written mistake?

Regards,

Running with dataset "IMDB"

Dear authors :
I use the "IMDB" dataset and run the program,I didn't change the parameters, but I got the different results from your paper. So,could you help me to explain this ? The following is the result.

DMGI:
[Classification] Macro-F1: 0.6509 (0.0101) | Micro-F1: 0.6519 (0.0076)
[Clustering] NMI: 0.2015
[Similarity] [5,10,20,50,100] : [0.6115,0.6022,0.5944,0.581,0.5674]

DMGI(attention):
[Classification] Macro-F1: 0.6163 (0.0114) | Micro-F1: 0.6184 (0.0083)
[Clustering] NMI: 0.1992
[Similarity] [5,10,20,50,100] : [0.5868,0.5754,0.5646,0.555,0.5449]

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.