A prediction model based on artificial intelligence machine learning is constructed to follow the change of thyroid nodule volume, to evaluate the clin. effect of metformin on type 2 diabetes mellitus (T2DM). A total of 80 newly admitted patients with T2DM complicated with thyroid nodules were randomly divided into a training set and a verification set. The minimal redundancy maximal relevance and the least absolute shrinkage and selection operator were used to screen the optimal features to construct the radiomics model. Machine learning was carried out in the training set to build the convolutional neural network (CNN) model. The receiver operating characteristic curve area under the curve (AUC) was used to evaluate the model performance. There was no statistical difference between the general data of patients in the training set (n = 56) and the test set (n = 24) (P > 0.05). A total of 15 radiomics features were selected to construct the radiomics model. In the training set, the AUC of the CNN model was 0.878 (95%CI: 0.807-0.948). In the test set, the AUC of the CNN model was 0.860 (95%CI: 0.781-0.939). Building a prediction model based on artificial intelligence to track the thyroid nodule volume to evaluate the clin. efficacy of metformin for T2DM has a good prediction efficiency.