Self-adaptive parameter adjustment method and device

Through data monitoring and preprocessing, parameter adjustment strategy library and adaptive parameter adjustment engine, combined with deep learning and reinforcement learning, hyperparameters are dynamically adjusted, and the problems of low parameter adjustment efficiency and high resource consumption in the existing technology are solved, and the model is realized Performance improvement and flexibility.

CN119129688APending Publication Date: 2024-12-13浪潮智慧城市科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411231541.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing adaptive parameter adjustment methods are difficult to maintain universality and effectiveness in different data sets and tasks, and in large-scale or real-time training scenarios, the computing resources are consumed, the tuning and iterations are frequent, and the efficiency is inefficient.

Method used

Adopt data monitoring and preprocessing, parameter adjustment strategy library, adaptive parameter adjustment engine and hyperparameter management, and dynamically adjust hyperparameters through real-time data monitoring, multiple adjustment strategies, Bayesian algorithms and batch normalization technology, combined with depth Learn and reinforce learning to achieve accurate adjustment of model parameters.

Benefits of technology

The parameter adjustment cycle is shortened, the model performance is improved, flexible strategy selection and application is realized, computing resource consumption is reduced, and it is adapted to different task needs, and has good scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129688A_ABST
    Figure CN119129688A_ABST
Patent Text Reader

Abstract

The invention relates to the field of deep learning, and particularly provides a self-adaptive parameter adjustment method and device, and the method comprises the following steps: S1, data monitoring and preprocessing; s2, application of a parameter adjustment strategy library; s3, operation of an adaptive parameter adjustment engine; s4, performing hyper-parameter management; and S5, performing performance evaluation and feedback. Compared with the prior art, the self-adaptive parameter adjustment engine can be adopted, parameter configuration can be adjusted in real time according to data changes and feedback information in the learning process, and therefore the parameter adjustment period is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning, and specifically provides an adaptive parameter adjustment method and device. Background Art

[0002] In the field of deep learning, the training efficiency and performance of the model depend largely on the setting of hyperparameters. Hyperparameters, such as learning rate, batch size, optimizer type, etc., have a decisive influence on the convergence speed and final performance of the model. However, selecting appropriate hyperparameters usually requires a lot of experiments and expertise, which is time-consuming and labor-intensive, and it is difficult to guarantee the optimal solution.

[0003] Traditional hyperparameter tuning methods rely on manual tuning or techniques such as grid search and random search, which are inefficient in high-dimensional parameter spaces and difficult to adapt to changing data and model architectures. In addition, as deep learning models become more complex, hyperparameter tuning becomes more difficult, requiring smarter and more automated methods to address this challenge.

[0004] In recent years, with the development of technologies such as reinforcement learning and Bayesian optimization, adaptive parameter adjustment methods have emerged. These methods automatically select the optimal hyperparameter combination through algorithms, significantly improving the efficiency and performance of model training. Adaptive parameter adjustment methods can adjust hyperparameters based on real-time feedback to achieve dynamic optimization of the model training process.

[0005] Nevertheless, existing adaptive parameter adjustment methods still face some challenges. For example, how to maintain the universality and effectiveness of adjustment strategies in different data sets and tasks, how to balance the adjustment speed with the improvement of model performance, and how to reduce the consumption of computing resources during the hyperparameter search process. In addition, existing methods may require a large number of tuning iterations in practical applications, which limits their application in large-scale or real-time training scenarios. Summary of the invention

[0006] The present invention aims at solving the above-mentioned deficiencies of the prior art and provides a highly practical adaptive parameter adjustment method.

[0007] A further technical task of the present invention is to provide an adaptive parameter adjustment device that is reasonably designed, safe and applicable.

[0008] The technical solution adopted by the present invention to solve its technical problem is:

[0009] An adaptive parameter adjustment method comprises the following steps:

[0010] S1, data monitoring and preprocessing;

[0011] S2, application of parameter adjustment strategy library;

[0012] S3, operation of the adaptive parameter adjustment engine;

[0013] S4. Hyperparameter management;

[0014] S5. Performance evaluation and feedback.

[0015] Furthermore, in step S1, it further includes:

[0016] S1.1, obtain input data in real time through the data acquisition interface;

[0017] S1.2. Use data change detection algorithms to monitor data changes in real time and automatically identify and mark abnormal data;

[0018] S1.3. Clean the collected data, remove duplicate data, and process missing values ​​and outliers

[0019] S1.4. Perform data standardization and normalization according to business needs and data characteristics, and unify data scale and distribution;

[0020] S1.5. Select appropriate features for extraction and selection.

[0021] Furthermore, in step S1.2, it specifically includes:

[0022] Implemented a real-time data change detection and anomaly marking algorithm based on statistical thresholds. For each real-time data point, the statistical difference with historical data is calculated and used

[0023] Z=(X-μ) / σ

[0024] Among them, X is the real-time data point, μ is the mean of historical data, σ is the standard deviation of historical data, and the threshold Z is set threshold To determine whether the data point is abnormal; if |Z|>Z threshold , then mark the data point as an anomaly.

[0025] Furthermore, in step S2, it further includes:

[0026] S2.1. Implement multiple parameter adjustment strategies, including learning rate adjustment, optimizer selection, and batch normalization.

[0027] S2.2, the learning rate adjustment strategy adopts attenuation and periodic adjustment to adapt to the needs of different training stages;

[0028] S2.3, state selection optimal optimizer;

[0029] S2.4. Apply batch normalization technology. First, add a batch normalization layer after each convolution layer, calculate the mean and variance of each batch of data, and normalize the data.

[0030] Then, we learn the scaling and translation parameters and apply them to the normalized data. In the forward propagation of model training, we process the data through the batch normalization layer, and in the backward propagation of model training, we update the parameters of the batch normalization layer. In the early stage of model training, we fine-tune the parameters of the batch normalization layer to adapt to the model.

[0031] Finally, during model inference, the statistical properties of the entire dataset are used for normalization.

[0032] Furthermore, in step S2.2, it specifically includes:

[0033] After setting the initial learning rate, decay rate, and epoch length, repeat the following steps until the model's performance on the validation set no longer improves or the predetermined number of training epochs is reached: In the first few batches of each epoch, the learning rate is linearly increased to a multiple of the initial learning rate;

[0034] For the remaining batches, the learning rate is linearly reduced back to the initial learning rate;

[0035] At the end of each epoch, apply exponential or step decay, update the learning rate, and monitor the accuracy on the validation set.

[0036] Furthermore, in step S3, it further includes:

[0037] S3.1. At the end of each training cycle, use the Bayesian algorithm to evaluate the current strategy and select a new strategy.

[0038] S3.2. After each training batch, the incremental change of the weights is calculated and stored in a buffer;

[0039] S3.3, when the buffer reaches a certain capacity or after a certain period of time, asynchronously apply all incremental changes in the buffer to the model weights;

[0040] S3.4. If an error occurs during the update process, use the backed-up weights to quickly restore to the state before the update.

[0041] Furthermore, in step S4, it further includes:

[0042] S4.1. Select an initial hyperparameter combination for each training task and start the initialization training task;

[0043] S4.2. Start a scheduled task to regularly collect performance indicators for each training task;

[0044] S4.3. Evaluate the performance of each training task;

[0045] S4.4. Generate new candidate hyperparameter combinations for training tasks with poor performance, and use grid search and decision tree prediction to select the combination with the highest expected performance;

[0046] S4.5. Apply the selected hyperparameter combination to the corresponding training task and update the training configuration of the model.

[0047] Furthermore, in step S5, it further includes:

[0048] S5.1. Define accuracy and F1 value as the main evaluation indicators and integrate them into the training cycle. The indicator formula is as follows:

[0049]

[0050] S5.2. After each training cycle, automatically collect performance data from the validation set or test set;

[0051] S5.3. Analyze the collected performance data to determine whether the performance of the model meets the preset performance goals;

[0052] S5.4. If the model performance does not reach the preset target, the results are fed back to the adaptive parameter adjustment engine to adjust the hyperparameters;

[0053] S5.5. After adjustment, continue training and evaluate the performance, compare it with the previous performance, and continue fine-tuning or try other parameter adjustments based on the results.

[0054] An adaptive parameter adjustment device comprises: at least one memory and at least one processor;

[0055] The at least one memory is used to store a machine-readable program;

[0056] The at least one processor is used to call the machine-readable program to execute an adaptive parameter adjustment method.

[0057] Compared with the prior art, the adaptive parameter adjustment method and device of the present invention have the following outstanding beneficial effects:

[0058] The present invention adopts an adaptive parameter adjustment engine, which can adjust parameter configuration in real time according to data changes and feedback information in the learning process, thereby greatly shortening the parameter adjustment cycle.

[0059] Through the combination of deep learning and reinforcement learning technology, the present invention can achieve accurate adjustment of model parameters, thereby improving the performance of the model, and flexibly selecting and applying it according to different tasks and data environments. At the same time, the data monitoring and preprocessing module can also dynamically adjust the parameter adjustment strategy according to the changes in data.

[0060] The system architecture of the present invention has good scalability and can easily add new parameter adjustment strategies and evaluation indicators to adapt to different task requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0062] Attached Figure 1 It is a flowchart of an adaptive parameter adjustment method. DETAILED DESCRIPTION

[0063] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] A best embodiment is given below:

