A hyperparameter adaptive multi-objective optimization method

By combining the improved non-dominated sorting genetic algorithm NSGA-III with the Katib hyperparameter optimization framework, adaptive hyperparameter optimization was achieved, solving the efficiency problem of the Katib framework in different tasks and environments, and improving the efficiency and resource utilization of distributed training.

CN119987939BActive Publication Date: 2026-01-13SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510013218.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2026-01-13
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The existing Katib hyperparameter optimization framework is difficult to adapt to changes in different tasks and environments, resulting in high time overhead and low resource utilization efficiency in distributed training.

Method used

An improved non-dominated sorting genetic algorithm, NSGA-III, is adopted, which combines dynamic weight allocation and adaptive search strategy. Hyperparameter optimization is performed through the Katib hyperparameter optimization framework to achieve adaptive multi-objective optimization.

Benefits of technology

It improves the efficiency of hyperparameter optimization, enabling dynamic adjustment of hyperparameter configuration based on changes in the training environment, thereby enhancing the efficiency and resource utilization of distributed training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987939B_ABST
    Figure CN119987939B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence, in particular to a kind of super parameter adaptive multi-objective optimization method.The super parameter adaptive multi-objective optimization method, user creates custom Experiment experimental resource, and verifies;Experiment controller creates Suggestion suggestion resource, and executes improved NSGA-III super parameter optimization;Trial controller creates training task and starts training;Collect and store target index, if meet end condition, then output optimal super parameter solution set, for decision maker to select.The super parameter adaptive multi-objective optimization method, realizes efficient super parameter optimization for AI training platform, not only improves optimization efficiency, but also dynamically adjusts super parameter configuration according to the change of training environment, provides intelligent, efficient solution for large-scale deep learning model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a hyperparameter adaptive multi-objective optimization method. Background Technology

[0002] With the rapid development of artificial intelligence technology, deep learning models are widely used in various fields, such as computer vision, natural language processing, and speech recognition. These models typically contain a large number of hyperparameters, such as learning rate, batch size, and regularization coefficient, and the selection of these hyperparameters has a significant impact on model performance. However, manually tuning hyperparameters is a time-consuming and inefficient process, requiring a great deal of trial and error and experience.

[0003] To improve the efficiency of hyperparameter tuning, researchers have proposed a variety of automated hyperparameter optimization methods, such as grid search, random search, and Bayesian optimization.

[0004] Katib, an open-source hyperparameter optimization framework based on Kubernetes, supports various optimization algorithms and is widely used in AI training platforms. However, Katib's optimization algorithms are typically based on fixed strategies, making it difficult to adapt to changes in different tasks and environments, and thus unable to achieve adaptive and efficient optimization.

[0005] To reduce the time overhead of distributed training, improve resource utilization efficiency, and provide an efficient and intelligent solution for training large-scale deep learning models, this invention proposes a hyperparameter adaptive multi-objective optimization method. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies, this invention provides a simple and efficient hyperparameter adaptive multi-objective optimization method.

[0007] This invention is achieved through the following technical solution:

[0008] A hyperparameter adaptive multi-objective optimization method, characterized by the following steps:

[0009] Step S1: The user creates a custom Experiment resource and verifies it;

[0010] User-created custom Experiment resources include the following information:

[0011] Search space for hyperparameters: Define the range and type of hyperparameters to be optimized, including learning rate, batch size, number of hidden layers, and number of neurons per layer; each hyperparameter can be customized as a continuous value, discrete value, or categorical value.

[0012] Target metrics: Define targets based on requirements, including accuracy, training time and resource consumption, and whether to maximize or minimize the target metrics;

[0013] Optimization algorithm: An improved non-dominated sorting genetic algorithm, NSGA-III, is used to search for hyperparameters;

[0014] Parallelism configuration: Defines the number of trials that can run simultaneously, controlling the parallelism of the training task;

[0015] Training task template: Defines how each training task is run, including Pod configuration, image address, and startup command;

[0016] The defined Experiment configuration information is submitted to the Experiment controller through the API server of the distributed training platform, and the correctness and completeness of the custom resources are verified based on the Experiment Webhook.

[0017] Step S2: The Experiment controller creates a Suggestion resource;

[0018] If the correctness and completeness of the custom resource pass the verification, the Experiment controller will create a Suggestion resource to generate a set of hyperparameter solutions.

[0019] Step S3: Perform improved NSGA-III hyperparameter optimization;

[0020] The suggestion is for the controller to check whether the improved non-dominated sorting genetic algorithm NSGA-III service resources are ready;

[0021] If the improved non-dominated sorting genetic algorithm NSGA-III service status representation can provide services, the Suggestion controller generates a new hyperparameter solution set based on the non-dominated sorting genetic algorithm NSGA-III and writes it into the suggestion status status.suggestions field of the Suggestion resource;

[0022] Step S4: The Trial test controller generates training tasks and starts training;

[0023] The Trial controller creates an actual training task, i.e. a Kubernetes Job or Pod instance, for each Trial based on the template of the training task in the custom Experiment resource, and submits the training task to the Kubernetes cluster for execution.

