Figure shows the distribution of data points across the GHS categories. The distribution suggests that the data is heavily biased with 3,737 fatal, 29,678 toxic, and only 1,704 safe molecules. Models trained on this biased data would be more likely to predict molecules as toxic, which, while undesirable for incorrectly labeled safe molecules, is a serious concern for incorrectly labeled fatal molecules. To avoid biasing the model predictions, we chose to equalize the number of datapoints in each category (for a more detailed discussion on the need for sampling, please see the discussion in Supporting Information, S4). There are 3 ways of achieving this: i) over-sampling the minority category, ii) under-sampling the majority category, and iii) a combination of over-sampling and under-sampling. The first two strategies carry the risk of representation bias the generated samples are non-representative of the entire population -, and aggregation biasgenerated samples falsely represent the entire population by ignoring sub-groups of data. Intuitively, a combination of the two strategies should produce the best results. Here, we carried out random under-sampling of the majority class to avoid sampling bias and used the adaptive synthetic (ADASYN) sampling algorithm to over-sample the minority classes (refer to Section S1 for further details). These strategies produced classes with nearly equal numbers of datapoints, with 4,453 fatal, 5,000 toxic, and 5,001 safe molecules. The slight imbalance was further accounted for by the choice of evaluation metrics in the following section.