Maximum segmentation solving method based on primal dual graph neural network learning optimization and related equipment
By converting the discrete parameters of the image maximum segmentation model into a continuous optimization problem through simplex relaxation, and using a dual hybrid gradient neural network for iterative solution, combined with probability distribution sampling, the problem of low solution efficiency of the maximum segmentation problem is solved, and efficient image data segmentation is achieved.
Patent Information
- Application Number
- CN202510575521.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-09
- Filing Date
- 2025-05-06
- Publication Date
- 2025-09-23
AI Technical Summary
The efficiency of solving the maximum segmentation problem in existing technologies is low, mainly because the increased complexity of the action space and the need for a large number of samples lead to significantly prolonged training and testing time.
A method based on primal-dual graph neural network learning optimization is adopted to transform the discrete one-hot vector parameters in the image maximum segmentation model into a continuous optimization problem through simplex relaxation. The problem is then iteratively solved using a dual hybrid gradient neural network, and finally a feasible solution is obtained through probability distribution sampling.
It significantly improves the solution efficiency of the maximum segmentation model, shortens the training and testing time, effectively solves the efficiency bottleneck of the maximum segmentation problem in practical applications, and achieves high-quality image data segmentation.
Smart Images

Figure CN120689608A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a maximum splitting solution method and related equipment based on primal-dual graph neural network learning optimization. Background Art
[0002] The Max-k-Cut problem requires partitioning the vertices of image data into multiple non-overlapping subsets such that the total weight of the edges between the different subsets is maximized. This problem has important academic value in combinatorial optimization and has been widely applied in various practical fields, such as telecommunications networks, data clustering, and theoretical physics. Because it is a generalization of the classic Max-k-Cut problem, one of the 21 NP-complete problems proposed by Karp, the Max-k-Cut problem has also been proven to be NP-complete, meaning it is difficult to solve directly.
[0003] In related technologies, solving the model corresponding to the maximum split problem typically uses machine learning techniques to model the maximum split problem as a sequential decision problem, and then uses reinforcement learning to train a policy network to generate a feasible solution. However, when this reinforcement learning method is extended to the maximum split problem, the increased complexity of the action space and the need for a large number of samples significantly prolong the training and testing time, making the maximum split model less efficient. Summary of the Invention
[0004] The embodiments of the present application provide a maximum split solution method and related equipment based on primal-dual graph neural network learning optimization, which can improve the solution efficiency of the maximum split model.
[0005] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a maximum split solution method based on primal-dual graph neural network learning optimization, the method comprising:
[0006] Obtaining a maximum image segmentation model, wherein the maximum image segmentation model includes an adjacency objective function and a one-hot vector parameter;
[0007] Performing simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, wherein the relaxed continuous optimization model includes continuous parameters;
[0008] Iteratively solving the relaxed continuous optimization model based on the adjacency objective function, the continuous parameter, and the dual hybrid gradient neural network to obtain a relaxed feasible solution;
[0009] Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model, and the target feasible solution is used to segment the image data corresponding to the image maximum segmentation model into multiple subset image data with maximized total weight.
[0010] In some embodiments, performing a simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model includes:
[0011] generating a plurality of multidimensional Cartesian products based on the convex hull of the one-hot vector parameter;
[0012] performing a relaxation transformation on the one-hot vector parameter based on all the multidimensional Cartesian products to obtain the continuous parameter;
[0013] Parameter conversion is performed on the image maximum segmentation model based on the continuous parameters to obtain the relaxed continuous optimization model.
[0014] In some embodiments, the iteratively solving the relaxed continuous optimization model based on the adjacency objective function, the continuous parameter, and the dual hybrid gradient neural network to obtain a relaxed feasible solution includes:
[0015] Generate an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network;
[0016] generating a loss function based on the network parameters and optimizing the adjacency objective function;
[0017] Iteratively updating the network parameters and the continuous parameters based on the iterative update function and the loss function;
[0018] The relaxed feasible solution is obtained based on the continuous parameters after multiple iterations of updating.
[0019] In some embodiments, the network parameters include first network parameters and second network parameters, the adjacency objective function includes adjacency matrix parameters and the continuous parameters, and generating an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network includes:
[0020] obtaining a first iterative update portion based on a product of the first network parameter and the continuous parameter;
[0021] obtaining a second iterative update portion based on the second network parameter, the continuous parameter, and the adjacency matrix parameter;
[0022] The iterative update function is obtained based on the accumulated value of the first iterative update part and the second iterative update part and multiplied by the activation function.
[0023] In some embodiments, the dual hybrid gradient neural network includes a multi-layer neural network, and the iterative updating of the network parameters and the continuous parameters based on the iterative update function and the loss function includes:
[0024] In each layer of the neural network, the network parameters are updated based on the continuous parameters output by the previous layer of the neural network and the loss function;
[0025] The continuous parameters are updated based on the updated network parameters, and the updated continuous parameters are used as input to the next layer of neural network.
[0026] In some embodiments, the relaxed feasible solution includes multiple sub-relaxed feasible solutions, and sampling based on the probability distribution of the relaxed feasible solutions to obtain the target feasible solution of the image maximum segmentation model includes:
[0027] Sampling based on the probability distribution of each sub-relaxed feasible solution to obtain a sub-goal feasible solution;
[0028] Based on all the feasible solutions of the sub-goals, the feasible solution of the goal is obtained.
[0029] In some embodiments, the sampling based on the probability distribution of the relaxed feasible solution to obtain the target feasible solution of the image maximum segmentation model includes:
[0030] Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a single feasible solution of the image maximum segmentation model;
[0031] Performing multiple data processing on the image maximum segmentation model to obtain multiple single feasible solutions;
[0032] The single feasible solution with the smallest adjacent objective function value is selected from the multiple single feasible solutions as the target feasible solution.
[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a maximum split solving device based on primal-dual graph neural network learning optimization, the device comprising:
[0034] An acquisition module is used to acquire an image maximum segmentation model input by a processing device, wherein the image maximum segmentation model includes an adjacency objective function and a one-hot vector parameter;
[0035] a relaxation transformation module, configured to perform a simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, wherein the relaxed continuous optimization model includes continuous parameters;
[0036] An iterative solution module, configured to iteratively solve the relaxed continuous optimization model based on the adjacency objective function, the continuous parameters, and the dual hybrid gradient neural network to obtain a relaxed feasible solution;
[0037] A sampling processing module is used to perform sampling based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model.
[0038] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the maximum segmentation solution method based on the original dual graph neural network learning optimization as described in the first aspect.
[0039] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, it implements the maximum segmentation solution method based on the original dual graph neural network learning optimization described in the first aspect above.
[0040] The embodiments of the present application propose a maximum segmentation solution method and related equipment based on original dual graph neural network learning optimization, the method comprising: first, obtaining an image maximum segmentation model, the image maximum segmentation model including an adjacency objective function and one-hot vector parameters; then, performing a simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, the relaxed continuous optimization model including continuous parameters; next, iteratively solving the relaxed continuous optimization model based on the adjacency objective function, continuous parameters and dual hybrid gradient neural network to obtain a relaxed feasible solution; finally, sampling based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model, the target feasible solution being used to segment the image data corresponding to the image maximum segmentation model into multiple subset image data with maximized total weight. The embodiment of the present application converts the discrete one-hot vector parameters of the original image maximum segmentation model into a more easily handled continuous optimization problem, effectively reducing the difficulty of solving the problem, and uses a dual mixed gradient neural network to iteratively solve the relaxed continuous optimization model to obtain the optimal continuous solution corresponding to the continuous optimization model. Compared with traditional reinforcement learning methods, it avoids complex action space and dependence on a large amount of sampling, thereby significantly improving the solution efficiency and shortening the training and testing time. Subsequently, sampling is performed based on the probability distribution of the relaxed feasible solution to convert the continuous solution into a high-quality discrete target feasible solution, thereby segmenting the image data into multiple subsets with maximized total weights, effectively solving the efficiency bottleneck of the maximum segmentation problem in practical applications, and greatly improving the solution efficiency of the maximum segmentation model.
[0041] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be achieved and obtained through the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flowchart of a maximum split solution method based on primal-dual graph neural network learning optimization provided by one embodiment of the present application.
[0043] Figure 2 yes Figure 1 Flowchart of step 102 in FIG.
[0044] Figure 3 yes Figure 1 Flowchart of step 103 in FIG.
[0045] Figure 4 yes Figure 3 Flowchart of step 301 in FIG.
[0046] Figure 5 yes Figure 3 Flowchart of step 303 in FIG.
[0047] Figure 6 yes Figure 1 Flowchart of step 104 in FIG.
[0048] Figure 7 This is a schematic diagram of a random sampling algorithm based on relaxed feasible solution category distribution provided by another embodiment of the present application.
[0049] Figure 8 yes Figure 1 Another flow chart of step 104 in FIG.
[0050] Figure 9 This is a flowchart of solving an image maximum segmentation model provided by another embodiment of the present application.
[0051] Figure 10 This is a performance simulation diagram of a maximum image segmentation model solution provided by another embodiment of the present application.
[0052] Figure 11 It is a structural diagram of a maximum split solution device based on primal-dual graph neural network learning optimization provided by an embodiment of the present application.
[0053] Figure 12 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0055] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flowchart.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0057] The Max-k-Cut problem requires partitioning the vertices of image data into multiple non-overlapping subsets such that the total weight of the edges between the different subsets is maximized. This problem has important academic value in combinatorial optimization and has been widely applied in various practical fields, such as telecommunications networks, data clustering, and theoretical physics. Because it is a generalization of the classic Max-k-Cut problem, one of the 21 NP-complete problems proposed by Karp, the Max-k-Cut problem has also been proven to be NP-complete, meaning it is difficult to solve directly.
[0058] In related technologies, solving the model corresponding to the maximum split problem typically uses machine learning techniques to model the maximum split problem as a sequential decision problem, and then uses reinforcement learning to train a policy network to generate a feasible solution. However, when this reinforcement learning method is extended to the maximum split problem, the increased complexity of the action space and the need for a large number of samples significantly prolong the training and testing time, making the maximum split model less efficient.
[0059] In order to improve the solution efficiency of the maximum segmentation model, the embodiment of the present application converts the discrete one-hot vector parameters of the original image maximum segmentation model into a more easily handled continuous optimization problem by performing simplex relaxation, effectively reducing the solution difficulty, and uses a dual hybrid gradient neural network to iteratively solve the relaxed continuous optimization model to obtain the optimal continuous solution corresponding to the continuous optimization model. Compared with traditional reinforcement learning methods, it avoids complex action space and dependence on a large amount of sampling, thereby significantly improving the solution efficiency and shortening training and testing time. Afterwards, sampling is performed based on the probability distribution of the relaxed feasible solution to convert the continuous solution into a high-quality discrete target feasible solution, thereby realizing the segmentation of image data into multiple subsets with maximized total weights, effectively solving the efficiency bottleneck of the maximum segmentation problem in practical applications, and thus greatly improving the solution efficiency of the maximum segmentation model.
[0060] The following describes the maximum split solution method and related devices based on primal-dual graph neural network learning optimization provided by the embodiments of the present application. The maximum split solution method based on primal-dual graph neural network learning optimization provided in the embodiments of the present application can be applied to any server or computing processor with computing resources.
[0061] The following is a detailed description of the maximum segmentation solution method based on the original dual graph neural network learning optimization in the embodiment of the present application. Figure 1 , which is an optional flowchart of a maximum split solution method based on primal-dual graph neural network learning optimization provided in an embodiment of the present application, Figure 1 The method may include but is not limited to steps 101 to 104. It is also understood that this embodiment is for Figure 1 The order of step 101 to step 104 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0062] Step 101: Obtain the maximum image segmentation model.
[0063] Step 101 is described in detail below.
[0064] In some embodiments, the image data is segmented to perform a maximum segmentation model corresponding to the image. Represents an undirected graph corresponding to image data, where is the vertex set, ε is the edge set. Each edge (i, j)∈ε is assigned an arbitrary weight It is the adjacency matrix, and the weights can be positive, zero, or negative. The partition in refers to the vertex set The goal of the maximum segmentation problem (i.e., the maximum k-cut problem) corresponding to image data is to find the vertex set A k-partition of The sum of the weights of the edges between vertices belonging to different partitions is maximized.
[0065] In order to represent this partition, a k-dimensional unique hot encoding method is used. Specifically, a k×N dimension matrix is defined Each column is a one-hot vector parameter, so the maximum segmentation model for the input image can be expressed as the following optimization problem formula (1).
[0066]
[0067] where X j represents the jth column of the matrix parameter X, the adjacency matrix W is a symmetric matrix with zero main diagonal elements, is a one-hot vector whose lth component is 1 and the rest are 0. The goal of the image maximum segmentation model corresponding to the above formula (1) is to maximize the sum of the edge weights between different partitions while ensuring that each vertex is assigned to only one partition and represented by a one-hot encoding vector.
[0068] It should be noted that the image maximum segmentation model shown in formula (1) is a generalized form of the classical maximum cut problem, which is a weighted maximum k-cut problem with arbitrary weights. It is widely used in many important fields, including telecommunications networks, data clustering, theoretical physics, data clustering, combinatorial optimization, and mixed integer programming. In other words, the maximum segmentation solution based on primal-dual graph neural network learning optimization proposed in this scheme is not only applicable to the field of image data processing, but can also be used in other technical fields.
[0069] Next, the image maximum segmentation model shown in formula (1) is simplified by removing the constant term and inverting the objective function to obtain a simplified equivalent form of the image maximum segmentation model as shown in the following formula (2).
[0070]
[0071] in, is the adjacency objective function, X is the one-hot vector parameter, that is That is, the one-hot vector parameter X is a discrete parameter. It should be noted that since the diagonal elements of the adjacency matrix W are set to zero, the matrix W is an unshaped matrix.
[0072] Step 102: Perform simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model.
[0073] Step 102 is described in detail below.
[0074] In some embodiments, since the variables in the discrete image maximum segmentation model corresponding to formula (2) are discrete, its solution faces great challenges. In order to be able to solve it, the one-hot vector parameter X in the image maximum segmentation model will be further transformed into a simplex relaxation to obtain a relaxed continuous optimization model to convert the discrete one-hot vector parameter X into a continuous parameter, so that subsequent solution can be performed, as described below.
[0075] Reference Figure 2 , performing simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, including the following steps 201 to 203.
[0076] Step 201: Generate multiple multi-dimensional Cartesian products based on the convex hull of the one-hot vector parameters.
[0077] Step 202: Based on all multi-dimensional Cartesian products, perform relaxation transformation on the one-hot vector parameters to obtain continuous parameters.
[0078] Step 203: Perform parameter conversion on the image maximum segmentation model based on the continuous parameters to obtain a relaxed continuous optimization model.
[0079] Steps 201 to 203 are described in detail below.
[0080] For each pixel, the convex hull of its one-hot vector is a K-dimensional simplex. For example, when K=3, the convex hull is a triangle consisting of three vertices (1,0,0), (0,1,0) and (0,0,1). In this embodiment, the one-hot vector parameter is The convex hull of is represented as the Cartesian product of N k-dimensional probability simplexes, denoted as Then based on all these multidimensional Cartesian products Perform a relaxation transformation on the one-hot vector parameters to obtain continuous parameters, i.e. Thus, the original one-hot vector parameter, which can only take K discrete values, is converted into a continuous vector that can take values within the K-dimensional simplex.
[0081] Afterwards, the image maximum segmentation model (2) is parameter-converted based on the continuous parameters to obtain a relaxed continuous optimization model as shown in the following formula (3).
[0082]
[0083] Through the above steps 201 to 203, the discrete category assignment problem that is difficult to directly optimize in the original image maximum segmentation model is transformed into an optimization problem that can be solved in a continuous space, so that mature and efficient continuous optimization algorithms such as gradient descent can be applied to find the optimal solution or high-quality approximate solution of the model, greatly improving the solution efficiency and stability, and avoiding the computational complexity brought about by combinatorial search in a huge discrete solution space.
[0084] The maximum k-cut problem is an NP-hard combinatorial optimization problem. Traditional optimization methods (such as semidefinite relaxation and heuristic algorithms) can provide approximate solutions, but they are often computationally intensive and time-consuming. Especially for large-scale graphs, traditional methods often require hours or even longer to compute a sufficiently good solution. The primal-dual hybrid gradient graph neural network (PGGNN) leverages the advantages of deep learning. The trained neural network model can solve large-scale maximum k-cut problems in seconds. Compared with traditional optimization methods, the primal-dual hybrid gradient graph neural network utilizes learnable parameters and a graph neural network architecture to automatically learn the structural features of the graph, significantly improving the quality and speed of the solution. The primal-dual hybrid gradient graph neural network utilizes a deep unrolling technique, transforming each iterative step of the primal-dual hybrid gradient algorithm into a layer of the neural network. This allows for parallelization of the computation at each layer, avoiding the computational bottleneck of incremental variable updates in traditional iterative methods. The operations of each neural network layer are optimized using learnable parameters, reducing unnecessary computational and storage overhead. Traditional methods for solving the maximum k-cut problem require manual tuning of algorithmic hyperparameters, such as step size and number of iterations, but these adjustments are poorly adaptable to different problem instances. The primal-dual hybrid gradient graph neural network introduces learnable parameters that automatically adjust the optimization process based on different inputs, enabling the algorithm to quickly adapt to maximum k-cut problems of varying scale and complexity. Because the primal-dual hybrid gradient graph neural network learns the structural features of the graph through neural networks during training, it is able to capture the underlying patterns and structural information within the graph. Compared to traditional heuristic-based maximum k-cut solvers, the primal-dual hybrid gradient graph neural network provides higher-quality solutions. Through deep learning, the primal-dual hybrid gradient graph neural network is able to leverage the powerful expressive power of graph neural networks during optimization to find more optimal graph partitioning solutions.
[0085] Step 103: Iteratively solve the relaxed continuous optimization model based on the adjacency objective function, continuous parameters, and dual hybrid gradient neural network to obtain a relaxed feasible solution.
[0086] Step 103 is described in detail below.
[0087] In some embodiments, the relaxed continuous optimization model (3) is iteratively solved using the primal-dual hybrid gradient graph neural network reparameterization method to utilize the adjacency objective function Continuous parameters The dual hybrid gradient neural network in the original dual hybrid gradient graph neural network reparameterization method is iteratively solved to obtain the relaxed feasible solution corresponding to the relaxed continuous optimization model, as described below.
[0088] The primal-dual hybrid gradient graph neural network reparameterization method is divided into several parts: input initialization, network structure, and multi-layer iteration. Regarding input initialization, the input in the maximum split problem is a graph structure represented by the adjacency matrix W, where the features of each node and the weight information of the edge are passed to the primal-dual hybrid gradient graph neural network through the matrix W. At the same time, the initial embedding vector X of each node is 0 It is initialized to the initial features of the graph nodes (such as node labels, degrees, etc.) and is a learnable parameter.
[0089] Reference Figure 3 , based on the adjacency objective function, continuous parameters and dual hybrid gradient neural network, the relaxed continuous optimization model is iteratively solved to obtain a relaxed feasible solution, including the following steps 301 to 304.
[0090] Step 301: Generate an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network.
[0091] Step 301 is described in detail below.
[0092] In some embodiments, in order to obtain the optimal relaxed feasible solution in the dual hybrid gradient neural network iterative update, it is first necessary to firstly calculate the optimal relaxed feasible solution based on the adjacency objective function. and the network parameters of the dual hybrid gradient neural network Generate an iterative update function for each layer of the dual hybrid gradient neural network, where l is the index of the neural network layer.
[0093] The steps for generating the iterative update function will be further described below.
[0094] Reference Figure 4 , generating an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network, including the following steps 401 to 403.
[0095] Step 401: Obtain a first iterative update part based on the product of a first network parameter and a continuous parameter.
[0096] Step 402: Based on the second network parameter, the continuity parameter and the adjacency matrix parameter, a second iterative update part is obtained.
[0097] Step 403: Based on the accumulated value of the first iterative update part and the second iterative update part, multiplying by the activation function, an iterative update function is obtained.
[0098] Steps 401 to 403 are described in detail below.
[0099] In some embodiments, first based on network parameters The first network parameter in and continuous parameters The product of , we get the first iterative update part And based on network parameters The second network parameter in Continuous parameters and adjacency objective function The product of the adjacency matrix parameter W in the second iteration update part is obtained Then, based on the accumulated values of the first iterative update part and the second iterative update part, and multiplied by the activation function σ, the iterative update function corresponding to the output of the current neural network (i.e., the input of the next layer of neural network) and the input (i.e., the output of the previous layer of neural network) is obtained as shown in the following formula (4).
[0100]
[0101] where X (l) is the continuous parameter of the lth layer The node embedding vector for iterative update, l∈{0,1,L,L-1}, and are the learnable parameters of the kth layer, which are used to adjust the self-update of node embedding and the interaction with the adjacency matrix. W is the adjacency matrix of the graph, which includes the connection relationship between nodes and the weight of the edge. σ represents the nonlinear activation function. X (0) is a learnable embedding for a node.
[0102] Step 302: Generate a loss function based on the network parameters and the optimized adjacency objective function.
[0103] Step 303: Iteratively update the network parameters and continuous parameters based on the iterative update function and the loss function.
[0104] Step 304: Based on the continuous parameters updated through multiple iterations, a relaxed feasible solution is obtained.
[0105] Steps 302 to 304 are described in detail below.
[0106] Next, based on the network parameters And the adjacency objective function is optimized to obtain the loss function of each layer of the neural network as shown in the following formula (5).
[0107]
[0108] Then, in the dual hybrid gradient neural network, a multi-layer connected neural network is used to iteratively update the network parameters and continuous parameters based on the iterative update function (4) and the loss function (5), as described below.
[0109] Reference Figure 5 , generating an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network, including the following steps 501 to 502.
[0110] Step 501: In each layer of the neural network, the network parameters are updated based on the continuous parameters and loss function output by the previous layer of the neural network.
[0111] Step 502: Update the continuous parameters based on the updated network parameters, and use the updated continuous parameters as input to the next layer of neural network.
[0112] Steps 501 to 502 are described in detail below.
[0113] In some embodiments, in each layer of the dual hybrid gradient neural network (such as the i-th layer), the continuous parameter X output by the previous layer of the neural network is converted to (l) Input the loss function (6) to get the loss value of the neural network layer, and then use the loss value to adjust the network parameters of the current neural network layer. Update and then use the updated network parameters The continuous parameters are updated in combination with the iterative update function (4), and the updated continuous parameters are used as the input parameters of the next layer of neural network, so as to perform iterative updates until all neural network layers are iteratively updated, and the continuous parameters output by the last layer of neural network are used as the relaxed feasible solution.
[0114] In each layer iteration, the dual hybrid gradient neural network uses two important update operations: first, self-update, It is a self-update of the node embedding of the current neural network layer, which means that each node adjusts itself based on the embedding of the previous layer through learnable parameters. This step can capture the influence of the local structure of the node in the graph. The second step is the role of the adjacency matrix. The structural information of the graph is propagated through the adjacency matrix W to update the embedding of each node. Specifically, this step adjusts the representation of the node based on the adjacency information of the graph so that the embedding of each node is more consistent with the global structure of the graph. and are learnable parameters in the neural network. Through these learnable parameters, the network can automatically adjust its structure during training to adapt to different types of maximum segmentation problems (i.e., Max-k-Cut problems). In the last layer, i.e., the Lth layer, a softmax function can be used for activation so that the output of the final neural network meets the constraints on the decision variables in (3), thereby taking the output of the neural network as the value of the decision variable, as shown in the following formula (6).
[0115]
[0116] Where W test The problem instance represented by is W in the relaxed continuous optimization model (3) in the embodiment, and the loss function is solved and optimized using the Adam optimizer.
[0117] The original dual hybrid gradient graph neural network corresponding to the dual hybrid gradient neural network in this embodiment is more flexible and efficient than the traditional optimization method. It performs multiple iterations through a multi-layer neural network, and the output X of each layer is (l+1) Each layer serves as input to the next layer, gradually approaching the optimal solution to the maximum k-cut problem. Each layer's update optimizes the neural network's parameters, allowing the node embeddings to increasingly accurately reflect the graph's structural characteristics during the iterative process. Ultimately, the optimization process of the primal-dual hybrid gradient graph neural network stops after reaching a predetermined number of iterations. Due to the parallel computing capabilities of neural networks, the primal-dual hybrid gradient graph neural network can find a near-optimal maximum k-cut solution within a relatively small number of iterations, significantly improving solution efficiency.
[0118] Through the above steps 301 to 304, 401 to 403, and 501 to 502, by combining the first network parameters, the second network parameters, the continuous parameters and the adjacency matrix parameters, the adjacency relationship and constraints in the problem can be effectively captured, and nonlinearity is introduced through the activation function to enhance the expression ability of the model. When constructing the loss function, the optimized adjacency objective function is associated with the network parameters to guide the network to learn in the direction of the optimal objective function, and the iterative update function and the loss function are used to iteratively update the network parameters and continuous parameters through methods such as gradient descent, and gradually optimize the solution. After that, the update process of the network parameters and continuous parameters is further refined, and the multi-layer neural network is used to extract features and optimize layer by layer, thereby improving the learning ability and generalization performance of the model. This step process combines the powerful expression ability of deep learning with the efficiency of the optimization algorithm, can effectively handle complex adjacency relationships and constraints, and obtain high-quality continuous feasible solutions for relaxed continuous optimization models.
[0119] Step 104: Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model.
[0120] Step 104 is described in detail below.
[0121] In some embodiments, after obtaining a high-quality continuous feasible solution to the relaxed continuous optimization model (3), After that, since the original goal is to construct a discrete feasible solution to the original problem of image maximum segmentation model (3) At the same time, it is necessary to ensure that the objective function value is equal to the objective value of the solution to the relaxed problem.
[0122] Therefore, in this embodiment, based on the relaxed feasible solution The probability distribution of is sampled to obtain a high-quality target feasible solution corresponding to the maximum segmentation model (2) of the image. When this target feasible solution is applied to the field of image data processing, it can be used to divide the image data corresponding to the image maximum segmentation model into multiple subset image data with maximized total weights; similarly, when applied to other technical fields, similar effects can also be achieved. It only requires the existence of an optimization problem form such as formula (1) or (2) corresponding to the image maximum segmentation model, that is, the maximum segmentation solution method based on the original dual graph neural network learning optimization provided in the embodiment of the present application can be implemented to obtain a high-quality feasible solution at high speed.
[0123] The following will further describe how to solve the problem based on the relaxed feasible solution. The probability distribution of is sampled to obtain a high-quality target feasible solution corresponding to the maximum segmentation model (2) of the image.
[0124] Reference Figure 6 , sampling is performed based on the probability distribution of the relaxed feasible solution to obtain the target feasible solution of the image maximum segmentation model, including the following steps 601 to 602.
[0125] Step 601: Sampling is performed based on the probability distribution of each sub-relaxed feasible solution to obtain a sub-goal feasible solution.
[0126] Step 602: Based on all sub-goal feasible solutions, obtain the goal feasible solution.
[0127] Steps 601 to 602 are described in detail below.
[0128] Reference Figure 7 , is a schematic diagram of a random sampling algorithm based on a relaxed feasible solution category distribution provided in an embodiment of the present application. Figure 7 As shown in the example, in this embodiment, the target feasible solution Consistent, relaxed feasible solution Is a matrix data, so it includes multiple columns of data, each column of data is a sub-relaxed feasible solution. Therefore, from a sub-relaxed feasible solution Sampling from a categorical distribution of event probabilities (e.g. Figure 7 As shown in step 3 of the algorithm in , it is expressed as Where Cat() is the probability distribution processing) to obtain the target feasible solution Each column of data, that is, the feasible solution of the sub-goal X i Then based on all sub-goals, a feasible solution X i Combine them to get the final feasible solution corresponding to the maximum segmentation model (2) of the image
[0129] This randomized approach generates a feasible solution to the image maximum segmentation model (2) However, due to Figure 7 The algorithm 1 shown in arrive Randomness is introduced in the generation process of the objective function value Therefore, it becomes a random variable. In this embodiment, it can be proved by theory This shows that The expectation is equal to This means that the random sampling method can generate the maximum k-cut feasible solution with equal objective function value in a probabilistic sense based on the continuous solution.
[0130] Through the above steps 601 to 602, the continuous solution obtained by the relaxed optimization can be converted into a practical discrete segmentation result, and sampling can be performed using probability distribution to generate multiple different segmentation schemes, thereby providing more flexible choices and possibly finding the best segmentation scheme that better meets actual needs. At the same time, the sampling process can be regarded as a "refinement" of the relaxed solution, which helps to eliminate the errors introduced by the relaxation and improve the accuracy of the segmentation results.
[0131] Reference Figure 8 , sampling is performed based on the probability distribution of the relaxed feasible solution to obtain the target feasible solution of the image maximum segmentation model, and also includes the following steps 801 to 803.
[0132] Step 801: Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a single feasible solution of the maximum image segmentation model.
[0133] Step 802: Perform multiple data processing on the image maximum segmentation model to obtain multiple single feasible solutions.
[0134] Step 803: Select a single feasible solution with the smallest value of the adjacent objective function from multiple single feasible solutions as the target feasible solution.
[0135] Steps 801 to 803 are described in detail below.
[0136] In some embodiments, based on the probability distribution of the relaxed feasible solution obtained in the previous step, a sampling is performed to obtain a single feasible solution of the image maximum segmentation model. The sampling process here can be understood as randomly assigning a segmentation label to each pixel based on the probability of each pixel belonging to a different segmentation region. For example, if a pixel has an 80% probability of belonging to region A and a 20% probability of belonging to region B, then when sampling, there is an 80% probability of assigning it to region A and a 20% probability of assigning it to region B.
[0137] Next, the image maximum segmentation model is processed multiple times, each time using the iterative solution and probabilistic sampling process described above, resulting in multiple single-shot feasible solutions. Alternatively, different random sampling methods can be used to generate different segmentation solutions. This increases the diversity of segmentation results for subsequent selection. This allows for a broader exploration of the solution space and avoids being trapped in local optima.
[0138] Finally, the best single-shot feasible solution is selected as the final target feasible solution. The selection criterion is the value of the adjacency objective function, which is used to evaluate the quality of the segmentation result, such as the smoothness and connectivity of the segmented region. By comparing the adjacency objective function values corresponding to different single-shot feasible solutions and selecting the solution with the smallest value, we have found a solution that best meets the segmentation goal based on the current relaxed feasible solution. This is similar to a local search process, searching for the optimal discrete solution within the neighborhood of the current probability distribution.
[0139] Through the above steps 801 to 803, the continuous probability distribution is converted into a single feasible solution for a specific discrete segmentation through sampling, and multiple different feasible solutions are generated through repeated sampling, which effectively explores the probability space defined by the relaxed solution, increases the possibility of finding a high-quality solution, and avoids the suboptimal results that may be caused by single random sampling. The adjacency objective function is then used as an evaluation criterion to select the best one from multiple candidate solutions, ensuring that the final output target feasible solution not only conforms to the probability distribution, but also performs best in actual segmentation quality (such as regional smoothness, boundary clarity, and other indicators defined by the adjacency objective function), thereby improving the accuracy and reliability of the final image segmentation result.
[0140] Reference Figure 9 , is a flow chart of solving a maximum image segmentation model provided by an embodiment of the present application. Figure 9As shown in , first, the adjacency matrix W of the input image data G is input, which describes the relationship between nodes (or pixels). Next, the "probabilistic simplex relaxation" (corresponding to steps 201-203 above) is performed to convert the original discrete assignment problem (such as the one-hot vector representation) into a continuous probability distribution representation, and obtain a relaxed continuous optimization model. Then, the core step is to use the "primal-dual hybrid gradient graph neural network optimization" (corresponding to steps 301-304 above). The network learns the optimization parameters through "unsupervised loss training" (using iterative update function (4) and loss function (5)) in the "training" phase, and outputs the optimized continuous parameters (relaxed feasible solution) in the "inference" phase. Finally, through "category distribution sampling" (corresponding to steps 601-602 above), sampling is performed from the relaxed feasible solution (probability distribution) output by the neural network to obtain the final discrete "node assignment of graph G" result (target feasible solution) as output.
[0141] In order to further verify the reliability of the maximum split solution method based on primal-dual graph neural network learning optimization proposed in this application, this embodiment also conducts simulation experiments on the performance of this solution and other algorithms in solving the maximum split model.
[0142] Reference Figure 10 , is a performance simulation diagram of a maximum image segmentation model solution provided by an embodiment of the present application. Figure 10 As shown in , this embodiment compares the performance of the maximum segmentation model solution method proposed in this application with five other existing algorithms (semi-definite relaxation algorithm, local search algorithm, genetic algorithm, mirror gradient descent algorithm, and physical-driven graph neural network algorithm) under different problem scales. Each column in the table represents a different experimental setting, specifically a combination of the number of nodes N (with values of 100, 1000, 10000) and the number of categories k (with values of 2, 3). The rows of the table correspond to different solution algorithms. The values in the cells (usually in the format of mean ± standard deviation) represent the objective function values or other performance indicators obtained by each algorithm when solving the maximum segmentation model under the corresponding settings, where the smaller the value, the better the performance. Some cells are marked with "N / A" or "-", indicating that the algorithm is not applicable, has not been tested, or has failed to solve successfully under this setting. This table aims to demonstrate the effectiveness and scalability of the method proposed in this application relative to existing technologies on segmentation problems of different scales and complexities through quantitative comparison. In particular, when dealing with large-scale problems (such as N = 10000), this method can still give results, while some comparison algorithms are not applicable. This further demonstrates the superior performance of the image maximum segmentation model proposed in this application.
[0143] The embodiment of the present application proposes a maximum segmentation solution method and related equipment based on original dual graph neural network learning optimization, the method includes: first, obtaining an image maximum segmentation model, the image maximum segmentation model includes an adjacency objective function and a one-hot vector parameter; then, based on the convex hull of the one-hot vector parameter, generating multiple multidimensional Cartesian products, based on all multidimensional Cartesian products, performing a relaxation transformation on the one-hot vector parameter to obtain a continuous parameter, based on the continuous parameter, performing parameter transformation on the image maximum segmentation model to obtain a relaxed continuous optimization model, the relaxed continuous optimization model includes continuous parameters; next, based on the product of the first network parameter and the continuous parameter, obtaining a first iterative update part, based on the second network parameter, the continuous parameter and the adjacency matrix parameter, obtaining a second iterative update part, based on the accumulated value of the first iterative update part and the second iterative update part, and multiplying it by the activation function, obtaining an iterative update function, based on the network parameters and the optimized adjacency objective function The target function generates the loss function. In each layer of the neural network, the network parameters are updated based on the continuous parameters and loss function output by the previous layer of the neural network. The continuous parameters are updated based on the updated network parameters, and the updated continuous parameters are used as the input of the next layer of the neural network. Based on the continuous parameters updated after multiple iterations, a relaxed feasible solution is obtained. Finally, based on the probability distribution of each sub-relaxed feasible solution, a sub-target feasible solution is obtained. Based on all sub-target feasible solutions, a target feasible solution is obtained. Based on the probability distribution of the relaxed feasible solution, a single feasible solution of the image maximum segmentation model is obtained. The image maximum segmentation model is processed multiple times to obtain multiple single feasible solutions. From the multiple single feasible solutions, the single feasible solution with the smallest value of the adjacent objective function is selected as the target feasible solution. The target feasible solution is used to segment the image data corresponding to the image maximum segmentation model into multiple subset image data with maximized total weight.
[0144] The embodiment of the present application converts the discrete one-hot vector parameters of the original image maximum segmentation model into a more easily handled continuous optimization problem by performing simplex relaxation, thereby effectively reducing the difficulty of solving the problem, and uses a dual hybrid gradient neural network to iteratively solve the relaxed continuous optimization model to obtain the optimal continuous solution corresponding to the continuous optimization model. Compared with traditional reinforcement learning methods, it avoids complex action spaces and dependence on a large number of samples, thereby significantly improving the solution efficiency and shortening the training and testing time. Subsequently, by sampling based on the probability distribution of the relaxed feasible solution, the continuous solution is converted into a high-quality discrete target feasible solution, and the image data is segmented into multiple subsets with maximized total weights, effectively solving the efficiency bottleneck of the maximum segmentation problem in practical applications, thereby greatly improving the solution efficiency of the maximum segmentation model; in addition, the discrete category assignment problem that is difficult to directly optimize in the original image maximum segmentation model is converted into an optimization problem that can be solved in a continuous space, so that mature and efficient continuous optimization algorithms such as gradient descent can be applied to find the optimal solution or high-quality approximate solution of the model, greatly improving the solution efficiency and stability, and avoiding the computational complexity brought about by combinatorial search in a huge discrete solution space; and, by combining the first network parameter , the second network parameters, continuous parameters and adjacency matrix parameters can effectively capture the adjacency relationship and constraints in the problem, and introduce nonlinearity through the activation function to enhance the expressiveness of the model. When constructing the loss function, the optimized adjacency objective function is associated with the network parameters to guide the network to learn in the direction of the optimal objective function. The iterative update function and the loss function are used to iteratively update the network parameters and continuous parameters through methods such as gradient descent, and gradually optimize the solution. After that, the update process of the network parameters and continuous parameters is further refined. The multi-layer neural network is used to extract features and optimize layer by layer, which improves the learning ability and generalization performance of the model. This step process combines the powerful expressive power of deep learning with the efficiency of the optimization algorithm, can effectively handle complex adjacency relationships and constraints, and obtain high-quality continuous feasible solutions for the relaxed continuous optimization model; moreover, the continuous solution obtained by the relaxed optimization can be converted into a practical discrete segmentation result, and sampling using probability distribution can generate multiple different segmentation schemes, thereby providing more flexible choices and possibly finding the best segmentation scheme that better meets actual needs. At the same time, the sampling process can be regarded as a "refinement" of the relaxed solution, which helps to eliminate the error introduced by the relaxation and improve the accuracy of the segmentation results.Furthermore, sampling transforms the continuous probability distribution into a single feasible solution for a specific discrete segmentation. Repeated sampling generates multiple different feasible solutions, effectively exploring the probability space defined by the relaxed solution. This increases the likelihood of finding a high-quality solution and avoids the suboptimal results that may result from single random sampling. Using the adjacency objective function as an evaluation criterion, the optimal one is selected from multiple candidate solutions, ensuring that the final output target feasible solution not only conforms to the probability distribution but also performs optimally in terms of actual segmentation quality (such as regional smoothness, boundary clarity, and other indicators defined by the adjacency objective function), thereby improving the accuracy and reliability of the final image segmentation results.
[0145] The embodiment of the present application also provides a maximum split solution device based on the original dual graph neural network learning optimization, which can realize the maximum split solution method based on the original dual graph neural network learning optimization. Figure 11 , the apparatus 1100 comprises:
[0146] An acquisition module 1110 is configured to acquire an image maximum segmentation model input by a processing device, wherein the image maximum segmentation model includes an adjacency objective function and a one-hot vector parameter;
[0147] A relaxation transformation module 1120 is configured to perform a simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, wherein the relaxed continuous optimization model includes continuous parameters;
[0148] An iterative solution module 1130 is used to iteratively solve the relaxed continuous optimization model based on the adjacency objective function, the continuous parameters, and the dual hybrid gradient neural network to obtain a relaxed feasible solution;
[0149] The sampling processing module 1140 is used to perform sampling based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model.
[0150] In some embodiments, the relaxation conversion module 1120 is further configured to:
[0151] Generate multiple multidimensional Cartesian products based on the convex hull of the one-hot vector parameters;
[0152] Based on all multidimensional Cartesian products, the one-hot vector parameters are relaxed to obtain continuous parameters;
[0153] The parameters of the image maximum segmentation model are transformed based on continuous parameters to obtain a relaxed continuous optimization model.
[0154] In some embodiments, the iterative solution module 1130 is further configured to:
[0155] Generate an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network;
[0156] Generate a loss function based on network parameters and the optimized adjacency objective function;
[0157] Iteratively update network parameters and continuous parameters based on iterative update function and loss function;
[0158] Based on the continuous parameters updated after multiple iterations, a relaxed feasible solution is obtained.
[0159] In some embodiments, the iterative solution module 1130 is further configured to:
[0160] Obtaining a first iterative update portion based on a product of the first network parameter and the continuous parameter;
[0161] obtaining a second iterative update portion based on the second network parameter, the continuity parameter, and the adjacency matrix parameter;
[0162] Based on the accumulated values of the first iterative update part and the second iterative update part, and multiplied by the activation function, an iterative update function is obtained.
[0163] In some embodiments, the iterative solution module 1130 is further configured to:
[0164] In each layer of the neural network, the network parameters are updated based on the continuous parameters and loss function output by the previous layer of the neural network;
[0165] The continuous parameters are updated based on the updated network parameters, and the updated continuous parameters are used as the input of the next layer of neural network.
[0166] In some embodiments, the sampling processing module 1140 is further configured to:
[0167] Sampling is performed based on the probability distribution of each sub-relaxed feasible solution to obtain the sub-goal feasible solution;
[0168] Based on all feasible solutions of sub-goals, the feasible solution of the goal is obtained.
[0169] In some embodiments, the sampling processing module 1140 is further configured to:
[0170] Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a single feasible solution of the image maximum segmentation model;
[0171] Perform multiple data processing on the image maximum segmentation model to obtain multiple single feasible solutions;
[0172] From multiple single feasible solutions, the single feasible solution with the smallest value of the adjacent objective function is selected as the target feasible solution.
[0173] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, the specific implementation of the maximum split solution device based on the original dual graph neural network learning optimization is basically the same as the specific implementation of the maximum split solution method based on the original dual graph neural network learning optimization, and will not be repeated here.
[0174] In the embodiment of the present application, the maximum segmentation solution device based on the original dual graph neural network learning optimization converts the discrete one-hot vector parameters of the original image maximum segmentation model into a more easily handled continuous optimization problem by performing simplex relaxation, and uses the dual hybrid gradient neural network to iteratively solve the relaxed continuous optimization model to obtain the optimal continuous solution corresponding to the continuous optimization model. Compared with the traditional reinforcement learning method, it avoids the complex action space and the dependence on a large amount of sampling, thereby significantly improving the solution efficiency and shortening the training and testing time. Afterwards, sampling is performed based on the probability distribution of the relaxed feasible solution, so as to convert the continuous optimization model into an optimal continuous solution. The solution is converted into a high-quality discrete target feasible solution, which realizes the segmentation of image data into multiple subsets with maximized total weight, effectively solving the efficiency bottleneck of the maximum segmentation problem in practical applications, thereby greatly improving the efficiency of solving the maximum segmentation model. In addition, the discrete category assignment problem that is difficult to directly optimize in the original image maximum segmentation model is converted into an optimization problem that can be solved in a continuous space, making it possible to apply mature and efficient continuous optimization algorithms such as gradient descent to find the optimal solution or high-quality approximate solution of the model, greatly improving the solution efficiency and stability, and avoiding the computational complexity brought about by combinatorial search in a huge discrete solution space. In addition, by combining the first network parameters, the second network parameters, the continuous parameters and the adjacency matrix parameters, the adjacency relationship and constraints in the problem can be effectively captured, and nonlinearity is introduced through the activation function to enhance the expression ability of the model. When constructing the loss function, the optimal adjacency objective function is associated with the network parameters to guide the network to learn in the direction of the optimal objective function. The iterative update function and the loss function are used to iteratively update the network parameters and continuous parameters through methods such as gradient descent, and gradually optimize the solution. After that, the update process of the network parameters and continuous parameters is further refined, and the multi-layer neural network is used to extract features and optimize layer by layer, which improves the learning of the model. This step combines the powerful expressive power of deep learning with the efficiency of optimization algorithms. It can effectively handle complex adjacency relationships and constraints and obtain high-quality continuous feasible solutions for relaxed continuous optimization models. In addition, it can convert the continuous solution obtained by relaxed optimization into a practical discrete segmentation result and use probability distribution for sampling to generate multiple different segmentation schemes, thereby providing more flexible choices and potentially finding the best segmentation scheme that better meets actual needs. At the same time, the sampling process can be regarded as a "refinement" of the relaxed solution, which helps to eliminate the errors introduced by relaxation and improve the accuracy of the segmentation results.Furthermore, sampling transforms the continuous probability distribution into a single feasible solution for a specific discrete segmentation. Repeated sampling generates multiple different feasible solutions, effectively exploring the probability space defined by the relaxed solution. This increases the likelihood of finding a high-quality solution and avoids the suboptimal results that may result from single random sampling. Using the adjacency objective function as an evaluation criterion, the optimal one is selected from multiple candidate solutions, ensuring that the final output target feasible solution not only conforms to the probability distribution but also performs optimally in terms of actual segmentation quality (such as regional smoothness, boundary clarity, and other indicators defined by the adjacency objective function), thereby improving the accuracy and reliability of the final image segmentation results.
[0175] An embodiment of the present application further provides an electronic device, including:
[0176] at least one memory;
[0177] at least one processor;
[0178] at least one program;
[0179] The program is stored in the memory, and the processor executes the at least one program to implement the maximum split solution method based on primal-dual graph neural network learning optimization implemented in this application. The electronic device can be any smart terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), an in-vehicle computer, etc.
[0180] See also Figure 12 , Figure 12 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0181] The processor 1201 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0182] The memory 1202 can be implemented in the form of ROM (Read Only Memory), static storage device, dynamic storage device or RAM (Random Access Memory). The memory 1202 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1202, and the processor 1201 calls and executes the maximum partitioning solution method based on the primal-dual graph neural network learning optimization of the embodiment of the present application;
[0183] Input / output interface 1203, used to implement information input and output;
[0184] Communication interface 1204, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0185] Bus 1205 , which transmits information between various components of the device (e.g., processor 1201 , memory 1202 , input / output interface 1203 , and communication interface 1204 );
[0186] The processor 1201 , the memory 1202 , the input / output interface 1203 and the communication interface 1204 are connected to each other in communication within the device via the bus 1205 .
[0187] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned maximum segmentation solution method based on original dual graph neural network learning optimization.
[0188] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0189] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0190] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0191] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0192] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0193] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0194] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0195] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0196] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0198] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0199] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A maximum split solution method based on primal-dual graph neural network learning optimization, characterized in that: The method comprises: Obtaining a maximum image segmentation model, wherein the maximum image segmentation model includes an adjacency objective function and a one-hot vector parameter; Performing simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, wherein the relaxed continuous optimization model includes continuous parameters; Iteratively solving the relaxed continuous optimization model based on the adjacency objective function, the continuous parameter, and the dual hybrid gradient neural network to obtain a relaxed feasible solution; Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model, and the target feasible solution is used to segment the image data corresponding to the image maximum segmentation model into multiple subset image data with maximized total weight.
2. The maximum split solution method based on primal-dual graph neural network learning optimization according to claim 1 is characterized in that: The step of performing simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model includes: generating a plurality of multidimensional Cartesian products based on the convex hull of the one-hot vector parameter; performing a relaxation transformation on the one-hot vector parameter based on all the multidimensional Cartesian products to obtain the continuous parameter; Parameter conversion is performed on the image maximum segmentation model based on the continuous parameters to obtain the relaxed continuous optimization model.
3. The maximum split solution method based on primal-dual graph neural network learning optimization according to claim 1 is characterized in that: The iteratively solving the relaxed continuous optimization model based on the adjacency objective function, the continuous parameter, and the dual hybrid gradient neural network to obtain a relaxed feasible solution includes: Generate an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network; generating a loss function based on the network parameters and optimizing the adjacency objective function; Iteratively updating the network parameters and the continuous parameters based on the iterative update function and the loss function; The relaxed feasible solution is obtained based on the continuous parameters after multiple iterations of updating.
4. The maximum split solution method based on primal-dual graph neural network learning optimization according to claim 3 is characterized in that: The network parameters include first network parameters and second network parameters, the adjacency objective function includes adjacency matrix parameters and the continuous parameters, and generating an iterative update function based on the adjacency objective function and the network parameters of the dual hybrid gradient neural network includes: obtaining a first iterative update portion based on a product of the first network parameter and the continuous parameter; obtaining a second iterative update portion based on the second network parameter, the continuous parameter, and the adjacency matrix parameter; The iterative update function is obtained based on the accumulated value of the first iterative update part and the second iterative update part and multiplied by the activation function.
5. The maximum split solution method based on primal-dual graph neural network learning optimization according to claim 3 is characterized in that: The dual hybrid gradient neural network includes a multi-layer neural network, and the iterative updating of the network parameters and the continuous parameters based on the iterative update function and the loss function includes: In each layer of the neural network, the network parameters are updated based on the continuous parameters output by the previous layer of the neural network and the loss function; The continuous parameters are updated based on the updated network parameters, and the updated continuous parameters are used as input to the next layer of neural network.
6. The maximum split solution method based on primal-dual graph neural network learning optimization according to claim 1 is characterized in that: The relaxed feasible solution includes a plurality of sub-relaxed feasible solutions, and the sampling based on the probability distribution of the relaxed feasible solutions to obtain the target feasible solution of the image maximum segmentation model includes: Sampling based on the probability distribution of each sub-relaxed feasible solution to obtain a sub-goal feasible solution; Based on all the feasible solutions of the sub-goals, the feasible solution of the goal is obtained.
7. The maximum split solution method based on primal-dual graph neural network learning optimization according to claim 1 is characterized in that: The sampling based on the probability distribution of the relaxed feasible solution to obtain the target feasible solution of the image maximum segmentation model includes: Sampling is performed based on the probability distribution of the relaxed feasible solution to obtain a single feasible solution of the image maximum segmentation model; Performing multiple data processing on the image maximum segmentation model to obtain multiple single feasible solutions; The single feasible solution with the smallest adjacent objective function value is selected from the multiple single feasible solutions as the target feasible solution.
8. A maximum split solving device based on primal-dual graph neural network learning optimization, characterized in that: The device comprises: An acquisition module is used to acquire an image maximum segmentation model input by a processing device, wherein the image maximum segmentation model includes an adjacency objective function and a one-hot vector parameter; a relaxation transformation module, configured to perform a simplex relaxation transformation on the one-hot vector parameters in the image maximum segmentation model to obtain a relaxed continuous optimization model, wherein the relaxed continuous optimization model includes continuous parameters; An iterative solution module, configured to iteratively solve the relaxed continuous optimization model based on the adjacency objective function, the continuous parameters, and the dual hybrid gradient neural network to obtain a relaxed feasible solution; A sampling processing module is used to perform sampling based on the probability distribution of the relaxed feasible solution to obtain a target feasible solution of the image maximum segmentation model.
9. An electronic device, characterized in that: It includes a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, it implements the maximum split solution method based on the original dual graph neural network learning optimization as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the maximum split solution method based on primal-dual graph neural network learning optimization according to any one of claims 1 to 7 is implemented.