[0024] Step S5: The Metrics Collector collects and stores the target metrics;

[0025] The Metrics Collector collects metrics and stores them in the backend database of the Katib hyperparameter optimization framework.

[0026] Step S6: If the termination condition is met, output the optimal hyperparameter solution set;

[0027] When the training task is completed, the Trial test controller updates the Trial test resource status of the training task.

[0028] When a Trial resource is no longer in use, the Suggestion controller updates the search strategy based on the current experimental results, generates a new set of hyperparameter solutions, and writes the updated set of hyperparameter solutions into the suggestion status field of the Suggestion resource for use in the next round of Trial trials.

[0029] The optimization process is repeated in multiple iterations to generate new trial tasks and run them until the pre-defined termination conditions are met.

[0030] When the Experiment resource meets the termination condition, the run ends and the optimal hyperparameter solution set is written to the status.paretoOptimalTrials field of the Experiment resource.

[0031] In step S1, the custom Experiment resource contains relevant configuration information for the training task. The system triggers the Experiment Webhook to verify the submitted Experiment resource.

[0032] If the Webhook check shows that the Experiment resource is filled in completely and the configuration is valid, the verification will pass, the Experiment resource will be officially accepted, and included in the system's management.

[0033] Otherwise, if the verification fails, the webhook will return an error message, requiring the user to modify the custom Experiment resource and resubmit it.

[0034] In step S3, the improved non-dominated sorting genetic algorithm NSGA-III is implemented as follows:

[0035] Step S3.1: The improved non-dominated sorting genetic algorithm NSGA-III adopts a dynamic weight allocation method, which adaptively adjusts the weights of each optimization objective during the search process to find high-quality hyperparameter configurations in multi-objective optimization problems, thereby optimizing the performance of the distributed training model.

[0036] The optimization objectives are obtained through actual training with real-time feedback, including accuracy, inference speed, and resource consumption;

[0037] S3.2. Deeply integrate the improved non-dominated sorting genetic algorithm NSGA-III with the Katib hyperparameter optimization framework, so that the Katib hyperparameter optimization framework can adaptively and dynamically adjust the hyperparameter configuration according to the changes in the training environment, thereby improving the optimization efficiency.

[0038] S3.3. Make full use of distributed computing resources to achieve parallel hyperparameter optimization;

[0039] S3.4 The improved non-dominated sorting genetic algorithm NSGA-III adopts an adaptive search strategy, which can dynamically adjust the algorithm parameters based on feedback information during the search process to improve the convergence speed and solution quality.

[0040] S3.5. Combining intelligent resource allocation and scheduling technology, appropriate computing resources are dynamically allocated according to the characteristics of the training task, and resources are intelligently scheduled to further improve training efficiency and resource utilization.

[0041] In step S3.1, the improved non-dominated sorting genetic algorithm NSGA-III adaptively adjusts the weights of each optimization objective. The specific process is as follows:

[0042] Step S3.1.1: First, obtain the hyperparameter configuration of the training model, including the learning rate lr ∈ [0.0001, 0.1], batch size bs ∈ [16, 128], number of hidden layers hn ∈ [1, 5], and number of neurons per layer nn ∈ [32, 512]. Individuals x are randomly generated from the candidate hyperparameter combinations using a normal distribution. i Individual x i Represented as:

[0043] x i =random(lr,bs,hn,nn)

[0044] Where random represents the normal distribution function;

[0045] Then, from several individuals x i The initial population p0 is formed, and each individual x in the initial population p0 is... iEach of these includes a set of hyperparameters that need to be optimized, including the learning rate, batch size, number of hidden layers, and number of neurons per layer.

[0046] Step S3.1.2: Train and evaluate the model performance, construct a multi-objective fitness function F, and calculate the individual x. i fitness value;

[0047] The multi-objective fitness evaluation function F is expressed as:

[0048] F=ω1·f1(x i )-ω2·f2(x i )-ω3·f3(x i )

[0049] Where ω1 is the initial weight for accuracy, ω2 is the initial weight for inference speed, ω3 is the initial weight for resource consumption, and f1(x) i f2(x) represents the accuracy. i f3(x) represents the training time. i ) represents resource consumption;

[0050] Step S3.1.3: Dynamically adjust the weight of each objective based on the performance of individuals in the current population:

[0051] The weights are dynamically adjusted based on the fitness value of the target, and the new weights ω 、 k The calculation method is as follows:

[0052]

[0053] Where 1≦k≦3, ω 、 1 represents the accuracy weight, ω 、 2 represents the inference speed weight, ω 、 3 represents the resource consumption weight;

[0054] Step S3.1.4, Selection and Evolution Process:

[0055] The process of performing non-dominated ranking and hierarchy classification on individuals in a population is as follows:

[0056] First, calculate individual x. i The dominance relationship is calculated as follows:

[0057] When individual x j When the accuracy is higher and the reasoning speed and resource consumption are lower, it is believed that individual x... j Outperformed individual x in all three optimization objectives. i ;

