An adaptive graph clustering method based on feature confrontation and graph transformer

By employing feature adversarial approaches and an adaptive graph clustering method based on graph Transformers, this approach addresses the problem of insufficient utilization of attribute and structural information in existing graph clustering methods. It achieves effective fusion of local features and global structure, thereby improving the accuracy and robustness of graph clustering.

CN119740061BActive Publication Date: 2026-05-26XIDIAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2024-12-25
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing graph clustering methods do not fully utilize the attributes and structural information of graphs, ignore the dependency between local features and global structure, and lack adaptive fusion mechanisms, making it difficult to learn distributionally consistent representations and affecting graph clustering performance.

Method used

An adaptive graph clustering method based on feature adversarial and graph Transformer is adopted. The feature adversarial autoencoder module optimizes attribute-level features, and the graph Transformer autoencoder module performs the convergence and fusion of local features and global structure. The feature fusion is guided by self-supervised learning and joint optimization of loss function to achieve adaptive fusion of attribute-level and structure-level features.

Benefits of technology

It improves the performance of graph representation learning, enhances information learning between first-order neighbors of nodes, establishes global dependencies between nodes, and improves the accuracy and robustness of clustering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740061B_ABST
    Figure CN119740061B_ABST
Patent Text Reader

Abstract

This invention discloses an adaptive graph clustering method based on feature adversarial and graph Transformer, belonging to the field of image processing technology. The original graph is optimized by a feature adversarial autoencoder module to match prior distributions of representation features, obtaining attribute-level features. The feature adversarial autoencoder module includes an autoencoder and a feature adversarial module. The original graph is then processed by a graph Transformer autoencoder module to perform the convergence and fusion of local features and global structure, and information propagation, obtaining structural-level features. Adaptive fusion of attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module completes graph clustering. The training of the feature adversarial autoencoder module and the graph Transformer autoencoder module employs a self-supervised learning approach. A joint optimization loss function guides the joint optimization of graph representation learning and cluster assignment. The joint optimization loss function includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimum cross-entropy loss optimization function of the feature adversarial module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to an adaptive graph clustering method based on feature adversarial and graph Transformer. Background Technology

[0002] Graph representation clustering is the process of classifying nodes into categories based on the structural and attribute features of graph data. Attribute graph clustering has practical applications in various fields. For example, in social networks, platform sponsors promote products to target users based on clustering results; in citation networks, clustering results determine the relevance and trends of research content; and in protein-protein interaction (PPI) networks, clustering results reveal the characteristics of proteins with similar biological functions. Therefore, research on attribute graph clustering is of great significance.

[0003] Autoencoders (AEs) are a classic deep clustering method that learns representational features in a low-dimensional space. They optimize AEs using attribute feature reconstruction loss. Attribute graphs possess complex attribute features and non-Euclidean structural features. Applying AEs to attribute graph clustering only utilizes the attribute features of nodes while ignoring the structural relationships between nodes. Furthermore, AEs have linear learning characteristics and cannot effectively learn non-linear node representations. Another deep learning-based graph clustering method, Graph Convolutional Networks (GCNs), has been proposed. However, GCNs can only perform first-order information propagation and local feature learning, failing to achieve the convergence and fusion of local features and global structure, thus limiting their feature learning performance.

[0004] To address the limitations of the aforementioned algorithms, some researchers have combined AE (Automatic Learning) and GCN (Graph Clustering Network), fully leveraging the linear learning capability of AE and the nonlinear representation capability of GCN to improve the performance of graph clustering.

[0005] Yi et al. published a paper titled "Redundancy-Free Self-Supervised Relational Learning for Graph Clustering" in IEEE Transactions on Neural Networks and Learning Systems, 2023: 1-15. This paper, based on AE and GAE, extracts attribute and structural relationship information from global and local views respectively, obtaining more robust representation features and mentioning the performance of graph clustering. Yang et al. published a paper titled "Fuzzy-Based Deep Attributed Graph Clustering" in IEEE Transactions on Fuzzy Systems, 2024, 32(4): 1951-64. This paper uses GCN to encode network structure and attribute information into compact representations, and then introduces fuzzy logic to optimize the algorithm, improving the performance of graph clustering.

[0006] Most existing graph clustering methods do not fully utilize the attribute and structural information of graphs, neglect the dependency between local features and global structure, and lack adaptive fusion mechanisms to integrate and refine the complementarity between the attribute and structural information of graphs, making it difficult to perform distribution-consistent representation learning. They also fail to fully utilize structural and attribute information to generate robust target distributions to better guide network optimization and learning. Therefore, the optimization of learned features from attribute information, structural information, and fusion information is not linked together, thus affecting the performance of graph clustering. Summary of the Invention

[0007] The purpose of this invention is to overcome the problem that existing graph clustering methods do not make full use of the attribute and structural information of graphs, and to propose an adaptive graph clustering method based on feature adversarial and graph Transformer.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides an adaptive graph clustering method based on feature adversarial mechanisms and graph Transformer, comprising the following steps:

