User interactive neural architecture search method for resource-constrained scene

By employing a user-interactive neural architecture search method, this approach addresses the shortcomings of existing technologies in handling multiple constraints, enabling efficient neural architecture search in resource-constrained scenarios. This improves search efficiency and solution set quality, adapts to user needs, and is applicable to practical applications such as mobile terminals and edge computing.

CN121480554APending Publication Date: 2026-02-06NORTHEASTERN UNIV CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511720300.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing neural architecture search methods for resource-constrained scenarios have shortcomings in handling multiple constraints, supporting user interaction, and constraint satisfaction mechanisms, resulting in low search efficiency and poor solution set quality, making them difficult to apply effectively in real-world scenarios such as mobile terminals and edge computing.

Method used

We employ a user-interactive neural architecture search method. By setting initial parameters, predefining the search space, generating an initial population, performing crossover and mutation operations, implementing a two-level hierarchical non-dominated sorting, and periodic user interaction, combined with a penalty mechanism and preference weights, we optimize the architecture performance to meet multiple constraints and user needs.

Benefits of technology

It enables effective handling of multiple constraints in resource-constrained environments, improves the flexibility and adaptability of the search process, enhances search efficiency and solution quality, and ensures that the architecture meets resource constraints in actual deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121480554A_ABST
    Figure CN121480554A_ABST
Patent Text Reader

Abstract

The invention discloses a resource-constrained scene-oriented user interactive neural architecture search method, and relates to the technical field of neural architecture search. The method comprises the following steps: setting initial parameters; the method comprises the following steps: pre-defining a search space, coding the architecture of the search space, and generating an initial parent population containing different candidate architectures; on the basis of a current parent population, an offspring population is generated through crossover and mutation operation, then the performance of all individuals, namely candidate architectures, in the population is evaluated, a performance index penalty value and an optimization target are calculated, the population is updated through a two-stage hierarchical non-dominated sorting strategy, and therefore the performance of the individuals, namely the architectures is optimized step by step; based on the user interaction frequency m in the evolutionary search parameters, triggering user interaction once every m generations, adjusting preference weights according to user instructions, and guiding the next architecture optimization direction; and when the user interaction is not triggered, judging whether a preset iteration termination condition is met, and if the iteration termination condition is met, outputting the current Pareto frontier solution set for the user to screen the architecture and deploy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neural architecture search technology, and more specifically to a user-interactive neural architecture search method for resource-constrained scenarios. Background Technology

[0002] Neural Architecture Search (NAS) is a technique for automating the design of neural network structures. It significantly reduces the expertise and trial-and-error costs required for manually designing networks by automatically finding the optimal neural network structure (often called an "architecture") in a predefined search space.

[0003] With the development of NAS technology, researchers have begun to focus on application requirements in resource-constrained scenarios. Existing resource-constrained NAS methods mainly fall into the following categories: MnasNet introduces latency constraints through a reinforcement learning framework, balancing architecture accuracy and inference speed in the reward function; ProxylessNAS directly measures the inference speed of the architecture on a real hardware platform, incorporating hardware performance into the optimization objective; FBNet employs a weight-sharing strategy to quickly search for architectures that meet resource constraints within a predefined search space. Furthermore, some studies attempt to combine neural architecture search with subsequent compression steps such as pruning and quantization, aiming to further optimize the actual performance of the searched architecture in constrained environments. However, these resource-constrained NAS methods still have significant shortcomings. First, most existing methods only consider a single resource constraint, lacking the ability to comprehensively handle multiple hard constraints. Second, the search process of these methods is fully automated, unable to incorporate user domain knowledge and real-time preference adjustments; when the search results do not meet actual needs, the search must be restarted, lacking necessary flexibility. Furthermore, existing methods typically employ simple linear weighted penalty functions when handling constraint violations, which makes it difficult to achieve an effective balance between multiple objectives under the premise of strictly satisfying hard constraints, resulting in low search efficiency or poor solution set quality.