[0058] When individual x j It performs no worse than individual x on all three optimization objectives.i And at least on one optimization objective m, individual x j The performance was better than individual x i If m∈k, then individual x is considered to be j Dominant individual x i ;

[0059] If individual x j If individual x is not dominated by any other individual, then individual x j This is called a non-dominated solution;

[0060] Based on the dominance relationship, all individuals are divided into different ranks, fronts;

[0061] Step S3.1.5: For each non-dominated level calculated in step S3.1.4, calculate the crowding distance of individuals to assess the distribution of individuals in the target space, thereby maintaining the diversity of the population during the evolutionary process and avoiding the concentration of solutions in certain specific areas.

[0062] Individual x i Crowding distance d between it and its neighboring individuals i Calculated using the following formula:

[0063]

[0064] Among them, f k max and f k min represents the maximum and minimum values ​​of the optimization objective in the population, respectively;

[0065] Step S3.1.6: Based on the non-dominance level and crowding distance, select individuals to form a new population p. 1-tmp ;

[0066] Step S3.1.7: Perform crossover and mutation operations on the selected individuals to generate new individuals;

[0067] Among them, the crossover operation is achieved through single-point crossover or multi-point crossover, and the mutation operation is achieved by randomly changing the hyperparameter values;

[0068] Step S3.1.8: Combine the newly generated individual with the current population p. 1-tmp Merge to form a new temporary population p ` and for population p ` Perform non-dominated sorting and crowding distance calculation to select a new population p1;

[0069] Step S3.1.9: Repeat steps S3.1.3 to S3.1.7 until the custom termination condition is met;

[0070] Step S3.1.10: Output the solution set on the Pareto front, providing a set of uniformly distributed hyperparameter configurations for decision-makers to choose from.

[0071] In step S3.1.4, based on the dominance relationship, all individuals are divided into different levels, fronts, as follows:

[0072] The first level, fronts, contains all non-dominated solutions;

[0073] The second level fronts contains individuals that are only dominated by the non-dominated solutions in the first level fronts;

[0074] The third level fronts contains individuals that are dominated only by individuals in the second level fronts;

[0075] This process is repeated to divide the population into several levels (fronts) until all individuals have been divided.

[0076] In step S3.1.6, when selecting individuals based on non-dominance level and crowding distance, individuals with higher non-dominance levels (closer to the first level) are given priority.

[0077] When the number of individuals in the same non-dominant class exceeds the population requirement, further screening is performed using crowding distance, prioritizing individuals that are more dispersed in the target space, i.e., those with a crowding distance d between them and their neighboring individuals. i Large individuals.

[0078] In step S3, the Experiment controller monitors the update status of the Suggestion resource in real time. If the Suggestion resource is found to be updated, a Trial resource is generated for each new set of hyperparameters.

[0079] A hyperparameter adaptive multi-objective optimization system includes:

[0080] The Experiment creation module is responsible for helping users create custom Experiment resources. It submits the defined Experiment configuration information to the Experiment controller through the API Server of the distributed training platform, and verifies the correctness and completeness of the custom resources based on the Experiment Webhook.

[0081] The Experiment controller is responsible for creating a Suggestion resource after receiving the Experiment resource created by the user, which is used to generate a set of hyperparameter solutions. At the same time, it monitors the update status of the Suggestion resource in real time. If the Suggestion resource is found to be updated, a Trial resource is generated for each new set of hyperparameters.

[0082] The Suggestion Controller is responsible for checking whether the service resources of the improved non-dominated sorting genetic algorithm NSGA-III are ready;

[0083] If the improved non-dominated sorting genetic algorithm NSGA-III service status representation can provide services, the Suggestion controller generates a new hyperparameter solution set based on the non-dominated sorting genetic algorithm NSGA-III and writes it into the suggestion status status.suggestions field of the Suggestion resource;

[0084] Meanwhile, the suggestion suggests that the controller be responsible for updating and generating a new set of hyperparameters based on the current metrics when the Trial resource execution is completed;

[0085] The Trial controller is responsible for creating actual training tasks (i.e., Kubernetes Jobs or Pod instances) for each Trial experiment based on the template of the training task in the custom Experiment resource, and submitting the training task to the Kubernetes cluster for execution. When the training task is completed, it updates the status of the Trial resource for that training task. When the Experiment task meets the termination condition, it terminates the run and writes the optimal hyperparameter solution set to the status.paretoOptimalTrials field of the Experiment resource.

[0086] The Metrics Collector is responsible for collecting target metrics and storing them in the backend database of the Katib hyperparameter optimization framework.

[0087] A hyperparameter adaptive multi-objective optimization device, characterized in that it comprises:

[0088] One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing any of the methods described above.

[0089] A readable storage medium, characterized in that: a computer program is stored on the readable storage medium, and the computer program, when executed by a processor, implements the method described above.

