Parameter optimization method based on large language model multi-stage strategy pruning workflow component
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU UNIV
- Filing Date
- 2026-07-06
- Publication Date
- 2026-08-07
AI Technical Summary
[0006]本发明的主要目的在于提供了一种基于大语言模型多阶段策略剪枝工作流组件参数优化方法,以解决现有超参数优化方法在可视化机器学习工作流的多组件、高维、结构化参数空间中搜索效率低、难以利用历史信息进行策略决策以及评估成本高的缺陷
[0049]与现有技术相比,本发明提供了一种基于大语言模型多阶段策略剪枝工作流组件参数优化方法。本发明设计了初始化探索与Top-k限制,能够快速提出明显低性能分支,识别出潜在的高性能区域。在此基础上,进一步引入了基于大语言模型的策略剪枝阶段,利用大语言模型对历史搜索记录进行语义分析和策略推理,结合分支在完整预算周期内的最优值、稳定性及收敛趋势作出延迟剪枝决策克服了传统方法仅依赖单点数值结果、无法利用历史信息进行高层策略决策的局限,提升了高维参数空间的搜索效率与优化质量。
Smart Images

Figure CN122529129A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning workflow and hyperparameter optimization technology, and in particular to a method for optimizing the parameters of a workflow component based on a multi-stage strategy pruning of a large language model. Background Technology
[0002] With the widespread adoption of visual machine learning platforms, users can build workflows that include components such as data preprocessing, feature engineering, and model training through drag-and-drop interaction, lowering the technical barrier to model development. However, the final performance of the workflow is highly dependent on the parameter configuration of each component. In practical applications, most platform components use default parameter configurations geared towards general scenarios, making it difficult to adapt to specific data distributions and task objectives. To obtain ideal model results, users need to fine-tune multiple parameters for each component, which places a significant operational burden on non-professional users.
[0003] In a visualized workflow environment, parameter optimization faces multiple technical challenges. First, a complete workflow typically consists of multiple components, each containing multiple adjustable parameters, forming a high-dimensional and structured combinatorial space where the parameter size grows exponentially with the number of components. Second, there are cascading dependencies between components; the parameters of the upstream preprocessing module directly affect the training performance of the downstream model, exhibiting complex coupling characteristics. Furthermore, each parameter combination evaluation requires running the entire workflow, resulting in high computational costs. These factors make traditional parameter optimization methods difficult to apply directly.
[0004] Existing hyperparameter optimization methods, such as grid search, random search, and Bayesian optimization strategies, achieve good results in single-model or low-dimensional parameter spaces. However, in multi-component, structured, and high-dimensional workflow scenarios, these methods have significant shortcomings: grid search and random search are inefficient and struggle to cover high-potential regions within a limited budget. Bayesian methods lack characterization of the phased features of the optimization process, making it difficult to utilize historical search information for high-level strategy decisions and easily wasting computational resources on low-yield regions.
[0005] In summary, to address the shortcomings of existing hyperparameter optimization methods in terms of low search efficiency, difficulty in utilizing historical information for policy decision-making, and high evaluation costs in multi-component, high-dimensional, and structured parameter spaces of visualized machine learning workflows, a component parameter optimization method based on a multi-stage policy pruning workflow using a large language model is proposed. Summary of the Invention
[0006] The main objective of this invention is to provide a method for optimizing component parameters in a multi-stage strategy pruning workflow based on a large language model, in order to address the shortcomings of existing hyperparameter optimization methods in terms of low search efficiency, difficulty in utilizing historical information for strategy decision-making, and high evaluation costs in the multi-component, high-dimensional, and structured parameter space of visualized machine learning workflows.
[0007] Based on the first main aspect of the present invention, a method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model is provided, comprising the following steps:
[0008] Obtain the target dataset and the machine learning workflow to be optimized, explore the original global parameter space of the machine learning workflow to be optimized, and generate candidate parameter configurations;
[0009] The performance of the candidate parameter configuration on the target dataset is calculated and the performance index is recorded. The performance index is sorted and a preset number of initial candidate branches are retained.
[0010] By using a large language model combined with the historical search records of the retained initial candidate branches, reasoning is performed based on contextual information to generate parameter adjustment suggestions. The overall performance of each candidate branch is comprehensively evaluated within the complete budget period, and another preset number of candidate branches are selected and retained to form the parameter subspace of the second stage.
[0011] A local search is performed on the parameter subspace in the second stage to output the final approximate optimal parameter combination.
[0012] As a further preferred embodiment, in the aforementioned method, the execution steps for generating candidate parameter configurations are as follows:
[0013] Extract the dataset feature vector from the target dataset;
[0014] Based on the feature vector of the dataset, historical parameter configurations with similarity exceeding a preset similarity threshold are retrieved from the historical experience database;
[0015] If the retrieval is successful, the retrieved historical parameter configurations are analyzed using a large language model to generate the candidate parameter configurations.
[0016] If the retrieval fails, the candidate parameter configuration is generated by the large language model based on different scales.
[0017] As a further preferred embodiment, in the aforementioned method, the calculation of its performance on the target dataset and the recording of performance metrics are performed using the following formula:
[0018] ;
[0019] in, This represents the set of performance scores obtained after the first phase of exploration. Represents the evaluation index function. This represents the machine learning workflow to be optimized. Indicates the first The components of each candidate parameter configuration. Represents the target dataset. This indicates the total number of candidate parameter configurations generated in the first stage. Indicates the index number of the candidate parameter configuration.
[0020] As a further preferred embodiment, in the aforementioned method, the execution steps constituting the parameter subspace of the second stage are as follows:
[0021] Based on the large language model, the candidate branches are iteratively pruned in multiple rounds. First, the dataset feature vectors in the target dataset are extracted as the basis for subsequent retrieval and reasoning.
[0022] Repeat the following operations according to the preset number of iterations:
[0023] Initialize the set of new branches for the current round to empty;
[0024] For each candidate branch in the initial candidate branches that retain a preset number of preceding branches, execute sequentially:
[0025] The large language model is invoked, and a new set of parameter configurations to be evaluated is generated by combining the historical search records of the current candidate branch, the historical experience base, the dataset feature vectors, and the preset pruning parameters.
[0026] For each newly generated parameter configuration, run the workflow and evaluate it on the dataset to obtain the corresponding performance score;
[0027] All generated parameter configurations and their corresponding performance scores, along with the dataset feature vectors, are stored in the historical experience database.
[0028] In the parameter configuration generated in the current round, candidate branches with preset selection parameters ranked according to performance scores are selected as the candidate branch set for the next iteration;
[0029] After completing the preset number of iterations, the final set of candidate branches output is the parameter subspace of the second stage.
[0030] As a further preferred embodiment, in the aforementioned method, the steps for performing the local search are as follows:
[0031] Extract the feature vectors from the target dataset as a reference for defining the subsequent search space;
[0032] Define the search space by using a large language model and automatically defining a local search space based on the parameter range and candidate configuration information corresponding to the candidate branches of the parameter subspace in the second stage.
[0033] Within the defined local search space, a hyperparameter optimization strategy is run using a preset search budget to perform the search;
[0034] After the search is completed, the final approximate optimal parameter combination is output.
[0035] As a further preferred option, in the aforementioned method, the preset search budget is either a time budget or an iteration count budget;
[0036] The hyperparameter optimization strategy includes, but is not limited to, any one of the following: local Bayesian optimization method, random search method, or grid search method.
[0037] As a further preferred embodiment, in the aforementioned method, the original global parameter space of the machine learning workflow to be optimized is defined as the Cartesian product of each parameter space.
[0038] The goal of this method is to find an approximately optimal combination of parameters that satisfies the following conditions:
[0039] ;
[0040] in, This represents an approximately optimal combination of parameters. This indicates the performance of the machine learning workflow on the dataset under the specified parameter configuration. This represents the machine learning workflow to be optimized. Indicates parameter configuration. Represents the target dataset. Represents the original global parameter space. This represents the value of the independent variable that maximizes the objective function. Represents the evaluation index function;
[0041] The evaluation index function is accuracy or F1 score in classification tasks; and root mean square error or coefficient of determination in regression tasks.
[0042] Based on a second key aspect of the present invention, a component parameter optimization system for a multi-stage strategy pruning workflow based on a large language model is provided for implementing the aforementioned method, comprising:
[0043] The initialization exploration module is used to explore the original parameter space of the machine learning workflow, generate initial parameter configurations and evaluate performance, and retain a preset number of initial candidate branches.
[0044] The strategy pruning module is used to analyze the search records in each initial candidate branch that retains a preset number of predecessors, generate parameter adjustment suggestions, comprehensively evaluate the overall performance of each candidate branch within the full budget period, and sort and filter to retain another preset number of candidate branches, forming the parameter subspace of the second stage.
[0045] The refined search module is used to perform a local search on the parameter subspace of the second stage and output the final approximate optimal parameter combination.
[0046] Based on a third key aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0047] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the aforementioned method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model.
[0048] Based on a fourth key aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed, implements the aforementioned method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model.
[0049] Compared with existing technologies, this invention provides a parameter optimization method for a multi-stage policy pruning workflow component based on a large language model. This invention designs initialization exploration and Top-k constraints, which can quickly identify obviously low-performance branches and potential high-performance regions. Building upon this, a policy pruning stage based on a large language model is further introduced. This stage utilizes the large language model to perform semantic analysis and policy reasoning on historical search records. By combining the optimal value, stability, and convergence trend of branches within the complete budget period, delayed pruning decisions are made. This overcomes the limitations of traditional methods that rely solely on single-point numerical results and cannot utilize historical information for high-level policy decisions, thus improving the search efficiency and optimization quality in the high-dimensional parameter space.
[0050] Secondly, addressing the technical challenges of high evaluation costs and difficulty in fully exploring high-dimensional spaces within limited budgets using traditional methods, this invention constructs a three-stage optimization architecture: initial exploration, strategy pruning, and refined search with progressive compression. The first stage locates high-potential regions over a wide area; the second stage uses semantic reasoning based on a large language model to further filter the optimal branch; and the third stage performs intensive local searches only within a significantly reduced subspace, thereby improving the efficiency of unit computational resource utilization.
[0051] Finally, this invention, through a structured multi-stage pruning framework and automatic strategy generation based on a large language model, enables users to achieve optimal workflow performance without needing to understand the coupling relationships and technical meanings of the parameters of each component. Simultaneously, the entire optimization process is divided into three clearly defined stages, with traceable historical records and explainable decision-making basis, reducing users' distrust of black-box optimization. The generated optimal parameter configuration can be directly applied to the visualization platform, and users can also manually adjust it as needed, thereby lowering the technical threshold for parameter tuning while maintaining flexibility. This solves the practical application problems of existing visualization machine learning platforms where default parameters are unsuitable for specific tasks and non-professional users find it difficult to perform complex parameter tuning. Attached Figure Description
[0052] 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 only some embodiments of the present invention. For those skilled in the art, obtaining other drawings based on these drawings without creative effort still falls within the scope of the present invention.
[0053] Figure 1 The following is an execution flowchart of a multi-stage strategy pruning workflow component parameter optimization method based on a large language model, according to one embodiment of the present invention.
[0054] Figure 2 This diagram illustrates the overall framework of a multi-stage strategy pruning workflow component parameter optimization method based on a large language model, according to one embodiment of the present invention.
[0055] Figure 3 This diagram illustrates an example algorithm for the initial exploration phase of a multi-stage strategy pruning workflow component parameter optimization method based on a large language model, according to an embodiment of the present invention.
[0056] Figure 4 The diagram illustrates an example algorithm for the strategy pruning stage based on a large language model, in an embodiment of the present invention, of a multi-stage strategy pruning workflow component parameter optimization method based on a large language model.
[0057] Figure 5 The diagram illustrates an example algorithm for a refined search of a component parameter optimization method based on a multi-stage strategy pruning workflow using a large language model, according to one embodiment of the present invention. Detailed Implementation
[0058] The preferred embodiments of the present invention will be described in detail below to provide a clearer understanding of the purpose, features, and advantages of the invention. It should be understood that the following embodiments are not intended to limit the scope of the invention, but are merely illustrative of the essential spirit of the technical solution of the invention.
[0059] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the art will recognize that embodiments may be practiced without one or more of these specific details. In other instances, well-known techniques associated with the invention may not have been shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0060] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.
[0061] The following is a description of the specific meanings of technical terms, English abbreviations, and formula parameters that may be used in this invention:
[0062] Workflow: A machine learning process consisting of multiple components that are executed sequentially or in parallel.
[0063] Parameter configuration: The combination of values for all component parameters in the workflow is a vector, with each component representing the value of a specific parameter.
[0064] TPE: Tree-structured Parsons estimator, a hyperparameter optimization method based on Bayesian optimization, often used in automated machine learning.
[0065] Random Search: A hyperparameter optimization method that randomly samples candidate configurations in the parameter space for evaluation.
[0066] Simulated Annealing Algorithm (Anneal): A global optimization algorithm based on the physical annealing mechanism. This algorithm simulates the heating and slow cooling process in the metal annealing process. In the early stage of the search, it accepts inferior solutions with a high probability to escape local optima. As the temperature parameter gradually decreases, the probability of accepting inferior solutions decreases, and eventually converges to an approximate global optimum.
[0067] DS-Agent: Data Science Intelligent Agent, refers to an automated machine learning agent driven by a large language model, which can automatically complete tasks such as data understanding, workflow construction, and parameter adjustment according to user instructions.
[0068] Evolutionary Algorithm: A global optimization algorithm inspired by biological evolution mechanisms. The algorithm maintains a population of each candidate solution. In each generation, the performance of individuals is evaluated through a fitness function. Better individuals are selected for crossover, recombination, and mutation operations to generate a new generation of population. This process is repeated until convergence.
[0069] N2WBench dataset: A collection of public benchmark datasets for evaluating methods for automatically building and optimizing machine learning workflows.
[0070] Combination Figure 1 As shown, a method for optimizing the parameters of a workflow component based on a multi-stage strategy pruning of a large language model includes the following steps S1~S4:
[0071] S1, Obtain the target dataset and the machine learning workflow to be optimized, explore the original global parameter space of the machine learning workflow to be optimized, and generate candidate parameter configurations;
[0072] S2, calculate the performance of the candidate parameter configuration on the target dataset and record the performance indicators, sort the performance indicators, and retain a preset number of initial candidate branches;
[0073] S3 utilizes a large language model combined with the historical search records of the retained initial candidate branches to perform reasoning based on contextual information, generate parameter adjustment suggestions, comprehensively evaluate the overall performance of each candidate branch within the complete budget cycle, and select and retain another preset number of candidate branches to form the parameter subspace of the second stage.
[0074] S4, perform a local search on the parameter subspace of the second stage, and output the final approximate optimal parameter combination.
[0075] This invention provides a method for optimizing the parameters of a workflow component based on a large language model using a multi-stage strategy-pruned workflow (MSP-WPO).
[0076] The core idea of this method is to achieve efficient and stable near-optimal search in high-dimensional space by shrinking the search space in stages and layer by layer while ensuring the initial exploration capability, and by combining a large language model to perform semantic analysis and strategy decision-making on the search history.
[0077] Overall framework as Figure 2 As shown. The method provided by this invention consists of three stages: an initialization exploration stage, a strategy pruning stage, and a refined search stage. These stages form a hierarchical optimization structure with progressively compressed layers.
[0078] The core of this framework is to explore extensively in the early stages to avoid getting trapped in local optima, then reduce invalid branches through phased pruning, and finally enhance global decision-making capabilities through semantic reasoning, effectively utilizing historical optimization records as decision-making auxiliary information.
[0079] Let a machine learning workflow be denoted as: ,in This indicates the machine learning workflow to be optimized. Indicates the first The system comprises several components, including modules for data preprocessing, feature selection, and model training. This indicates the total number of workflow components. This indicates the first component. This indicates the second component.
[0080] Each component has a corresponding set of parameters: ,in, This indicates that each component has a corresponding set of parameters; This indicates the first parameter. This indicates the second parameter. Indicates parameters, The number of parameters in the component is given in this formula. Indicates the component's index number.
[0081] The global parameter space of the entire workflow can be represented as the Cartesian product of the parameter spaces of each component: ,in Represents the original global parameter space. This represents the parameter set of the first component. This represents the parameter set of the second component. This indicates that each component has a corresponding set of parameters. This indicates the total number of workflow components.
[0082] The parameter configuration vector for any workflow component is denoted as: ,in Indicates the first The components of each candidate parameter configuration. This indicates the component configured in the first candidate parameter. This indicates the component configured in the second candidate parameter. This indicates the component configured in the last candidate parameter. This indicates that each component has a corresponding set of parameters. This formula represents the total number of workflow components. Indicates the component's index number. This indicates the last component of the candidate parameter configuration. This indicates parameter configuration.
[0083] The ultimate optimization objective of this invention is given a target dataset and an evaluation index function. The component parameter optimization problem can be defined as follows:
[0084] ;
[0085] in, This represents an approximately optimal combination of parameters; This indicates the performance of the machine learning workflow on the dataset under the specified parameter configuration. This represents the machine learning workflow to be optimized. Indicates parameter configuration. Represents the target dataset; Represents the original global parameter space; This represents the value of the independent variable that maximizes the objective function. This represents the evaluation index function, in classification tasks. For accuracy or F1 score; in regression tasks, It can be RMSE or Indicators such as these.
[0086] Let the original global parameter space be... The objective function is .in, This represents the machine learning workflow to be optimized. Indicates parameter configuration. Represents the target dataset; Represents the original global parameter space; This represents the evaluation index function.
[0087] Traditional optimization directly searches the original global parameter space, while this invention restructures the search process into a phased optimization process:
[0088] ;
[0089] in, It is the candidate space after the first stage of screening; It is the high-potential subspace after policy pruning, i.e. the parameter subspace of the second stage; This represents the final approximate optimal solution; Represents the original global parameter space.
[0090] The basic flow of the algorithm of this invention is as follows: Figure 2 As shown.
[0091] In one possible embodiment, steps S1 and S2 are described, namely the first stage: initial exploration and Top-k constraint.
[0092] In the first stage, the algorithm explores the original global parameter space extensively. The goal of this stage is not to directly obtain the optimal solution, but to identify potential high-performance regions.
[0093] First, extract the dataset feature vector from the target dataset;
[0094] Based on the feature vectors of the dataset, searches are performed in the historical experience database for data with similarity exceeding a preset similarity threshold. Historical parameter configuration;
[0095] If the retrieval is successful, the retrieved historical parameter configurations are analyzed using a large language model to generate candidate parameter configurations.
[0096] If the retrieval fails, the large language model generates candidate parameter configurations based on different scales.
[0097] Specific example algorithms for this stage are as follows: Figure 3 As shown.
[0098] Specifically, a set of candidate parameter configurations is generated through random sampling or a search strategy based on a probability model:
[0099] ;
[0100] in, This represents the set of candidate parameter configurations generated after the first phase of initial exploration. This represents a configuration vector for each workflow parameter; This represents the first workflow parameter configuration vector; This represents the second workflow parameter configuration vector; This represents the last workflow parameter configuration vector; This indicates the total number of candidate parameter configurations generated in the first stage.
[0101] And calculate the corresponding performance:
[0102] ;
[0103] in, This represents the set of performance scores obtained after the first phase of exploration. Represents the evaluation index function. This represents the machine learning workflow to be optimized. Indicates the first The components of each candidate parameter configuration. Represents the target dataset. This represents the total number of candidate parameter configurations generated in the first stage. In this formula... Indicates the index number of the candidate parameter configuration.
[0104] After obtaining the initial search results, a Top-k constraint strategy is introduced. For each component that can form a branching structure, such as model type selection and feature processing methods, the components are sorted according to performance metrics, and only the top-performing components are retained. The best performing candidate branch.
[0105] This step can be formalized as follows:
[0106] ;
[0107] in, This represents the candidate space after the first stage of screening; This represents the original global parameter space; in this formula Indicates the selection parameters. This represents a filtering operation function.
[0108] Its purpose is to: quickly eliminate obviously low-performance branches; control the search scale in subsequent stages; and maintain a certain level of exploration diversity. This stage achieves the first compression of the parameter space.
[0109] In one possible embodiment, step S3, namely the second stage: policy pruning based on the large language model, will be described.
[0110] The first stage mainly relies on performance indicators for sorting and screening. Although it can effectively eliminate obviously inefficient parameter branches, its decision-making is still based on single-point numerical results and has not fully explored the potential structural patterns and trend information in the search history.
[0111] Therefore, in the second stage, this invention introduces a large language model to perform structured analysis and strategy decision-making on the search trajectory.
[0112] This step involves multiple rounds of iterative pruning of candidate branches based on a large language model. First, the dataset feature vectors in the target dataset are extracted as the basis for subsequent retrieval and inference.
[0113] Repeat the following operations according to the preset number of iterations:
[0114] Initialize the set of new branches for the current round to empty;
[0115] For each candidate branch in the initial candidate branches that retain the preset number of preceding branches, execute sequentially:
[0116] The large language model is invoked, and a new set of parameter configurations to be evaluated is generated by combining the historical search records of the current candidate branch, the historical experience base, the dataset feature vectors, and the preset pruning parameters.
[0117] For each newly generated parameter configuration, run the workflow and evaluate it on the dataset to obtain the corresponding performance score;
[0118] All generated parameter configurations and their corresponding performance scores, along with the dataset feature vectors, are stored in the historical experience database.
[0119] In the parameter configuration generated in the current round, candidate branches with preset selection parameters ranked according to performance scores are selected as the candidate branch set for the next iteration;
[0120] After completing the preset number of iterations, the final set of candidate branches output is the parameter subspace of the second stage.
[0121] An example algorithm for this step is as follows: Figure 4 As shown.
[0122] After the initial pruning in the first stage, the current parameter space has retained several high-performance candidate branches, but the overall size is still large and needs further compression.
[0123] At the same time, if pruning is continued based solely on the current best metrics, potentially deleting branches may be mistakenly done due to noise in the early assessment or insufficient exploration.
[0124] To avoid premature convergence, a resource balancing mechanism was designed in this stage: a fixed search budget was allocated to each remaining potential branch.
[0125] In practice, the large language model combines the historical search records of each branch to strategically guide the next round of parameter attempts. This guidance process is not a simple random perturbation, but rather a multi-step inference based on contextual information to generate targeted parameter adjustment suggestions. Each branch iterates continuously within a predetermined budget until resources are exhausted.
[0126] Once all candidate branches have completed their allocated budgets, a unified performance evaluation and branch comparison will be performed.
[0127] At this point, the pruning decision no longer depends on the result of a single evaluation, but is based on the overall performance of the branch over the entire budget cycle, including comprehensive indicators such as optimal value, stability, and convergence trend.
[0128] Ultimately, only the branches with the highest scores are retained to form the parameter subspace of the second stage. The core purpose of this delayed decision-making mechanism is to avoid prematurely pruning branches that have potential but have not yet been fully developed, while ensuring sufficient exploration.
[0129] At this point, the search space has undergone its second round of significant compression. The key difference between this stage and the first is that pruning decisions no longer rely solely on single-point performance ranking, but instead combine historical search trajectories for global pattern judgment and structured strategy reasoning.
[0130] In one possible embodiment, step S4, namely the third stage: refined local search, will be described.
[0131] After two rounds of phased pruning, the parameter space has been significantly reduced, and the remaining subspace is concentrated in high-potential regions.
[0132] At this point, a more intensive local search can be performed on the parameter subspace of the second stage to further approximate the optimal solution. The feature vectors of the target dataset are extracted as a reference for defining the subsequent search space.
[0133] Define the search space by using a large language model and automatically defining a local search space based on the parameter range and candidate configuration information corresponding to the candidate branches of the parameter subspace in the second stage.
[0134] Within the defined local search space, use time or iteration budget to run hyperparameter optimization strategies for searching;
[0135] After the search is completed, the final approximate optimal parameter combination is output.
[0136] Specific example algorithms for this stage are as follows: Figure 5 As shown.
[0137] In this stage, classic hyperparameter optimization strategies can be used, such as local Bayesian optimization, random search, or grid search.
[0138] Since the search space has been significantly compressed in the first two stages, the evaluation budget can be concentrated on high-value regions, thereby improving the utilization efficiency of unit computing resources and accelerating the convergence speed.
[0139] It is worth noting that since the first two stages have already completed large-scale structural screening and space reduction, the search scale faced in the third stage is usually smaller. Therefore, the specific local optimization strategy adopted has a relatively limited impact on the final performance.
[0140] In other words, the core source of the performance improvement of this method lies in the effective reconstruction and compression of the search space in the first two stages, rather than the optimization algorithm itself in the final stage.
[0141] After completing the local refinement search, the final approximate optimal parameter combination is output. This concludes the entire multi-stage strategy pruning and optimization process.
[0142] In one feasible embodiment, the method provided by the present invention is experimentally analyzed:
[0143] TPE (Tree Structured Parzen Estimator), Random Search, Simulated Annealing, DS-Agent, and Evolutionary Algorithm were selected as comparison objects.
[0144] We selected all classification and regression tasks from the basic instruction class in the N2WBench dataset, totaling 21 tasks, as the public dataset for this component parameter optimization task.
[0145] In this experiment, APR (Average Performance Ranking) was used as the unified metric.
[0146] In the experiment, this invention sets selection parameters in the MSP-WPO algorithm. Pruning parameters Number of iterations All methods in the embodiments are limited to a maximum of 75 evaluations. The basic model used for the experiment is qwen3-235b-a22b-instruct-2507, and the temperature parameter of the LLM is set to 0.
[0147] To further ensure the accuracy and reliability of the experimental results, three experiments were conducted in this embodiment, and the average value of the results was taken.
[0148] In the comparative experiments, the method of the present invention improved the average performance ranking by 4.7 places on all datasets, indicating that the proposed phased pruning method can greatly alleviate the problems caused by default parameters.
[0149] Compared with DS-Agent, the average ranking of the method in this invention is further improved by 3.5 places, indicating that under the same optimization paradigm based on a large language model, the introduction of a phased space compression and policy pruning mechanism can make more effective use of the limited search budget, thereby achieving better overall performance.
[0150] Compared to the classic Bayesian optimization method TPE, the method of this invention achieves an improvement of approximately 0.28 in average ranking.
[0151] Experimental results further validate the applicability of this method in high-dimensional structured search spaces and under resource-constrained conditions.
[0152] Furthermore, in scenarios where a balance needs to be struck between search efficiency and optimization quality, multi-stage pruning strategies can reduce unnecessary exploration, thereby saving resources consumed throughout the process and achieving better results.
[0153] The ablation experiments were divided into two aspects: module ablation and hyperparameter optimization algorithm-dependent ablation.
[0154] For module ablation, ablation is performed on three modules, which are divided into three groups: C1: disable the initialization search module, which only uses the large language model for iterative search pruning; C2: disable the policy pruning module, which directly uses the hyperparameter optimization module for optimization after the initialization search is completed; C3: disable the hyperparameter optimization module.
[0155] All three modules contributed positively to the final performance. Compared to the complete algorithm, the average performance ranking of group C1 decreased by approximately 0.62, group C3 by approximately 0.66, and group C2 by approximately 0.33.
[0156] The above demonstrates that the initialization exploration module and the final hyperparameter optimization module play a significant role in the entire optimization process.
[0157] If the first-stage global exploration method is removed, the search is easily constrained by the initial selection and cannot obtain good results; if the third-stage fine search is not performed, the model's optimization level in good regions will also decrease.
[0158] There is good synergy between the modules: initial exploration expands the search scope, strategy pruning reduces useless searches, and fine-grained optimization improves the local search effect.
[0159] For hyperparameter optimization algorithms that depend on ablation, this embodiment uses four methods to implement the module: TPE, EvolutionaryAlgorithm, Random Search, and direct parameter generation based on LLM, and compares and evaluates them under the same experimental settings.
[0160] The average performance differences brought about by different optimization algorithms in the third stage are small, the ranking changes are limited, and all of them are better than the baseline method.
[0161] This phenomenon indicates that the performance improvement of the method of the present invention does not mainly depend on the specific hyperparameter optimization algorithm, but rather on the structured compression of the search space and the screening of high-potential regions in the first two stages.
[0162] This is because, upon entering the third stage, after initial exploration and policy pruning, the original high-dimensional parameter space has been reduced to a smaller candidate subspace.
[0163] Under these conditions, the optimization problem transforms from a high-dimensional combinatorial search to a low-dimensional local search or nearest-neighbor search problem. Therefore, even when using random search or LLM-based parameter generation strategies, similar optimization results can be obtained within a limited budget.
[0164] The results demonstrate that the performance gain of the method in this invention mainly comes from the search space reconstruction and staged compression mechanism, rather than relying on a specific underlying optimization algorithm. This weak dependence on the optimization algorithm makes the method well-adaptable and versatile in different hyperparameter optimization frameworks.
[0165] In the parameter analysis experiment, the Top-k parameter is used to control the number of candidate branches retained during the second-stage pruning process, and it is a parameter that affects the pruning intensity.
[0166] In this embodiment, the Top-k values are set to 1, 2, 3, 5 and 7 respectively, and comparative experiments are conducted under the same experimental configuration.
[0167] The results show that when Top-k increases from 1 to 3, the average performance ranking shows a significant improvement, indicating that moderately increasing the number of candidate branches helps alleviate the information loss problem caused by excessive pruning. However, when Top-k continues to increase to 5 or 7, the improvement in average performance ranking decreases significantly, and even shows slight fluctuations.
[0168] This indicates that after the number of retained branches reaches a certain scale, continuing to reduce the pruning intensity will not significantly improve the final performance. On the contrary, it may weaken the search efficiency and resource concentration due to the expansion of the search space.
[0169] For large language models, different large language models can achieve good optimization results under this framework.
[0170] Llama3.3-70B performed best overall; DeepSeek-V3.1 and GPT-4o-mini-2024-07-18 also achieved relatively excellent performance.
[0171] In addition, the baseline model Qwen3-235B-A22BInstruct-2507 also achieved an average performance ranking of 1.9048.
[0172] The results show that the method proposed in this invention does not depend on a specific large language model, but has good applicability and stability under various model conditions.
[0173] Meanwhile, under all model configurations, this method outperforms current mainstream parameter configuration optimization methods in all metrics, further validating the effectiveness and generalization ability of the proposed optimization framework.
[0174] In summary, this chapter further enhances the automation level of visualized machine learning workflows from the perspective of parameter optimization. The proposed method not only lowers the barrier for non-professional users to perform parameter tuning, but also provides an effective approach to intelligent pruning in high-dimensional structured search spaces, offering a new technical path for the intelligent upgrading of data science platforms.
[0175] The technical terms, principles, or means related to the technical solutions of the present invention mentioned in the above embodiments, which are not described in detail above, are all well-known technologies or common practices that are known to those skilled in the art.
[0176] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for optimizing the parameters of a workflow component based on a multi-stage strategy pruning of a large language model, characterized in that, Includes the following steps: Obtain the target dataset and the machine learning workflow to be optimized, explore the original global parameter space of the machine learning workflow to be optimized, and generate candidate parameter configurations; The performance of the candidate parameter configuration on the target dataset is calculated and the performance index is recorded. The performance index is sorted and a preset number of initial candidate branches are retained. By using a large language model combined with the historical search records of the retained initial candidate branches, reasoning is performed based on contextual information to generate parameter adjustment suggestions. The overall performance of each candidate branch is comprehensively evaluated within the complete budget period, and another preset number of candidate branches are selected and retained to form the parameter subspace of the second stage. A local search is performed on the parameter subspace in the second stage to output the final approximate optimal parameter combination.
2. The method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model according to claim 1, characterized in that, The steps for generating candidate parameter configurations are as follows: Extract the dataset feature vector from the target dataset; Based on the feature vector of the dataset, historical parameter configurations with similarity exceeding a preset similarity threshold are retrieved from the historical experience database; If the retrieval is successful, the retrieved historical parameter configurations are analyzed using a large language model to generate the candidate parameter configurations. If the retrieval fails, the candidate parameter configuration is generated by the large language model based on different scales.
3. The method for optimizing the parameters of a workflow component based on a multi-stage strategy pruning of a large language model according to claim 1, characterized in that, The performance on the target dataset is calculated and the performance metrics are recorded using the following formula: ; in, This represents the set of performance scores obtained after the first phase of exploration. Represents the evaluation index function. This represents the machine learning workflow to be optimized. Indicates the first The components of each candidate parameter configuration. Represents the target dataset. This indicates the total number of candidate parameter configurations generated in the first stage. Indicates the index number of the candidate parameter configuration.
4. The parameter optimization method for a multi-stage strategy pruning workflow component based on a large language model according to claim 1, characterized in that, The execution steps of the parameter subspace constituting the second stage are as follows: Based on the large language model, the candidate branches are iteratively pruned in multiple rounds. First, the dataset feature vectors in the target dataset are extracted as the basis for subsequent retrieval and reasoning. Repeat the following operations according to the preset number of iterations: Initialize the set of new branches for the current round to empty; For each candidate branch in the initial candidate branches that retain a preset number of preceding branches, execute sequentially: The large language model is invoked, and a new set of parameter configurations to be evaluated is generated by combining the historical search records of the current candidate branch, the historical experience base, the dataset feature vectors, and the preset pruning parameters. For each newly generated parameter configuration, run the workflow and evaluate it on the dataset to obtain the corresponding performance score; All generated parameter configurations and their corresponding performance scores, along with the dataset feature vectors, are stored in the historical experience database. In the parameter configuration generated in the current round, candidate branches with preset selection parameters ranked according to performance scores are selected as the candidate branch set for the next iteration; After completing the preset number of iterations, the final set of candidate branches output is the parameter subspace of the second stage.
5. The method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model according to claim 1, characterized in that, The steps for performing a local search are as follows: Extract the feature vectors from the target dataset as a reference for defining the subsequent search space; Define the search space by using a large language model and automatically defining a local search space based on the parameter range and candidate configuration information corresponding to the candidate branches of the parameter subspace in the second stage. Within the defined local search space, a hyperparameter optimization strategy is run using a preset search budget to perform the search; After the search is completed, the final approximate optimal parameter combination is output.
6. The method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model according to claim 5, characterized in that, The preset search budget is either a time budget or an iteration count budget; The hyperparameter optimization strategy includes, but is not limited to, any one of the following: local Bayesian optimization method, random search method, or grid search method.
7. The method for optimizing the parameters of a multi-stage strategy pruning workflow component based on a large language model according to claim 1, characterized in that, The original global parameter space of the machine learning workflow to be optimized is defined as the Cartesian product of the parameter spaces. The goal of this method is to find an approximately optimal combination of parameters that satisfies the following conditions: ; in, This represents an approximately optimal combination of parameters. This indicates the performance of the machine learning workflow on the dataset under the specified parameter configuration. This represents the machine learning workflow to be optimized. Indicates parameter configuration. Represents the target dataset. Represents the original global parameter space. This represents the value of the independent variable that maximizes the objective function. Represents the evaluation index function; The evaluation index function is accuracy or F1 score in classification tasks; and root mean square error or coefficient of determination in regression tasks.
8. A component parameter optimization system for a multi-stage strategy pruning workflow based on a large language model for implementing the method as described in any one of claims 1-7, characterized in that, include: The initialization exploration module is used to explore the original parameter space of the machine learning workflow, generate initial parameter configurations and evaluate performance, and retain a preset number of initial candidate branches. The strategy pruning module is used to analyze the search records in each initial candidate branch that retains a preset number of predecessors, generate parameter adjustment suggestions, comprehensively evaluate the overall performance of each candidate branch within the full budget period, and sort and filter to retain another preset number of candidate branches, forming the parameter subspace of the second stage. The refined search module is used to perform a local search on the parameter subspace of the second stage and output the final approximate optimal parameter combination.
9. An electronic device, comprising: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The feature is that the memory stores a computer program, which, when executed by the processor, causes the processor to execute the parameter optimization method for multi-stage strategy pruning workflow components based on a large language model as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed, it implements the parameter optimization method for multi-stage strategy pruning workflow components based on a large language model as described in any one of claims 1 to 7.