Abstract Machine learning (ML) was used to measure the solubility of CO 2 in each new ILs due to the numerous the combination of forms of anions and cations. The ML model with 8869 data points and four algorithms (Transformer, DNN, RF, SVM), which were contained at different temperatures and different pressures, was employed to establish the relationship between structure and properties, encoding anions and cations based on a simplified molecular linear input specification. Moreover, a decoding method, which was referenced first for predicting CO 2 solubility in ILs with ML, was used to improve the data processing results. In this paper, four error indicators ( r , R 2 , RMSE, MAE) were used, and the Transformer model had the most accurate predictions with them of 0.993, 0.986, and 0.0021, respectively. Ultimately, SHapley Additive exPlanations analyses was used to understand the black box operation.