[0090] The beneficial effects of this invention are: the hyperparameter adaptive multi-objective optimization method achieves efficient hyperparameter optimization for AI training platforms through adaptive search strategies and dynamic multi-objective optimization. It not only improves optimization efficiency, but also adaptively adjusts the hyperparameter configuration according to changes in the training environment, providing an intelligent and efficient solution for large-scale deep learning model training. Attached Figure Description

[0091] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0092] Appendix Figure 1 This is a schematic diagram of the implementation architecture of the hyperparameter adaptive multi-objective optimization system of the present invention.

[0093] Appendix Figure 2 This is a schematic diagram illustrating the implementation process of the hyperparameter adaptive multi-objective optimization method of the present invention.

[0094] Appendix Figure 3 This is a schematic diagram of the execution flow of the hyperparameter adaptive multi-objective optimization method of the present invention.

[0095] Appendix Figure 4 This is a schematic diagram of a sample configuration file for the Suggestion resource of this invention. Detailed Implementation

[0096] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions in the embodiments of this invention will be clearly and completely described below in conjunction with the embodiments of this invention. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0097] This hyperparameter adaptive multi-objective optimization method includes the following steps:

[0098] Step S1: The user creates a custom Experiment resource and verifies it;

[0099] User-created custom Experiment resources include the following information:

[0100] Search space for hyperparameters: Define the range and type of hyperparameters to be optimized, including learning rate, batch size, number of hidden layers, and number of neurons per layer; each hyperparameter can be customized as a continuous value, discrete value, or categorical value.

[0101] Target metrics: Define targets based on requirements, including accuracy, training time and resource consumption, and whether to maximize or minimize the target metrics;

[0102] Optimization algorithm: An improved non-dominated sorting genetic algorithm, NSGA-III, is used to search for hyperparameters;

[0103] Parallelism configuration: Defines the number of trials that can run simultaneously, controlling the parallelism of the training task;

[0104] Training task template: Defines how each training task is run, including Pod configuration, image address, and startup command;

[0105] The defined Experiment configuration information is submitted to the Experiment controller through the API server of the distributed training platform, and the correctness and completeness of the custom resources are verified based on the Experiment Webhook.

[0106] Step S2: The Experiment controller creates a Suggestion resource;

[0107] If the correctness and completeness of the custom resource pass the verification, the Experiment controller will create a Suggestion resource to generate a set of hyperparameter solutions.

[0108] Step S3: Perform improved NSGA-III hyperparameter optimization;

[0109] The suggestion is for the controller to check whether the improved non-dominated sorting genetic algorithm NSGA-III service resources are ready;

[0110] If the improved non-dominated sorting genetic algorithm NSGA-III service status representation can provide services, the Suggestion controller generates a new hyperparameter solution set based on the non-dominated sorting genetic algorithm NSGA-III and writes it into the suggestion status status.suggestions field of the Suggestion resource;

[0111] Step S4: The Trial test controller generates training tasks and starts training;

[0112] The Trial controller creates an actual training task, i.e. a Kubernetes Job or Pod instance, for each Trial based on the template of the training task in the custom Experiment resource, and submits the training task to the Kubernetes cluster for execution.

[0113] Step S5: The Metrics Collector collects and stores the target metrics;

[0114] The Metrics Collector collects metrics and stores them in the backend database of the Katib hyperparameter optimization framework.

[0115] Step S6: If the termination condition is met, output the optimal hyperparameter solution set;

[0116] When the training task is completed, the Trial test controller updates the Trial test resource status of the training task.

[0117] When a Trial resource is no longer in use, the Suggestion controller updates the search strategy based on the current experimental results, generates a new set of hyperparameter solutions, and writes the updated set of hyperparameter solutions into the suggestion status field of the Suggestion resource for use in the next round of Trial trials.

[0118] The optimization process is repeated in multiple iterations to generate new trial tasks and run them until the pre-defined termination conditions are met.

[0119] When the Experiment resource meets the termination condition, the run ends and the optimal hyperparameter solution set is written to the status.paretoOptimalTrials field of the Experiment resource.

[0120] In step S1, the custom Experiment resource contains relevant configuration information for the training task. The system triggers the Experiment Webhook to verify the submitted Experiment resource.

[0121] If the Webhook check shows that the Experiment resource is filled in completely and the configuration is valid, the verification will pass, the Experiment resource will be officially accepted, and included in the system's management.

[0122] Otherwise, if the verification fails, the webhook will return an error message, requiring the user to modify the custom Experiment resource and resubmit it.

[0123] In step S3, the improved non-dominated sorting genetic algorithm NSGA-III is implemented as follows:

[0124] Step S3.1: The improved non-dominated sorting genetic algorithm NSGA-III adopts a dynamic weight allocation method, which adaptively adjusts the weights of each optimization objective during the search process to find high-quality hyperparameter configurations in multi-objective optimization problems, thereby optimizing the performance of the distributed training model.

[0125] The optimization objectives are obtained through actual training with real-time feedback, including accuracy, inference speed, and resource consumption;

[0126] S3.2. Deeply integrate the improved non-dominated sorting genetic algorithm NSGA-III with the Katib hyperparameter optimization framework, so that the Katib hyperparameter optimization framework can adaptively and dynamically adjust the hyperparameter configuration according to the changes in the training environment, thereby improving the optimization efficiency.

