In recent years, numerous structure-free deep-learning-based neural networks have emerged aiming to predict compound-protein interactions for drug virtual screening. Although these methods show high prediction accuracy in their own tests, we find that they are not generalizable to predict interactions between unknown proteins and unknown small molecules, thus hindering the utilization of state-of-the-art deep learning techniques in the field of virtual screening. In our work, we develop a compound-protein interaction predictor, YueL, which can predict compound-protein interactions with high generalizability. Upon comprehensive tests on various data sets, we find that YueL has the ability to predict interactions between unknown compounds and unknown proteins. We anticipate our work can motivate broad application of deep learning techniques for drug virtual screening to supersede the traditional docking and cheminformatics methods.