[0010] The original image is optimized by a feature adversarial autoencoder module to match the prior distribution of representation features, thereby obtaining attribute-level features; the feature adversarial autoencoder module includes an autoencoder and a feature adversarial module.

[0011] The original graph is processed by the Graph Transformer autoencoder module to perform the convergence and fusion of local features and global structure of the graph and information propagation to obtain structural features;

[0012] Adaptive fusion of attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module is performed to complete graph clustering;

[0013] The training of the feature adversarial autoencoder module and the graph Transformer autoencoder module adopts a self-supervised learning approach;

[0014] The joint optimization loss function guides the joint optimization of graph representation learning and cluster assignment. The joint optimization loss includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimization of cross-entropy loss optimization function of the feature adversarial module.

[0015] Furthermore, the joint optimization loss function is:

[0016]

[0017] in, To jointly optimize the loss function, For feature adversarial loss function, To optimize the loss function, For self-supervised learning loss function, This represents the hyperparameter that balances the loss of self-supervised learning.

[0018] Furthermore, the encoder and decoder of the autoencoder have the same number of layers;

[0019] The feature adversarial loss function is:

[0020]

[0021] in, For feature adversarial loss function, This represents the feature reconstruction loss function of the autoencoder. This represents the minimum cross-entropy loss function of the adversarial feature module. Hyperparameters for balancing feature adversarial loss;

[0022] The feature reconstruction loss function of the autoencoder is:

[0023]

[0024] in, This represents the feature reconstruction loss function of the autoencoder. For the encoder input, Let N be the node feature matrix, where N is the number of nodes and d is the feature dimension. This is the output of the decoder;

[0025] The feature adversarial module minimizes the cross-entropy loss function as follows:

[0026]

[0027] in, This represents the minimization of cross-entropy loss in the feature adversarial module. The prior distribution is normal. The discriminator is a feature-based adversarial model. It is a self-encoder.

[0028] Furthermore, the original graph is processed by a graph Transformer autoencoder module to perform the convergence and fusion of local features and global structure of the graph, and to propagate information, specifically as follows:

[0029] Local features representing graph attribute information are obtained by calculating the query matrix, key matrix, and value matrix of the first preset layer using a linear structure.

[0030] Calculate the dot product attention between the query matrix and the key matrix to generate a local similarity feature matrix between nodes;

[0031] The local similarity feature matrix is ​​fused with the dot product of the regularized adjacency matrix and the value matrix to obtain the fused local feature matrix;

[0032] By intersecting and fusing the local feature matrix with the global structure, global fusion representation features are extracted;

[0033] The encoded query feature matrix, key feature matrix, value feature matrix, local similarity features, and global fusion features are decoded to obtain the decoding layer of the second preset layer;

[0034] The adjacency matrix is ​​reconstructed using the inner product decoding method through the last layer of encoded features and decoded features, resulting in the reconstructed adjacency matrix.

[0035] The optimized loss function is used to fine-tune the final global fused feature of a node during the process of merging local and global features.

[0036] Furthermore, the optimization loss function is:

[0037]

[0038]

[0039]

[0040]

[0041]

[0042]

[0043]

[0044]

[0045]

[0046] in, This represents the optimization loss function, where N is the number of nodes. This indicates the decoding features of the last layer. This represents the regularized adjacency matrix. These are hyperparameters of the reconstruction loss function weights that balance the weighted attribute matrix and the adjacency matrix. To reconstruct the adjacency matrix, This represents the last layer of encoded features. Indicates the first Layer decoding layer, Indicates the first Layer-wide global fusion representation features Represents the query feature matrix. Represents the key feature matrix, Represents the local characteristic matrix. This indicates the dot product fusion operation. Represents the local similarity feature matrix. Value matrix

[0047] Furthermore, the adaptive fusion of attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module specifically involves:

[0048] The ReLU layer performs nonlinear transformations on the attribute-level features from the feature adversarial autoencoder module and the structural-level features from the graph Transformer autoencoder module, respectively. The attention values ​​after nonlinear transformation are learned through the coefficient matrix. The attention values ​​are regularized to obtain regularization weights. The regularization weights are concatenated into a matrix to obtain the adaptive fusion weights of the feature adversarial autoencoder module and the graph Transformer autoencoder module.

[0049] The adaptive fusion weights of the feature adversarial autoencoder module and the graph Transformer autoencoder module are adaptively weighted and fused with the attribute-level features from the feature adversarial autoencoder module and the structural-level features from the graph Transformer autoencoder module to obtain the adaptive fused features.

[0050] The adaptive fusion features are fused with the adjacency matrix to obtain dual-source fusion representation features.

[0051] Furthermore, the self-supervised learning is as follows:

[0052] Embed the dual-source information from the feature adversarial autoencoder module and the graph Transformer autoencoder module into the representation;

