The nuclear mass model has significant applications in nuclear physics, astrophysics, and nuclear engineering. The accurate prediction of binding energy is crucial for studying nuclear structure, reactions, and decay. However, traditional mass models exhibit significant errors in double magic number region and heavy nuclear region. These models are difficult to effectively describe shell effect and parity effect in the nuclear structure, and also fail to capture the subtle differences observed in experimental results. This study demonstrates the powerful modeling capabilities of MLP neural networks, which optimize the parameters of the nuclear mass model, and reduce prediction errors in key regions and globally. In the neural network, neutron number, proton number, and binding energy are used as training feature values, and the mass-model coefficient is regarded as training label value. The training set is composed of the multiple sets of calculated nuclear mass model coefficients. Through extensive experiments, the optimal parameters are determined to ensure the convergence speed and stability of the model. The Adam optimizer is used to adjust the weight and bias of the network to reduce the mean squared error loss during training. Based on the AME2020 dataset, the trained neural network model with the minimum loss is used to predict the optimal coefficients of the nuclear mass model. The optimized BW2 model significantly reduces root-mean-square errors in double magic number and heavy nuclear regions. Specifically, the optimized model reduces the root-mean-square error by about 28%, 12%, and 18% near Z = 50 and N = 50; Z(N) = 50 and N = 82; Z = 82 and N = 126, respectively. In the heavy nuclear region, the error is reduced by 48%. The BW3 model combines higher-order symmetry energy terms, and after parameter optimization using the neural network, reduces the global root-mean-square error from 1.86 MeV to 1.63 MeV. This work reveals that the model with newly optimized coefficients not only exhibit significant error reduction near double magic numbers, but also shows the improvements in binding energy predictions for both neutron-rich and neutron-deficient nuclei. Furthermore, the model shows good improvements in describing parity effects, accurately capturing the differences related to parity in isotopic chains with different proton numbers. This study demonstrates the tremendous potential of MLP neural networks in optimizing the parameters of nuclear mass model and provides a novel method for optimizing parameters in more complex nuclear mass models. In addition, the proposed method is applicable to the nuclear mass models with implicit or nonlinear relationships, providing a new perspective for further developing the nuclear mass models.