choderalab / pinot

Probabilistic Inference for NOvel Therapeutics
MIT License
15 stars 2 forks source link

Incorporate edge feature (bond types) into decoder reconstruction #98

Closed dnguyen1196 closed 4 years ago

dnguyen1196 commented 4 years ago

Dataloading now also loads the bond types, since it stores only the bond types for the edges present, this shouldn't take that much more memory.

A new encoder, which now predicts the node identity as well as the bond types of the original molecule.

To use with semi supervised net, simply replace the decoder type used to initialize SemiSupervisedNet

    decoder_with_edge = pinot.generative.decoder.EdgeDecoder <--- Use the new type of decoder
    representation = SequentialMix(architecture)

    net = SemiSupervisedNet(
        representation=representation,
        decoder=decoder_with_edge, <---- And replace it here
        output_regressor=output_regressor,
        embedding_dim=embedding_dim,
        generative_hidden_dim=generative_hidden_dim,
        unsup_scale=1 #float(len(train_labeled))/len(unlabeled), # <------ if unsup_scale = 0., reduces to supervised model
    )

It seems to bring marginal performance to ESOL

Expepriment setting:

architecture = [GraphConv, 128, GraphConv, 128] No unlabeled data

esol_test_different_decoder_100epochs