[0053] Soft assignment probabilities are computed on the two latent representations of the feature adversarial autoencoder module and the graph Transformer autoencoder module, respectively, and adaptive KL divergence optimization is performed through self-supervised learning loss function with self-supervised mutual constraints.

[0054] The self-supervised learning loss function is:

[0055]

[0056]

[0057]

[0058] in, This is the loss function for self-supervised learning.

[0059] Secondly, the present invention provides an adaptive graph clustering system based on feature adversarial mechanisms and graph Transformer, comprising:

[0060] An attribute-level feature module is obtained, which is used to optimize the representation feature matching prior distribution of the original image through the feature adversarial autoencoder module to obtain attribute-level features; the feature adversarial autoencoder module includes an autoencoder and a feature adversarial module.

[0061] The structural-level feature module is obtained, which is used to perform the intersection and fusion of local features and global structure of the graph and information propagation through the graph Transformer autoencoder module to obtain structural-level features;

[0062] The adaptive fusion module is used to adaptively fuse attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module to complete graph clustering.

[0063] The self-supervised learning module is used to employ a self-supervised learning approach in the training of the feature adversarial autoencoder module and the graph Transformer autoencoder module.

[0064] The loss optimization module is used to guide the joint optimization of graph representation learning and cluster assignment by combining the joint optimization loss function. The joint optimization loss includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimum cross-entropy loss optimization function of the feature adversarial module.

[0065] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the aforementioned adaptive graph clustering method based on feature adversarial and graph Transformer.

[0066] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, describes an adaptive graph clustering method based on feature adversarial and graph Transformer.

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

[0068] This invention proposes an adaptive graph clustering method based on feature adversarial learning and graph Transformer. The method constructs a FAAE module, which primarily learns attribute feature information through AEs. It introduces the idea of ​​adversarial learning, training the node representation features learned by the AEs against the prior distribution using a discriminator to determine whether the learned representation features come from the true prior distribution or the AEs. In adversarial learning, the attribute-level representation features learned by the AEs are matched with the true prior distribution, thus learning more robust attribute-level representation features. A GTAE module is also designed, which uses a linear structure to learn local graph features and then utilizes a self-attention mechanism to capture the local graph features and global structure. The system fully integrates local features with global structure to learn global structural information of nodes, enhances information learning between first-order neighbors, and establishes global dependencies between nodes, thereby improving the performance of graph representation learning. A dual-source feature adaptive fusion (DFAF) module is also designed to fuse features learned from FAAE and GTAE. An attention module calculates adaptive weights for FAAE and GTAE, and based on these adaptive weights, attribute-level and structural-level dual-source relation features learned from FAAE and GTAE branches are fused to obtain the final fused features for downstream clustering tasks, improving clustering accuracy. Attached Figure Description

[0069] The accompanying drawings described herein are for illustrative purposes only and are not intended to limit the scope of the invention in any way. Furthermore, the shapes and proportions of the components in the drawings are merely schematic to aid in understanding the invention and do not specifically limit the shapes and proportions of the components. In the drawings:

[0070] Figure 1 This is a flowchart of an adaptive graph clustering method based on feature adversarial and graph Transformer according to the present invention.

[0071] Figure 2 This is a structural diagram of an adaptive graph clustering system based on feature adversarial and graph Transformer according to the present invention.

[0072] Figure 3 This invention relates to an adaptive graph clustering method for electronic devices based on feature adversarial approaches and graph Transformer.

[0073] Figure 4 This is a structural diagram of an adaptive graph clustering method based on feature adversarial and graph Transformer.

[0074] Figure 5 This is a FA module diagram for an adaptive graph clustering method based on feature adversarial and graph Transformer.

[0075] Figure 6 This is a graph of the GraphTransformer (GT) module, which is an adaptive graph clustering method based on feature adversarial and graph Transformer.

[0076] Figure 7 A visualization of the clustering results of five algorithms on the DBLP, CITE, and AMAC datasets. Detailed Implementation

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

[0078] Example 1

[0079] See Figure 1 An adaptive graph clustering method based on feature adversarial and graph Transformer includes the following steps:

[0080] The original image is optimized by a feature adversarial autoencoder module to match the prior distribution of representation features, thereby obtaining attribute-level features; the feature adversarial autoencoder module includes an autoencoder and a feature adversarial module.

[0081] The original graph is processed by the Graph Transformer autoencoder module to perform the convergence and fusion of local features and global structure of the graph and information propagation to obtain structural features;

[0082] Adaptive fusion of attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module is performed to complete graph clustering;

[0083] The training of the feature adversarial autoencoder module and the graph Transformer autoencoder module adopts a self-supervised learning approach;

[0084] The joint optimization loss function guides the joint optimization of graph representation learning and cluster assignment. The joint optimization loss includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimization of cross-entropy loss optimization function of the feature adversarial module.

