Cocrystal plays an important role in various fields. However, how to choose coformer remains a challenge on experiments. In this work, we develop a novel graph neural network (GNN) based deep learning framework to rapidly predict formation of the cocrystal. A large and reliable data set is first constructed, which contains 7871 samples. A complementary feature representation is proposed by combining molecular graph and molecular descriptors from priori knowledge. A new GNN learning architecture is then explored to effectively embed the priori knowledge into the “endto-end” learning on the molecular graph, in which multi-head attention mechanism is introduced to further optimize the feature space. Consequently, the performance of our model achieves 98.86% accuracy, greatly surpassing some traditional machine learning models and classic GNN models. Furthermore, the out-of-distribution prediction on energetic cocrystals is also high up to 97.11% accuracy, showing strong generalization.