[0127] S3.3. Make full use of distributed computing resources to achieve parallel hyperparameter optimization;

[0128] S3.4 The improved non-dominated sorting genetic algorithm NSGA-III adopts an adaptive search strategy, which can dynamically adjust the algorithm parameters based on feedback information during the search process to improve the convergence speed and solution quality.

[0129] S3.5. Combining intelligent resource allocation and scheduling technology, appropriate computing resources are dynamically allocated according to the characteristics of the training task, and resources are intelligently scheduled to further improve training efficiency and resource utilization.

[0130] In step S3.1, the improved non-dominated sorting genetic algorithm NSGA-III adaptively adjusts the weights of each optimization objective. The specific process is as follows:

[0131] Step S3.1.1: First, obtain the hyperparameter configuration of the training model, including the learning rate lr ∈ [0.0001, 0.1], batch size bs ∈ [16, 128], number of hidden layers hn ∈ [1, 5], and number of neurons per layer nn ∈ [32, 512]. Individuals x are randomly generated from the candidate hyperparameter combinations using a normal distribution. i Individual x i Represented as:

[0132] x i =random(lr,bs,hn,nn)

[0133] Where random represents the normal distribution function;

[0134] Then, from several individuals xi The initial population p0 is formed, and each individual x in the initial population p0 is... i Each of these includes a set of hyperparameters that need to be optimized, including the learning rate, batch size, number of hidden layers, and number of neurons per layer.

[0135] Step S3.1.2: Train and evaluate the model performance, construct a multi-objective fitness function F, and calculate the individual x. i fitness value;

[0136] The multi-objective fitness evaluation function F is expressed as:

[0137] F=ω1·f1(x i )-ω2·f2(x i )-ω3·f3(x i )

[0138] Where ω1 is the initial weight for accuracy, ω2 is the initial weight for inference speed, ω3 is the initial weight for resource consumption, and f1(x) i f2(x) represents the accuracy. i f3(x) represents the training time. i ) represents resource consumption;

[0139] Step S3.1.3: Dynamically adjust the weight of each objective based on the performance of individuals in the current population:

[0140] The weights are dynamically adjusted based on the fitness value of the target, and the new weights ω 、 k The calculation method is as follows:

[0141]

[0142] Where 1≦k≦3, ω 、 1 represents the accuracy weight, ω 、 2 represents the inference speed weight, ω 、 3 represents the resource consumption weight;

[0143] Step S3.1.4, Selection and Evolution Process:

[0144] The process of performing non-dominated ranking and hierarchy classification on individuals in a population is as follows:

[0145] First, calculate individual x. i The dominance relationship is calculated as follows:

[0146] When individual x j When the accuracy is higher and the reasoning speed and resource consumption are lower, it is believed that individual x... j Outperformed individual x in all three optimization objectives. i ;

[0147] When individual x j It performs no worse than individual x on all three optimization objectives. i And at least on one optimization objective m, individual x j The performance was better than individual x i If m∈k, then individual x is considered to be j Dominant individual x i ;

[0148] If individual x j If individual x is not dominated by any other individual, then individual x j This is called a non-dominated solution;

[0149] Based on the dominance relationship, all individuals are divided into different ranks, fronts;

[0150] Step S3.1.5: For each non-dominated level calculated in step S3.1.4, calculate the crowding distance of individuals to assess the distribution of individuals in the target space, thereby maintaining the diversity of the population during the evolutionary process and avoiding the concentration of solutions in certain specific areas.

[0151] Individual x i Crowding distance d between it and its neighboring individuals i Calculated using the following formula:

[0152]

[0153] Among them, f k max and f k min represents the maximum and minimum values ​​of the optimization objective in the population, respectively;

[0154] Step S3.1.6: Based on the non-dominance level and crowding distance, select individuals to form a new population p. 1-tmp ;

[0155] Step S3.1.7: Perform crossover and mutation operations on the selected individuals to generate new individuals;

[0156] Among them, the crossover operation is achieved through single-point crossover or multi-point crossover, and the mutation operation is achieved by randomly changing the hyperparameter values;

[0157] Step S3.1.8: Combine the newly generated individual with the current population p. 1-tmp Merge to form a new temporary population p ` and for population p ` Perform non-dominated sorting and crowding distance calculation to select a new population p1;

[0158] Step S3.1.9: Repeat steps S3.1.3 to S3.1.7 until the custom termination condition is met;

[0159] Step S3.1.10: Output the solution set on the Pareto front, providing a set of uniformly distributed hyperparameter configurations for decision-makers to choose from.

[0160] In step S3.1.4, based on the dominance relationship, all individuals are divided into different levels, fronts, as follows:

[0161] The first level, fronts, contains all non-dominated solutions;

[0162] The second level fronts contains individuals that are only dominated by the non-dominated solutions in the first level fronts;

[0163] The third level fronts contains individuals that are dominated only by individuals in the second level fronts;