[0004] In summary, existing neural architecture search methods for resource-constrained environments still have significant shortcomings in areas such as handling multiple constraints, supporting user interaction, and constraint satisfaction mechanisms. These shortcomings severely limit the application effectiveness of NAS technology in practical scenarios such as mobile terminals and edge computing. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a user-interactive neural architecture search method for resource-constrained scenarios.

[0006] The technical solution of this invention is:

[0007] A user-interactive neural architecture search method for resource-constrained scenarios includes the following steps:

[0008] Step 1: Set initial parameters, including user reference point, hard constraints, penalty coefficient, preference weights, and evolutionary search parameters;

[0009] Step 2: Predefine the search space and encode the architectures within the search space, then generate an initial parent population containing N different candidate architectures to ensure the diversity and coverage of the initial parent population in the search space;

[0010] Step 3: Based on the current parent population, generate the offspring population through crossover and mutation operations, then evaluate the performance of all individuals (candidate architectures) in the population, calculate the performance index penalty value and optimization objective, and update the population through a two-level hierarchical non-dominated sorting strategy to gradually optimize the performance of individuals (architectures).

[0011] Step 4: Based on the user interaction frequency m in the evolutionary search parameters, trigger a user interaction once every m generations, adjust the preference weights according to the user instructions, guide the next architecture optimization direction, and then return to step 3; if no user interaction is triggered, execute step 5;

[0012] Step 5: Determine whether the preset iteration termination condition has been met. If the iteration termination condition is met, output the current Pareto front solution set for the user to select the architecture and deploy it. Otherwise, return to step 3 to continue the architecture optimization.

[0013] Furthermore, according to the user-interactive neural architecture search method, the user reference point includes an architecture accuracy reference value. Reference values ​​for architecture training time The hard constraints include the upper limit of architectural memory usage. and the upper limit of floating-point operations in the architecture The penalty coefficient includes an architecture accuracy penalty coefficient. Architecture training time penalty coefficient Architecture memory penalty coefficient and architecture computational penalty coefficient The preference weights include architecture accuracy preference weights. And architecture training time preference weights The evolutionary search parameters include the architecture population size N, the maximum number of iterations T, and the crossover probability. The mutation probability is Frequency of user interaction (m).

[0014] Furthermore, according to the user-interactive neural architecture search method, the predefined search space is the NAS-Bench-201 search space.

[0015] Furthermore, the architecture within the search space is encoded according to the aforementioned user-interactive neural architecture search method. Where A is the adjacency matrix, representing the connection relationship between nodes in the neural network, and O is the operation list, representing the type of operation performed by each node in the neural network. The optional operations are {0:”none”, 1:”skip_connect”, 2:”conv 1x1”, 3:”conv 3x3”}; the encoding (A, O) together uniquely defines an effective neural network architecture in the search space.

[0016] Furthermore, according to the user-interactive neural architecture search method, in step 2, an initial parent population containing N different architectures is generated through a uniform sampling strategy. Specifically, for the adjacency matrix A, under the premise of satisfying the directed acyclic graph constraint, each element representing a connectable position in the upper triangle of the matrix is ​​randomly sampled as 0 or 1 with equal probability; for the operation list O, for each operation bit, an operation type is randomly selected from the operation set {0, 1, 2, 3} with uniform probability.

[0017] Furthermore, according to the user-interactive neural architecture search method described above, step 3 further includes the following steps:

[0018] Step 3.1: Based on the current parent population, perform crossover and mutation operations on the individuals in the population to generate a offspring population with a certain degree of structural diversity;

[0019] Step 3.2: Merge the parent and offspring populations to form a new generation of candidate populations, evaluate the performance of all individuals in the candidate populations, and obtain the performance index of each individual;

[0020] Step 3.3: Calculate the performance index penalty value for each individual, and at the same time filter individuals according to the hard constraints. Individuals that violate the preset hard constraints are added to the infeasible solution set V, and the remaining individuals constitute the current feasible solution set F.

[0021] Step 3.4: Calculate the optimization objective value for each individual based on the performance index and performance index penalty value of the individuals in the new generation candidate population, and perform a two-level hierarchical non-dominated sorting of the current candidate population to update the population and obtain the new generation population.

