question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Graph convolutions are not invariant under the symmetric group action

See original GitHub issue

Permuting the atom order leads to different output probabilities. In this case I’ve permuted the ordering of the atoms in strychnine and a miyazaki graph about 1000 times using the following code, then ran it through deepchem in prospective mode to compare the output probabilities. For miyazaki graphs this discrepancy becomes significantly larger (you’ll also have to trust me that they’re the same graph 😃)

The code used to permute and generate the smiles:

with open("debug.csv", "w") as oh:
    writer = csv.writer(oh)
    writer.writerow(["smiles","cmpdId"])
    for k in range(10):
        ans = list(range(mol.GetNumAtoms()))
        random.shuffle(ans)
        nm = rdmolops.RenumberAtoms(mol, ans)
        newSmi = Chem.MolToSmiles(nm, isomericSmiles=True, canonical=False)
        writer.writerow([newSmi,"111"])

Note that I’ve fixed the random seed to a constant in all test runs. The results are listed as smiles, [true_proba, false_proba]. They’re supposed to be the same.

Test case 1:

Strychnine:


C12=CCO[C@H]3CC(=O)N4[C@H]5[C@H]3[C@H]1C[C@@H]1N(C2)CC[C@@]15c1ccccc14 [ 0.95647782  0.04352212]
N12C(=O)C[C@@H]3OCC=C4CN5CC[C@@]6([C@@H]1[C@H]3[C@H]4C[C@H]56)c1ccccc12 [ 0.95647794  0.04352212]

Test case 2:

Miyazaki graph

