Nuclear masses are of great importance in nuclear physics and astrophysics. Description and prediction of the nuclear masses based on residual proton-neutron interactions are one of the focuses in nuclear physics. Because the accuracy of the residual interaction determines the accuracy of the nuclear mass, so the study of residual interaction is essential. This work has contributed to our present understanding of the systematicness of residual interaction. Before we do so, there are many papers using artificial neural networks in nuclear physics. Our paper that we introduce is enlightened by these papers. Based on BP neural network, we obtained the description and prediction model for residual interaction. In this paper, by combining experimental values with residual proton-neutron interactions, we successfully calculate the nuclear mass of A ≥ 100. Neural network has some advantages in studying the local mass relations. Results demonstrate that the differences between our calculated values and databases (AME2003, AME2012 and AME2016) show that the root-mean-squared deviations (RMSDs) are small (comparing with AME2003, the odd-A nuclei RMSD and the even-A nuclei RMSD are 112 keV and 128 keV; comparing with AME2012, the odd-A nuclei RMSD and the even-A nuclei RMSD are 103 keV and 121 keV; comparing with AME2016, the RMSD of odd-A nuclei and even-A nuclei are 106 keV and 122 keV, respectively). In addition, we obtained some predicted masses based on AME2003 and AME2012, the predicted values have good accuracy and compared well with experimental values (AME2012 and AME2016). These results show that the study of residual interaction by using BP neural network is feasible and accurate. The BP neural network helps us to get more accurate nuclear mass map, and the map may be helpful for future astrophysics research. This idea is helpful to analyze or excavate useful information from a large number of experimental values, and then provide a reference for discovering physical laws, and provide support for the feasibility of physical experiments.