Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 12, No. 3, 2025 36 Research on Machine Learning Optimization Algorithm Based on QUBO Model Minyi Ye *, Lanqing Wu, Guanquan Zhu, Jiaguo Jiang School of Mathematics and Information Science, Guangzhou University, Guangzhou Guangdong, 510006, China * Corresponding author: Minyi Ye (Email: 32215150090@e.gzhu.edu.cn) Abstract: This paper deals with the research of QUBO model optimization machine learning algorithm, including the following: first, discretize the continuous parameters of the machine learning model into binary variables, and construct the QUBO objective function; then optimize the QUBO model by using the quantum annealing algorithm; and finally solve the globally optimal solution by adjusting the annealing parameters, which include the initial temperature, the coefficient of temperature reduction, and the number of iterations. QUBO model can discretize continuous variables (including parameters such as weights and bias) in AR, SVM, CNN and other models in machine learning into binary variables, so as to better deal with nonlinear relationships and reduce the computational complexity in the training process. With the QUBO model, the regularization term can be better controlled to avoid the overfitting problem. Meanwhile, the QUBO model can be solved in parallel by quantum computing or simulated annealing algorithm, which significantly improves the computational efficiency under large-scale data. Keywords: QUBO; AR; SVM; CNN; Quantum Computing; Simulated Annealing Algorithm. 1. Introduction The development of quantum technology is of great scientific significance and social value, which is expected to have a major impact on traditional technology and trigger technological revolution and industrial transformation [1]. Among them, quantum computing stands out in decision problems, classification problems, as well as prediction problems. In recent years, people have discovered that a mathematical formulation known as QUBO, an acronym for a Quadratic Unconstrained Binary Optimization problem. Through special reformulation techniques that are easy to apply, the power of QUBO solvers can be used to efficiently solve many important problems once they are put into the QUBO framework [2]. According to the above description and relevant data, this paper built mathematical models to solve the following problems. (1) Transform the Autoregressive (AR) model used in the time series forecasting problem whose primitive data ranging from January to September into a QUBO model and define the objective function and decision variables clearly. Based on this, use Kaiwu SDK's simulated annealing algorithm to solve the model and predict the demand for October. (2) Classify the provided dataset using an SVM model, among which you should transform the optimization problem of training an SVM-based classification model into a QUBO model and define the objective function and decision variables. Besides, solve the QUBO problem using the simulated annealing algorithm in the Kaiwu SDK. (3) Explore the integration of quantum computing and deep learning by selecting a specific application scenario like image classification or recommendation systems and design a deep learning model such as Convolutional Neural Net-works (CNNs), then convert the model's training optimization into a QUBO form, Finally use the simulated annealing algorithm to solve this optimization problem. 2. Model 1: The QUBO Model Based on Time Series Prediction (1) Establishment of QUBO Resource Demand Prediction Model Based on AR Firstly, based on the given problem settings, we conduct predictions by employing the autoregressive model. Autoregressive (AR) model is a model for studying time series, with wide applicability and high accuracy. AR model is mainly based on the linear combination of past observations and present disturbance values for prediction. The general P-order autoregressive process AR (p) is[3] ∑ (1) Where, Y indicates the predicted value of resource demand in month t, and Y indicates the real value of resource demand in month (t-1); c is a constant, representing the average level of the time series; φ refers to the autoregressive model parameter, representing the effect of the i-th lag term on the current value; ε refers to random noise with a mean of zero; p is the order of the AR model, indicating how many lag terms are used to predict the current value, as determined by the Akaike information criterion (AIC) and p=3. On this basis, We transform the above time series prediction problem into Quadratic Unconstrained Binary Optimization (QUBO) model. QUBO, whose minimum energy state is called the ground state. The QUBO model consists of multiple 0-1 binary variables, and a combination of which gives one solution. In particular, the combination of binary variables giving the minimum energy state of the QUBO model is called the ground-state solution. A QUBO model is represented by the formula below using a binary variable that takes 0 or 1( 0 1). ∑ ∑ (2) Where , ⋯ is a set of binary variables; is the external magnetic field coefficient representing the force on the binary variable ; and is the interaction 37 coefficient representing the weight of the connection between the binary variables and . A solution of a QUBO model is one of the combinations of binary variables. The ground- state solution of the QUBO model is the combination of binary variables that minimizes . The value of for a given combination of binary variables is called the objective value. Remember that Q is composed of a matrix , according to the QUBO Hamiltonian produced by it, the objective function is transformed into a quadratic form, then formula (2) can be simplified as: (3) Where x is the binary decision variable, represents the transpose of , a is the linear term coefficient vector, Q is the quadratic term coefficient matrix of the quadratic unconstrained binary optimization problem, and it is a symmetric matrix, otherwise the form of the coefficient matrix Q can be changed by the following formula: Symmetrical Form Upper Triangular Form , 0, (4) We take 70% of the data as the training set, 30% of the data as the test set, by determining the Sum of Squared Errors (SSE) of the predicted value of the minimum autoregressive function, predict the Computing resource demand in October. In this problem, we aim to minimize the predicted value error while satisfying the constraint that demand varies within a reasonable range. Therefore, based on the above Analysis, an objective function D with minimized predicted value is constructed: ∑ (5) Combined with formula (3), we can see that the objective function can be expressed as follows: (6) Based on this, we define a (1+p) · n-dimensional vector x to discretize the continuous values c and to binary decision variables, where : is the binary representation of c and the binary representation of is : , arranged in the order of i: , , ⋯ , , ,⋯ , ,⋯ (7) The mathematical formula for the specific binarization is as follows: ∑ 2 ∑ 2 (8) Substituting formula (8) into formula (6) can simplify and expand the objective function: ∑   2 ∑   2 2 ∑   ∑   2 ∑   2 2 ∑   2 ∑   ∑   2 ∑   ∑   2 (9) And since the constant term has nothing to do with the value of the decision variable when the function D gets the minimum value, for simple operation, we directly ignore the constant term , formula (9) can be simplified to the following mathematical expression: ∑   2 ∑   2 2 ∑   ∑   2 ∑   2 2 ∑   2 ∑   ∑   2 ∑   ∑   2 (10) In addition, we constrain the decision variable by the following formula: 0 2 1 2 1 (11) Among them, by observing the demand data from January to September, we calculate and find that the data 9000 in January is close to 2 1, so the value range of c is set in the interval 0, 2 1 ; Similarly, we find that the difference of data multiples is not more than two times, so the value range of is set in the interval 2 , 1 . Among them, the QUBO matrix needs to be converted to Ising variable before using Kaiwu SDK. The Ising Model is a random process model that describes the phase transition of matter, which is abstracted into the following mathematical form: ∑ , ∑ (12) Where, is the spin variable to be found, the value is {- 1,1}, H is the Hamiltonian, J is the quadratic term coefficient, 38 and h is the linear term coefficient, are known quantities[4] We adopt the following formula as the conversion formula between the binary variable and the Ising variable: (13) Where, 1 correspond 0 , 1 correspond 1. Here, we summarize the solution of this model: Figure 1. The solution of model 1 (2) Solution of Resource Demand Prediction Model Based on SA In order to solve the resource demand corresponding to October when the error of the predicted value is minimized, we adopted the simulated annealing solver built in Kaiwu SDK to solve it. The following is the flow chart of the simulated annealing algorithm solver. Figure 2. Flow chart of QUBO model solved by simulated annealing For the parameters in the simulated annealing solver in the Kaiwu SDK, we set them as follows: Select the initial temperature and the end temperature , and select the appropriate cooling coefficient during the annealing process, so that the iterative depth of each temperature in the annealing process does not exceed 100. Table 1. Simulated annealing parameter table Parameters Select parameter values Initial temperature 3000 Cutoff temperature 10 Cooling factor 0.90 Iterations per temperature 100 Size limit 100 By solving the simulated annealing solver, we get the following results: Table 2. Optimal prediction parameter values table Optimal prediction parameters Value c 1393 0.6484 0.1016 0.1351 At this point, the mean square error has reached its minimum value of 30,723.78. Among them, can be regarded as the weight of the real value i before the predicted value to the predicted value, then the phenomenon of great influence on the predicted value is in line with reality, which is reasonable. On this basis, we substitute the formula (1) to solve the predicted value of each month as follows: Table 3. Statistics of predicted values for each month Month Predicted Value Month Predicted Value April 9784.98 August 10443.38 May 10030.58 September 10613.51 June 10147.90 October 10719.36 July 10248.88 In addition, we draw the fitting image as follows: It can be seen from the above figure that the predicted results have a high goodness of fit. Based on this, we calculated a variety of prediction evaluation indicators to help explain the excellent performance of the results. In addition to this, we also visualized the process of Hamiltonian change over time in the simulated annealing algorithm to reflect the energy state of the system. As can be seen from the figure above, when the system is in the initial state, the energy is higher; Then, the Hamiltonian decreases rapidly, and the system quickly finds a lower energy state in the optimization process; When the Hamiltonian approaches 0.03 seconds, there is a small increase, which is because the algorithm is trying to jump out of the local optimal solution. After the decrease, the Hamiltonian tends to be stable, indicating that the algorithm has converged and the system has reached the global optimal state. Solving time of the QUBO model is approximately 0.07s. 3. Model 2: The QUBO Model Based on SVM Classification (1) Establishment of QUBO-Classification Model Based on SVM 39 Figure 3. The predicted value compared with the true value Table 4. Results evaluation index value statistics Prediction Evaluation Indicators Value MAE 67.624 MAPE 0.667 0.933 Figure 4. Visualization of Hamiltonian value over time Support Vector Machine (SVM) is developed from the optimal classification surface in the case of linear separability. The basic idea can be illustrated by the two-dimensional situation in Figure 4. In the figure below, the solid point and the hollow point represent two types of samples respectively. If they are linearly separable, the result of machine learning is a hyperplane (also known as the discriminant function), which divides the training sample into positive and negative classes. Obviously, there are infinite number of such hyperplanes. According to the requirement of the Structure Risk Minimization principle (SRM), the result of machine learning should be the optimal hyperplane, which can not only correctly separate the two types of training samples. but also maximizes the classification interval. Since SVM is a binary classification model, while this is a three-classification problem, we first split the three-classification problem into three different binary classification problems. including distinguishing between Setosa and Versicolor, distinguishing between Setosa and Virginica, including distinguishing between Setosa and versicolor, distinguishing between Setosa and virginica, distinguishing between Virginica and Versicolor. Distinguishing between Virginica and Versicolor. By doing this, a tripartite classification problem is transformed into three independent binary classification problems. Suppose an M-dimensional hyperplane is described by the following equation [5]: ∙ 0 ∈ , ∈ (14) 40 Figure 5. Classification hyperplane in the linearly separable case Then the optimal hyperplane with the largest classification interval can be obtained by finding the minimum value of ‖ ‖ , where the constraints are: ∙ 1 0 1,⋯ , (15) Where, ∈ 1, 1 , is the sample eigenvector. The constraint conditions ensure that the distance from the data point to the hyperplane is at least 1. When the above formula obtains an equal sign, it means that the data point is exactly on the interval boundary, and these data points are called support vectors. In the case of linear indivisibility, such as the presence of noisy data, SVM introduces a relaxation term 0 in the above equation to achieve soft spacing, i.e.: ∙ 1 1,⋯ , (16) Based on this, the objective function is changed into the following formula: min , ∑ (17) Where w is the normal vector of the hyperplane, b is the bias of the hyperplane and is the relaxation variable, C is the regularization parameter, which is used to control the model's tradeoff between classification interval and misclassification, and determines the relative importance of the two, while its value is selected by cross-validation, that is, adjusting C according to the performance on the verification set. Based on the above analysis, we transform SVM into QUBO model, which means that formula (17) is transformed into formula (3). First, we discretized w, b, and in SVM by converting to binary. Suppose ∈ , , represented by m binary variables , ∈ 0,1 : ∆ ∑ , ∙ 2 (18) Of which, ∆ (19) Then the mathematical expression of binary conversion of w binormal is as follows: ‖ ‖ ∑ ∑ ∆ ∑ , ∙ 2 (20) In the same way, we assume that ∈ , , represented by binary variable , ∈ 0,1 : ∆ ∑ , ∙ 2 (21) Among them, ∆ (22) And , respectively represent the minimum and maximum of b. To convert formula (15) into QUBO penalty term, we have: ∑ max 0,1 (23) Where, ∑ , , b is the bias and is the penalty term weight. Secondly, we substitute the binary expressions of w and b into the above formula respectively, then we have: (24) Where, ∑   , is the constant term, ∆ ∑   ∑   , ⋅ , ⋅ 2 ∆ ∑   , ⋅ 2 is the part about the binary variable. Finally, substitute the above into the formula (23): (25) Where 1 ∑   , is the constant term, ∆ ∑   ∑   , , 2 ∆ ∑   , 2 is the linear term about the binary variable, respectively remember the constant term is , , then the above formula can be abbreviated as follows: 1 (26) Then formula (23) can be written as: ∑ max 0, (27) 41 Consequently, the objective function can be integrated as follows: (28) (2) Solving QUBO-Classification Model Based on SA Firstly, we do data preprocessing, which scramps the original ordered data, and uses 70% of the data for data training, and the rest of which is used for data prediction. We still use the simulated annealing solver built in Kaiwu SDK for solving, in which the parameters in the solver are set as follows: Table 5. Simulated annealing parameter table Parameters Select parameter values Initial temperature 100 Cutoff temperature 10 Cooling factor 0.99 Iterations per temperature 10 Size limit 10 Select the initial temperature and the end temperature , and select the appropriate cooling coefficient during the annealing process, so that the iterative depth of each temperature in the annealing process does not exceed 10. By solving the simulated annealing solver, we get 3 independent binary classification problem parameter results: Table 6. Optimal prediction parameter values (Iris-setosa and Iris- versicolor) Optimal prediction parameters Value -0.269 0.338 -0.701 -0.749 b -0.247 50 At this point, the objective function Q reaches a minimum, and w is the decision hyperplane normal vector, and b is the bias and is the penalty term weight. On this basis, we draw the classification result image as follows: It can be seen from the above figure that QUBO-SVM binary classification results are more accurate. Based on this, we calculated a variety of prediction evaluation indicators to help explain the excellent results. Figure 6. Comparison of classical SVM and QUBO-SVM classification (Iris-setosa and Iris-versicolor) Table 7. Statistics of outcome evaluation indicators (Iris-setosa and Iris-virginica) Data set Recall rate F1 Accuracy Rate Precision rate Training Set 1 1 1 1 Test Set 1 1 1 1 Based on this, we solve the hyperplane parameters of Iris- setosa and Iris-virginica: 42 Table 8. Optimal prediction parameter values (Iris-setosa and Iris-virginica) Optimal prediction parameters Value -0.098 0.138 -0.663 -0.657 b -0.139 24 At this point, the objective function Q reaches its minimum value. Based on this, we draw the classification result image as follows: Figure 7. Comparison of classical SVM and QUBO-SVM classification (Iris-setosa and Iris-virginica) As can be seen from the above figure, QUBO-SVM binary classification results are more accurate. Based on this, we calculate multiple prediction evaluation indicators to assist in illustrating the excellent results. Table 9. Statistics of outcome evaluation indicators (Iris-setosa and Iris-virginica) Data set Recall Rates F1 Accuracy rate Precision rate Training Set 1 1 1 1 Test Set 1 1 1 1 In the same way, we solve for the hyperplane parameters of Iris-versicolor and Iris-virginica: Table 10. Optimal prediction parameter values (Iris-versicolor and Iris-virginica) Optimal prediction parameters Value 1.026 2.191 -5.459 -7.785 b 0.794 10 At this point, the objective function Q reaches the minimum value, where, due to the fusion of data points of Iris-versicolor and Iris-virginica, we draw a comparison diagram of classification results of Iris-versicolor and Iris- virginica between SVM and QUBO-SVM: Figure 8. Comparison of classification results between classical SVM and QUBO-SVM (Iris-versicolor and Iris-virginica) In addition, we calculated a variety of predictive evaluation indicators to assist in illustrating superior classification 43 performance: Table 11. Statistics of outcome evaluation indicators (Iris-versicolor and Iris-virginica) Data set Recall Rates F1 Accuracy Rate Precision rate Training Set 0.957 0.957 0.957 0.958 Test Set 0.942 0.933 0.933 0.933 In addition, we also visualized the change of Hamiltonian over time in the simulated annealing algorithm during the solving of 3 binary classification problems to reflect the energy state of the system. Figure 9. Visualization of Hamiltonian changes over time for 3 binary classification problems From the figure above, we can see that the Hamiltonian drops rapidly at the beginning, which indicates that the energy of the system decreases rapidly, and then there are some fluctuations. These fluctuations indicate that during the optimization process, the system is exploring different states in order to find the state with lower energy. As time goes on, the rate of decline gradually slows down, and the Hamiltonian tends to stabilize, which may mean that the system has approached or reached a stable state. And Solving time of the QUBO model is between 0.07s and 0.09s. And solving time of the QUBO model is between 0.07s and 0.09s. 4. Model 3: The QUBO Model Based on CNN Image Classification (1) Establish QUBO Model of CNN for Image Classification of MNIST Handwritten Numerals Dataset So far, the pattern recognition system based on convolutional neural network is one of the systems with the best performance, especially in the field of handwritten character recognition, and has been used as the evaluation standard for the performance of machine recognition systems. By mining the spatial correlation in the data, convolutional neural network can reduce the number of trainable parameters in the network, so as to improve the backpropagation algorithm efficiency of the forward propagation network. As shown in the following figure, after the input layer reads images of a unified size, the input image is convolved with three filters and one additive bias. After convolution, three feature maps are generated in layer C1. Then, the four adjacent pixels in the feature map are grouped together to obtain the average value, and then weighted value and bias are added. Three feature maps of layer S2 are obtained by ReLU activation function. Among them, max 0, 29 These maps are then filtered accordingly to get the C3 layer. This layer then produces S4, as does S2. Finally, these pixel values are rasterized, connected into a one-dimensional vector input into a traditional neural network, and then enter the fully connected layer to produce an output. Figure 10. Illustration of convolutional neural networks 44 Among them, layer C is the convolutional layer, that is, the feature extraction layer. A convolutional layer usually contains multiple feature graphs with different weight vectors, so that a variety of different features can be obtained at the same position. Layer S is the pooling layer, which reduces the resolution of the feature map and reduces the sensitivity of the network output to displacement and deformation through local averaging and downsampling operations. Subsequent convolutional layers and pooling layers are alternately distributed and connected, forming a "double pyramid" structure: the number of feature maps gradually increases, and the resolution of the feature maps gradually decreases. Convolutional layers are the core of CNN, and each convolutional layer uses several convolutional layers to scan the input image. As for every convolution kernel, the convolution operation computes the weighted sum of the local region between the input image and the convolution kernel. Assuming the size of the input image is (height, width, depth), the convolution operation uses a convolution kernel of size , depth D, and the number of convolution cores (number of output channels) is F. For each local region and convolution kernel W in the input image X, the convolution operation is as follows [9]:       , , , , 30 Where, the convolution kernel , , representing the (m, n, d) element, , , is the (i+m-1, j+n-1, d) pixel of the input image, and b is the offset term. The pooling layer is used to downsample the feature map output of the convolutional layer. The pooling operation performed here is the maximum pooling, that is, for each region in the feature map, the maximum value in the region is selected as the output. Each image in the MNIST dataset corresponds to a digital label from 0 to 9, which is composed of NIST Special Database 1 and NIST Special Database 3. The training set in MNIST selects 30,000 samples from SD-3 and SD-1 respectively. The 60,000 samples were drawn from handwritten data from approximately 250 different individuals, and the 5,000 samples each from SD-3 and SD-1 were similarly selected as the test set. The images in the MNIST dataset are all of size, and the images of some numbers in the dataset are28 28[6] Figure 11. Images of the first 16 numbers in the MNIST data set In the multi-class classification problem, the objective function is minimize the difference between the predicted result and the true label. Assuming that the model predicts the result is and that the actual label is , we use the cross entropy loss function to measure the error [7]: ,   log 31 Where C is the total number of categories, and for this dataset, C is the constant 10; is the k-th element of the sample 's true label, if the sample belongs to class k, 1 , then 0 otherwise; is the probability that the sample predicted by the model belongs to class k. The output layer of CNN uses softmax activation function to calculate the probability of each class, softmax activation function is the mathematical expression as follows[8]: ∑ 32 Where, is the raw score of class k output by the fully connected layer, is the predicted probability of class k. For the convolutional layer l and the fully connected layer, the output can be expressed as follows: ReLU ∗ 33 Where, refers to the weight matrix of the convolution layer and the fully connected layer, and X is the output (or input image) of the previous layer and is the biased term. In addition, denoted as the target value, then the error term of the convolution layer can be expressed as follows: 34 In order to combine the variables involved in the above theoretical Analysis with QUBO, we defined as the binary activation variable of the i-th neuron, indicating whether the neuron is activated, with the value of 0 or 1; Binary variable for the model prediction class k, indicating whether the sample is classified as class k, taking the value 0 or 1; In addition, we need to replace it with binary , to expression. To prevent overfitting, we add regularization terms, especially L2 regularization terms. , 35 Based on the above Analysis, we determine that the objective function is: (36) Where, , , is the penalty coefficient that controls the importance of the error term. On this basis, we determine the constraint conditions, the classification results should meet "only one category is predicted", the activation value of neurons can only be 0 or 1, the discretization into binary decision variables in convolution operation, the calculation rules of weighted sum of neurons, the minimization of cross entropy loss function and regularization constraints, the specific mathematical expressions are as follows: 45   1 ∈ 0,1 , ∀ conv   fe   fe fe ∈ , , … , , ∀ , cross-entropy   log regularization reg   , 37 Where, is the predicted binary variable of class k, , , … , is the weight value after discretization. (2) Solution of Image Recognition Classification Codel Based on Simulated Annealing We still use the simulated annealing solver built in Kaiwu SDK for solving, in which the parameters in the solver are set as follows: Table 12. Simulated annealing parameter table Parameters Select parameter values Initial temperature 3000 Cutoff temperature 10 Cooling factor 0.90 Iterations per temperature 100 Size limit 100 Select the initial temperature and the end temperature , and select the appropriate cooling coefficient during the annealing process, so that the iterative depth of each temperature in the annealing process does not exceed 100. Through solving, we captured part of the images in the MNIST dataset and their recognition results, as shown below: Figure 12. Part of the image recognition results In addition to this, we visualize the changes in the loss (left) and accuracy (right) of the model training process over the training cycle: Figure 13. The change of loss and accuracy in the model training process with the training cycle As can be seen from the figure on the left, both training losses and validation losses decrease as the training cycle increases, indicating that the model is learning and gradually reducing the prediction error. After the initial decline, the validation loss levels off and is always lower than the training loss, indicating that the model performs well on the training set without significant overfitting. For the figure on the right, both the training accuracy and validation accuracy rise as the training cycle increases, and both approach 1.0, indicating that the model's predictions are becoming more accurate. And the training accuracy and verification accuracy are very close, which further indicates that the model is not overfitting and has good generalization ability on both the training set and the verification set. In addition, we calculated a variety of predictive evaluation indicators to help explain the excellent performance of image recognition classification results: Table 13. Results evaluation index value statistics (Iris-versicolor and Iris-virginica) Data set recall F1- score accuracy support Macro avg 0.99 0.99 0.99 10000 Weighted avg 0.99 0.99 0.99 10000 46 From the table above, we can see that the accuracy, recall rate, and F1 score of the model recognition results are close to 0.99 or 1.00, indicating that the model performs very well on handwritten digit recognition tasks. solving time of the QUBO model is 211s due to the huge amount of data and individual differences in hardware performance. 5. Conclusion For model 1, we used the monthly computational resource demand data provided by the problem and combined with AIC criterion to establish an autoregressive model of order 3. To predict the data in October, we took predicted resource demand in October as the result when SSE minimises. Then AR model is transformed into QUBO, and the parameters in AR are replaced by binary expressions, and the SSE function of binary variable as the decision variable is taken as the objective function. The minimum value is obtained when SSE equals to 30723.78, and the predicted value in October is 10719.36. In addition, we calculated that the MAPE of the model is 0.709, and the R-squared is 0.933, indicating that the prediction result of the model was excellent. By using Kaiwu SDK, the solving time of the QUBO model was 0.07 seconds. For model 2, we decomposed the tripartite classification into three binary classification tasks: Setosa vs. Versicolor, Setosa vs. Virginica, and Virginica vs. Versicolor. The objective function minimizes the norm of the normal vector of the SVM hyperplane for each task. The normal vector, bias, and relaxation variables of the hyperplane are discretized into binary variables, with a penalty term and weight introduced. The objective is then transformed into a QUBO, solved using the Kaiwu SDK, and evaluated. Here only demonstrate the normal vector for Setosa vs. Versicolor, it’s [-0.269, 0.338, - 0.701, -0.749], the bias is -0.247, and the penalty weight is 50. Evaluation metrics, including recall, F1-score, and accuracy, all exceeded 0.93, indicating good model performance. And the QUBO model solving time ranged from 0.07 to 0.09 seconds. For model 3, we used the MNIST dataset for image classification, applying convolutional neural networks (CNNs) with ReLU activation and cross-entropy loss. We introduced penalty coefficients for the convolutional and fully connected layers, as well as cross-entropy, and minimized the loss for image recognition. To prevent overfitting, L2 regularization was added. The softmax activation function was used in the output layer to calculate category probabilities. Evaluation metrics, including macro avg and weighted avg recall, F1-score, and accuracy, all exceeded 0.98, with a support of 10,000, indicating strong model performance. As QUBO model solving time was around 211 seconds. This paper fully demonstrates the application of the QUBO model in optimizing machine learning algorithms, which can be extended to other artificial intelligence algorithms and represents a future direction for research. Acknowledgments The authors gratefully acknowledge the financial support from 2024 Guangzhou University Student Innovation Training Project of Ministry of Education of P.R.C (2024110 78145). References [1] Wen, J., Wang, Z., Huang, Z. Optical experimental solutions for multi-channel partitioning problems and their applications in computing power scheduling. Sci. China Phys. Mech. Astron.66, 290313 (2023). [2] Glover, F., Kochenberger, G., Hennig, R., et al. Quantum Bridge Analysis I: A tutorial on formulating and using QUBO models. Ann Opera Studies 314, 141–183 (2022). [3] Chen Si. Based on machine learning research on electricity demand forecasting and inventory decisions [D]. Shenzhen university, 2021. The DOI: 10.27321 /, dc nki. Gszdu. 2020. 000186. [4] Chang Yunfeng. Phase Transition and Transmission Dynamics of Ising Model on Complex Networks [D]. Huazhong Normal University,2008. [5] Qi Hengnian. Overview of Support Vector Machines and their applications [J]. Computer Engineering, 2004, (10):6-9. [6] Xu Ke. Research on the application of Convolutional Neural networks in image recognition [D]. Zhejiang University,2012. [7] Zhang Xiaorong. Research on Deep Learning Algorithm Based on Convolutional Neural Network and Its Application[D]. Xidian University, 2015. [8] Chen Hongxiang. Semantic Image Segmentation Based on Convolutional Neural Networks [D]. Zhejiang University, 2016. [9] Yang Juyu. Research and Implementation of Object Recognition Based on Convolutional Neural Networks [D]. University of Electronic Science and Technology of China, 2016.