[0085] See Figure 4 This paper presents the structure diagram of an adaptive graph clustering method based on feature adversarial and graph Transformer. The FTAGC algorithm mainly consists of four parts: Feature Adversarial Autoencoder (FAAE), Graph Transformer Autoencoder (GTAE), Dual-Source Feature Adaptive Fusion (DFAF) module, and Self-Supervised Learning (SSL) module. X and A represent the original attributes and structure, respectively; H_i and Z_i represent the i-th layer feature representations learned from FAAE and GTAE, respectively; M represents the dual-source fused features obtained from DFAF; and Z represents the final features used for downstream clustering tasks. The FAAE module includes encoding and decoding processes. The encoding process obtains attribute-level embedding features, and the decoding process is used to reconstruct feature information to optimize the FAAE module. The GTAE module obtains structure-level embedding features during the encoding process, and reconstructs the adjacency matrix through inner product operations during the decoding process to reconstruct the loss and optimize the GTAE module. The DFAF module calculates the adaptive feature fusion weights from the FAAE and GTAE modules, and fuses the attribute-level and structure-level dual-source features from the FAAE and GTAE modules according to the weights to obtain the final embedding features. The SSL module is used to jointly optimize fusion features with the FAAE and GTAE modules and guide the allocation of clusters.

[0086] The implementation steps of an adaptive graph clustering method based on feature adversarial mechanisms and graph Transformer are as follows:

[0087] Step 1: Learn attribute-level representation features through an autoencoder (AE), and optimize the representation features through a feature adversarial (FA) module. The specific steps are as follows:

[0088] 1.1) First, the attribute-level representation features of the nodes are learned through the AE module. The encoder and decoder have the same number of layers. The output of each encoder and decoder layer is expressed as follows:

[0089]

[0090]

[0091] in, and They are the first The weight matrices of the layer encoder and decoder, and These are the corresponding biases. This represents the activation function (e.g., LeakyReLU, tanh, and Sigmoid). The encoder input is... , The node feature matrix, N For the number of nodes, d is the feature dimension. Meanwhile, the last layer of the encoder and decoder are respectively represented as... and .

[0092] 1.2) To learn and optimize the AE module, the attribute features of the nodes are reconstructed. The feature reconstruction loss of the AE module is defined as:

[0093]

[0094] 1.3) In order to preserve the feature representations learned by AE To match a specific prior distribution, this paper introduces the concept of feature adversarial learning. The FA module is trained by minimizing cross-entropy loss, optimizing and updating the representation features learned by the AE during training, thereby enhancing the performance of AE representation learning. The loss function is defined as follows:

[0095]

[0096] Among them, the prior distribution It follows a normal distribution. The feature adversarial model acts as a discriminator. The distinguishing latent features come from the autoencoder Or from the prior distribution Adversarial learning is performed through a discriminator, so that the representation features learned by the AE match the prior distribution.

[0097] 1.4) The loss function of the Feature Adversarial Autoencoder (FAAE) module consists of the feature reconstruction loss of the AE module and the cross-entropy loss of the FA module. These two are combined to optimize the representation features of the FAAE module. The feature adversarial loss function is defined as follows:

[0098]

[0099] in, Hyperparameters for balancing feature adversarial loss.

[0100] Step 2: The Graph Transformer Autoencoder (GTAE) module realizes the convergence and fusion of local features and global structure of the graph and information propagation. The detailed implementation steps are as follows:

[0101] 2.1) First, in order to characterize the attribute information of the graph and obtain local features, the first feature is calculated through a linear structure. Query matrix of layer Key matrix Sum matrix As shown below:

[0102]

[0103]

[0104]

[0105] 2.2) Calculate the matrix between the query matrix Bond matrix Dot product attention between nodes generates a local similarity feature matrix between nodes. :

[0106]

[0107] 2.3) The local similarity feature matrix With regularized adjacency matrix Sum matrix Dot product fusion yields the fused local feature matrix. The calculation method is as follows:

[0108]

[0109] in This indicates the dot product fusion operation.

[0110] 2.4) Local feature matrix With global structure Convergence and integration, extracting the first Global fusion representation features of the layer GTAE module This achieves the convergence and fusion of local node features and global structural information, as shown in the following equation:

[0111]

[0112] 2.5) The query feature matrix obtained after encoding Key feature matrix , value characteristic matrix Local similarity features and global fusion features Decode to obtain the first Layer decoding layer is , means as follows:

[0113]

[0114] 2.6) The last layer of encoded features and decoded features are respectively represented as follows: and The adjacency matrix is ​​reconstructed using inner product decoding, resulting in the reconstructed adjacency matrix. As shown below:

[0115]

[0116] 2.7) To further optimize the representation capability of the GTAE module network, the final global fused feature of the node is fine-tuned during the fusion process of local and global features. The optimization loss function of the GTAE module is defined as follows:

[0117]

[0118] in, It is a hyperparameter of the weights of the reconstruction loss function that balances the weighted attribute matrix and the adjacency matrix.

