Convolutional neural network (CNN) and graph convolutional network (GCN) has gained huge success in various tasks, from image classification, video processing to speech recognition and natural language understanding. The success stems from both the well-designed neural network architecture and the increasing computing power in recent hardware. Many attempts have been made to extend these frameworks to biological problems, with varying success. In this talk, I will present the applications of using both CNN and GCN models to predict Mg2+/small molecule binding sites/modes in RNA molecules. These approaches exploit the information of the local binding environment and predict the most probable distribution of the Mg2+ sites or ligand binding modes. Further comparisons between our methods and various types of methods validate the machine-learning approaches.