While the use of deep learning in drug discovery is gaining increasing attention, the lack of methods to computate reliable errors in prediction for Neural Networks prevents their application to guide decision making in domains where identifying unreliable predictions is essential, e.g. precision medicine. Here, we present a framework to compute reliable errors in prediction for Neural Networks using Test-Time Dropout and Conformal Prediction. Specifically, the algorithm consists of training a single Neural Network using dropout, and then applying it N times to both the validation and test sets, also employing dropout in this step. Therefore, for each instance in the validation and test sets an ensemble of predictions were generated. The residuals and absolute errors in prediction for the validation set were then used to compute prediction errors for test set instances using Conformal Prediction. We show using 24 bioactivity data sets from ChEMBL 23 that dropout Conformal Predictors are valid (i.e., the fraction of instances whose true value lies within the predicted interval strongly correlates with the confidence level) and efficient, as the predicted confidence intervals span a narrower set of values than those computed with Conformal Predictors generated using Random Forest (RF) models. Lastly, we show in retrospective virtual screening experiments that dropout and RF-based Conformal Predictors lead to comparable retrieval rates of active compounds. Overall, we propose a computationally efficient framework (as only N extra forward passes are required in addition to training a single network) to harness Test-Time Dropout and the Conformal Prediction framework, and to thereby generate reliable prediction errors for deep Neural Networks.
Machine Learning -Data SplittingThe data sets were randomly split into a training set (70% of the data), a validation set (15%), and a test set (15%). For each data set, the training set was used to train a given network, whereas the validation set served to monitor the performance of the network during the training phase. In case of RF models, both the training and validation sets were used for model training.The predictive power of the final RF and DNN model was evaluated on the test set. The above split (and associated model training and testing) was repeated 20 times with random data set assignments.
-Deep Neural Networks (DNN)DNNs were trained using the python library Pytorch 48 . We defined four hidden layers, composed of 1000, 1000, 100 and 10 nodes, respectively. The number of neurons in each layer was selected to be smaller than the input fingerprint size to reduce the chances of overfitting 49 .Rectified linear unit (ReLU) activation was used in all cases. The training data was processed in batches of size equal to 15% of the number of instances. We used Stochastic Gradient Descent with Nesterov momentum, which was set to 0.9 and kept constant during the training phase 50 .The networks were trained over 4,000 epochs, and early stopping was used in all cases, i.e., the ...