[0065] like Figure 1 As shown, an adaptive parameter adjustment method in this embodiment has the following steps:

[0066] S1, data monitoring and preprocessing;

[0067] Further including:

[0068] S1.1. Obtain input data in real time through the data acquisition interface to ensure the timeliness and accuracy of the data.

[0069] S1.2, using efficient data change detection algorithms to monitor data changes in real time, automatically identify and mark abnormal data. Specifically, a real-time data change detection and anomaly marking algorithm based on statistical thresholds is implemented. For each real-time data point, the statistical difference between it and historical data is calculated and used

[0070] Z=(X-μ) / σ

[0071] Where X is the real-time data point, μ is the mean of historical data, and σ is the standard deviation of historical data. Set the threshold Z threshold To determine whether the data point is abnormal. If |Z|>Z threshold , then mark the data point as an anomaly.

[0072] S1.3. Clean the collected data, remove duplicate data, and process missing values ​​and outliers;

[0073] S1.4. Perform data standardization and normalization according to business needs and data characteristics, and unify data scale and distribution;

[0074] S1.5. Select appropriate features for extraction and selection to reduce data dimension and improve model training efficiency.

[0075] S2, application of parameter adjustment strategy library;

[0076] Further including:

[0077] S2.1. Implement multiple parameter adjustment strategies, including learning rate adjustment, optimizer selection, and batch normalization.

[0078] S2.2, the learning rate adjustment strategy adopts attenuation and periodic adjustment to adapt to the needs of different training stages;

[0079] Specifically include:

[0080] After setting the initial learning rate, decay rate, and cycle length, repeat the following steps until the model's performance on the validation set no longer improves or reaches the predetermined number of training cycles: for the first five batches of each cycle, the learning rate is linearly increased to 1.5 times the initial learning rate; for the remaining five batches, the learning rate is linearly reduced back to the initial learning rate. At the end of each cycle, apply exponential decay or step decay to update the learning rate; monitor the accuracy on the validation set, and if the accuracy stops improving, further reduce the learning rate.

[0081] S2.3. Dynamically select the optimal optimizer, including SGD, Adam, RMSprop, etc.

[0082] S2.4. Apply batch normalization technology to reduce internal covariate shift and speed up the training process.

[0083] The details are as follows: First, add a batch normalization layer after each convolutional layer; calculate the mean and variance on each batch of data and normalize the data. Then, learn the scaling and translation parameters and apply them to the normalized data; in the forward propagation of model training, process the data through the batch normalization layer. In the backward propagation of model training, update the parameters of the batch normalization layer; in the early stage of model training, fine-tune the parameters of the batch normalization layer to adapt to the model. Finally, during model inference, use the statistical characteristics of the entire dataset for normalization.

[0084] S3, operation of the adaptive parameter adjustment engine;

[0085] Further including:

[0086] S3.1. At the end of each training cycle, use the Bayesian algorithm to evaluate the current strategy and select a new strategy.

[0087] S3.2. After each training batch, the incremental change of the weights is calculated and stored in a buffer;

[0088] S3.3, when the buffer reaches a certain capacity or after a certain period of time, asynchronously apply all incremental changes in the buffer to the model weights;

[0089] S3.4. If an error occurs during the update process, use the backed-up weights to quickly restore to the state before the update.

[0090] S4. Hyperparameter management;

[0091] Further including:

[0092] S4.1. Select an initial hyperparameter combination for each training task and start the initialization training task;

[0093] S4.2. Start a scheduled task to regularly collect performance indicators of each training task, such as accuracy and loss value on the validation set;

[0094] S4.3. Evaluate the performance of each training task to determine whether it meets the preset performance standards;

[0095] S4.4. Generate new candidate hyperparameter combinations for training tasks with poor performance, and use grid search and decision tree prediction to select the combination with the highest expected performance;

[0096] S4.5. Apply the selected hyperparameter combination to the corresponding training task and update the training configuration of the model.

[0097] S5. Performance evaluation and feedback;

[0098] Further including:

[0099] S5.1. Define accuracy and F1 value as the main evaluation indicators and integrate them into the training cycle. The indicator formula is as follows:

[0100]

[0101] S5.2. After each training cycle, automatically collect performance data from the validation set or test set;

[0102] S5.3. Analyze the collected performance data to determine whether the performance of the model meets the preset performance goals;

[0103] S5.4. If the model performance does not reach the preset target, the results are fed back to the adaptive parameter adjustment engine to adjust the hyperparameters;

[0104] S5.5. After adjustment, continue training and evaluate the performance, compare it with the previous performance, and continue fine-tuning or try other parameter adjustments based on the results.

[0105] An adaptive parameter adjustment device in this embodiment includes: at least one memory and at least one processor;