[0164] This process is repeated to divide the population into several levels (fronts) until all individuals have been divided.

[0165] In step S3.1.6, when selecting individuals based on non-dominance level and crowding distance, individuals with higher non-dominance levels (closer to the first level) are given priority.

[0166] When the number of individuals in the same non-dominant class exceeds the population requirement, further screening is performed using crowding distance, prioritizing individuals that are more dispersed in the target space, i.e., those with a crowding distance d between them and their neighboring individuals. i Large individuals.

[0167] In step S3, the Experiment controller monitors the update status of the Suggestion resource in real time. If the Suggestion resource is found to be updated, a Trial resource is generated for each new set of hyperparameters.

[0168] A hyperparameter adaptive multi-objective optimization system includes:

[0169] The Experiment creation module is responsible for helping users create custom Experiment resources. It submits the defined Experiment configuration information to the Experiment controller through the API Server of the distributed training platform, and verifies the correctness and completeness of the custom resources based on the Experiment Webhook.

[0170] The Experiment controller is responsible for creating a Suggestion resource after receiving the Experiment resource created by the user, which is used to generate a set of hyperparameter solutions. At the same time, it monitors the update status of the Suggestion resource in real time. If the Suggestion resource is found to be updated, a Trial resource is generated for each new set of hyperparameters.

[0171] The Suggestion Controller is responsible for checking whether the service resources of the improved non-dominated sorting genetic algorithm NSGA-III are ready;

[0172] If the improved non-dominated sorting genetic algorithm NSGA-III service status representation can provide services, the Suggestion controller generates a new hyperparameter solution set based on the non-dominated sorting genetic algorithm NSGA-III and writes it into the suggestion status status.suggestions field of the Suggestion resource;

[0173] Meanwhile, the suggestion suggests that the controller be responsible for updating and generating a new set of hyperparameters based on the current metrics when the Trial resource execution is completed;

[0174] The Trial controller is responsible for creating actual training tasks (i.e., Kubernetes Jobs or Pod instances) for each Trial experiment based on the template of the training task in the custom Experiment resource, and submitting the training task to the Kubernetes cluster for execution. When the training task is completed, it updates the status of the Trial resource for that training task. When the Experiment task meets the termination condition, it terminates the run and writes the optimal hyperparameter solution set to the status.paretoOptimalTrials field of the Experiment resource.

[0175] The Metrics Collector is responsible for collecting target metrics and storing them in the backend database of the Katib hyperparameter optimization framework.

[0176] This hyperparameter adaptive multi-objective optimization apparatus includes:

[0177] One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing any of the methods described above.

[0178] The readable storage medium stores a computer program that, when executed by a processor, implements the method described above.

[0179] Compared with existing technologies, this hyperparameter adaptive multi-objective optimization method has the following characteristics:

[0180] (1) The Algorithm using the Katib hyperparameter optimization framework employs an optimized evolutionary algorithm to achieve intelligent adaptive hyperparameter tuning;

[0181] (2) The optimal multi-objective optimization scheme is learned through interactive training of the improved non-dominated sorting genetic algorithm NSGA-III, which enables the system to automatically search and adjust the hyperparameter configuration of complex models during the training process;

[0182] (3) By innovatively adopting the improved non-dominated sorting genetic algorithm NSGA-III, combined with an adaptive search strategy and dynamic acquisition function, efficient multi-objective hyperparameter optimization was achieved, solving the common parameter tuning problem in distributed training and significantly improving training speed and resource utilization efficiency.

[0183] The embodiments described above are merely one specific implementation of the present invention. Ordinary changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included within the protection scope of the present invention.

Claims

1. A hyperparameter adaptive multi-objective optimization method, characterized in that: Includes the following steps: Step S1: The user creates a custom Experiment resource and verifies it; User-created custom Experiment resources include the following information: Search space for hyperparameters: Define the range and type of hyperparameters to be optimized, including learning rate, batch size, number of hidden layers, and number of neurons per layer; each hyperparameter can be customized as a continuous value, discrete value, or categorical value. Target metrics: Define targets based on requirements, including accuracy, training time and resource consumption, and whether to maximize or minimize the target metrics; Optimization algorithm: An improved non-dominated sorting genetic algorithm, NSGA-III, is used to search for hyperparameters; Parallelism configuration: Defines the number of trials that can run simultaneously, controlling the parallelism of the training task; Training task template: Defines how each training task is run, including Pod configuration, image address, and startup command; The defined Experiment configuration information is submitted to the Experiment controller through the API server of the distributed training platform, and the correctness and completeness of the custom resources are verified based on the Experiment Webhook. Step S2: The Experiment controller creates a Suggestion resource; If the correctness and completeness of the custom resource pass the verification, the Experiment controller will create a Suggestion resource to generate a set of hyperparameter solutions. Step S3: Perform improved NSGA-III hyperparameter optimization; The suggestion is for the controller to check whether the improved non-dominated sorting genetic algorithm NSGA-III service resources are ready; If the improved non-dominated sorting genetic algorithm NSGA-III service status representation can provide services, the Suggestion controller generates a new hyperparameter solution set based on the non-dominated sorting genetic algorithm NSGA-III and writes it into the suggestion status status.suggestions field of the Suggestion resource; Step S4: The Trial test controller generates training tasks and starts training; The Trial controller creates an actual training task, i.e. a Kubernetes Job or Pod instance, for each Trial based on the template of the training task in the custom Experiment resource, and submits the training task to the Kubernetes cluster for execution. Step S5: The Metrics Collector collects and stores the target metrics; The Metrics Collector collects metrics and stores them in the backend database of the Katib hyperparameter optimization framework. Step S6: If the termination condition is met, output the optimal hyperparameter solution set; When the training task is completed, the Trial test controller updates the Trial test resource status of the training task. When a Trial resource is no longer in use, the Suggestion controller updates the search strategy based on the current experimental results, generates a new set of hyperparameter solutions, and writes the updated set of hyperparameter solutions into the suggestion status field of the Suggestion resource for use in the next round of Trial trials. The optimization process is repeated in multiple iterations to generate new trial tasks and run them until the pre-defined termination conditions are met. When the Experiment resource meets the termination condition, the run ends and the optimal hyperparameter solution set is written to the status.paretoOptimalTrials field of the Experiment resource.