[0119] Step 3: Adaptively fuse attribute-level and structure-level dual-source features from the FAAE and GTAE modules and The details are as follows:

[0120] 3.1) Calculation from and The attention score of the module is used to obtain the corresponding adaptive attention weight score. as follows:

[0121]

[0122] 3.2) Adaptive attention weights and The specific calculation process first involves using a ReLU layer to process attribute-level relation features. Perform nonlinear transformation using the coefficient matrix. The corresponding attention value is learned, expressed as follows:

[0123]

[0124] in , Here are the weight and bias matrices corresponding to the attention layer. Similarly, we can obtain... .

[0125] 3.3) Using softmax regularization get as follows:

[0126]

[0127] Similarly, . The weights for the regularized FAAE and GTAE.

[0128] 3.4) Concatenate the regularization weights as The matrix, i.e., the adaptive fusion weights of the FAAE and GTAE modules, is shown below:

[0129]

[0130]

[0131] 3.5) Adaptive fusion weights and and and Adaptive weighted fusion yields the following adaptive features:

[0132]

[0133] 3.6) The fusion features are fused with the adjacency matrix to obtain the final dual-source fusion representation features, as shown below:

[0134]

[0135] Step 4: To better guide the training of the clustering network and obtain more robust representation features, self-supervised learning is described in detail below:

[0136] 4.1) First, embed the dual-source information from the FAAE and GTAE models into the representation. This is used to generate the target distribution, as shown below:

[0137]

[0138]

[0139] 4.2) Calculate the soft assignment probabilities on the two latent representations of the FAAE and GTAE modules respectively, and express the soft assignment probabilities of the FAAE and GTAE modules as follows: and By , and By combining these approaches, we train the network within a unified framework and improve the representational capabilities of the FAAE and GTAE modules. This is achieved through adaptive KL divergence optimization using self-supervised mutual constraints of the following form:

[0140]

[0141] Step 5: Combine the losses generated by the FAAE module, GTAE module, DFAF fusion module, and SSL module to jointly guide the joint optimization of graph representation learning and cluster assignment. The final loss is shown below:

[0142]

[0143] in, , , and Let represent the loss functions from the FAAE module, GTAE module, self-supervised learning module, and the total loss function, respectively. This represents the hyperparameter that balances the loss of self-supervised learning.

[0144] The following description, in conjunction with the accompanying drawings and simulation results, further illustrates this embodiment:

[0145] This embodiment was performed using Python software on a PyTorch platform configured with an NVIDIA GeForce RTX 4090, 120GB of memory, and a Linux system.

[0146] This embodiment was validated on the ACM, DBLP, CITE, AMAC, and COCS datasets against existing methods such as DDGAE, AGCC, SCGC, DCGL, DCRN, SDCN, DFCN, and AE. This embodiment uses four metrics—clustering accuracy (ACC), macro F1 score (F1), normalized mutual information (NMI), and average Rand index (ARI)—as evaluation indicators, and was compared with eight advanced algorithms.

[0147] This embodiment tested the proposed algorithm against eight comparative algorithms on five benchmark datasets. The algorithms were run 10 times and the average value was taken. The best and second-best clustering results are highlighted in bold and underlined, respectively. OOM indicates that the algorithm experienced a memory overflow on the same dataset under the same experimental conditions. The clustering numerical results of the eight comparative algorithms and the FTAGC algorithm on the five benchmark datasets are shown in Table 1.

[0148] Table 1. Clustering numerical results of eight comparison algorithms and the FTAGC algorithm on five benchmark datasets.

[0149]

[0150] Table 1 shows the clustering experimental results of the proposed FTAGC algorithm and eight comparative algorithms on five benchmark datasets. The following results can be observed from Table 1:

[0151] First, in most cases, the clustering performance of the FTAGC algorithm in this paper is significantly better than that of the seven comparison algorithms. Specifically, on the ACM dataset, the FTAGC algorithm improves the ACC, NMI, ARI, and F1 scores of the suboptimal DCRN algorithm by 0.67%, 1.45%, 1.64%, and 0.68%, respectively; on the DBLP dataset, the FTAGC algorithm improves the ACC, NMI, ARI, and F1 scores of the suboptimal algorithm by 1.6%, 2.71%, 2.51%, and 1.90%, respectively; on the CITE dataset, the FTAGC algorithm improves the NMI, ARI, and F1 scores of the suboptimal algorithm by 0.98%, 0.58%, and 0.80%, respectively; on the AMAC dataset, the FTAGC algorithm improves the ACC, NMI, ARI, and F1 scores of the suboptimal algorithm by 7.43%, 8.59%, 10.28%, and 2.11%, respectively; and on the COCS dataset, the FTAGC algorithm improves the ACC, NMI, ARI, and F1 scores of the suboptimal algorithm by 7.81%, 5.1%, 0.46%, and 2.81%, respectively. The results show that the FTAGC algorithm in this paper outperforms the comparison algorithms in clustering performance on five datasets.

