The particle size characteristic (d50, the particle size value corresponding to 50% of the cumulative mass fraction of the sieve analysis curve, μm) of formation sand is a key parameter in sand control design. In order to obtain the vertical distribution profile of particle size, the response relationship between reservoir particle size and logging curve based on a machine learning method is studied. Classical machine learning often lacks a feature extraction process inside the model. Moreover, when a single sampling point is used as the input, the adjacent data association relationship is missing to reflect the horizon information. Considering the geological continuity of reservoirs, using the trend and background information of logging curves,taking the depth adjacent data points as machine learning eigenvalues, a grain size profile prediction method based on multiple sampling points is proposed. A prediction model based on random forest, support vector machine, Xtreme gradient boosting tree and artificial neural networks is constructed and trained. The results show that, compared with the single point mapping model, the prediction accuracy of each model considering the vertical geological continuity of reservoir is higher than that of single point prediction. The five point mapping ANN model (ANN -5) has the best prediction effect, with the highest correlation coefficient 0.819 and the least error measures 9.59 of the testing set. It is proved that multiple sampling points are used as input to implicitly utilize part of the stratum information and effectively improve the prediction accuracy. The influence of feature point density on the accuracy of the model is also studied. The Gaussian kernel density distribution of the feature points of the samples in the two-dimensional input space of the training set and the feature point density of the training set at the sample points of the test set are calculated. It is concluded that the RMSE of the sample points of the test set in the high-density area is generally low. The prediction accuracy of the model will be further improved as the number of training samples increases. AHP is used to determine the weight of each factor affecting the model selection, and fuzzy comprehensive evaluation is used to optimize the machine learning model. According to the optimized model, the grain size profile of the reservoir in adjacent blocks is predicted. The predictions capture well the trend of grain size change and simulate its peak value.