C1~C234~C5~C~26~C2~C7~C8~C9~C%10~C%11~C~7~C7(~C%12~C(~C%13~C%14~C~9%15%16~C9%17~C~%15~C%15~C%18(~C%19~C%20~C~9~C9~C%21~C%22~C~%20~C%20~C%23%24%25~C~C~C~%22%26(~C%22~C~%26%27~C%26~C%28~C%29~C%30~C%31%32%33~C%34~C%35~C%36(~C~%35%37(~C~C~%31)~C~%29~C%29~C%31~C~%27~C%27~C(~C~%26~C~%30~C~%37~C~%27~C~%32~%29)~C~%23(~C~%28~%31)~C~%24~%22)~C%22~C%23~C%24~C~%33~%34~C%26~C~%22~C%22~C%27~C%28%29%30~C~C~C%31%32(~C%33%34~C%35~C%37~C%38~C%39~C%40~C%41~C%42%43%44~C%45%46~C%47~C%48~C%49~C%50~C~%45~C%45~C%51~C%52~C%53%54%55~C~C~C%56%57(~C(~C~%48~C~%53~C~%50~C~%51~%56)~C~%52~C~%47~C~%45~C~%49%45~C(~C~%45%47(~C~%40~C%40~C(~C~%39~%33)~C(~C~%35~C(~C~%40~%42)~C~%47~C~%41~%37)~C~%28~%38~C~%29~C~%31~%34)~C~C~%43)~C~%46~%44)~C%28~C~%57%29~C%31~C%33~C%34~C%35~C%37~C%38~C~%33~C%33~C%39~C~%31~C(~C(~C~%35~%29)~C%29~C~%37~C~%33%31%35~C%33~C%37~C%40(~C%41~C%42~C%43~C%44~C~%40~C~%44~C(~C~%33~%31~%43)~C~%41~%42)~C~%38~%37(~C~C~%35)~C~%39~%29)~C~%54~%34~C~%55~%28)~C(~C%28~C~%30~C(~C~%26~C~%36~C~%28~%24)~C~%32~%22)~C~%23~%27)~C%22~C~%20~C~%19~C~%17~C(~C~9~%18)~C~%22~C~%25~%21)~C~%15(~C~8~C~%14~C~2~%12)(~C~%10~%13)~C~C~%16)~C~%11~6)~C2(~C6~C8~C~3~C3~C9~C%10~C%11%12~C%13~C%14~C%15(~C%16~C(~C~6~C~4~C(~C~%10~%16)~C~3~2)~C~%11~C~8~C~9~%15)~C~%1423~C4~C6~C8~C9~C~2~C2~C(~C~4~C4~C%10~C~6~C6~C~9~C9~C~2~C~4~C~62~C46%11~C%14~C%15~C~%14~C%14~C%16~C~4~C~%16~C~%15~C~%144(~C~C~6)~C(~C~%10~4~9)~C~%11~2)~C~8~%12~%13~C~C~3)(~C~5~7)~C~1 [ 0.96809512  0.03190488]
C12~C3~C4~C5~C6~C7~C89~C%10%11%12~C%13~C%14~C%15~C%16~C%17~C%18~C%19%20~C%21%22%23~C%24~C%25~C%26~C~%25~C~%21~C%21~C(~C~%26%25(~C(~C~%25%26~C(~C%25~C~%19~C(~C(~C(~C~%15%19(~C(~C~5~%19~C5~C(~C~4~8)~C4~C8~C(~C(~C%15%19(~C%27%28~C%29~C%30~C%31~C%32~C%33~C%34~C%35%36%37~C%38%39~C~%35~C%35~C%40(~C~C~%36)(~C(~C%36~C~%29~C(~C(~C(~C~%36~%37)~C~%33~%40)~C~%32~%27)~C~%31%27~C(~C~%28~%15)~C~1~8~%27~C~C~%19)~C~%30~%34)~C~%351~C8~C%15~C~%38~C%19~C%27~C%28~C%29~C%30~C(~C%31~C~%28%32%33~C~C~C~%30%28(~C%30%34~C%35~C%36~C%37~C%38~C%40~C%41~C~%36~C~%32(~C%32~C(~C%36~C%42~C(~C~%37~C%37%43(~C%44~C%45~C%46(~C%47~C%48~C%49~C~%44~%37~C%37~C%44~C~%46~C~%49~C%46~C%49~C%50%51%52~C%53~C(~C(~C%54(~C%55~C~%54%56~C%54~C%57~C%58~C~%50(~C~%55~%51)~C%50~C%51~C~%56~C~%58~C%55~C%56~C~%57~C%57~C%58%59%60~C~C~C~%56%61(~C(~C~%57~C~%54~%50)~C~%51~C~%58~%55)~C%50~C~%59~C~%60%51~C%54~C%55~C%56~C%57~C%58~C%59~C~%55~C%55~C%60%62%63~C~C~C~%59%64(~C%59~C(~C(~C(~C~%54~C~%59~%55)~C~%56~%61~%50)~C~%57~%51)~C~%60~%58)~C%50~C~%62~C~%63%51~C%54~C%55~C%56~C%57~C%58%59%60~C%61%62~C%63~C%65~C%66~C%67~C~%61~C~%67~C(~C~%65~%63)~C~%66%61~C(~C~%61%63(~C%61~C%65~C~%58~C(~C~%54~C%54~C~%50~%64~C~%55~C(~C~%51~C~%54~%65)~C~%57~%61)~C~%56~%63)~C~C~%59)~C~%62~%60)(~C~C~%52)~C~%46~C~%53~%48)~C~%49~%44)~C~%47~%37)~C~%45~%42~%38~C~C~%43)~C~%36~%40)~C~%32~%35)~C~%41~%30)~C~%33~C~%28~%34)~C~%27~C~%15~%31)~C~8~C~%39~C~%29~C~%19~1)~C~3~4)~C~2~6)~C~7~5)~C~%10~9)~C~C~%11)~C~%25~%13)~C~%16~%12)~C~%17~%26)~C~%14~%18)~C~%22~%20)~C~C~%23)~C~%24~%21 [ 0.95993292  0.04006705]

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
proteneercommented, Mar 8, 2017

This is only temporarily alleviated by #428 - maybe we should leave this open for now?

0reactions
rbharathcommented, Mar 4, 2018

I’ve marked this issue as a Research Question. If you’re a deep learning researcher, this might be a good topic to investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant and Equivariant Graph Networks - OpenReview
Equivariance means that there is *some* action of the symmetric group S_n on each layer, and wrt these actions the network is equivariant....
Read more >
Group Equivariant Convolutional Networks - arXiv
The CIFAR dataset is not actually symmetric, since objects typically appear upright. Nevertheless, we see substantial increases in accuracy on ...
Read more >
Universal Invariant and Equivariant Graph Neural Networks
The design of neural network architectures which are equivariant or invariant under group actions is an active area of research, see for instance...
Read more >
Going back in time... - Petar Veličković
We arrive at a useful notion of permutation invariance. We say that f(X) is permutation invariant if, for all permutation matrices P: ○...
Read more >
Leveraging permutation group symmetries for designing ...
Workshop on Equivariance and Data AugmentationWebsite: https://sites.google.com/view/equiv-data-aug/homeFriday, September 4, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found