The architecture of MolGramTreeNet includes two main branches:
1D Syntax Tree Encoder
The syntax tree encoder uses a tree-structured neural network (Tree-LSTM or similar variants) to propagate information along the hierarchical structure of the syntax tree. Each node aggregates information from its child nodes and learns the chemical semantic representation of the substructure. This bottom-up propagation ensures that the model can capture structural features at different levels of the molecule.
2D Molecular Graph Encoder
The molecular graph encoder uses graph neural networks (GNNs), such as GAT (Graph Attention Network) or MPNN (Message Passing Neural Network), to perform message passing on the atomic graph. This encoder can capture local interactions and long-range dependencies between atoms.
Fusion Layer
The outputs of the two encoders are integrated in the fusion layer. Fusion strategies may include:
- Concatenation: Concatenate the two representation vectors and feed them into a fully connected layer
- Attention mechanism: Learn weights for the two representations and perform weighted summation
- Cross-attention: Allow the two representations to attend to each other and capture their correlations
The fused representation contains both the hierarchical semantics of the syntax tree and the topological information of the molecular graph, enabling more accurate prediction of molecular properties.