2. The hyperparameter adaptive multi-objective optimization method according to claim 1, characterized in that: In step S1, the custom Experiment resource contains relevant configuration information for the training task. The system triggers the ExperimentWebhook to verify the submitted Experiment resource. If the Webhook check shows that the Experiment resource is filled in completely and the configuration is valid, the verification will pass, the Experiment resource will be officially accepted, and included in the system's management. Otherwise, if the verification fails, the webhook will return an error message, requiring the user to modify the custom Experiment resource and resubmit it.

3. The hyperparameter adaptive multi-objective optimization method according to claim 1, characterized in that: In step S3, the improved non-dominated sorting genetic algorithm NSGA-III is implemented as follows: Step S3.1: The improved non-dominated sorting genetic algorithm NSGA-III adopts a dynamic weight allocation method, which adaptively adjusts the weights of each optimization objective during the search process to find high-quality hyperparameter configurations in multi-objective optimization problems, thereby optimizing the performance of the distributed training model. The optimization objectives are obtained through actual training with real-time feedback, including accuracy, inference speed, and resource consumption; S3.

2. Deeply integrate the improved non-dominated sorting genetic algorithm NSGA-III with the Katib hyperparameter optimization framework, so that the Katib hyperparameter optimization framework can adaptively and dynamically adjust the hyperparameter configuration according to the changes in the training environment, thereby improving the optimization efficiency. S3.

3. Make full use of distributed computing resources to achieve parallel hyperparameter optimization; S3.4 The improved non-dominated sorting genetic algorithm NSGA-III adopts an adaptive search strategy, which can dynamically adjust the algorithm parameters based on feedback information during the search process to improve the convergence speed and solution quality. S3.

5. Combining intelligent resource allocation and scheduling technology, appropriate computing resources are dynamically allocated according to the characteristics of the training task, and resources are intelligently scheduled to further improve training efficiency and resource utilization.