[0152] After using t-SNE to reduce the dimensionality of the representation features of each dataset, the clustering performance is visualized in a two-dimensional space. Figure 7 (a)-(e), (f)-(j), and (k)-(n) represent the original labels of the DBLP, CITE, and AMAC datasets, and the clustering visualizations of the SCGC, AGCC, DDGAE, and FTAGC algorithms, respectively. Since the AMAC dataset experienced memory overflow under the AGCC algorithm under the same experimental conditions, no visualization of the AMAC dataset under the AGCC algorithm is provided.

[0153] Figure 7In the diagram, (a) represents the clustering graph of DBLP on the original features. Figure 7 (b) in the diagram represents the clustering graph of DBLP on SCGC. Figure 7 In the figure, (c) represents the clustering graph of DBLP on AGCC, 7(d) represents the clustering graph of DBLP on DDGAE, and 7(e) represents the clustering graph of DBLP on FTAGC. Figure 7 In the diagram, (f) represents the CITE clustering graph based on the original features. Figure 7 In this context, (g) represents the clustering graph of CITE on SCGC. Figure 7 In the diagram, (h) represents the clustering graph of CITE on AGCC. Figure 7 In this context, (i) represents the clustering graph of CITE on DDGAE. Figure 7 In this context, (j) represents the clustering graph of CITE on FTAGC; Figure 7 In this context, (k) represents the clustering graph of AMAC on the original features. Figure 7 In the diagram, (l) represents the clustering graph of AMAC on SCGC. Figure 7 In this context, (m) represents the clustering graph of AMAC on DDGAE. Figure 7 In this context, (n) represents the clustering graph of AMAC on FTAGC;

[0154] from Figure 7 It can be seen that, Figure 7 In this embodiment, (e), (j), and (n) represent the clustering visualization results of the FTAGC algorithm, which are better than other visualizations and have clearer boundaries between different labels in the clusters. More specifically, the clustering performance is better when using the representation features obtained by the algorithm in this paper. Compared with the irregular distribution of the original data labels and the comparison algorithm, the model in this embodiment can clearly separate labels of different categories, making samples of the same label more concentrated and samples of different label categories farther apart. This fully demonstrates that the algorithm proposed in this embodiment has strong representation learning ability and good clustering performance.

[0155] To address the shortcomings of existing graph clustering methods in fully utilizing graph attribute and structural information and lacking adaptive fusion mechanisms to integrate and refine the complementarity between these attributes and structural information, thus hindering distribution-consistent representation learning, this paper first introduces adversarial learning into the autoencoder. This allows the attribute-level representation features learned by the autoencoder to match the true prior distribution, resulting in attribute-level representation features. The graph Transformer autoencoder uses a linear structure to learn local graph features and then captures the dependencies between local features and the global structure through an attention mechanism, obtaining global structural-level representation features of nodes. A dual-source feature adaptive fusion module integrates and refines attribute-level and structural-level dual-source features from the FAAE and GTAE branches, achieving consistent representation learning. This ensures that the fused features are adapted to the information itself, resulting in more compact representation features. A self-supervised learning module guides the optimization of representation learning and cluster assignment, mutually optimizing and closely linking the learned features from attribute-level, structural-level, and fused information. This makes the representation features from different modules more consistent, thereby improving the performance of the FTAGC algorithm on clustering tasks. Through theoretical analysis and extensive experiments on five benchmark datasets, the proposed FTAGC algorithm has been verified to achieve higher accuracy in graph clustering tasks.

[0156] As the scale of existing networks continues to increase, graph clustering can be used in many fields. For example, (1) Social network analysis: In social networks, there are complex relationships between users, including friendships, following relationships, etc. Attribute graph clustering can help identify the community structure in social networks and reveal the interaction patterns between different user groups. For example, by analyzing users' interest tags, geographical locations, and interaction frequencies, users can be divided into different groups, thus providing a basis for precision marketing. In addition, this method can also be used to detect fake accounts or abnormal behavior, improving the security of social platforms. (2) Bioinformatics: In the field of bioinformatics, attribute graph clustering can effectively process genomic data and protein interaction networks. By constructing interaction graphs between genes or proteins, functionally similar genomic regions or protein complexes can be identified. This is of great significance for disease research, drug development, etc. For example, in cancer research, by analyzing the differences between tumor cells and normal cells, potential new therapeutic targets can be found. (3) Recommendation system: Recommendation system is an important part of modern e-commerce and content platforms. Attribute graph clustering can associate users with products or content based on users' historical behavior and preferences, thereby improving recommendation accuracy. For example, by constructing a user-product bipartite graph and clustering user features and product features, a personalized recommendation list can be generated for each user. This not only improves the user experience but also significantly increases the conversion rate. (4) Image processing and computer vision: In the field of computer vision, attribute graph clustering also has important applications. In object recognition and scene understanding, each element in the image can be regarded as a node and connected through attributes such as color and texture to achieve classification and analysis of complex scenes. This technology can be widely used in fields such as autonomous driving, monitoring systems and medical image analysis to improve the machine's ability to understand the environment. (5) Intelligent transportation system: With the acceleration of urbanization, traffic management faces increasingly greater challenges. Attribute graph clustering can help analyze traffic flow data and classify traffic status according to factors such as vehicle type, driving speed, and time period. This information can support intelligent traffic signal control, congestion prediction and route optimization, provide a scientific basis for urban traffic management, help alleviate traffic pressure and improve traffic efficiency. (6) Financial risk control: In the financial industry, risk control is a crucial link. By employing attribute graph clustering technology, customer credit records can be analyzed in depth, allowing customers to be categorized according to their credit risk levels. This not only helps financial institutions formulate more reasonable lending policies but also reduces bad debt rates. Furthermore, this technology can be used for anti-money laundering monitoring, identifying potentially risky customers through transaction network analysis.