[0022] Furthermore, according to the user-interactive neural architecture search method described above, the crossover and mutation operations performed on individuals in the population in step 3.1 are as follows:

[0023] The crossover operation is as follows: randomly select two individuals, i.e., architectures a and b, from the current parent population, and cross each element in the adjacency matrix A of architectures a and b positionally, with probability... The inheritance connection relationship yields the adjacency matrix representation of the offspring; for the operation lists O of architectures a and b, a random intersection point k is selected, and the first k operations of architecture a are concatenated with the last len(O)-k operations of architecture b;

[0024] The mutation operation refers to performing a mutation operation on the individual formed by the crossover operation: each connection bit of the individual's adjacency matrix A is mutated with probability. Flip; randomly select a position from the operation list O for this individual and replace it with another valid operation.

[0025] Furthermore, according to the user-interactive neural architecture search method, step 3.3, calculating the performance index penalty value for each individual, includes calculating the accuracy penalty value according to equation (1). Calculate the training time penalty value according to formula (2). And calculate the penalty value for violating hard constraints according to formula (3). ;

[0026] (1)

[0027] in, This is a penalty coefficient for architectural precision. The accuracy is the reference value for the architecture, and the test accuracy is the architecture in the candidate population.

[0028] (2)

[0029] in, This is the penalty coefficient for architecture training time. This is a reference value for architecture training time, where Time is the single iteration time of the architecture in the candidate population;

[0030] , (3)

[0031] in, This is the architecture memory penalty coefficient. This is a penalty coefficient for the computational cost of the architecture. and These are the upper limits for architecture memory usage and floating-point operations, respectively.

[0032] Furthermore, according to the user-interactive neural architecture search method described above, the specific process of step 3.4 is as follows: First, calculate the optimization target value for each individual according to equations (4) and (5), including the accuracy optimization target. and training time optimization goals :

[0033] (4)

[0034] (5)

[0035] in, and These are the architecture accuracy preference weights and the architecture training time preference weights, respectively.

[0036] Then, according to and The feasible solution F and the infeasible solution V are sorted using non-dominated sorting, as follows:

[0037] The NSGA-II algorithm is used to analyze the feasible solution set. Individuals in the target function vector Perform a dominance sort to generate non-dominated ranks; within the same non-dominated rank, sort individuals according to crowding distance, prioritizing those with larger crowding distances; for individuals in the infeasible solution set V, prioritize those based on the penalty value for violating hard constraints. Sort in ascending order. Individuals with smaller values ​​take priority, indicating a lower degree of constraint violation; for For individuals with the same value, the NSGA-II algorithm is then used according to the objective function vector. Perform a dominant ranking;

[0038] When finally selecting the next generation of the population, the following principle is followed: always prioritize retaining those from the feasible solution set. individuals, if The number of individuals has reached or exceeded the population size. Then only the top results will be selected from the sorted list. There are one feasible solution; if The number of individuals is insufficient Then select first All feasible solutions in the set, then from the infeasible solution set Selected from Several individuals with smaller values ​​were added to make up the population size. .

[0039] Furthermore, according to the user-interactive neural architecture search method described above, the user instructions in step 4 include:

[0040] The instruction `acc` indicates that the user wants to focus on improving the accuracy metric in the next iteration, i.e., the next round of step 3, which means increasing the architecture accuracy preference weight. Reduce the bias weight of architecture training time ;

[0041] The instruction `time` indicates that the user wants to focus on reducing architecture training time in the next iteration, i.e., the next round of step 3, which means reducing the bias weight of architecture accuracy. Increase the weight of architecture training time preference ;

[0042] The `ref` instruction indicates that the user believes there is a problem with the current direction of architectural evolution and wants to adjust the current user reference point; in other words, it guides the user to input information to update the architectural precision reference value. Reference values ​​for architecture training time ;

