An automated model tuning system based on AI training intelligent workbench
By setting up data acquisition instruments and environmental monitoring points during the model training process, combining comprehensive performance indicators and intelligent control strategies, the problem of real-time data utilization and resource inefficiency in AutoML is solved, and the efficiency, stability and flexibility of the model training process is achieved, improving the robustness of the model and the ability to adapt to new tasks.
Patent Information
- Application Number
- CN202411475827.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing AutoML solutions lack effective utilization of real-time data during model training, make it difficult to accurately control different training stages, and the resource utilization efficiency is inefficient.
By setting up data acquisition instruments and environmental monitoring points, real-time data during model training is collected, pre-processed, and comprehensive performance indicators are used to conduct comprehensive evaluation, dynamically adjust intelligent control strategies, divide the model training process into different stages, and apply adaptive hyperparameter optimization, automatic exploration of model architecture and rapid adaptation to new task strategies.
Real-time monitoring and data quality assurance of the model training process are realized, parameter configuration is optimized, model robustness and generalization capabilities are improved, training efficiency and flexibility are significantly improved, resource consumption is reduced, and the model is efficient and stable and the ability to quickly adapt to new tasks.
Smart Images

Figure CN119398112B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an automated model tuning system based on an AI training intelligent workbench. Background Art
[0002] With the rapid development of artificial intelligence (AI) technology, the training of deep learning models has become a core component of data analysis and prediction. However, traditional model training methods often require extensive manual intervention to adjust hyperparameters and model architecture, which negatively impacts model performance and efficiency. In recent years, automated machine learning (AutoML) technology has emerged, aiming to optimize the model training process through automation, improving model performance and training efficiency. Despite this, existing AutoML solutions still suffer from several limitations, such as a lack of effective utilization of real-time data during training, difficulty in precisely controlling the different stages of model training, and a failure to fully consider resource utilization. Summary of the Invention
[0003] In view of the above existing problems, the present invention is proposed.
[0004] Therefore, the present invention provides an automated model tuning system based on an AI training intelligent workbench to solve the problems in the prior art of lack of effective real-time data utilization in the model training process, difficulty in accurately controlling different training stages, and low resource utilization efficiency.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides an automated model tuning system based on an AI training intelligent workbench, which includes a data acquisition module responsible for setting data acquisition instruments and environmental monitoring points, collecting real-time model data during model training, and performing preprocessing;
[0007] The model performance analysis module is responsible for analyzing the model performance based on the real-time model data and the original model data to obtain the final parameter configuration;
[0008] The model tuning module is responsible for using the final parameter configuration to train the model, dividing the model training process into different stages, and dynamically adjusting the intelligent control strategy based on the model performance requirements to tune the model at different stages.
[0009] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench of the present invention, the setting of data acquisition instruments and environmental monitoring points, collecting real-time model data during model training, and performing preprocessing includes the following steps:
[0010] Install performance monitoring tools on training servers, deploy various sensors in the training environment, and deploy traffic monitoring tools in the data transmission path;
[0011] Use Python programming language to develop scripts, regularly call the API interface provided by the training server, and obtain real-time model data from the training server through the API interface during the model training process;
[0012] The performance monitoring tools include Prometheus and Grafana;
[0013] The multiple sensors include a temperature sensor and a humidity sensor;
[0014] The traffic monitoring tool refers to NetFlow;
[0015] The real-time model data includes accuracy, loss function value, resource usage, gradient information and training time;
[0016] The preprocessing includes removing outliers, unifying time series, handling missing data and standardization.
[0017] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench of the present invention, the model performance analysis is performed based on the real-time model data and the original model data, including the following steps:
[0018] Obtaining model original data from the historical records of model training, wherein the model original data includes a training set, a validation set, and a test set;
[0019] Calculate the comprehensive performance index, which reflects the performance difference of the model on the training set and the validation set, and takes into account both loss and accuracy, expressed as,
[0020]
[0021] Among them, P represents the comprehensive performance index, L T represents the average loss on the training set, L V represents the average loss on the validation set, A V represents the average accuracy on the validation set, A T represents the average accuracy on the training set, W L Represents the weight factor of the loss, W A represents the weight factor of accuracy, and δ' represents the correction parameter;
[0022] Calculate the gradient health index, calculate the health of the gradient based on the standard deviation and average gradient of the gradient, and evaluate the stability of the gradient, expressed as,
[0023]
[0024] Where G represents the gradient health index, σ g represents the standard deviation of the gradient, μ g represents the average gradient, ∈ represents the anti-zero constant;
[0025] Combining resource utilization and training time, we define resource efficiency indicators to evaluate the utilization efficiency of hardware resources, expressed as,
[0026]
[0027] Among them, R represents the resource efficiency index, U CPU Indicates CPU utilization, U GPU Indicates GPU utilization, U Mem represents memory utilization, t represents training time, t max Indicates the maximum allowed training time;
[0028] Based on the Z-score to measure the deviation of the data point from the mean, the anomaly detection index is calculated, which is expressed as:
[0029]
[0030] Among them, I represents the anomaly detection index, Z i represents the Z-score of the i-th data point, n represents the number of data points, and i represents the index of the data point.
[0031] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench of the present invention, the following steps are included: obtaining the final parameter configuration based on model performance analysis:
[0032] Consider minimizing the comprehensive performance index to reduce the risk of overfitting and underfitting, minimizing the gradient health index to ensure gradient stability, maximizing the resource efficiency index to improve resource utilization efficiency, minimizing the anomaly detection index to reduce anomalies, and calculating the comprehensive score value, which is expressed as,
[0033]
[0034] Among them, S represents the comprehensive score value;
[0035] Calculate the comprehensive score values under all configurations and select the configuration with the highest comprehensive score value as the final parameter configuration.
[0036] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench of the present invention, the model training is performed using the final parameter configuration, and the model training process is divided into different stages, including the following steps:
[0037] Based on model performance requirements, model training is divided into three stages: rapid learning, fine-tuning, and resource optimization;
[0038] In the rapid learning stage, a higher learning rate and a larger batch size are used. In the fine-tuning stage, the learning rate is gradually reduced and the regularization strength is increased. In the resource optimization stage, the batch size is dynamically adjusted to reduce unnecessary resource consumption and achieve model tuning.
[0039] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench described in the present invention, the intelligent control strategy includes an adaptive hyperparameter optimization strategy, an automatic exploration model architecture strategy, and a rapid adaptation to new tasks strategy;
[0040] Based on the model performance requirements, the intelligent control strategy is dynamically adjusted to optimize the model at different stages.
[0041] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench described in the present invention, the adaptive hyperparameter optimization strategy includes the following steps:
[0042] Automatically adjust learning rate, batch size, and regularization parameters based on performance feedback during model training;
[0043] The learning rate is dynamically adjusted through the learning rate decay strategy and the learning rate backtracking strategy, which are expressed as,
[0044]
[0045]
[0046] Among them, η j represents the learning rate of the jth iteration through the learning rate decay strategy, η j ' represents the learning rate of the jth iteration through the learning rate backtracking strategy, η0 represents the initial learning rate, j represents the current number of iterations, J represents the total number of iterations, η j-1 represents the learning rate of the j-1th iteration, L val,j-1 represents the validation set loss of the j-1th iteration, L val,j represents the validation set loss of the jth iteration, K represents the backtracking factor, and ρ represents the exponential factor that controls the decay rate of the learning rate;
[0047] When stable model convergence is required, only the learning rate decay strategy is used. When the learning rate needs to be dynamically adjusted according to the validation set performance during model training, only the learning rate backtracking strategy is used. When both stable model convergence and dynamic adjustment of the learning rate according to the validation set performance are required during model training, both the learning rate decay strategy and the learning rate backtracking strategy are used.
[0048] Adaptively adjust the batch size, expressed as,
[0049]
[0050] Among them, B j represents the batch size of the jth iteration, B j-1 Indicates the batch size of the j-1th iteration, M max Indicates the upper limit of memory usage, M j Indicates the memory usage of the jth iteration, M j-1 represents the memory usage of the j-1th iteration, and ξ represents the adjustment factor of the batch size;
[0051] Adjust the regularization parameter, expressed as,
[0052]
[0053] Among them, λ j represents the regularization parameter of the jth iteration, λ j-1 represents the regularization parameter of the j-1th iteration, and χ represents the adjustment factor of the regularization parameter.
[0054] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench of the present invention, wherein: using the learning rate decay strategy and the learning rate backtracking strategy at the same time, the following steps are included:
[0055] First, the learning rate is calculated using the learning rate decay strategy;
[0056] Then, according to the calculated learning rate, set the total number of iterations threshold;
[0057] Finally, the total number of iterations is compared with the total number of iterations threshold to determine whether to use the learning rate backtracking strategy;
[0058] When the total number of iterations is greater than the total number of iterations threshold, the learning rate backtracking strategy is used to adjust the learning rate;
[0059] When the total number of iterations is less than or equal to the total number of iterations threshold, the initial learning rate is used.
[0060] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench described in the present invention, the automatic exploration of the model architecture strategy includes the following steps:
[0061] Use neural architecture search technology to automatically explore the model architecture space and find the optimal architecture;
[0062] Initialize the policy network parameters, define the reward function and baseline, set the learning rate, define the search space, determine the comprehensive score function, use the current policy network to sample an action, execute the action and record the new state, and calculate the comprehensive score value as the reward function;
[0063] Combined with the policy gradient method, the formula for updating the policy network parameters is designed, which is expressed as,
[0064]
[0065] Among them, Δθ represents the update amount of the policy network parameter θ, η represents the learning rate, R(s,a) represents the reward obtained after taking action a in state s, and b represents the baseline. represents the gradient of the parameter θ, logπ θ (s|a) represents the logarithmic probability of taking action a in state s, where a represents taking action and s represents the state;
[0066] When the maximum number of iterations is reached, the search ends. Otherwise, a new action is sampled to continue the search task.
[0067] As a preferred solution of the automated model tuning system based on the AI training intelligent workbench described in the present invention, the rapid adaptation to new task strategies includes the following steps:
[0068] Using meta-learning techniques to enable the model to quickly adapt to new tasks;
[0069] Initialize model parameters, set inner and outer learning rates, and define training and query task sets;
[0070] Randomly extract a small batch of samples from the task dataset as the support set, calculate the loss function on the support set, and use gradient descent to update the model parameters, which is expressed as,
[0071]
[0072] Among them, φ' represents the updated model parameters on task T, represents the loss function on task T, γ represents the inner learning rate, represents the gradient of φ, T represents any task in the training task set, and φ represents the initialization model parameters;
[0073] Randomly extract another small batch of samples from the task dataset as the query set, calculate the loss function on the query set, and use gradient descent to update the model parameters, which is expressed as,
[0074]
[0075] Among them, δ represents the outer layer learning rate, Represents the loss function on another task T';
[0076] Repeat the steps of updating the model parameters until all training tasks in the training task set are completed;
[0077] Use the model parameters trained by meta-learning to quickly adapt to new tasks, extract a small number of samples from the new task as a support set, use the support set to update the model parameters, and use the updated parameters to train on the new task.
[0078] The beneficial effects of the present invention are as follows: by setting up data acquisition instruments and environmental monitoring points, real-time data collection and preprocessing are achieved during the model training process, which not only ensures the quality and consistency of the data, but also provides a solid foundation for subsequent performance analysis. By using comprehensive performance indicators, gradient health index, resource efficiency indicators and anomaly detection indicators, the model performance is comprehensively evaluated, the parameter configuration is optimized, and the good performance and robustness of the model on different data sets are ensured. The model training process is divided into different stages, and the intelligent control strategy is dynamically adjusted, and refined management and resource optimization are carried out, which significantly improves the flexibility and efficiency of model training, accelerates the model convergence speed, reduces resource consumption, and improves the overall performance and generalization ability of the model. Ultimately, these steps work together to make the model training process more efficient and stable, and can quickly adapt to new tasks, with broad application prospects and practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0080] Figure 1 This is a flow chart of the automated model tuning system based on the AI training intelligent workbench in Example 1.
[0081] Figure 2 This is the decision diagram for adaptive learning rate optimization in Example 1. DETAILED DESCRIPTION
[0082] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0083] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0084] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0085] Example 1, with reference to Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides an automated model tuning system based on an AI training intelligent workbench, comprising the following steps:
[0086] S1. Set up data collection instruments and environmental monitoring points to collect real-time model data during model training and perform preprocessing.
[0087] Install performance monitoring tools on training servers, deploy various sensors in the training environment, and deploy traffic monitoring tools in the data transmission path;
[0088] Use Python programming language to develop scripts, regularly call the API interface provided by the training server, and obtain real-time model data from the training server through the API interface during the model training process;
[0089] Performance monitoring tools include Prometheus and Grafana to monitor CPU usage, memory usage, and disk I / O;
[0090] Various sensors include temperature sensors and humidity sensors to detect temperature and humidity;
[0091] Traffic monitoring tools refer to NetFlow, which is used to monitor data transmission rate and latency;
[0092] Model real-time data includes accuracy, loss function value, resource usage, gradient information, and training time;
[0093] Preprocessing includes removing outliers, unifying time series, handling missing data, and standardization.
[0094] It should be noted that by setting up data acquisition instruments and environmental monitoring points, collecting real-time model data during model training and performing preprocessing, real-time monitoring of the training process and data quality assurance are achieved. By collecting comprehensive training data and performing preprocessing, the quality and consistency of the data are ensured, laying a solid foundation for subsequent performance analysis, improving the transparency of the model training process, reducing training deviations caused by data quality issues, and enhancing the reliability of model training.
[0095] S2. Perform model performance analysis based on the model's real-time data and original model data to obtain the final parameter configuration.
[0096] Obtaining model original data from the historical records of model training, wherein the model original data includes a training set, a validation set, and a test set;
[0097] Calculate the comprehensive performance index, which reflects the performance difference of the model on the training set and the validation set, and takes into account both loss and accuracy, expressed as,
[0098]
[0099] Among them, P represents the comprehensive performance index, which reflects the performance difference of the model on the training set and the validation set, and takes into account both loss and accuracy to evaluate the overall performance of the model. T Represents the average loss on the training set, which is used to measure the degree of fit of the model on the training set. V represents the average loss on the validation set, which is used to measure the generalization ability of the model on unseen data. V Represents the average accuracy on the validation set, which is used to measure the classification accuracy of the model on unseen data. T Represents the average accuracy on the training set, which is used to measure the classification accuracy of the model on the training set. L Represents the weight factor of the loss, which is used to adjust the proportion of the loss in the comprehensive performance index. Its value can be adjusted according to actual needs to balance the importance of the loss. W A The weight factor for accuracy is used to adjust the weight of accuracy in the comprehensive performance index. Its value can be adjusted according to actual needs to balance the importance of accuracy. δ' represents a correction parameter used to correct the performance difference between the training set and the validation set. This parameter can be adjusted to fine-tune the calculation results of the comprehensive performance index to better reflect the actual performance of the model.
[0100] Calculate the gradient health index, calculate the health of the gradient based on the standard deviation and average gradient of the gradient, and evaluate the stability of the gradient, expressed as,
[0101]
[0102] Among them, G represents the gradient health index, which is an indicator to measure the stability of the gradient. It evaluates the overall health of the gradient by considering the fluctuation and average value of the gradient. The higher the health index, the more stable the gradient is and the smaller the fluctuation during the model training process, which helps the model converge more smoothly. g Represents the standard deviation of the gradient. The larger the standard deviation, the more drastic the gradient change, which may lead to large fluctuations during model training. The standard deviation is a key statistic for measuring gradient volatility. g Represents the average gradient, which is the average of all gradient values and reflects the central position of the gradient in multiple iterations. The average gradient helps us understand the overall trend and size of the gradient. ∈ represents the anti-zero constant, which is a very small positive number used to prevent the denominator from being zero and ensure the stability of mathematical calculations.
[0103] Combining resource utilization and training time, we define resource efficiency indicators to evaluate the utilization efficiency of hardware resources, expressed as,
[0104]
[0105] Among them, R represents the resource efficiency index, which reflects the efficiency of hardware resource utilization, and U CPU Indicates CPU utilization, which is used to evaluate the use of CPU resources. GPU Indicates GPU utilization, which is used to evaluate the usage of GPU resources. Mem represents memory utilization, which is used to evaluate the usage of memory resources. t represents training time, which is used to evaluate training efficiency. max Indicates the maximum allowed training time, used to set a reference standard for time efficiency;
[0106] Based on the Z-score to measure the degree of deviation of the data point from the mean, the anomaly detection index is calculated, which is expressed as:
[0107]
[0108] Among them, I represents the anomaly detection index, which is an indicator that measures the number and severity of outliers in a data set. It is calculated by accumulating the absolute value of the Z-score of all data points. The higher the value of this indicator, the more outliers there are in the data set or the greater the degree to which the outliers deviate from the mean. i It represents the Z-score of the i-th data point. The larger its absolute value, the more likely the data point is an outlier. n represents the number of data points. This parameter determines the range of the accumulated anomaly detection index. i represents the index of the data point. i traverses from 1 to n to ensure that the Z-score of each data point is taken into account.
[0109] Consider minimizing the comprehensive performance index to reduce the risk of overfitting and underfitting, minimizing the gradient health index to ensure gradient stability, maximizing the resource efficiency index to improve resource utilization efficiency, minimizing the anomaly detection index to reduce anomalies, and calculating the comprehensive score value, which is expressed as,
[0110]
[0111] Among them, S represents the comprehensive score value. The larger the value of the comprehensive score function S is, the better the overall performance of the model configuration is.
[0112] Calculate the comprehensive score values under all configurations and select the configuration with the highest comprehensive score value as the final parameter configuration.
[0113] It should be noted that the final parameter configuration is obtained by comprehensive performance indicators, gradient health index, resource efficiency index and anomaly detection index, which realizes a comprehensive evaluation of model performance and the selection of optimal parameter configuration. Through multi-dimensional performance evaluation, it is ensured that the model not only performs well on the current data set, but also can effectively utilize resources and has strong robustness, reducing the risk of overfitting and underfitting of the model, improving resource utilization efficiency, reducing the impact of abnormal data, and making the model more stable and efficient.
[0114] S3. Use the final parameter configuration to train the model and divide the model training process into different stages. Based on the model performance requirements, dynamically adjust the intelligent control strategy and tune the model at different stages.
[0115] Based on model performance requirements, model training is divided into three stages: rapid learning, fine-tuning, and resource optimization;
[0116] In the rapid learning stage, the focus is on quickly establishing the foundation of the model, so a higher learning rate and a larger batch size are mainly used. Specifically, a higher learning rate is initialized, such as 0.1, a larger batch size is selected, such as 64, and a lower regularization parameter is set, such as 0.0001. Use the above configuration for training until the model shows good performance on the training set; in the fine-tuning stage, the focus is on improving model performance and reducing the risk of overfitting, so learning rate decay, batch size adjustment and regularization parameter adjustment are mainly used. A learning rate decay strategy is used, such as attenuating the learning rate by a certain proportion after a certain number of iterations, and dynamically adjusting the batch size according to memory usage. For example, when memory usage is close to the upper limit, the batch size is appropriately reduced, and the batch size is gradually increased. Gradually increase the value of the regularization parameter, such as increasing the regularization parameter by a certain proportion after a certain number of iterations, and use the above configuration for training until the model performance on the validation set reaches a satisfactory level; in the resource optimization stage, the focus is on optimizing the use of computing resources, so batch size adjustment is mainly used to reduce memory usage while maintaining model performance. Specifically, continue to use the learning rate decay strategy, such as decaying the learning rate by a certain proportion after a certain number of iterations, and dynamically adjust the batch size according to memory usage. For example, when memory usage approaches the upper limit, appropriately reduce the batch size, keep the regularization parameter unchanged or slightly adjust it to maintain model performance, and use the above configuration for training until the predetermined performance standard is reached or resource utilization efficiency reaches the best state.
[0117] Intelligent control strategies include adaptive hyperparameter optimization strategies, automatic model architecture exploration strategies, and rapid adaptation to new tasks strategies;
[0118] Based on the model performance requirements, the intelligent control strategy is dynamically adjusted to optimize the model at different stages.
[0119] The adaptive hyperparameter optimization strategy includes the following steps:
[0120] Automatically adjust learning rate, batch size, and regularization parameters based on performance feedback during model training to accelerate convergence and prevent overfitting;
[0121] The learning rate is dynamically adjusted through the learning rate decay strategy and the learning rate backtracking strategy, which are expressed as,
[0122]
[0123]
[0124] Among them, η j represents the learning rate of the jth iteration through the learning rate decay strategy, η j' represents the learning rate of the jth iteration through the learning rate backtracking strategy, η0 represents the initial learning rate, j represents the current number of iterations, J represents the total number of iterations, η j-1 represents the learning rate of the j-1th iteration, L val,j-1 represents the validation set loss of the j-1th iteration, L val,j represents the validation set loss of the jth iteration, K represents the lookback factor, which determines the degree of influence of the validation set loss change on the learning rate adjustment, and ρ represents the exponential factor that controls the decay rate of the learning rate;
[0125] When stable model convergence is required, only the learning rate decay strategy is used. When the learning rate needs to be dynamically adjusted according to the validation set performance during model training, only the learning rate backtracking strategy is used. When both stable model convergence and dynamic adjustment of the learning rate according to the validation set performance are required during model training, both the learning rate decay strategy and the learning rate backtracking strategy are used.
[0126] Furthermore, if you want to smoothly reduce the learning rate throughout the training process to ensure stable convergence of the model, you can use only the learning rate decay strategy, which helps the model adjust the weights more finely in the later stage of training and avoid oscillations caused by excessive learning rate. If you want to dynamically adjust the learning rate according to the performance of the validation set during model training to prevent overfitting, you can use only the learning rate backtracking strategy, which can automatically reduce the learning rate when the model starts to overfit, helping the model find a better local optimal solution. If you want to ensure that the learning rate decreases steadily during training and dynamically adjust the learning rate according to the performance of the validation set, you can use both strategies at the same time. Combining the advantages of the two strategies, you can ensure that the learning rate decreases steadily and adjust the learning rate in time when the model starts to overfit.
[0127] Using both the learning rate decay strategy and the learning rate backtracking strategy includes the following steps:
[0128] First, the learning rate is calculated using the learning rate decay strategy;
[0129] Then, according to the calculated learning rate, set the total number of iterations threshold;
[0130] Finally, the total number of iterations is compared with the total number of iterations threshold to determine whether to use the learning rate backtracking strategy;
[0131] When the total number of iterations is greater than the total number of iterations threshold, the learning rate backtracking strategy is used to adjust the learning rate;
[0132] When the total number of iterations is less than or equal to the total number of iterations threshold, the initial learning rate is used.
[0133] At the first iteration, j = 1, there is no historical validation set loss data, so the loss change ratio cannot be calculated. This means it is impossible to know whether the model is starting to overfit or whether performance has improved. Therefore, the first iteration is usually trained using the initial learning rate, and the validation set loss of the first iteration is recorded. Only after the second iteration, j = 2 and above, is there enough information to compare the change in validation set loss and adjust the learning rate accordingly, setting the total number of iterations threshold to 1.
[0134] Adaptively adjust the batch size, expressed as,
[0135]
[0136] Among them, B j represents the batch size of the jth iteration, B j-1 Indicates the batch size of the j-1th iteration, M max Indicates the upper limit of memory usage, M j Indicates the memory usage of the jth iteration, M j-1 represents the memory usage of the j-1th iteration, and ξ represents the adjustment factor of the batch size;
[0137] Adjust the regularization parameter, expressed as,
[0138]
[0139] Among them, λ j represents the regularization parameter of the jth iteration, λ j-1 represents the regularization parameter of the j-1th iteration, and χ represents the adjustment factor of the regularization parameter.
[0140] It should be noted that through the adaptive hyperparameter optimization strategy, including dynamic adjustment of learning rate, adaptive adjustment of batch size, and dynamic adjustment of regularization parameters, the efficiency and effect of model training have been significantly improved, model convergence has been accelerated, overfitting has been prevented, and resource utilization has been optimized.
[0141] Automatically explore the model architecture strategy, including the following steps:
[0142] Use neural architecture search technology to automatically explore the model architecture space and find the optimal architecture;
[0143] Initialize the policy network parameters, define the reward function and baseline, set the learning rate, define the search space, including the architecture configuration and the actions taken, determine the comprehensive score function, use the current policy network to sample an action, execute the action and record the new state, and calculate the comprehensive score value as the reward function;
[0144] Combined with the policy gradient method, the formula for updating the policy network parameters is designed, which is expressed as,
[0145]
[0146] Where Δθ represents the update amount of the policy network parameter θ, η represents the learning rate, R(s,a) represents the reward obtained after taking action a in state s, R(s,a) is equal to the comprehensive scoring function S, which is used to measure the overall quality of the model architecture after taking action a, and b represents the baseline. represents the gradient of the parameter θ, logπ θ (s|a) represents the logarithmic probability of taking action a in state s. The purpose is to convert the probability into logarithmic form to facilitate the calculation of the gradient. a represents taking action and s represents the state.
[0147] When the maximum number of iterations is reached, the search ends. Otherwise, a new action is sampled to continue the search task.
[0148] It should be noted that by automatically exploring model architecture strategies and utilizing neural architecture search technology and policy gradient methods, the optimal model architecture can be automatically discovered, significantly improving model performance and generalization capabilities.
[0149] Quickly adapt to new mission strategies, including the following steps:
[0150] Using meta-learning techniques to enable the model to quickly adapt to new tasks;
[0151] Initialize model parameters, set inner and outer learning rates, and define training and query task sets;
[0152] Randomly extract a small batch of samples from the task dataset as the support set, calculate the loss function on the support set, and use gradient descent to update the model parameters, which is expressed as,
[0153]
[0154] Among them, φ' represents the updated model parameters on task T, represents the loss function on task T, γ represents the inner learning rate, represents the gradient of φ, T represents any task in the training task set, and φ represents the initialization model parameters;
[0155] Randomly extract another small batch of samples from the task dataset as the query set, calculate the loss function on the query set, and use gradient descent to update the model parameters, which is expressed as,
[0156]
[0157] Among them, δ represents the outer layer learning rate, Represents the loss function on another task T';
[0158] Repeat the steps of updating the model parameters until all training tasks in the training task set are completed;
[0159] Use the model parameters trained by meta-learning to quickly adapt to new tasks, extract a small number of samples from the new task as a support set, use the support set to update the model parameters, and use the updated parameters to train on the new task.
[0160] It should be noted that by quickly adapting to new task strategies and using meta-learning technology, the model can quickly adapt to new tasks with the support of a small number of samples, significantly improving the model's generalization ability and ability to adapt to new scenarios.
[0161] It should be noted that by using the final parameter configuration for model training and dividing the model training process into different stages, the intelligent control strategy is dynamically adjusted based on the model performance requirements, and the model is tuned at different stages, thereby achieving refined management of the model training process and resource optimization. By dynamically adjusting the training strategy, the flexibility and efficiency of model training are improved, while ensuring the maximization of model performance, accelerating the model convergence speed, reducing unnecessary resource consumption, and improving the overall performance and generalization ability of the model.
[0162] In summary, the present invention realizes real-time data collection and preprocessing during the model training process by setting up data acquisition instruments and environmental monitoring points, which not only ensures the quality and consistency of the data, but also provides a solid foundation for subsequent performance analysis. By using comprehensive performance indicators, gradient health index, resource efficiency index and anomaly detection index, the model performance is comprehensively evaluated, the parameter configuration is optimized, and the good performance and robustness of the model on different data sets are ensured. The model training process is divided into different stages, and the intelligent control strategy is dynamically adjusted, and refined management and resource optimization are carried out, which significantly improves the flexibility and efficiency of model training, accelerates the model convergence speed, reduces resource consumption, and improves the overall performance and generalization ability of the model. Ultimately, these steps work together to make the model training process more efficient and stable, and can quickly adapt to new tasks, with broad application prospects and practical value.
[0163] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An automated model tuning system based on an AI training intelligent workbench, characterized by: include, The data acquisition module is responsible for setting up data acquisition instruments and environmental monitoring points, collecting real-time model data during model training, and performing preprocessing; The model performance analysis module is responsible for analyzing the model performance based on the real-time model data and the original model data to obtain the final parameter configuration; The model tuning module is responsible for training the model using the final parameter configuration, dividing the model training process into different stages, and dynamically adjusting the intelligent control strategy based on the model performance requirements to tune the model at different stages; The real-time model data includes accuracy, loss function value, resource usage, gradient information and training time; Model performance analysis based on real-time model data and original model data includes the following steps: Obtaining model original data from the historical records of model training, wherein the model original data includes a training set, a validation set, and a test set; Calculate the comprehensive performance index, which reflects the performance difference of the model on the training set and the validation set, and takes into account both loss and accuracy, expressed as, ; Among them, P represents the comprehensive performance index, L T represents the average loss on the training set, L V represents the average loss on the validation set, A V represents the average accuracy on the validation set, A T represents the average accuracy on the training set, W L Represents the weight factor of the loss, W A The weight factor representing the accuracy, represents the correction parameter; Calculate the gradient health index, calculate the health of the gradient based on the standard deviation and average gradient of the gradient, and evaluate the stability of the gradient, expressed as, ; Where G represents the gradient health index, σ g represents the standard deviation of the gradient, μ g represents the average gradient, represents the anti-zero constant; Combining resource utilization and training time, we define resource efficiency indicators to evaluate the utilization efficiency of hardware resources, expressed as, ; Among them, R represents the resource efficiency index, U CPU Indicates CPU utilization, U GPU Indicates GPU utilization, U Mem represents memory utilization, t represents training time, t max Indicates the maximum allowed training time; Based on the Z-score to measure the deviation of the data point from the mean, the anomaly detection index is calculated, which is expressed as: ; Among them, I represents the anomaly detection index, Z i represents the Z-score of the i-th data point, n represents the number of data points, and i represents the index of the data point; Based on the model performance analysis, the final parameter configuration is obtained, which includes the following steps: Consider minimizing the comprehensive performance index to reduce the risk of overfitting and underfitting, minimizing the gradient health index to ensure gradient stability, maximizing the resource efficiency index to improve resource utilization efficiency, minimizing the anomaly detection index to reduce anomalies, and calculating the comprehensive score value, which is expressed as, ; Among them, S represents the comprehensive score value; Calculate the comprehensive score values under all configurations and select the configuration with the highest comprehensive score value as the final parameter configuration.
2. The automated model tuning system based on the AI training intelligent workbench according to claim 1, characterized in that: The steps of setting up data acquisition instruments and environmental monitoring points, collecting real-time model data during model training, and performing preprocessing include the following: Install performance monitoring tools on training servers, deploy various sensors in the training environment, and deploy traffic monitoring tools in the data transmission path; Use Python programming language to develop scripts, regularly call the API interface provided by the training server, and obtain real-time model data from the training server through the API interface during the model training process; The performance monitoring tools include Prometheus and Grafana; The multiple sensors include a temperature sensor and a humidity sensor; The traffic monitoring tool refers to NetFlow; The preprocessing includes removing outliers, unifying time series, handling missing data and standardization.
3. The automated model tuning system based on the AI training intelligent workbench according to claim 2, characterized in that: Use the final parameter configuration to train the model, and divide the model training process into different stages, including the following steps: Based on model performance requirements, model training is divided into three stages: rapid learning, fine-tuning, and resource optimization; In the rapid learning stage, a higher learning rate and a larger batch size are used. In the fine-tuning stage, the learning rate is gradually reduced and the regularization strength is increased. In the resource optimization stage, the batch size is dynamically adjusted to reduce unnecessary resource consumption and achieve model tuning.
4. The automated model tuning system based on the AI training intelligent workbench according to claim 3, characterized in that: Intelligent control strategies include adaptive hyperparameter optimization strategies, automatic model architecture exploration strategies, and rapid adaptation to new tasks strategies; Based on the model performance requirements, the intelligent control strategy is dynamically adjusted to optimize the model at different stages.
5. The automated model tuning system based on the AI training intelligent workbench according to claim 4, characterized in that: The adaptive hyperparameter optimization strategy includes the following steps: Automatically adjust learning rate, batch size, and regularization parameters based on performance feedback during model training; The learning rate is dynamically adjusted through the learning rate decay strategy and the learning rate backtracking strategy, which are expressed as, ; ; Among them, η j represents the learning rate of the jth iteration through the learning rate decay strategy, represents the learning rate of the jth iteration through the learning rate backtracking strategy, η0 represents the initial learning rate, j represents the current number of iterations, J represents the total number of iterations, η j-1 represents the learning rate of the j-1th iteration, L val,j-1 represents the validation set loss of the j-1th iteration, L val,j represents the validation set loss of the jth iteration, K represents the backtracking factor, Represents the exponential factor that controls the decay rate of the learning rate; When stable model convergence is required, only the learning rate decay strategy is used. When the learning rate needs to be dynamically adjusted according to the validation set performance during model training, only the learning rate backtracking strategy is used. When both stable model convergence and dynamic adjustment of the learning rate according to the validation set performance are required during model training, both the learning rate decay strategy and the learning rate backtracking strategy are used. Adaptively adjust the batch size, expressed as, ; Among them, B j represents the batch size of the jth iteration, B j-1 Indicates the batch size of the j-1th iteration, M max Indicates the upper limit of memory usage, M j Indicates the memory usage of the jth iteration, M j-1 represents the memory usage of the j-1th iteration, and ξ represents the adjustment factor of the batch size; Adjust the regularization parameter, expressed as, ; Among them, λ j represents the regularization parameter of the jth iteration, λ j-1 represents the regularization parameter of the j-1th iteration, and χ represents the adjustment factor of the regularization parameter.
6. The automated model tuning system based on the AI training intelligent workbench according to claim 5, characterized in that: Using both the learning rate decay strategy and the learning rate backtracking strategy includes the following steps: First, the learning rate is calculated using the learning rate decay strategy; Then, according to the calculated learning rate, set the total number of iterations threshold; Finally, the total number of iterations is compared with the total number of iterations threshold to determine whether to use the learning rate backtracking strategy; When the total number of iterations is greater than the total number of iterations threshold, the learning rate backtracking strategy is used to adjust the learning rate; When the total number of iterations is less than or equal to the total number of iterations threshold, the initial learning rate is used.
7. The automated model tuning system based on the AI training intelligent workbench according to claim 6, characterized in that: Automatically explore the model architecture strategy, including the following steps: Use neural architecture search technology to automatically explore the model architecture space and find the optimal architecture; Initialize the policy network parameters, define the reward function and baseline, set the learning rate, define the search space, determine the comprehensive score function, use the current policy network to sample an action, execute the action and record the new state, and calculate the comprehensive score value as the reward function; Combined with the policy gradient method, the formula for updating the policy network parameters is designed, which is expressed as, ; Where Δθ represents the update amount of the policy network parameter θ, η represents the learning rate, R(s,a) represents the reward obtained after taking action a in state s, and b represents the baseline. represents the gradient of the parameter θ, logπ θ (s|a) represents the logarithmic probability of taking action a in state s, where a represents taking action and s represents state; When the maximum number of iterations is reached, the search ends. Otherwise, a new action is sampled to continue the search task.
8. The automated model tuning system based on the AI training intelligent workbench according to claim 7, characterized in that: Quickly adapt to new mission strategies, including the following steps: Using meta-learning techniques to enable the model to quickly adapt to new tasks; Initialize model parameters, set inner and outer learning rates, and define training and query task sets; Randomly extract a small batch of samples from the task dataset as the support set, calculate the loss function on the support set, and use gradient descent to update the model parameters, which is expressed as, ; in, represents the updated model parameters on task T, represents the loss function on task T, γ represents the inner learning rate, Express The gradient of , T represents any task in the training task set, Indicates the initialization of model parameters; Randomly extract another small batch of samples from the task dataset as the query set, calculate the loss function on the query set, and use gradient descent to update the model parameters, which is expressed as, ; Among them, δ represents the outer layer learning rate, In another task The loss function on ; Repeat the steps of updating the model parameters until all training tasks in the training task set are completed; Use the model parameters trained by meta-learning to quickly adapt to new tasks, extract a small number of samples from the new task as a support set, use the support set to update the model parameters, and use the updated parameters to train on the new task.
Citation Information
Patent Citations
Scheduling command monitoring system based on AI intelligent model training
CN117149410A
Generating and utilizing classification and query-specific models to generate digital responses to queries from client device
US20190325068A1