[0157] In conclusion, graph clustering, as a powerful data mining tool, has a very broad application prospect. From social networks to biomedicine and fintech, various fields can benefit from it. With the development of the big data era, the demand for processing complex data structures is increasing, and it is believed that more innovative algorithms will emerge in the future to further promote the development of this technology. At the same time, strengthening interdisciplinary cooperation will enable attribute graph clustering to play a greater role in practical applications, bringing new opportunities and challenges to various industries.

[0158] Example 2

[0159] See Figure 2 An adaptive graph clustering system based on feature adversarial mechanisms and graph Transformer includes:

[0160] An attribute-level feature module is obtained, which is used to optimize the representation feature matching prior distribution of the original image through the feature adversarial autoencoder module to obtain attribute-level features; the feature adversarial autoencoder module includes an autoencoder and a feature adversarial module.

[0161] The structural-level feature module is obtained, which is used to perform the intersection and fusion of local features and global structure of the graph and information propagation through the graph Transformer autoencoder module to obtain structural-level features;

[0162] The adaptive fusion module is used to adaptively fuse attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module to complete graph clustering.

[0163] The self-supervised learning module is used to employ a self-supervised learning approach in the training of the feature adversarial autoencoder module and the graph Transformer autoencoder module.

[0164] The loss optimization module is used to guide the joint optimization of graph representation learning and cluster assignment by combining the joint optimization loss function. The joint optimization loss includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimum cross-entropy loss optimization function of the feature adversarial module.

[0165] Example 3

[0166] See Figure 3 An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the aforementioned adaptive graph clustering method based on feature adversarial and graph Transformer.

[0167] Example 4

[0168] A computer-readable storage medium storing a computer program, which, when executed by a processor, describes an adaptive graph clustering method based on feature adversarial and graph Transformer.

[0169] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, read-only optical discs, optical storage, etc.) containing computer-usable program code.

[0170] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0171] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0172] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the functions specified in one or more boxes. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.

Claims

1. An adaptive graph clustering method based on feature adversarial mechanisms and graph Transformer, characterized in that, Includes the following steps: The original image is optimized by a feature adversarial autoencoder module to match the prior distribution of representation features, thereby obtaining attribute-level features; the feature adversarial autoencoder module includes an autoencoder and a feature adversarial module; the original image is graph data constructed from computer vision images; The original graph is processed by the Graph Transformer autoencoder module to fuse local features with global structure and propagate information, resulting in structural features; specifically: Local features representing the attribute information of the graph are obtained by calculating the query matrix, key matrix, and value matrix of the first preset layer using a linear structure, as shown in the following equation: Calculate the dot product attention between the query matrix and the key matrix to generate a local similarity feature matrix between nodes; As shown in the following formula: The nodes are the various elements in the computer vision image, which are connected by color or texture to classify and analyze complex scenes; The local similarity feature matrix is ​​fused with the dot product of the regularized adjacency matrix and the value matrix to obtain the fused local feature matrix; As shown in the following formula: The local feature matrix is ​​intersected and fused with the global structure to extract the global fused representation features, as shown in the following formula: The encoded query feature matrix, key feature matrix, value feature matrix, local similarity features, and global fusion features are decoded to obtain the decoding layer of the second preset layer; as shown in the following formula: The adjacency matrix is ​​reconstructed using the inner product decoding method through the last layer of encoded features and decoded features, resulting in the reconstructed adjacency matrix. As shown in the following formula: In the process of merging local and global features of a node, the global final fused feature of the node is fine-tuned by using an optimized loss function. Where N is the number of nodes. This indicates the decoding features of the last layer. This represents the regularized adjacency matrix. These are hyperparameters of the reconstruction loss function weights that balance the weighted attribute matrix and the adjacency matrix. To reconstruct the adjacency matrix, This represents the last layer of encoded features. Indicates the first Layer decoding layer, Indicates the first Layer-wide global fusion representation features Represents the query feature matrix. Represents the key feature matrix, Represents the local characteristic matrix. This indicates the dot product fusion operation. Represents the local similarity feature matrix. Represents a value matrix; Adaptive fusion of attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module is performed to complete graph clustering, specifically as follows: The ReLU layer performs nonlinear transformations on the attribute-level features from the feature adversarial autoencoder module and the structural-level features from the graph Transformer autoencoder module, respectively. The attention value after the nonlinear transformation is learned through the coefficient matrix, as shown in the following equation: in , These are the weight and bias matrices corresponding to the attention layer; The attention value is regularized to obtain the regularized weight, as shown in the following formula: The regularization weights are concatenated into a matrix to obtain the adaptive fusion weights of the feature adversarial autoencoder module and the graph Transformer autoencoder module, as shown in the following equation: The adaptive fusion weights of the feature adversarial autoencoder module and the graph Transformer autoencoder module are adaptively weighted and fused with the attribute-level features from the feature adversarial autoencoder module and the structural-level features from the graph Transformer autoencoder module to obtain the adaptive fused features, as shown in the following equation: The adaptive fusion features are fused with the adjacency matrix to obtain the dual-source fusion representation features, as shown in the following equation: in, The weights for regularized FAAE and GTAE, This indicates the dot product fusion operation. To reconstruct the adjacency matrix; The training of the feature adversarial autoencoder module and the graph Transformer autoencoder module adopts a self-supervised learning approach; The joint optimization loss function guides the joint optimization of graph representation learning and cluster assignment. The joint optimization loss includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimization of cross-entropy loss optimization function of the feature adversarial module.

