Near infrared spectroscopy (NIRS) analysis technology, combined with chemometrics, can be e®ectively used in quick and nondestructive analysis of quality and category. In this paper, an e®ective drug identi¯cation method by using deep belief network (DBN) with dropout mechanism (dropout-DBN) to model NIRS is introduced, in which dropout is employed to overcome the over¯tting problem coming from the small sample. This paper tests proposed method under datasets of di®erent sizes with the example of near infrared di®use re°ectance spectroscopy of erythromycin ethylsuccinate drugs and other drugs, aluminum and nonaluminum packaged. Meanwhile, it gives experiments to compare the proposed method's performance with back propagation (BP) neural network, support vector machines (SVMs) and sparse denoising autoencoder (SDAE). The results show that for both binary classi¯cation and multi-classi¯cation, dropout mechanism can improve the classi¯cation accuracy, and dropout-DBN can achieve best classi¯cation accuracy in almost all cases. SDAE is similar to dropout-DBN in the aspects of classi¯cation accuracy and algorithm stability, which are higher than that of BP neural network and SVM methods. In terms of training time, dropout-DBN model is superior to SDAE model, but inferior to BP neural network and SVM methods. Therefore, dropout-DBN can be used as a §