[0043] The command `cont` means that the user does not need to modify the policy, that is, to keep all current parameters unchanged.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) The present invention uses memory usage and floating-point operation as hard constraints and adopts a nonlinear penalty mechanism based on the degree of constraint violation, so that the search process can effectively distinguish between feasible and infeasible solutions, thereby overcoming the problem of insufficient multi-constraint processing capability in the prior art and ensuring that the final architecture strictly meets the resource constraints of actual deployment.

[0046] (2) By introducing a periodic user interaction process, this invention allows users to dynamically adjust preference weights or update reference points according to the progress of the search, so that the search direction can respond to user needs in a timely manner, solving the problem of lack of flexibility in traditional automated search methods and significantly improving the practicality and adaptability of the method.

[0047] (3) The present invention adopts an objective function that combines preference weights and penalty mechanisms, and establishes a two-level hierarchical non-dominated ranking strategy, so that the search process can achieve an effective balance between multiple objectives such as accuracy and inference time. At the same time, it can more accurately evaluate infeasible solutions when dealing with constraint violations, thereby improving search efficiency and solution set quality.

[0048] (4) By establishing a two-level hierarchical non-dominated sorting mechanism, this invention prioritizes the retention of feasible solutions and supplements infeasible solutions with lower degree of violation when necessary, so that the search process can make full use of population resources under the premise of satisfying constraints. At the same time, through reasonable parameter settings and weight sharing strategies, the consumption of computing resources is significantly reduced. Attached Figure Description

[0049] Figure 1 This is a flowchart of the user-interactive neural architecture search method for resource-constrained scenarios in this embodiment;

[0050] Figure 2 This is a flowchart of the two-level hierarchical non-dominated sorting in this embodiment;

[0051] Figure 3 This is a flowchart of the user interaction in this embodiment; Detailed Implementation

[0052] To facilitate understanding of this application, a more comprehensive description of this application will be provided below with reference to the accompanying drawings.

[0053] Experimental Environment: The hardware platform included a server equipped with an NVIDIA RTX 2080 GPU (Graphics Processing Unit); the software environment included an Ubuntu 20.04 operating system, Python 3.8 programming language, and the PyTorch 2.1 deep learning framework. The experiment used the search space of the Neural Architecture Search Benchmark-201 (NAS-Bench-201), which defines a set of structured neural network architectures containing various basic operational units and their connections, providing a clear operational scope for the search algorithm of this invention. The dataset consisted of a batch of 50,000 images collected from a mobile terminal, with 40,000 images used as the training set and 10,000 images as the validation set.

[0054] Figure 1 This is a flowchart of the user-interactive neural architecture search method for resource-constrained scenarios in this implementation. Figure 1 As shown, the user-interactive neural architecture search method for resource-constrained scenarios includes the following steps:

[0055] Step 1: Set all initial parameters, including user reference point, hard constraints, penalty coefficient, preference weights and evolutionary search parameters, to provide the basic configuration for the subsequent neural architecture search process;

[0056] In this implementation, the following five types of initial parameters need to be set:

[0057] (1) User reference point: Set the architecture precision reference value Reference value for architecture training time This is used to subsequently evaluate whether the candidate architecture meets the user's expected performance goals;

[0058] (2) Hard constraints: Set an upper limit on the architecture's memory usage. The upper limit of floating-point operations in the architecture These two are constraints that must be strictly met; an architecture that violates either constraint cannot run on the target resource-constrained device.

[0059] (3) Penalty coefficient: Set the architecture precision penalty coefficient. =1, architecture training time penalty coefficient =1, Architecture memory penalty coefficient =10, Penalty factor for architecture computational complexity =10, these coefficients are used to calculate the penalty value when each performance index deviates from the reference point or violates the constraint;

[0060] (4) Preference weights: Set preference weights for architecture accuracy. Architecture training time preference weights This is important for balancing different performance metrics during the evolution of multi-objective architectures;

[0061] (5) Evolutionary search parameters: Set the architecture population size N=50, the maximum number of iterations T=50, and the crossover probability =0.9, the mutation probability is The user interaction frequency m=5, these parameters control the search behavior of the multi-objective architecture evolutionary algorithm.