2. The adaptive graph clustering method based on feature adversarial and graph Transformer according to claim 1, characterized in that, The joint optimization loss function is: in, To jointly optimize the loss function, For feature adversarial loss function, To optimize the loss function, For self-supervised learning loss function, This represents the hyperparameter that balances the loss of self-supervised learning.

3. The adaptive graph clustering method based on feature adversarial and graph Transformer according to claim 2, characterized in that, The encoder and decoder of the autoencoder have the same number of layers; The feature adversarial loss function is: in, For feature adversarial loss function, This represents the feature reconstruction loss function of the autoencoder. This represents the minimum cross-entropy loss function of the adversarial feature module. Hyperparameters for balancing feature adversarial loss; The feature reconstruction loss function of the autoencoder is: in, This represents the feature reconstruction loss function of the autoencoder. For the encoder input, Let N be the node feature matrix, where N is the number of nodes and d is the feature dimension. This is the output of the decoder; The feature adversarial module minimizes the cross-entropy loss function as follows: in, This represents the minimization of cross-entropy loss in the feature adversarial module. The prior distribution is normal. The discriminator is a feature-based adversarial model. It is a self-encoder.

4. The adaptive graph clustering method based on feature adversarial and graph Transformer according to claim 1, characterized in that, The optimization loss function is: in, This represents the optimization loss function.

5. The adaptive graph clustering method based on feature adversarial and graph Transformer according to claim 1, characterized in that, The self-supervised learning is as follows: Embed the dual-source information from the feature adversarial autoencoder module and the graph Transformer autoencoder module into the representation; Soft assignment probabilities are computed on the two latent representations of the feature adversarial autoencoder module and the graph Transformer autoencoder module, respectively, and adaptive KL divergence optimization is performed through self-supervised learning loss function with self-supervised mutual constraints. The self-supervised learning loss function is: in, This is the loss function for self-supervised learning.

6. An adaptive graph clustering system based on feature adversarial and graph Transformer, using the adaptive graph clustering method based on feature adversarial and graph Transformer as described in any one of claims 1-5, characterized in that, include: The attribute-level feature module is obtained, which is used to optimize the representation feature matching prior distribution of the original image through the feature adversarial autoencoder module to obtain attribute-level features; The feature-adversarial autoencoder module includes an autoencoder and a feature-adversarial module; The structural-level feature module is obtained, which is used to perform the intersection and fusion of local features and global structure of the graph and information propagation through the graph Transformer autoencoder module to obtain structural-level features; The adaptive fusion module is used to adaptively fuse attribute-level and structural-level dual-source features from the feature adversarial autoencoder module and the graph Transformer autoencoder module to complete graph clustering. The self-supervised learning module is used to employ a self-supervised learning approach in the training of the feature adversarial autoencoder module and the graph Transformer autoencoder module. The loss optimization module is used to guide the joint optimization of graph representation learning and cluster assignment by combining the joint optimization loss function. The joint optimization loss includes a feature adversarial loss function, an optimization loss function, and a self-supervised learning loss function. The feature adversarial loss function includes the feature reconstruction loss function of the autoencoder and the minimum cross-entropy loss optimization function of the feature adversarial module.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements an adaptive graph clustering method based on feature adversarial and graph Transformer as described in any one of claims 1-5.

8. A computer-readable storage medium storing a computer program that, when executed by a processor, implements an adaptive graph clustering method based on feature adversarial and graph Transformer as described in any one of claims 1-5.