Unsupervised controllable adaptive resolution deep community detection method
By building an encoder-decoder collaboration deep community detection network, combined with joint optimization of loss function, the feature representation and topological reconstruction problems in unsupervised community detection are solved, and adaptive resolution and high-performance community detection are achieved.
Patent Information
- Application Number
- CN202510670115.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-29
AI Technical Summary
The existing community detection methods have problems such as feature representation and community structure separation, resolution parameter solidification and topological reconstruction distortion under unsupervised conditions, resulting in clustering results that are biased from the real topological and overfitted.
A deep community detection network that is coordinated by encoder-decoder is built. By jointly optimizing the loss function, combining module optimization terms, resolution control terms and reconstruction loss terms, it realizes end-to-end adaptive resolution and topological maintenance, and uses graph attention network and softmax functions for feature extraction and clustering.
High-performance graph clustering under unsupervised conditions is realized, clustering particle size is adaptively adjusted, improving the accuracy of community detection and topological reconstruction, and avoiding the deviation and overfitting of clustering results from the real topology.
Smart Images

Figure CN120561622A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of graph clustering / graph data mining technology, and specifically relates to an unsupervised deep community detection method with controllable adaptive resolution. Background Art
[0002] With the development of modern information technology, data in the real world increasingly exhibits the characteristics of complex networks. When these real systems are represented as data structures such as graphs, they will exhibit locally uneven edge distributions, forming community structures with dense inner and sparse outer characteristics. Graph clustering, as an important research method in the field of data mining and machine learning, is designed to discover this community structure in graph structures, analyze community characteristics to understand and optimize the structure and function of the network, and solve the problems of analyzing and understanding complex network data. It can be applied to various fields such as recommendation systems, social friend recommendations, and epidemic detection and prevention.
[0003] Existing community detection methods have the following defects: (1) Existing deep learning methods adopt a two-stage process: first, node feature representation vectors are generated in the latent space, and then independent clustering algorithms such as K-means are applied. They rely heavily on manual labeling or preset cluster numbers, which still poses challenges in unsupervised graph clustering tasks. This framework leads to a separation between feature representation and community structure, resulting in deviations between clustering results and the actual topology; (2) In the mathematical modeling stage of optimizing the modularity target, fixed resolution parameters are difficult to adapt to the detection of multi-community structures in complex graph data structures, and the clustering granularity cannot be adaptively adjusted according to the multi-scale characteristics of the graph, which easily leads to overfitting problems; (3) Although current graph autoencoders based on reconstruction loss (such as adversarial regularized graph autoencoders ARGA) can maintain local connections between nodes, their decoders only aim to reconstruct the adjacency matrix and do not consider the modularity index, resulting in a mismatch between the reconstructed edge distribution and the community structure. Summary of the Invention
[0004] The purpose of the present invention is to provide an unsupervised controllable adaptive resolution deep community detection method, which solves the problems of two-stage optimization of feature extraction and clustering, resolution parameter solidification and topology reconstruction distortion in the prior art.
[0005] The technical solution adopted by the present invention is an unsupervised controllable adaptive resolution deep community detection method, which specifically includes the following steps: Step 1: Get the original graph data from a public graph dataset or an actual social network API, and construct an adjacency matrix for the original graph data using an edge list. , Use node attributes to build feature matrix , get graph data ; Step 2: Build a deep community detection network with encoder-decoder collaboration; Step 3: Define the joint optimization loss function; Step 4: Train and optimize the encoder-decoder collaborative deep community detection network based on the joint optimization loss function, update the parameters and weights simultaneously through backpropagation, perform dynamic feature adjustment, and achieve end-to-end clustering.
[0006] The present invention is also characterized in that: The encoder-decoder collaborative deep community detection network constructed in step 2 includes an encoder, a cluster assignment module, and a decoder; the encoder uses a graph attention network, the cluster assignment module uses a softmax function, and the decoder uses an inner product-based decoder; The graph data Input encoder-decoder collaborative deep community detection network, its processing process specifically includes the following steps: Step 2.1: Graph Data Input encoder, output high-order node features; Step 2.2: Input the high-order node features into the cluster assignment module and output the soft cluster assignment matrix; Step 2.3: The soft clustering assignment matrix is input into the decoder, which outputs a new adjacency matrix.
[0007] The graph data Input encoder, its processing process is: Step 2.1.1: Perform the following operations on each node in the graph: Attention mechanism, calculate the attention coefficient , the calculation formula is: (1) Where, and Node and Features, is a learnable weight matrix used to transform node features, represents the gluing of tensors, are learnable attention mechanism parameters, , is the activation function; Step 2.1.2: Attention coefficient use The function is normalized and expressed as: (2) Where, is the set of neighbor nodes of node i; is the normalized attention weight coefficient of node i to neighbor node j; k is the index of all neighbor nodes traversed by node i; Step 2.1.3: Using the normalized attention weight coefficient, calculate the new features of node i , which is expressed as follows: (3) Where, is a nonlinear activation function; Step 2.1.4: The graph attention network adopts a multi-head attention mechanism, which calculates multiple independent attention heads in parallel and fuses them to obtain the final feature representation of node i. : (4) Where K represents K independent attention mechanisms, and the features obtained by K independent attention mechanisms are connected to achieve the fusion of heterogeneous features; The final feature representation of node i in the multi-layer network of the stacked graph attention network generates high-order node features .
[0008] The clustering allocation module uses the softmax function to classify high-order node features. Perform normalization and output the soft clustering assignment matrix, which is expressed as: (5) In the formula, the generated soft clustering assignment matrix is , represents the probability distribution of node-community membership; n is the total number of nodes, k is the number of potential clusters, represents the probability that node i belongs to cluster k; is the learnable clustering weight matrix.
[0009] The inner product-based decoder reconstructs the adjacency matrix through the soft clustering assignment matrix and calculates the reconstruction loss to optimize the decoder network representation, specifically: Reconstruct the adjacency matrix through the soft clustering assignment matrix C to obtain a new adjacency matrix , which is expressed as follows: (6) in, For the sigmoid activation function, the new adjacency matrix Elements in .
[0010] The reconstruction loss of the encoder is expressed as follows: (7) in, represents the elements in the adjacency matrix, Represents the elements in the new adjacency matrix, and n is the number of nodes.
[0011] The joint optimization loss function in step 3 is expressed as follows: (8) Where, represents the joint optimization loss function, represents the modularity optimization item, Indicates the resolution control item, is the reconstruction loss weight coefficient.
[0012] Modularity optimization items The calculation formula is as follows: (9) Where, is the number of edges, is the degree of the node, is an element in the adjacency matrix, When the node Belong to the same community, When the node Not belonging to the same community; make , for modularity optimization Matrix representation is as follows: (10) Where, is the soft cluster assignment matrix, express Belong to the same community, express Not belonging to the same community, That is, the sum of the elements in the matrix B that belong to the same sub-region.
[0013] Assigning matrix to soft clusters By constraining, we can get the resolution control item, which is expressed as follows: (11) in, is the F-form, n is the total number of nodes, and k is the number of potential clusters.
[0014] In step 4, set the learning rate to 0.001, set the dropout rate, train for 1000 epochs, and update the network parameters after each epoch; Input encoder-decoder collaborative deep community detection network for iterative training and optimization.
[0015] The beneficial effects of the present invention are: The unsupervised and adaptive resolution deep community detection method of the present invention constructs an encoder-decoder collaborative deep community detection architecture. The node features learned by the encoder are deeply integrated with the modularity factor to effectively identify the community structure in the network. The decoder reconstruction loss is then added to the loss function of modularity optimization. The constraint model minimizes the network reconstruction error while optimizing the community division, realizing an end-to-end high-performance graph clustering process under unsupervised conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of the unsupervised and adaptive resolution deep community detection method of the present invention; Figure 2 Schematic diagram of the multi-head attention graph attention mechanism in the graph attention encoder in the unsupervised, controllable, adaptive resolution deep community detection method of the present invention; Figure 3 This is a framework diagram for unsupervised end-to-end community detection in the unsupervised deep community detection method with controllable adaptive resolution of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] The present invention provides an unsupervised and adaptive resolution deep community detection method. Figure 1 As shown, the specific steps include: Step 1: Get the original graph data from a public graph dataset or an actual social network API, and construct an adjacency matrix for the original graph data using an edge list. , Use node attributes to build feature matrix , get graph data , as input data.
[0019] Step 2: Build a deep community detection network with encoder-decoder collaboration.
[0020] The constructed encoder-decoder collaborative deep community detection network specifically includes an encoder, a cluster assignment module, and a decoder. The encoder uses a graph attention network, the decoder uses an inner product-based decoder, and the cluster assignment module uses a softmax function. Specifically, the graph data is used as input data and fed into the encoder-decoder collaborative deep community detection network. The processing process is as follows: Step 2.1: Graph Data Input encoder, output high-order node features; Step 2.2: Input the high-order node features into the cluster assignment module and output the soft cluster assignment matrix; Step 2.3: The soft clustering assignment matrix is input into the decoder, which outputs a new adjacency matrix.
[0021] Specifically, in the encoder, as Figure 2 As shown, the input of each layer of the graph attention network is a node feature vector set , where F is the dimension of node features, N is the number of vectors, and the vector set h represents the features of all nodes; the output of each layer is a new node feature vector set ,in Represents the new node feature dimension; Step 2.1.1: Perform the following operations on each node in the graph: Attention mechanism, calculate the attention coefficient , the calculation formula is: (1) Where, and Node and Features, is a learnable weight matrix used to transform node features, represents the gluing of tensors, are learnable attention mechanism parameters, , is the activation function; Step 2.1.2: Attention coefficient use The function is normalized and expressed as: (2) Where, is the set of neighbor nodes of node i; is the normalized attention weight coefficient of node i to neighbor node j; k is the index of all neighbor nodes traversed by node i; Step 2.1.3: Using the normalized attention weight coefficient, calculate the new features of node i , which is expressed as follows: (3) Where, is a nonlinear activation function; Step 2.1.4: The graph attention network adopts a multi-head attention mechanism, which calculates multiple independent attention heads in parallel and fuses them to obtain the final feature representation of node i. : (4) Where K represents K independent attention mechanisms, and the features obtained by K independent attention mechanisms are connected to achieve the fusion of heterogeneous features; The final feature representation of node i in the multi-layer network of the stacked graph attention network generates high-order node features .
[0022] The clustering allocation module uses the softmax function to classify high-order node features. Perform normalization and output the soft clustering assignment matrix, which is expressed as: (5) In the formula, the generated soft clustering assignment matrix is , represents the probability distribution of node-community membership; n is the total number of nodes, k is the number of potential clusters (usually set to the number of nodes), (element of the soft cluster assignment matrix) represents the probability that node i belongs to cluster k; is the learnable clustering weight matrix.
[0023] After Softmax normalization, the soft clustering assignment matrix The row vector of represents the probability distribution of node membership to the community, which directly guides the community division. At the same time, its column vector is used as the latent space feature representation output by the encoder, so it is used for decoding to retain the community similarity of the network topology and to generate the original network to the greatest extent.
[0024] The inner product-based decoder reconstructs the adjacency matrix through the soft clustering assignment matrix and calculates the reconstruction loss to optimize the decoder network representation, specifically: Reconstruct the adjacency matrix through the soft clustering assignment matrix C to obtain a new adjacency matrix , which is expressed as follows: (6) in, For the sigmoid activation function, the new adjacency matrix Elements in The core idea is to use the cosine similarity of latent space features to represent the connection probability between nodes. This reconstruction method implicitly requires latent space features to be The communities in the network must be encoded so that nodes in the same community are close to each other in the latent space, while nodes in different communities are far away from each other.
[0025] The reconstruction loss inside the decoder is expressed as follows: (7) in, represents the elements in the adjacency matrix, represents the elements in the new adjacency matrix, and n is the number of nodes. By minimizing the reconstruction loss, the model forces Satisfy the minimization of local connection reconstruction error.
[0026] Step 3: Define the joint optimization loss function to drive end-to-end clustering, as shown below: (8) Where, represents the joint optimization loss function, represents the modularity optimization item, Indicates the resolution control item, is the reconstruction loss weight coefficient.
[0027] Among them, the modularity optimization item The calculation formula is as follows: (9) Where, is the number of edges, is the degree of the node, is an element in the adjacency matrix, When the node Belong to the same community, When the node Not belonging to the same community; make , for modularity optimization Matrix representation is as follows: (10) Where, is the soft cluster assignment matrix, express Belong to the same community, express Not belonging to the same community, That is, the sum of the elements in the matrix B that belong to the same sub-region.
[0028] In order to constrain the size of the module, the soft clustering assignment matrix By constraining, we can get the resolution control item, which is expressed as follows: (11) in, is the F paradigm, n is the total number of nodes, and k is the number of potential clusters. This term is used to prevent large communities from merging into small communities and to constrain the size of the community.
[0029] The constructed joint optimization loss function integrates modularity optimization, resolution control, and decoder reconstruction loss. The modularity optimization is used to detect community structure; the resolution suppression is used to prevent large modules from merging with surrounding small modules, causing all nodes to be assigned to the same community; the reconstruction loss minimizes the difference between the original adjacency matrix and the reconstructed matrix, making the clustering results closer to the actual network structure, thereby improving the effect of community division. The collaborative optimization of feature representation and topological structure is achieved through multi-task learning. This multi-task optimization mechanism makes As a latent space feature, its generation process is jointly guided by the community division goal and the topology reconstruction goal, ultimately achieving adaptive end-to-end clustering without manual labeling.
[0030] Step 4: Train and optimize the encoder-decoder collaborative deep community detection network based on the joint optimization loss function, update the parameters and weights simultaneously through backpropagation, perform dynamic feature adjustment, and achieve end-to-end clustering.
[0031] Set the learning rate to 0.001, set the dropout rate to 0.001, train for 1000 epochs, and update the network parameters after each epoch. Input encoder-decoder collaborative deep community detection network for iterative training and optimization.
[0032] The present invention provides an unsupervised and adaptive resolution deep community detection method. Figure 3 As shown in the figure, by constructing a deep community detection network with encoder-decoder collaboration and jointly optimizing the loss function, the problems of traditional feature extraction, two-stage optimization of separate clustering, fixed resolution parameters that cannot adaptively adjust clustering granularity leading to overfitting, and the separation of topology reconstruction and community indicators are effectively solved, realizing an unsupervised clustering process with end-to-end joint optimization, adaptive resolution, topology preservation and feature collaborative enhancement. The core mechanism of the present invention is: (1) Integrating modularity maximization, adaptive resolution control and decoder reconstruction loss into end-to-end optimization goals, maximizing modularity by jointly optimizing the loss function, and guiding the node feature learning mechanism to achieve collaborative enhancement of feature representation and community structure; (2) Designing a soft clustering allocation matrix Has a dual role: through After normalization, The row vector of represents the probability distribution of node membership in a community, directly guiding community division. Simultaneously, its column vector serves as the latent space feature representation output by the encoder, and is therefore used for decoding to preserve the community similarity of the network topology, maximizing the original network. This dual mechanism not only promotes the deep integration of high-order features and clustering objectives, but also constrains the authenticity of community division through the decoder reconstruction loss, ultimately achieving adaptive detection of community structure under unsupervised conditions.
[0033] Example 1 This embodiment provides an unsupervised, controllable, adaptive resolution deep community detection method, which specifically includes the following steps: Step 1: Get the original graph data from a public graph dataset or an actual social network API, and construct an adjacency matrix for the original graph data using an edge list. , Use node attributes to build feature matrix , get graph data ; Step 2: Build a deep community detection network with encoder-decoder collaboration; Step 3: Define the joint optimization loss function; Step 4: Train and optimize the encoder-decoder collaborative deep community detection network based on the joint optimization loss function, update the parameters and weights simultaneously through backpropagation, perform dynamic feature adjustment, and achieve end-to-end clustering.
[0034] Example 2 Based on Example 1, the encoder-decoder collaborative deep community detection network constructed in step 2 includes an encoder, a cluster assignment module, and a decoder; the encoder adopts a graph attention network, the cluster assignment module adopts a softmax function, and the decoder adopts an inner product-based decoder; The graph data Input encoder-decoder collaborative deep community detection network, its processing process specifically includes the following steps: Step 2.1: Graph Data Input encoder, output high-order node features; Step 2.2: Input the high-order node features into the cluster assignment module and output the soft cluster assignment matrix; Step 2.3: The soft clustering assignment matrix is input into the decoder, which outputs a new adjacency matrix.
[0035] Example 3 Based on Example 2, the graph data Input encoder, its processing process is: Step 2.1.1: Perform the following operations on each node in the graph: Attention mechanism, calculate the attention coefficient , the calculation formula is: (1) Where, and Node and Features, is a learnable weight matrix used to transform node features, represents the gluing of tensors, are learnable attention mechanism parameters, , is the activation function; Step 2.1.2: Attention coefficient use The function is normalized and expressed as: (2) Where, is the set of neighbor nodes of node i; is the normalized attention weight coefficient of node i to neighbor node j; k is the index of all neighbor nodes traversed by node i; Step 2.1.3: Using the normalized attention weight coefficient, calculate the new features of node i , which is expressed as follows: (3) Where, is a nonlinear activation function; Step 2.1.4: The graph attention network adopts a multi-head attention mechanism, which calculates multiple independent attention heads in parallel and fuses them to obtain the final feature representation of node i. : (4) Where K represents K independent attention mechanisms, and the features obtained by K independent attention mechanisms are connected to achieve the fusion of heterogeneous features; The final feature representation of node i in the multi-layer network of the stacked graph attention network generates high-order node features .
[0036] The clustering allocation module uses the softmax function to classify high-order node features. Perform normalization and output the soft clustering assignment matrix, which is expressed as: (5) In the formula, the generated soft clustering assignment matrix is , represents the probability distribution of node-community membership; n is the total number of nodes, k is the number of potential clusters, represents the probability that node i belongs to cluster k; is the learnable clustering weight matrix.
[0037] The inner product-based decoder reconstructs the adjacency matrix through the soft clustering assignment matrix and calculates the reconstruction loss to optimize the decoder network representation, specifically: Reconstruct the adjacency matrix through the soft clustering assignment matrix C to obtain a new adjacency matrix , which is expressed as follows: (6) in, For the sigmoid activation function, the new adjacency matrix Elements in .
[0038] The reconstruction loss of the encoder is expressed as follows: (7) in, represents the elements in the adjacency matrix, Represents the elements in the new adjacency matrix, and n is the number of nodes.
[0039] Example 4 Based on Example 3, the joint optimization loss function in step 3 is expressed as follows: (8) Where, represents the joint optimization loss function, represents the modularity optimization item, Indicates the resolution control item, is the reconstruction loss weight coefficient.
[0040] Example 5 Based on Example 4, the modularity optimization item The calculation formula is as follows: (9) Where, is the number of edges, is the degree of the node, is an element in the adjacency matrix, When the node Belong to the same community, When the node Not belonging to the same community; make , for modularity optimization Matrix representation is as follows: (10) Where, is the soft cluster assignment matrix, express Belong to the same community, express Not belonging to the same community, That is, the sum of the elements in the matrix B that belong to the same sub-region.
[0041] Assigning matrix to soft clusters By constraining, we can get the resolution control item, which is expressed as follows: (11) in, is the F-form, n is the total number of nodes, and k is the number of potential clusters.
[0042] Example 6 Based on Example 5, in step 4, set the learning rate to 0.001, set the dropout rate to 0.001, train for 1000 epochs, and update the network parameters after each epoch. Input encoder-decoder collaborative deep community detection network for iterative training and optimization.
Claims
1. Unsupervised controllable adaptive resolution deep community detection method, characterized by: The specific steps include: Step 1: Get the original graph data from a public graph dataset or an actual social network API, and construct an adjacency matrix for the original graph data using an edge list. , Use node attributes to build feature matrix , get graph data ; Step 2: Build a deep community detection network with encoder-decoder collaboration; Step 3: Define the joint optimization loss function; Step 4: Train and optimize the encoder-decoder collaborative deep community detection network based on the joint optimization loss function, update the parameters and weights simultaneously through backpropagation, perform dynamic feature adjustment, and achieve end-to-end clustering.
2. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 1, characterized in that: The encoder-decoder collaborative deep community detection network constructed in step 2 includes an encoder, a cluster assignment module, and a decoder; The encoder adopts a graph attention network, the cluster assignment module adopts a softmax function, and the decoder adopts an inner product-based decoder; The graph data Input encoder-decoder collaborative deep community detection network, its processing process specifically includes the following steps: Step 2.1: Graph Data Input encoder, output high-order node features; Step 2.2: Input the high-order node features into the cluster assignment module and output the soft cluster assignment matrix; Step 2.3: The soft clustering assignment matrix is input into the decoder, which outputs a new adjacency matrix.
3. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 2, characterized in that: The graph data Input encoder, its processing process is: Step 2.1.1: Perform the following operations on each node in the graph: Attention mechanism, calculate the attention coefficient , the calculation formula is: (1) Where, and Node and Features, is a learnable weight matrix used to transform node features, represents the gluing of tensors, are learnable attention mechanism parameters, , is the activation function; Step 2.1.2: Attention coefficient use The function is normalized and expressed as: (2) Where, is the set of neighbor nodes of node i; is the normalized attention weight coefficient of node i to neighbor node j; k is the index of all neighbor nodes traversed by node i; Step 2.1.3: Using the normalized attention weight coefficient, calculate the new features of node i , which is expressed as follows: (3) Where, is a nonlinear activation function; Step 2.1.4: The graph attention network adopts a multi-head attention mechanism, which calculates multiple independent attention heads in parallel and fuses them to obtain the final feature representation of node i. : (4) Where K represents K independent attention mechanisms, and the features obtained by K independent attention mechanisms are connected to achieve the fusion of heterogeneous features; The final feature representation of node i in the multi-layer network of the stacked graph attention network generates high-order node features .
4. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 3, characterized in that: The cluster allocation module uses the softmax function to classify high-order node features. Perform normalization and output the soft clustering assignment matrix, which is expressed as: (5) In the formula, the generated soft clustering assignment matrix is , represents the probability distribution of node-community membership; n is the total number of nodes, k is the number of potential clusters, represents the probability that node i belongs to cluster k; is the learnable clustering weight matrix.
5. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 4, characterized in that: The inner product-based decoder reconstructs the adjacency matrix by soft clustering assignment matrix and calculates the reconstruction loss to optimize the decoder network representation, specifically: Reconstruct the adjacency matrix through the soft clustering assignment matrix C to obtain a new adjacency matrix , which is expressed as follows: (6) in, For the sigmoid activation function, the new adjacency matrix Elements in .
6. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 4, characterized in that: The reconstruction loss of the encoder is expressed as follows: (7) in, represents the elements in the adjacency matrix, Represents the elements in the new adjacency matrix, and n is the number of nodes.
7. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 6, characterized in that: The joint optimization loss function in step 3 is expressed as follows: (8) Where, represents the joint optimization loss function, represents the modularity optimization item, Indicates the resolution control item, is the reconstruction loss weight coefficient.
8. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 7, characterized in that: Modularity optimization items The calculation formula is as follows: (9) Where, is the number of edges, is the degree of the node, is an element in the adjacency matrix, When the node Belong to the same community, When the node Not belonging to the same community; make , for modularity optimization Matrix representation is as follows: (10) Where, is the soft cluster assignment matrix, express Belong to the same community, express Not belonging to the same community, That is, the sum of the elements in the matrix B that belong to the same sub-region.
9. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 8, characterized in that: Assigning matrix to soft clusters By constraining, we can get the resolution control item, which is expressed as follows: (11) in, is the F-form, n is the total number of nodes, and k is the number of potential clusters.
10. The unsupervised, controllable, adaptive resolution deep community detection method according to claim 9, characterized in that: In step 4, set the learning rate to 0.001, set the dropout rate, train for 1000 epochs, and update the network parameters after each epoch; Input encoder-decoder collaborative deep community detection network for iterative training and optimization.