We formalized the nuclear mass problem in the inverse problem framework. This approach allows us to infer the underlying model parameters from experimental observation, rather than to predict the observations from the model parameters. The inverse problem was formulated for the numericaly generalized the semi-empirical mass formula of Bethe and von Weizs{a}cker. It was solved in step by step way based on the AME2012 nuclear database. The solution of the overdetermined system of nonlinear equations has been obtained with the help of the Aleksandrovs auto-regularization method of Gauss-Newton type for ill-posed problems. In the obtained generalized model the corrections to the binding energy depend on nine proton (2, 8, 14, 20, 28, 50, 82, 108, 124) and ten neutron (2, 8, 14, 20, 28, 50, 82, 124, 152, 202) magic numbers as well on the asymptotic boundaries of their influence. These results help us to evaluate the borders of the nuclear landscape and show their limit. The efficiency of the applied approach was checked by comparing relevant results with the results obtained independently.