Open chester-tan opened 2 weeks ago
I think this is correct. Looking at the original implementation here, it uses three loss regularizations.
I think this might be the correct implementation (in the same repo) with only 2 losses https://github.com/google-research/google-research/blob/master/graph_embedding/dmon/dmon.py
🐛 Describe the bug
I think there might be an error in the implementation and documentation of DMoNPooling https://github.com/pyg-team/pytorch_geometric/blob/master/torch_geometric/nn/dense/dmon_pool.py .
The documentation writes
As I understand, for it to match the original paper https://arxiv.org/pdf/2006.16904 , there should be only 2 losses, and the "spectral" loss should be called a "modularity" loss
I think the orthogonality loss in the current implementation is actually from MinCutPool. The DMoNPooling example in https://github.com/pyg-team/pytorch_geometric/blob/master/examples/proteins_dmon_pool.py should also only sum the modularity loss and cluster loss (ignoring the orthogonality loss).
The implementation might not have to change since I think the calculation of the modularity loss and cluster (or "collapse regularization") loss is correct, though the calculation of the additional orthogonality loss might be both unnecessary computationally and confusing for users.
Versions
Not applicable. Referring to the "latest" documentation and master branch as of 10 June 2024.