[0062] Step 2: Based on the predefined NAS-Bench-201 search space, the architectures in it are encoded, and then an initial parent population containing N different candidate architectures is generated through a uniform sampling strategy to ensure the diversity and coverage of the initial parent population in the search space.

[0063] In this embodiment, the architecture encoding within the search space employs an operation list and an adjacency matrix. The encoding for each architecture is as follows: Here, A is the adjacency matrix, representing the connection relationships between nodes in the neural network, and O is the operation list, representing the type of operation performed by each node in the neural network. The possible operations are {0: "none", 1: "skip_connect", 2: "conv 1x1", 3: "conv 3x3"}. This encoding (A, O) uniquely defines an effective neural network architecture within the NAS-Bench-201 search space.

[0064] When generating the initial parent population, a uniform sampling strategy is adopted. For the adjacency matrix A, under the premise of satisfying the directed acyclic graph constraint, each element representing a connectable position in the upper triangle of the matrix is ​​randomly sampled as 0 or 1 with equal probability; for the operation list O, for each operation bit, an operation type is randomly selected from the operation set {0, 1, 2, 3} with uniform probability.

[0065] Step 3: Based on the current parent population, generate the offspring population through crossover and mutation operations, then evaluate the performance of all individuals in the population, i.e., the candidate architectures, calculate the performance index penalty value and optimization objective, and update the population through a two-level hierarchical non-dominated sorting strategy, thereby gradually optimizing the architecture performance.

[0066] Step 3.1: Based on the current parent population, perform crossover and mutation operations on the individuals in the population to generate a offspring population with a certain degree of structural diversity;

[0067] The crossover operation involves randomly selecting two individuals, architectures a and b, from the current parent population, and then crossovering each element in the adjacency matrix A of architectures a and b positionally, with probability. The inheritance connection relationship yields the adjacency matrix representation of the offspring; for the operation lists O of architectures a and b, a random intersection point k is selected, and the first k operations of architecture a are concatenated with the last len(O)-k operations of architecture b;

[0068] The mutation operation involves performing a mutation on the individuals formed by the crossover operation. For each connection bit in the adjacency matrix A of the individuals formed by the crossover, a probability is applied. Flip the operation list O by randomly selecting a position and replacing it with another valid operation.

[0069] After performing crossover and mutation operations, the legality of the generated offspring population is checked to ensure that the adjacency matrix of the offspring individuals satisfies the directed acyclic graph property. If the adjacency matrix of the offspring individuals does not satisfy the directed acyclic graph constraint, the connection relationship in the adjacency matrix of the offspring individuals is modified to satisfy the legality requirement.

[0070] Step 3.2: Merge the parent and offspring populations to form a new generation of candidate populations, evaluate the performance of all individuals in the candidate populations, and obtain the performance index of each individual;

[0071] Performance evaluation refers to the process of training and validating individuals (architectures) in the candidate population on a dataset and recording the resulting performance metrics, including test accuracy on the validation set, time of a single iteration recorded during the training phase, peak GPU memory usage, and floating-point operations per second (FLOPs).

[0072] Step 3.3: Calculate the performance index penalty value for each individual, and at the same time filter individuals according to the hard constraints. Individuals that violate the preset hard constraints are added to the infeasible solution set V, and the remaining individuals constitute the current feasible solution set F.

