Due to the wide applications of deep learning in the field of urban rail transit passenger flow forecasting, the selection problem of training samples has become increasingly more worthy of researchers' attention, as it is closely related to urban rail transit passenger flow time series. Therefore, it is necessary to study the distribution characteristics of the contribution degree of the training sample to guide sample selection in the deep learning training process. In this study, based on the prediction accuracy and the sample contribution degree, the optimal sample contribution combination algorithm (GWO-SCBP) was ultimately generated by the grey wolf optimizer (GWO) and error back propagation (EBP) algorithms. The contribution of training samples for each station of the Xi'an metro network was calculated and analyzed. The results show that the sample contribution is not only related to the distance between the sample and predicted value, but is also closely related to the station flow characteristics. By classifying the network stations and fitting the contribution degree of the central station of each type of station, linear equations of sample contribution degree were obtained, and the R 2 values attained at least 0.65, indicating a good fitting effect. INDEX TERMS Rail transit, passenger flow forecast, sample selection, grey wolf optimizer algorithm, artificial neural network.