[0106] The at least one memory is used to store a machine-readable program;

[0107] The at least one processor is used to call the machine-readable program to execute an adaptive parameter adjustment method.

[0108] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that comply with the claims of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.

[0109] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An adaptive parameter adjustment method, characterized in that: The steps are as follows: S1, data monitoring and preprocessing; S2, application of parameter adjustment strategy library; S3, operation of the adaptive parameter adjustment engine; S4. Hyperparameter management; S5. Performance evaluation and feedback.

2. The method for adaptive parameter adjustment according to claim 1, characterized in that: In step S1, further comprising: S1.1, obtain input data in real time through the data acquisition interface; S1.

2. Use data change detection algorithms to monitor data changes in real time and automatically identify and mark abnormal data; S1.

3. Clean the collected data, remove duplicate data, and process missing values ​​and outliers S1.

4. Perform data standardization and normalization according to business needs and data characteristics, and unify data scale and distribution; S1.

5. Select appropriate features for extraction and selection.

3. The method for adaptive parameter adjustment according to claim 2, characterized in that: In step S1.2, it specifically includes: Implemented a real-time data change detection and anomaly marking algorithm based on statistical thresholds. For each real-time data point, the statistical difference with historical data is calculated and used Z=(X-μ) / σ Among them, X is the real-time data point, μ is the mean of historical data, σ is the standard deviation of historical data, and the threshold Z is set threshold To determine whether the data point is abnormal; if |Z|>Z threshold , then mark the data point as an anomaly.

4. The method for adaptive parameter adjustment according to claim 3, characterized in that: In step S2, further comprising: S2.

1. Implement multiple parameter adjustment strategies, including learning rate adjustment, optimizer selection, and batch normalization. S2.2, the learning rate adjustment strategy adopts attenuation and periodic adjustment to adapt to the needs of different training stages; S2.3, state selection optimal optimizer; S2.

4. Apply batch normalization technology. First, add a batch normalization layer after each convolution layer, calculate the mean and variance of each batch of data, and normalize the data. Then, we learn the scaling and translation parameters and apply them to the normalized data. In the forward propagation of model training, we process the data through the batch normalization layer, and in the backward propagation of model training, we update the parameters of the batch normalization layer. In the early stage of model training, we fine-tune the parameters of the batch normalization layer to adapt to the model. Finally, during model inference, the statistical properties of the entire dataset are used for normalization.

5. The method for adaptive parameter adjustment according to claim 4, characterized in that: In step S2.2, it specifically includes: After setting the initial learning rate, decay rate, and epoch length, repeat the following steps until the model's performance on the validation set no longer improves or the predetermined number of training epochs is reached: In the first few batches of each epoch, the learning rate is linearly increased to a multiple of the initial learning rate; For the remaining batches, the learning rate is linearly reduced back to the initial learning rate; At the end of each epoch, apply exponential or step decay, update the learning rate, and monitor the accuracy on the validation set.

6. The method for adaptive parameter adjustment according to claim 5, characterized in that: In step S3, further comprising: S3.

1. At the end of each training cycle, use the Bayesian algorithm to evaluate the current strategy and select a new strategy. S3.

2. After each training batch, the incremental change of the weights is calculated and stored in a buffer; S3.3, when the buffer reaches a certain capacity or after a certain period of time, asynchronously apply all incremental changes in the buffer to the model weights; S3.

4. If an error occurs during the update process, use the backed-up weights to quickly restore to the state before the update.

7. The method for adaptive parameter adjustment according to claim 6, characterized in that: In step S4, further comprising: S4.

1. Select an initial hyperparameter combination for each training task and start the initialization training task; S4.

2. Start a scheduled task to regularly collect performance indicators for each training task; S4.

3. Evaluate the performance of each training task; S4.

4. Generate new candidate hyperparameter combinations for training tasks with poor performance, and use grid search and decision tree prediction to select the combination with the highest expected performance; S4.

5. Apply the selected hyperparameter combination to the corresponding training task and update the training configuration of the model.

8. The method for adaptive parameter adjustment according to claim 7, characterized in that: In step S5, further comprising: S5.

1. Define accuracy and F1 value as the main evaluation indicators and integrate them into the training cycle. The indicator formula is as follows: S5.

2. After each training cycle, automatically collect performance data from the validation set or test set; S5.

3. Analyze the collected performance data to determine whether the performance of the model meets the preset performance goals; S5.

4. If the model performance does not reach the preset target, the results are fed back to the adaptive parameter adjustment engine to adjust the hyperparameters; S5.

5. After adjustment, continue training and evaluate the performance, compare it with the previous performance, and continue fine-tuning or try other parameter adjustments based on the results.

9. An adaptive parameter adjustment device, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 8.