[0073] Based on the performance metrics of each individual obtained in step 3.2, individuals that violate the preset hard constraints are added to the infeasible solution set V, i.e., V = { > ∪ > The remaining individuals constitute the current feasible solution set F;

[0074] Calculate the accuracy penalty value according to the following formulas (1), (2), and (3) respectively. Training time penalty value and penalties for violating hard constraints :

[0075] (1)

[0076] in, This is a penalty coefficient for architectural precision. The architecture accuracy reference value is set for step 1, and Accuracy is the test accuracy of the architecture in the candidate population.

[0077] (2)

[0078] in, This is the penalty coefficient for architecture training time. The reference value for architecture training time set in step 1, where Time is the single iteration time of the architecture in the candidate population;

[0079] , (3)

[0080] in, This is the architecture memory penalty coefficient. This is a penalty coefficient for the computational cost of the architecture. and These are the upper limits for architecture memory usage and floating-point operations set in step 1, respectively.

[0081] Step 3.4: Based on the performance metrics and performance penalty values ​​of the architectures in the new generation of candidate populations, calculate the optimization target value for each architecture, and perform a two-level hierarchical non-dominated sorting on the current candidate populations to update the population and obtain the new generation of populations.

[0082] Based on the performance metrics and performance penalty values ​​of the architectures in the new generation of candidate populations, the optimization objective value for each architecture, including the accuracy optimization objective, is calculated according to the following formulas (4) and (5). and training time optimization goals :

[0083] (4)

[0084] (5)

[0085] in, and These are the architecture accuracy preference weights and architecture training time preference weights set in step 1, respectively. and These are the architecture accuracy penalty value and architecture training time penalty value calculated in step 3.3, respectively.

[0086] Then, according to and Perform non-dominated sorting on the feasible solution F and infeasible solution V obtained in step 3.3 respectively. Figure 2 The flowchart of a two-level hierarchical non-dominated sort is shown, as follows: Figure 2 As shown, the sorting process is as follows:

[0087] For the feasible solution set obtained in step 3.3 Individuals in the dataset are sorted using a standard non-dominated genetic algorithm with an elitist strategy (NSGA-II) according to the objective function vector. Perform a dominance ranking to generate non-dominated ranks. Individuals within the same non-dominated rank are ranked according to their crowding distance, with individuals having larger crowding distances given priority. For infeasible solution sets V, priority is given based on the penalty value for violating hard constraints. Sort in ascending order, prioritizing individuals with smaller values, indicating a lower degree of constraint violation. For For individuals with the same value, the NSGA-II algorithm is then used according to the objective function vector. Perform a dominance sort.

[0088] When finally selecting the next generation of the population, the following principle is followed: always prioritize retaining those from the feasible solution set. Individuals. If the feasible solution set... The number of individuals has reached or exceeded the population size. Then only the top results will be selected from the sorted list. There are individual feasible solutions. If the set of feasible solutions... The number of individuals is insufficient First, select all feasible solutions, and then select from the infeasible solution set. Selected from A number of individuals with smaller values ​​(i.e., the least infeasible solutions) are added to make up the population size. .

[0089] Step 4: Based on the user interaction frequency m set in Step 1, trigger a user interaction every m generations, adjust the preference weights according to the user instructions, guide the next step of architecture optimization, and then return to Step 3; if no user interaction is triggered, execute Step 5;

[0090] Figure 3 The user interaction process is shown. Users can select instructions to guide the next direction of architectural evolution based on the performance metrics (accuracy, inference time, memory usage, floating-point operations) of each architecture in the current population and their own needs. Figure 3 The instruction acc shown implies that the user wants to focus on improving the accuracy metric in the next iteration, i.e., the next round of step 3, which means increasing the architecture accuracy preference weight. Reduce the bias weight of architecture training time The instruction `time` means that the user wants to focus on reducing architecture training time in the next iteration, i.e., the next round of step 3, which means reducing the bias weight of architecture accuracy. Increase the weight of architecture training time preference The `ref` directive indicates that the user believes there is a problem with the current direction of architectural evolution and wants to adjust the current user reference point; in other words, it guides the user to input information to update the architectural precision reference value. Reference values ​​for architecture training time The `cont` command means that the user does not need to modify the strategy, that is, to keep all current parameters unchanged.

[0091] After executing the user's instructions, return to step 3 to continue architecture optimization.

[0092] Step 5: Determine whether the preset iteration termination condition has been met. If the termination condition is met, output the current Pareto front solution set for the user to select and deploy the architecture; otherwise, return to step 3 to continue the architecture optimization.

[0093] The preset iteration termination conditions include three cases: the number of evolution iterations reaches the maximum number of iterations set in step 1. The optimization process terminates when any one of the following three conditions is met: the Pareto front solution set has not been updated for several generations, the user actively terminates the process, or the user confirms satisfaction with the current solution set. The current Pareto front solution set is then output for the user to choose from for deployment.

[0094] It should be understood that, inspired by the technical concept of this invention, those skilled in the art can make various improvements or modifications based on the above content without departing from the scope of this invention, and these modifications still fall within the protection scope of this invention.

Claims

1. A user-interactive neural architecture search method for resource-constrained scenarios, characterized in that, The method includes the following steps: Step 1: Set initial parameters, including user reference point, hard constraints, penalty coefficient, preference weights, and evolutionary search parameters; Step 2: Predefine the search space and encode the architectures within the search space, then generate an initial parent population containing N different candidate architectures to ensure the diversity and coverage of the initial parent population in the search space; Step 3: Based on the current parent population, generate the offspring population through crossover and mutation operations, then evaluate the performance of all individuals (candidate architectures) in the population, calculate the performance index penalty value and optimization objective, and update the population through a two-level hierarchical non-dominated sorting strategy to gradually optimize the performance of individuals (architectures). Step 4: Based on the user interaction frequency m in the evolutionary search parameters, trigger a user interaction once every m generations, adjust the preference weights according to the user instructions, guide the next architecture optimization direction, and then return to step 3; if no user interaction is triggered, execute step 5; Step 5: Determine whether the preset iteration termination condition has been met. If the iteration termination condition is met, output the current Pareto front solution set for the user to select the architecture and deploy it. Otherwise, return to step 3 to continue the architecture optimization.

2. The user-interactive neural architecture search method according to claim 1, characterized in that, The user reference points include architecture accuracy reference values. Reference values ​​for architecture training time The hard constraints include the upper limit of architectural memory usage. and the upper limit of floating-point operations in the architecture The penalty coefficient includes an architecture accuracy penalty coefficient. Architecture training time penalty coefficient Architecture memory penalty coefficient and architecture computational penalty coefficient ; The preference weights include architecture accuracy preference weights. And architecture training time preference weights The evolutionary search parameters include the architecture population size N, the maximum number of iterations T, and the crossover probability. The mutation probability is Frequency of user interaction (m).

3. The user-interactive neural architecture search method according to claim 2, characterized in that, The predefined search space is the NAS-Bench-201 search space.

4. The user-interactive neural architecture search method according to claim 3, characterized in that, Encoding the architecture within the search space Where A is the adjacency matrix, representing the connection relationship between nodes in the neural network, and O is the operation list, representing the type of operation performed by each node in the neural network. The optional operations are {0:”none”,1:”skip_connect”,2:”conv 1x1”,3:”conv 3x3”}; the encoding (A, O) together uniquely defines an effective neural network architecture in the search space.

5. The user-interactive neural architecture search method according to claim 4, characterized in that, In step 2, an initial parent population containing N different architectures is generated through a uniform sampling strategy. Specifically, for the adjacency matrix A, under the premise of satisfying the directed acyclic graph constraint, each element representing a connectable position in the upper triangle of the matrix is ​​randomly sampled as 0 or 1 with equal probability; for the operation list O, for each operation bit, an operation type is randomly selected from the operation set {0, 1, 2, 3} with uniform probability.

6. The user-interactive neural architecture search method according to claim 5, characterized in that, Step 3 further includes the following steps: Step 3.1: Based on the current parent population, perform crossover and mutation operations on the individuals in the population to generate a offspring population with a certain degree of structural diversity; Step 3.2: Merge the parent and offspring populations to form a new generation of candidate populations, evaluate the performance of all individuals in the candidate populations, and obtain the performance index of each individual; Step 3.3: Calculate the performance index penalty value for each individual, and at the same time filter individuals according to the hard constraints. Individuals that violate the preset hard constraints are added to the infeasible solution set V, and the remaining individuals constitute the current feasible solution set F. Step 3.4: Calculate the optimization objective value for each individual based on the performance index and performance index penalty value of the individuals in the new generation candidate population, and perform a two-level hierarchical non-dominated sorting of the current candidate population to update the population and obtain the new generation population.

7. The user-interactive neural architecture search method according to claim 6, characterized in that, The crossover and mutation operations performed on individuals in the population as described in step 3.1 are as follows: The crossover operation is as follows: randomly select two individuals, i.e., architectures a and b, from the current parent population, and cross each element in the adjacency matrix A of architectures a and b positionally, with probability... The inheritance relationship is used to obtain the adjacency matrix representation of the offspring; For the operation lists O of architectures a and b, randomly select an intersection point k, and concatenate the first k operations of architecture a with the last len(O)-k operations of architecture b. The mutation operation refers to performing a mutation operation on the individual formed by the crossover operation: each connection bit of the individual's adjacency matrix A is mutated with probability. Flip; randomly select a position from the operation list O for this individual and replace it with another valid operation.

8. The user-interactive neural architecture search method according to claim 7, characterized in that, Step 3.3 involves calculating the performance index penalty value for each individual, including calculating the accuracy penalty value according to equation (1). Calculate the training time penalty value according to formula (2). And calculate the penalty value for violating hard constraints according to formula (3). ; (1); in, This is a penalty coefficient for architectural precision. The accuracy is the reference value for the architecture, and the test accuracy is the architecture test accuracy in the candidate population. (2); in, This is the penalty coefficient for architecture training time. This is a reference value for architecture training time, where Time is the single iteration time of the architecture in the candidate population; , (3) in, This is the architecture memory penalty coefficient. This is a penalty coefficient for the computational cost of the architecture. and These are the upper limits for architecture memory usage and floating-point operations, respectively.

9. The user-interactive neural architecture search method according to claim 8, characterized in that, The specific process of step 3.4 is as follows: First, calculate the optimization target value for each individual according to equations (4) and (5), including the accuracy optimization target. and training time optimization goals : (4); (5); in, and These are the architecture accuracy preference weights and the architecture training time preference weights, respectively. Then, according to and The feasible solution F and the infeasible solution V are sorted using non-dominated sorting, as follows: The NSGA-II algorithm is used to analyze the feasible solution set. Individuals in the target function vector Perform a dominance sort to generate non-dominated ranks; within the same non-dominated rank, sort individuals according to crowding distance, prioritizing those with larger crowding distances; for individuals in the infeasible solution set V, prioritize those based on the penalty value for violating hard constraints. Sort in ascending order. Individuals with smaller values ​​take priority, indicating a lower degree of constraint violation; for For individuals with the same value, the NSGA-II algorithm is then used according to the objective function vector. Perform a dominant ranking; When finally selecting the next generation of the population, the following principle is followed: always prioritize retaining those from the feasible solution set. individuals, if The number of individuals has reached or exceeded the population size. Then only the top results will be selected from the sorted list. There are one feasible solution; if The number of individuals is insufficient Then select first All feasible solutions in the set, then from the infeasible solution set Selected from Several individuals with smaller values ​​were added to make up the population size. .

10. The user-interactive neural architecture search method according to claim 9, characterized in that, The user instructions mentioned in step 4 include: The instruction `acc` indicates that the user wants to focus on improving the accuracy metric in the next iteration, i.e., the next round of step 3, which means increasing the architecture accuracy preference weight. Reduce the bias weight of architecture training time ; The instruction `time` indicates that the user wants to focus on reducing architecture training time in the next iteration, i.e., the next round of step 3, which means reducing the bias weight of architecture accuracy. Increase the weight of architecture training time preference ; The `ref` instruction indicates that the user believes there is a problem with the current direction of architectural evolution and wants to adjust the current user reference point; in other words, it guides the user to input information to update the architectural precision reference value. Reference values ​​for architecture training time ; The command `cont` means that the user does not need to modify the policy, that is, to keep all current parameters unchanged.

Citation Information

Cited By

  • Graph rendering performance optimization method and system for high-dimensional configuration space

    CN121960217A