4. The hyperparameter adaptive multi-objective optimization method according to claim 3, characterized in that: In step S3.1, the improved non-dominated sorting genetic algorithm NSGA-III adaptively adjusts the weights of each optimization objective. The specific process is as follows: Step S3.1.1: First, obtain the hyperparameter configuration of the training model, including the learning rate lr ∈ [0.0001, 0.1], batch size bs ∈ [16, 128], number of hidden layers hn ∈ [1, 5], and number of neurons per layer nn ∈ [32, 512]. Individuals x are randomly generated from the candidate hyperparameter combinations using a normal distribution. i Individual x i Represented as: x i =random(lr,bs,hn,nn) Where random represents the normal distribution function; Then, from several individuals x i The initial population p0 is formed, and each individual x in the initial population p0 is... i Each of these includes a set of hyperparameters that need to be optimized, including the learning rate, batch size, number of hidden layers, and number of neurons per layer. Step S3.1.2: Train and evaluate the model performance, construct a multi-objective fitness function F, and calculate the individual x. i fitness value; The multi-objective fitness evaluation function F is expressed as: F=ω1·f1(x i )-ω2·f2(x i )-ω3·f3(x i ) Where ω1 is the initial weight for accuracy, ω2 is the initial weight for inference speed, ω3 is the initial weight for resource consumption, and f1(x) i f2(x) represents the accuracy. i f3(x) represents the training time. i ) represents resource consumption; Step S3.1.3: Dynamically adjust the weight of each objective based on the performance of individuals in the current population: The weights are dynamically adjusted based on the fitness value of the target, and the new weights ω 、 k The calculation method is as follows: Where 1≦k≦3, ω 、 1 represents the accuracy weight, ω 、 2 represents the inference speed weight, ω 、 3 represents the resource consumption weight; Step S3.1.4, Selection and Evolution Process: The process of performing non-dominated ranking and hierarchy classification on individuals in a population is as follows: First, calculate individual x. i The dominance relationship is calculated as follows: When individual x j When the accuracy is higher and the reasoning speed and resource consumption are lower, it is believed that individual x... j Outperformed individual x in all three optimization objectives. i ; When individual x j It performs no worse than individual x on all three optimization objectives. i And at least on one optimization objective m, individual x j The performance was better than individual x i If m∈k, then individual x is considered to be j Dominant individual x i ; If individual x j If individual x is not dominated by any other individual, then individual x j This is called a non-dominated solution; Based on the dominance relationship, all individuals are divided into different ranks, fronts; Step S3.1.5: For each non-dominated level calculated in step S3.1.4, calculate the crowding distance of individuals to assess the distribution of individuals in the target space, thereby maintaining the diversity of the population during the evolutionary process and avoiding the concentration of solutions in certain specific areas. Individual x i Crowding distance d between it and its neighboring individuals i Calculated using the following formula: Among them, f k max and f k min represents the maximum and minimum values ​​of the optimization objective in the population, respectively; Step S3.1.6: Based on the non-dominance level and crowding distance, select individuals to form a new population p. 1-tmp ; Step S3.1.7: Perform crossover and mutation operations on the selected individuals to generate new individuals; Among them, the crossover operation is achieved through single-point crossover or multi-point crossover, and the mutation operation is achieved by randomly changing the hyperparameter values; Step S3.1.8: Combine the newly generated individual with the current population p. 1-tmp Merge to form a new temporary population p ` and for population p ` Perform non-dominated sorting and crowding distance calculation to select a new population p1; Step S3.1.9: Repeat steps S3.1.3 to S3.1.7 until the custom termination condition is met; Step S3.1.10: Output the solution set on the Pareto front, providing a set of uniformly distributed hyperparameter configurations for decision-makers to choose from.

5. The hyperparameter adaptive multi-objective optimization method according to claim 4, characterized in that: In step S3.1.4, based on the dominance relationship, all individuals are divided into different levels, fronts, as follows: The first level, fronts, contains all non-dominated solutions; The second level fronts contains individuals that are only dominated by the non-dominated solutions in the first level fronts; The third level fronts contains individuals that are dominated only by individuals in the second level fronts; This process is repeated, dividing the population into several levels (fronts) until all individuals have been classified.

6. The hyperparameter adaptive multi-objective optimization method according to claim 4, characterized in that: In step S3.1.6, when selecting individuals based on non-dominance level and crowding distance, individuals with higher non-dominance levels are given priority. When the number of individuals in the same non-dominant class exceeds the population requirement, further screening is performed using crowding distance, prioritizing individuals that are more dispersed in the target space, i.e., those with a crowding distance d between them and their neighboring individuals. i Large individuals.

7. The hyperparameter adaptive multi-objective optimization method according to claim 1, characterized in that: In step S3, the Experiment controller monitors the update status of the Suggestion resource in real time. If the Suggestion resource has been updated, a Trial resource is generated for each new set of hyperparameters.

8. A hyperparameter adaptive multi-objective optimization system, characterized in that: include: The Experiment creation module is responsible for helping users create custom Experiment resources. It submits the defined Experiment configuration information to the Experiment controller through the API server of the distributed training platform, and verifies the correctness and completeness of the custom resources based on the Experiment Webhook. The Experiment controller is responsible for creating a Suggestion resource after receiving the Experiment resource created by the user, which is used to generate a set of hyperparameter solutions. At the same time, it monitors the update status of the Suggestion resource in real time. If the Suggestion resource is found to be updated, a Trial resource is generated for each new set of hyperparameters. The Suggestion Controller is responsible for checking whether the service resources of the improved non-dominated sorting genetic algorithm NSGA-III are ready; If the improved non-dominated sorting genetic algorithm NSGA-III service status representation can provide services, the Suggestion controller generates a new hyperparameter solution set based on the non-dominated sorting genetic algorithm NSGA-III and writes it into the suggestion status status.suggestions field of the Suggestion resource; Meanwhile, the suggestion suggests that the controller be responsible for updating and generating a new set of hyperparameters based on the current metrics when the Trial resource execution is completed; The Trial controller is responsible for creating actual training tasks (i.e., Kubernetes Jobs or Pod instances) for each Trial experiment based on the template of the training task in the custom Experiment resource, and submitting the training task to the Kubernetes cluster for execution. When the training task is completed, it updates the status of the Trial resource for that training task. When the Experiment task meets the termination condition, it terminates the run and writes the optimal hyperparameter solution set to the status.paretoOptimalTrials field of the Experiment resource. The Metrics Collector is responsible for collecting target metrics and storing them in the backend database of the Katib hyperparameter optimization framework.

9. A hyperparameter adaptive multi-objective optimization device, characterized in that: include: One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods according to claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • System resource and model hyper-parameter collaborative optimization method in deep learning training

    CN112836796A

  • Method and system for determining technological parameters of selective laser melting technology

    CN116502455A