Spectral band decomposition based cross-domain graph node classification method and device
Patent Information
- Application Number
- CN202611211672.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-13
AI Technical Summary
本发明希望解决异配图等现实图上标注稀缺时的少样本节点分类问题,使预训练模型能够直接迁移到新图、仅需训练一个轻量任务头并使用少量标注即可完成适配
[0086]本发明提出的基于谱频带分解的跨域图节点分类方法,能够在仅训练轻量任务头的条件下完成跨域迁移与少样本节点分类,并对现实中广泛存在的异配图具有良好的适应能力。在标注稀缺的条件下,本发明仍能取得优于现有空域图基础模型的分类效果,且预训练只需一张同配图与一张异配图即可使迁移性能饱和,无需构建大规模多图预训练语料。本发明可应用于引文与学术网络的论文领域分类、社交网络的用户属性与社区识别、电商平台的商品与用户类别预测及推荐等场景,具有较强的实用价值和广泛的应用前景。
Smart Images

Figure CN122904037A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph data mining technology, and particularly to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for cross-domain graph node classification based on spectral band decomposition. Background Technology
[0002] Graph-structured data is widely found in fields such as social networks, citation networks, e-commerce, bioinformatics, and knowledge graphs. Graph Neural Networks (GNNs), by combining node features with graph topology, have become a mainstream tool for representation learning and node classification of graph data. In recent years, inspired by the success of foundational models in language and vision domains, researchers have begun to explore Graph Foundation Models (GFMs). These models, after pre-training on diverse graphs, can be efficiently transferred and adapted to downstream tasks in new graphs and new domains, significantly reducing the cost of re-labeling data and retraining models for each new scenario.
[0003] Most existing graph-based models are built on spatial message passing mechanisms, which update node representations by hop-by-hop aggregation of features from neighboring nodes. Previous research has attempted to improve cross-domain generalization by constructing cross-dataset connections for joint pre-training, learning inductive predictors for arbitrary graphs, or learning structural priors in non-Euclidean space. However, these methods inherit the local bias of neighborhood aggregation, making it difficult to model long-range dependencies and global structural signals. They often fail to capture sufficient discriminative information carried by mid-to-high frequency components in heterogeneous graphs (i.e., graphs where adjacent nodes often have different labels), thus limiting cross-domain transfer capabilities.
[0004] The graph Laplacian matrix is a matrix used in graph theory to represent graph structure; simply put, it is calculated by subtracting the adjacency matrix from the degree matrix. It transforms the connections in a graph into a numerical form for easier computer processing. Spectrographic neural networks, through eigenvalue decomposition of the graph Laplacian matrix, filter graph signals in the Fourier frequency domain, enabling global information mixing and explicitly characterizing the contribution of different frequency components to prediction, making it a more suitable approach for characterizing global structures. However, existing spectral methods suffer from two insurmountable problems when used directly as basic models. Firstly, some methods use a fixed polynomial basis approximation spectral filter for the graph Laplacian, directly learning the polynomial coefficients as model parameters. However, the eigenvalue distributions, signal smoothness, and heterogeneity vary greatly across different graphs, resulting in learned coefficients that are strongly bound to specific datasets and cannot be reused across different domains. On the other hand, another type of method is based on eigenvalue decomposition and directly parameterizes the filter on the eigenvalue sequence using mechanisms such as attention. However, the number of eigenvalues, the range of values, and the spectral density are different in different graphs. The label of the first eigenvalue does not have consistent semantics in different graphs. Furthermore, the attention overhead increases quadratically with the number of eigenvalues, making it equally difficult to transfer.
[0005] In summary, most existing graph-based models are built upon spatial message passing mechanisms. Limited by the locality bias of neighborhood aggregation, they struggle to model global and frequency-related structural information, resulting in mediocre performance on heterogeneous graphs, which are prevalent in reality, and limited cross-domain transfer capabilities. While spectral graph neural networks are better suited for characterizing global and frequency information, they couple transferable spectral knowledge with graph-specific polynomial coefficients, eigenvalue sequences, or feature spaces. This prevents pre-trained filters from being directly reused across graphs of different sizes and domains, and the computational cost of eigenvalue-based modeling increases dramatically with graph size. Therefore, there is an urgent need for a graph-based model method that can decouple transferable spectral knowledge from graph-specific feature spaces and perform pre-training and cross-domain transfer in a graph-scale-independent manner to address the few-sample node classification problem in real-world graphs such as heterogeneous graphs where annotations are scarce. Summary of the Invention
[0006] This invention aims to address two technical problems: First, while existing spectral graph neural networks can characterize global and frequency-related structural information, their transferable spectral knowledge is coupled with graph-specific polynomial coefficients, eigenvalue sequences, or feature spaces, making it difficult to extend them into graph-based models that can be reused across graphs of different scales and domains. Second, many real-world graphs exhibit heterogeneous labeling (i.e., adjacent nodes often have different labels), and existing graph-based models based on spatial message passing are limited by the locality bias of neighborhood aggregation, resulting in mediocre performance on such graphs. This invention aims to solve the problem of few-sample node classification in real-world graphs such as heterogeneous graphs where labels are scarce, enabling pre-trained models to be directly transferred to new graphs, requiring only the training of a lightweight task head and the use of a small number of labels to complete the adaptation.
[0007] To address the shortcomings of existing technologies, this invention proposes a cross-domain graph node classification method based on spectral band decomposition, characterized by comprising:
[0008] The initial step is to acquire data from multiple graphs, each graph... Its node set is The number of nodes is Edge set is The adjacency matrix is The degree matrix is The node feature matrix is ,picture Each node has a category label;
[0009] In the filtering step, the spectral filter generator uses the adjacency matrix... and the degree matrix , calculation graph Normalized graph Laplace matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors The spectral filter generator utilizes eigenvectors Projecting the node feature matrix X onto the frequency domain yields the frequency components, and the eigenvalues are then used... Filter each frequency component;
[0010] In the convolution step, the convolutional layer combines the filtered result with the feature vector matrix. Multiply to obtain the eigenvector matrix Reverting back to the node domain yields the node representation after frequency reweighting. ;
[0011] Prediction steps, downstream task head Represent this node Mapping to a graph The label space is used to obtain the image. The category prediction results for each node;
[0012] The pre-training step involves constructing a loss function based on the prediction results and label of the category to train the spectral filter generator and the downstream task head. This yields the first generator and the first classification head;
[0013] The retraining step involves obtaining images from scenarios with few samples after the pretraining process is completed. Then, repeat the initial step to the prediction step, based on the few-sample scenario shown in the figure below. The class prediction results and class labels of each node are used to construct a loss function to train only the first classifier head to obtain the second classifier head;
[0014] The classification step involves concatenating and integrating the first generator, the convolutional layer, and the second classification head into a graph classification model. The graph to be classified is then input into the graph classification model to obtain the classification results for each node in the graph.
[0015] The cross-domain graph node classification method based on spectral band decomposition is characterized in that the filtering step includes:
[0016] Through the adjacency matrix Degree matrix Calculate the normalized graph Laplacian matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors :
[0017]
[0018] in, Represents the identity matrix. Represents the adjacency matrix. Degree matrix, Eigenvalues a diagonal matrix, Representing the 1 eigenvalue, Represents the number of eigenvalues. The eigenvector matrix;
[0019] Each feature value Encode as a 3D Spectrum Embedding The encoding method is to first... Perform sinusoidal encoding, then add a linear projection layer:
[0020]
[0021] in, Represents the spectral embedding function. Represents a set of preset frequency coefficients. and These represent the learnable linear projection weights and biases, respectively.
[0022] Preset A learnable spectral band Each spectral band From the learnable center With bandwidth Description; Calculate the soft-assigned weights for each eigenvalue to belong to each frequency band using a Gaussian kernel:
[0023]
[0024]
[0025] in, Representative eigenvalues To the Gaussian kernel scoring for each spectral band and Representing the first The learnable center and bandwidth of each spectral band Representative eigenvalues Assigned to the Weighting of each spectral band Represents an exponential function; The value is non-negative and for Summation is Within each spectral band, the eigenvalue embeddings are weighted and summed according to the assigned weights, and then a learnable band identity vector is superimposed. The frequency band marking of this frequency band is obtained. :
[0026]
[0027]
[0028] in, This means the current graph falls on the [number]th [position]. The sum of weights within each frequency band Representing the Frequency band markings for each frequency band Representative eigenvalues Spectral embedding, Representing the Learnable frequency band identity vectors for each frequency band. Represents a small constant to prevent division by zero;
[0029] Will Each frequency band marker is stacked into a matrix. After interaction through a pre-normalized multi-head self-attention layer, the frequency band representation after interaction is obtained:
[0030]
[0031] in, This represents a matrix composed of stacked frequency band markers. Representative level normalization, Represents the bulls' self-attention. The frequency band representation after interaction;
[0032] Then, the filter acting on each eigenvalue is reconstructed from the frequency band representation: first, each... Obtained through linear decoding The frequency band response is then interpolated back to each characteristic value using the aforementioned weighted allocation, resulting in... Candidate filters for each eigenvalue:
[0033]
[0034]
[0035] in, Representing the The frequency band in the first Band response per unit size and Representing the Learnable decoding weights and biases for size Represents the number of heads. Representative eigenvalues In the The response of the candidate filter on the head;
[0036] Each feature value is controlled by a frequency-varying gating network. A set of sums is assigned among the filter candidates. The weights are then weighted and fused to obtain the final filter:
[0037]
[0038]
[0039] in, Representative eigenvalues Assigned to the The mixing weights of the candidate filters, Represents the aforementioned eigenvalues The spectral embedding obtained by sinusoidal encoding and linear projection. Representing a gated linear unit multilayer perceptron, it outputs a dimensional vector, Indicates taking its first... One portion, That is, this component represents the gating network's response to the first... The scores given by the candidate filters. Representative eigenvalues The filter ultimately used.
[0040] The cross-domain graph node classification method based on spectral frequency band decomposition is characterized in that the graph data used in the pre-training step is mixed data including homologous and heterologous graphs;
[0041] Furthermore, this graph data is paper graph data, where nodes represent papers, edges represent citation relationships between papers, node features are text vectors of the papers, and labels and classification results indicate the subject area to which the papers belong; or
[0042] This graph data is social graph data. Nodes in the graph represent users, edges represent following, friend, or interaction relationships, node features are user registration information and behavioral statistics, and tags and classifications are user attributes; or
[0043] This graph data is shopping graph data. In the graph data, the nodes are users, the edges are relationships of joint purchase, browsing or clicking, the node features are the attribute text or image vectors of the products, and the labels and classification results are the user's preference categories.
[0044] This invention also proposes a cross-domain graph node classification device based on spectral band decomposition, characterized in that it includes:
[0045] The initial module acquires data from multiple graphs, each graph... Its node set is The number of nodes is Edge set is The adjacency matrix is The degree matrix is The node feature matrix is ,picture Each node has a category label;
[0046] The filtering module, the spectral filter generator, uses this adjacency matrix. and the degree matrix , calculation graph Normalized graph Laplace matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors The spectral filter generator utilizes eigenvectors Projecting the node feature matrix X onto the frequency domain yields the frequency components, and the eigenvalues are then used... Filter each frequency component;
[0047] The convolutional module, the convolutional layer, combines the filtered result with the feature vector matrix. Multiply to obtain the eigenvector matrix Reverting back to the node domain yields the node representation after frequency reweighting. ;
[0048] Prediction module, downstream task head Represent this node Mapping to a graph The label space is used to obtain the image. The category prediction results for each node;
[0049] The pre-training module constructs a loss function based on the prediction results and label of the category to train the spectral filter generator and the downstream task head. This yields the first generator and the first classification head;
[0050] The retraining module, after the pre-training is completed, obtains the image in the few-shot scenario. Then, execute the initial module to the prediction module again, based on the few-sample scenario shown in the figure below. The class prediction results and class labels of each node are used to construct a loss function to train only the first classifier head to obtain the second classifier head;
[0051] The classification module integrates the first generator, the convolutional layer, and the second classification head into a graph classification model. The graph to be classified is input into the graph classification model to obtain the classification results of each node in the graph to be classified.
[0052] The cross-domain graph node classification device based on spectral band decomposition is characterized in that the filtering module includes:
[0053] Through the adjacency matrix Degree matrix Calculate the normalized graph Laplacian matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors :
[0054]
[0055] in, Represents the identity matrix. Represents the adjacency matrix. Degree matrix, Eigenvalues a diagonal matrix, Representing the 1 eigenvalue, Represents the number of eigenvalues. The eigenvector matrix;
[0056] Each feature value Encode as a 3D Spectrum Embedding The encoding method is to first... Perform sinusoidal encoding, then add a linear projection layer:
[0057]
[0058] in, Represents the spectral embedding function. Represents a set of preset frequency coefficients. and These represent the learnable linear projection weights and biases, respectively.
[0059] Preset A learnable spectral band Each spectral band From the learnable center With bandwidth Description; Calculate the soft-assigned weights for each eigenvalue to belong to each frequency band using a Gaussian kernel:
[0060]
[0061]
[0062] in, Representative eigenvalues To the Gaussian kernel scoring for each spectral band and Representing the first The learnable center and bandwidth of each spectral band Representative eigenvalues Assigned to the Weighting of each spectral band Represents an exponential function; The value is non-negative and for Summation is Within each spectral band, the eigenvalue embeddings are weighted and summed according to the assigned weights, and then a learnable band identity vector is superimposed. The frequency band marking of this frequency band is obtained. :
[0063]
[0064]
[0065] in, This means the current graph falls on the [number]th [position]. The sum of weights within each frequency band Representing the Frequency band markings for each frequency band Representative eigenvalues Spectral embedding, Representing the Learnable frequency band identity vectors for each frequency band. Represents a small constant to prevent division by zero;
[0066] Will Each frequency band marker is stacked into a matrix. After interaction through a pre-normalized multi-head self-attention layer, the frequency band representation after interaction is obtained:
[0067]
[0068] in, This represents a matrix composed of stacked frequency band markers. Representative level normalization, Represents the bulls' self-attention. The frequency band representation after interaction;
[0069] Then, the filter acting on each eigenvalue is reconstructed from the frequency band representation: first, each... Obtained through linear decoding The frequency band response is then interpolated back to each characteristic value using the aforementioned weighted allocation, resulting in... Candidate filters for each eigenvalue:
[0070]
[0071]
[0072] in, Representing the The frequency band in the first Band response per unit size and Representing the Learnable decoding weights and biases for size Represents the number of heads. Representative eigenvalues In the The response of the candidate filter on the head;
[0073] Each feature value is controlled by a frequency-varying gating network. A set of sums is assigned among the filter candidates. The weights are then weighted and fused to obtain the final filter:
[0074]
[0075]
[0076] in, Representative eigenvalues Assigned to the The mixing weights of the candidate filters, Represents the aforementioned eigenvalues The spectral embedding obtained by sinusoidal encoding and linear projection. Representing a gated linear unit multilayer perceptron, it outputs a dimensional vector, Indicates taking its first... One portion, That is, this component represents the gating network's response to the first... The scores given by the candidate filters. Representative eigenvalues The filter ultimately used.
[0077] The cross-domain graph node classification device based on spectral frequency band decomposition is characterized in that the graph data used in the pre-training module is mixed data including homologous and heterologous graphs;
[0078] Furthermore, this graph data is paper graph data, where nodes represent papers, edges represent citation relationships between papers, node features are text vectors of the papers, and labels and classification results indicate the subject area to which the papers belong; or
[0079] This graph data is social graph data. Nodes in the graph represent users, edges represent following, friend, or interaction relationships, node features are user registration information and behavioral statistics, and tags and classifications are user attributes; or
[0080] This graph data is shopping graph data. In the graph data, the nodes are users, the edges are relationships of joint purchase, browsing or clicking, the node features are the attribute text or image vectors of the products, and the labels and classification results are the user's preference categories.
[0081] The present invention also proposes a client for implementing the aforementioned cross-domain graph node classification method device based on spectral band decomposition.
[0082] The present invention also proposes an electronic device, characterized in that it includes the aforementioned apparatus for a cross-domain graph node classification method based on spectral band decomposition, the electronic device being connected to an information display device, the information display device being used to display the classification result using user-set display parameters, attributes, or through an artificial intelligence model.
[0083] The present invention also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the cross-domain graph node classification method based on spectral band decomposition.
[0084] The present invention also proposes a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the cross-domain graph node classification method based on spectral band decomposition.
[0085] As can be seen from the above solutions, the advantages of the present invention are:
[0086] The proposed cross-domain graph node classification method based on spectral band decomposition can achieve cross-domain transfer and few-sample node classification with only a lightweight task head training, and has good adaptability to the widely existing heterogeneous graphs. Even with scarce annotations, this invention still achieves classification results superior to existing spatial domain graph models, and pre-training only requires one homogeneous graph and one heterogeneous graph to saturate the transfer performance, without the need to construct a large-scale multi-graph pre-training corpus. This invention can be applied to scenarios such as citation and academic network paper domain classification, social network user attribute and community identification, and e-commerce platform product and user category prediction and recommendation, demonstrating strong practical value and broad application prospects.
[0087] For example, in the context of academic paper classification, graph data represents a citation network: nodes are papers, edges represent citation relationships between papers, node features can be text vectors of paper titles and abstracts, and labels can be the subject area to which the paper belongs; in the context of user identification in social networks, nodes in graph data are users, edges represent following, friend, or interaction relationships, node features can be user registration information and behavioral statistics, and labels can be user attributes (such as age group, interest community affiliation, whether it is a bot / fake account); in the context of e-commerce product recommendation, nodes in graph data can be products or users, edges represent "co-purchase / browse / click" relationships, node features can be attribute text or image vectors of products, and labels can be product categories or user preferences; in the context of financial transactions, nodes in graph data are accounts, edges represent transfer transactions, and labels can be normal or fraudulent.
[0088] Without this invention, in scenarios like the aforementioned paper domain classification, assigning subject tags to papers requires domain experts, and there are almost no readily available annotations for interdisciplinary and emerging fields. In social scenarios, user attributes involve privacy and are difficult to obtain in large quantities; manual verification of massive user data is extremely costly, and attributes and communities are constantly changing. In e-commerce scenarios, products are added and updated rapidly every day, and manual annotation cannot keep up; newly listed products and new users lack historical tags. In financial transaction scenarios, fraud samples are scarce and concealed, often requiring post-event manual investigation for confirmation, resulting in severely unbalanced and lagging labels. The common thread in these use cases is that traditional methods require re-annotation and retraining of a model for each new graph or domain, leading to high costs and slow deployment. Furthermore, many real-world networks are heterogeneous (adjacent nodes are often of different classes, for example, fraudsters deliberately transact with legitimate users to disguise themselves), and traditional graph models based on neighbor aggregation mix information from different categories, significantly reducing accuracy. However, with this invention, only one pre-training is needed; when encountering a new graph, only a small task head needs to be trained, along with minimal annotations, for immediate use. Attached Figure Description
[0089] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0090] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0091] In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0092] The processor described in this invention is the control center of an electronic device. It can be a single processor or a collective term for multiple processing elements. For example, it can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of this invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0093] Alternatively, the processor can perform various functions of the electronic device by running or executing software programs stored in memory and by calling data stored in memory.
[0094] In a specific implementation, as one example, the processor may include one or more CPUs. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions). Electronic devices may include servers, desktop computers, laptops, smartphones, tablets, embedded computers, etc., where the embedded computer includes vehicles and robots, etc.
[0095] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. For specific implementation methods, please refer to the above method embodiments, which will not be repeated here.
[0096] It should be noted that the structure of the electronic device shown in the accompanying drawings of this invention does not constitute a limitation thereof. The actual knowledge structure recognition device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0097] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0098] It should also be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0099] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0100] It should also be understood that, in various embodiments of the present invention, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0101] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0102] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0103] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0104] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0105] To achieve the above-mentioned technical effects, the present invention proposes the following key technical points:
[0106] Key Point 1: Filter Generator for Spectral Band Decomposition. The graph Laplacian eigenvalues are soft-assigned to a small number of learnable spectral bands, resulting in a band vocabulary independent of graph size. This allows for the sharing and reuse of low-frequency, mid-frequency, and high-frequency spectral semantics across different graphs, providing transferable and interpretable spectral units.
[0107] Key Point 2: Band-level Interaction and Eigenvalue-based Filter Reconstruction. Band interactions are modeled on very short frequency band sequences, and then interpolated back to eigenvalue-based filters. This reduces the computational complexity of spectral attention from a quadratic increase with the number of eigenvalues to a quadratic increase with the number of frequency bands, and improves adaptability to both homologous and heterologous maps.
[0108] Key Point 3: Transfer mechanism decoupling parameter-free spectral convolution from lightweight task heads. Spectral convolution itself contains no learnable parameters; all knowledge is concentrated in the frequency band generator. After pre-training, the generator is frozen, and only one lightweight task head is trained for each image downstream. This key point ensures that the filter, not the feature base, is transferred, avoiding coupling between parameters and specific feature vectors of the image, thus achieving efficient cross-domain transfer and few-sample adaptation.
[0109] To make the above-mentioned features and effects of the present invention clearer and easier to understand, specific embodiments are described below in conjunction with the accompanying drawings. This specification discloses one or more embodiments incorporating the features of the present invention. The disclosed embodiments are merely illustrative. The scope of protection of the present invention is not limited to the disclosed embodiments, but is defined by the appended claims.
[0110] Given a graph Its node set is The number of nodes is Edge set is The adjacency matrix is The degree matrix is The node feature matrix is ,picture Each node in the graph carries a category label. The node classification task aims to learn a model that predicts the category label for nodes in the graph. This invention is designed for graph-based models and aims to solve the problem of efficiently transferring the learned transferable spectral knowledge to previously unseen graphs after pre-training on a batch of diverse graphs, especially to heterogeneous graphs (i.e., graphs where adjacent nodes often have different labels) where target graph labels are scarce, while still achieving good few-sample node classification results. Taking a citation network as an example, nodes represent papers, edges represent citation relationships, node features are paper text vectors, and labels are the subject categories of the papers. The model needs to predict the subject categories of the remaining papers given only a small number of labeled papers.
[0111] This invention proposes a graph-based model based on spectral band decomposition, the model structure of which is as follows: Figure 1As shown, the model comprises three components: a spectral filter generator based on band decomposition, a parameterless spectral convolution (Conv), and a lightweight task-specific header (Classifier). This model transforms the basic unit of cross-graph transfer from a sequence of feature values coupled to a graph-specific feature space into a small set of spectral bands independent of graph size and reusable across different graphs. This decouples transferable spectral knowledge from the graph-specific feature space, allowing the same pre-trained model to be directly transferred to new graphs. Each downstream graph only requires training a lightweight task-specific header to complete the adaptation. The specific implementation process of each of the three components is described below.
[0112] I. Spectral filter generator based on frequency band decomposition.
[0113] This component is the core of this invention, responsible for converting graph-related feature value sequences into transferable spectral knowledge and generating spectral filters. All learnable parameters of the model are concentrated here. The basic idea is to first encode each feature value as a spectral embedding, then softly assign it to a fixed number of learnable frequency bands and aggregate them into frequency band labels independent of graph size. Then, the interaction between frequency bands is modeled, and finally the frequency band response is reconstructed into an eigenvalue filter so that the spectral semantics of low frequency, medium frequency, and high frequency can be shared and reused between different graphs.
[0114] Frequency band marking This is the representative vector / summary vector for the k-th frequency band. The approach involves embedding the spectrum of all feature values falling within this frequency range, weighting them according to assigned weights, and then adding a learnable frequency band identity vector. This vector summarizes the spectral characteristics of this frequency range (e.g., low, mid, high) on the current graph. Furthermore, after normalization, it is independent of the number of nodes in the graph and can be reused across graphs. K frequency band labels constitute a frequency band vocabulary.
[0115] The K frequency band labels are stacked into a matrix and fed into a multi-head self-attention layer, allowing different frequency bands to "see" each other and exchange information (e.g., low and high frequencies coordinate with each other), and the resulting frequency band representation is output. .
[0116] exist Above that, there is another layer of linear decoding (corresponding to the formula in...) , ), to obtain the frequency band response It is a scalar intensity value for each frequency band on each filter head. The execution logic is: frequency band marking. Input from the attention interaction layer yields the frequency band representation. Frequency band representation After linear decoding, the frequency band response is obtained. .
[0117] The function of filter g is to "amplify" or "suppress" different frequency components of a graph signal in the frequency domain, similar to low-pass and high-pass filters in audio / image processing. In a graph, low-frequency components correspond to "neighbor similarity" information, and high-frequency components correspond to "neighbor difference" information. Filter g assigns a gain coefficient to each frequency to determine the proportion of each frequency retained.
[0118] Regarding the filter function itself, the input is the frequency, and the output is the gain coefficient at that frequency. The gain coefficient is a scalar, and all gain coefficients are arranged into a diagonal matrix. In practical applications, the input to the filter is the nodal eigenvector matrix X: first, X is projected into the frequency domain using the eigenvector Uᵀ to obtain the frequency components; then... Frequency-wise scaling (filtering); finally, using the eigenvector matrix. Convert back to the node field to obtain the node representation. = U· · ·X. Output It is a node representation that has been reweighted by frequency (one vector for each node), which strengthens the frequency components that are useful for classification, and is used by the downstream task head for classification.
[0119] Specifically:
[0120] First, through the adjacency matrix Degree matrix Calculate the normalized graph Laplacian matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors :
[0121]
[0122] in, Represents the identity matrix. Represents the adjacency matrix. Degree matrix, It is a diagonal matrix of eigenvalues (i.e., graph frequencies). Representing the 1 eigenvalue, Represents the number of feature values (number of nodes). The eigenvector matrix is the graph frequency matrix. eigenvalues The method of obtaining it is based on the normalized Laplace. Perform eigenvalue decomposition, and the resulting sequence of eigenvalues { It refers to the graph frequency. It is not the Laplace matrix itself. It is an N×N matrix with eigenvalues From A series of values extracted from the graph. The reason eigenvalues are called "frequency" is analogous to the Fourier transform—small eigenvalues correspond to low frequencies (the signal changes smoothly on the graph, and adjacent nodes have similar values), while large eigenvalues correspond to high frequencies (the signal changes drastically between adjacent nodes). Eigenvalues characterize how fast the graph signal changes, hence the term graph frequency. Normalized Laplace Given an N×N square matrix, where N is the number of nodes in the graph, performing eigenvalue decomposition on an N×N matrix yields exactly N eigenvalues (including duplicates). Therefore, the number of eigenvalues equals the number of nodes N; the more nodes, the more eigenvalues. This is precisely the core technical improvement of this invention over existing technologies: if attention is directly applied to each eigenvalue, the complexity is O(N²), which is extremely costly on large graphs; this invention uses a fixed K frequency bands (K is much smaller than N), reducing the complexity from a quadratic increase with the number of eigenvalues to a quadratic increase with the number of frequency bands.
[0123] The left side of the equation It is the normalized graph Laplacian matrix. The eigenvectors are the eigenvector matrix. eigenvalues are The model then requires eigenvalues and eigenvectors, which are obtained using the Laplacian matrix L. The Laplacian matrix L is obtained using the adjacency matrix A and the degree matrix D.
[0124] Then each feature value Encode as a 3D Spectrum Embedding The encoding method is to first... By performing sinusoidal encoding followed by a linear projection, sinusoidal encoding can bring feature values from different graphs with vastly different ranges into a unified representation space, facilitating cross-graph reuse. The formula is as follows:
[0125]
[0126] in, Represents the spectral embedding function. Represents a set of preset frequency coefficients. and Represents the sine and cosine functions, and Represents the learnable linear projection weights and biases.
[0127] Then preset A learnable spectral band ( Much smaller than the number of eigenvalues ), each frequency band From the learnable center With bandwidth Description. Calculate the soft-assigned weights for each eigenvalue belonging to each frequency band using a Gaussian kernel:
[0128]
[0129]
[0130] in, Representative eigenvalues To the Gaussian kernel scoring for each frequency band and Representing the first The learnable center and bandwidth of each frequency band Representative eigenvalues Assigned to the Soft allocation weights for each frequency band Represents an exponential function. The weight is non-negative and... Summation is This is equivalent to flexibly dividing a continuous frequency range into several frequency bands, such as low-frequency, mid-frequency, and high-frequency bands. Then, within each frequency band, the feature value embeddings are weighted and summed according to softly assigned weights, and a learnable frequency band identity vector is superimposed. The frequency band marking of this frequency band is obtained. :
[0131]
[0132]
[0133] in, This means the current graph falls on the [number]th [position]. The sum of weights within each frequency band Representing the Frequency band markings for each frequency band Representative eigenvalues Spectral embedding, Representing the Learnable frequency band identity vectors for each frequency band. This represents a small constant to prevent division by zero. Here, it's the sum of weights within the frequency band. Normalization is performed so that two images with the same frequency shape but different numbers of eigenvalues will have the same frequency band label. Frequency band marking This constitutes a set of spectrograms that are independent of graph size and can be reused across graphs.
[0134] To ensure that information from different frequency bands is coordinated, Each frequency band marker is stacked into a matrix. After interaction through a pre-normalized multi-head self-attention layer, the frequency band representation after interaction is obtained:
[0135]
[0136] in, This represents a matrix composed of stacked frequency band markers. Representative level normalization, Represents the bulls' self-attention. This represents the frequency band representation after interaction. Due to the number of frequency bands... The computational cost here is very small, far lower than in all... Attention is applied to each eigenvalue. Then, a filter acting on each eigenvalue is reconstructed from the frequency band representation: first, each... Obtained through linear decoding The frequency band response is then interpolated back to each characteristic value using the aforementioned soft-assignment weights, resulting in... The candidate filter for each eigenvalue is given by the following two equations in order:
[0137]
[0138]
[0139] in, Representing the The frequency band in the first Band response per unit size and Representing the Learnable decoding weights and biases for size This represents the number of heads, and the number of heads is a fixed hyperparameter, typically 4. The reason for setting multiple heads is to prepare several styles of candidate filters, some leaning towards low-pass and others towards high-pass, and then mixing them can improve the expressiveness of the model; Representative eigenvalues In the The candidate filter response at the size. It should be noted that here... That is, the same set of weights calculated in the aforementioned soft allocation step is reused here as interpolation weights: the first equation only applies to... The second equation gives the frequency band response at the granularity of each frequency band, and then assigns the proportion of each characteristic value to each frequency band. These frequency band responses are weighted and summed to smoothly restore the frequency band responses, which are independent of the graph size, to each specific eigenvalue of the graph; because right Summation is Furthermore, the filter response changes smoothly with frequency, and the results from adjacent eigenvalues also transition smoothly. Each candidate filter... Different frequency styles are preferred. Finally, a frequency-varying gating network is used for each feature value. A set of sums is assigned among the filter candidates. The weights are then weighted and fused to obtain the final filter. The two equations are as follows:
[0140]
[0141]
[0142] in, Representative eigenvalues Assigned to the The mixing weights of the candidate filters, Represents the aforementioned eigenvalues The spectral embedding obtained by sinusoidal encoding and linear projection. Representing a gated linear unit multilayer perceptron, it outputs a dimensional vector, Indicates taking its first... One portion, That is, this component represents the gating network's response to the first... The scores given by the candidate filters. Representative eigenvalues The final filter used. This gate uses the spectral embedding of the eigenvalues themselves. As input, it enables each frequency to automatically select the most suitable filtering style, thereby generating appropriate filters on both identical and dissimilar patterns.
[0143] II. Parametric Spectral Convolution.
[0144] This component is responsible for applying the filters generated by the generator to the node features, completing the signal transformation from the spectral domain to the node domain. Its key feature is that this part contains no learnable parameters, relying solely on the graph's own eigenvectors as fixed Fourier bases. This ensures that transferable knowledge exists only in the filters, not in the eigenbase, which is the fundamental guarantee for achieving cross-graph transfer.
[0145] Applying the eigenvalue filter output from the generator to the node features yields the spectral convolution output:
[0146]
[0147] in, The node representation of the spectral convolution output. The eigenvector matrix represents the graph itself. This represents a diagonal matrix composed of eigenvalue filter coefficients. This represents the feature matrix of the nodes. This part does not contain any learnable parameters: feature vectors. It serves solely as a fixed Fourier basis for the graph itself, responsible for projecting and reconstructing node features into the spectral domain; the filter coefficients... The frequency band generator provides all the learned knowledge. This parameterless design concentrates all learnable knowledge in the frequency band generator, avoiding coupling between model parameters and graph-specific feature vectors, thus ensuring that what is transferable is the filter rather than the feature basis.
[0148] III. Lightweight task-specific heads and pre-training, cross-domain transfer.
[0149] This component adapts the shared spectral convolution output to different downstream graphs, enabling the same pre-trained generator to handle target graphs with varying feature dimensions and label spaces. It also supports the overall training process, including pre-training, cross-domain transfer, and few-shot node classification. Its key feature is that only the task-specific header is graph-specific with very few parameters, and the bandgap generator remains frozen during the transfer phase.
[0150] Configure a lightweight, task-specific header for each downstream graph on top of the shared spectral convolution output. This maps node representations to the label space of the graph and outputs node category predictions.
[0151]
[0152] in, Representing the Node category prediction for the image. Representing the Zhang Tu's exclusive lightweight mission-specific head. This represents the shared spectral convolution output. Each downstream graph only... It is different, and its number of parameters is much smaller than that of the band generator.
[0153] In the pre-training phase, a frequency band generator (a spectral filter generator based on frequency band decomposition) is jointly trained on a mixed dataset of a matching image and a dissimilar image, ensuring that the shared frequency band vocabulary covers the entire frequency range. This is then optimized using the cross-entropy loss of supervised node classification. The matching image contains information at low frequencies, while the dissimilar image contains information at mid-to-high frequencies; together, they can cover all frequencies. The advantage of this invention is that it doesn't require accumulating a large number of images for pre-training; the effect of just two images is sufficient. Unlike existing technologies that learn "how to process each type of image," graph domains are diverse (papers, e-commerce, social media, etc.), with significant differences and no end in sight. Models can only accumulate experience by seeing a sufficient number and variety of images, thus requiring a large number of images for pre-training. This invention takes a different approach: instead of learning "specific images," it learns "how to filter signals at different frequencies." The reason is that the key information of an image can be summarized by frequency—useful information from matching images is concentrated at low frequencies, while dissimilar images are concentrated at mid-to-high frequencies; any image falls within the range of "low to high frequency." Therefore, as long as you learn the low-frequency end well with one matching diagram and the high-frequency end well with one different matching diagram, both ends of the entire frequency range will be covered, and all kinds of diagrams in the middle can be automatically deduced from these two ends.
[0154] During the transfer phase, the pre-trained band generator is frozen, and a task-specific head is trained only on each downstream target map. The training is supervised by the same cross-entropy loss. In few-shot scenarios, each category only requires a very small number of labeled nodes to complete the task head training, and the band generator never receives the target label gradient. All transferable spectral knowledge comes entirely from pre-training, thus enabling the classification of few-shot nodes in real-world graphs such as heterogeneous graphs when labels are scarce.
[0155] It's important to note that the graph used in the transfer phase doesn't need to be the same as the graph used in the pre-training phase, and there's no need to mix identical and dissimilar graphs. Using only the graph to be transferred is sufficient. Even after the model has been pre-trained with at least two graphs, the new graph can be from any domain, as long as each category has a small number of labeled nodes (one or more) to achieve adaptation. In the most extreme case, for example, using two graphs with all nodes labeled during pre-training, such as an e-commerce product classification graph and a social recognition graph; then switching to a citation classification graph during transfer, only a small number of nodes need to be labeled for each category. Assuming this graph is divided into three categories—biology, chemistry, and physics—only one node needs to be labeled for each category to complete downstream adaptation. This is because graphs from different domains may appear very different on the surface, but they all follow the same underlying principle: whether connected nodes are similar or dissimilar. Papers within the same domain citing each other demonstrate similarity, while fraudsters targeting legitimate accounts to impersonate transfers demonstrate dissimilarity. This pattern is uniformly characterized by frequency in the spectral domain—the more similar adjacent nodes are, the more concentrated the discriminative information is in the low frequencies; the more dissimilar adjacent nodes are, the more concentrated they are in the mid-to-high frequencies; graphs of any domain and any size fall within the same frequency range. This invention learns the domain-independent pattern of "how each frequency component should be filtered," rather than parameters specific to a particular domain graph, thus allowing direct cross-domain reuse. The training data is minimal because the most data-dependent step—mapping graph nodes to highly discriminative node representations—is completed in the pre-training phase and frozen during transfer learning, eliminating the need for relearning on new graphs. After this representation, nodes of the same type naturally cluster in the representation space, and the transfer phase only needs to determine the corresponding category label for each cluster. Therefore, each category only requires a very small number, or even a single, labeled node to provide category affiliation information, and the task head can assign the category to the corresponding cluster, completing downstream adaptation.
[0156] Similar graphs refer to connected nodes that tend to be of the same category or very similar. For example, in a citation network, papers in the same discipline are more likely to cite each other, and people with similar interests are more likely to become friends in a social network—in this case, "neighbors are like oneself," and useful discriminative information is mainly in the low-frequency range. Dissimilar graphs refer to connected nodes that are often of different categories. For example, in a financial / fraud network, fraudsters deliberately transact with normal users to disguise themselves; in a heterosexual dating network, men and women are connected—in this case, "neighbors are not like oneself," and discriminative information is more concentrated in the medium- and high-frequency ranges.
[0157] The following are system embodiments corresponding to the above method embodiments. This embodiment can be implemented in conjunction with the above embodiments. The relevant technical details mentioned in the above embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiments.
[0158] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A cross-domain graph node classification method based on spectral band decomposition, characterized in that, include: The initial step is to acquire data from multiple graphs, each graph... Its node set is The number of nodes is Edge set is The adjacency matrix is The degree matrix is The node feature matrix is ,picture Each node has a category label; In the filtering step, the spectral filter generator uses the adjacency matrix... and the degree matrix , calculation graph Normalized graph Laplace matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors ; Spectral filter generator utilizes eigenvectors Projecting the node feature matrix X onto the frequency domain yields the frequency components, and the eigenvalues are then used... Filter each frequency component; In the convolution step, the convolutional layer combines the filtered result with the feature vector matrix. Multiply to obtain the eigenvector matrix Reverting back to the node domain yields the node representation after frequency reweighting. ; Prediction steps, downstream task head Represent this node Mapping to a graph The label space is used to obtain the image. The category prediction results for each node; The pre-training step involves constructing a loss function based on the prediction results and label of the category to train the spectral filter generator and the downstream task head. This yields the first generator and the first classification head; The retraining step involves obtaining images from scenarios with few samples after the pretraining process is completed. Then, repeat the initial step to the prediction step, based on the few-sample scenario shown in the figure below. The class prediction results and class labels of each node are used to construct a loss function to train only the first classifier head to obtain the second classifier head; The classification step involves concatenating and integrating the first generator, the convolutional layer, and the second classification head into a graph classification model. The graph to be classified is then input into the graph classification model to obtain the classification results for each node in the graph.
2. The cross-domain graph node classification method based on spectral frequency band decomposition as described in claim 1, characterized in that, The filtering steps include: Through the adjacency matrix Degree matrix Calculate the normalized graph Laplacian matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors : in, Represents the identity matrix. Represents the adjacency matrix. Degree matrix, Eigenvalues a diagonal matrix, Representing the 1 eigenvalue, Represents the number of eigenvalues. The eigenvector matrix; Each feature value Encode as a 3D Spectrum Embedding The encoding method is to first... Perform sinusoidal encoding, then add a linear projection layer: in, Represents the spectral embedding function. Represents a set of preset frequency coefficients. and These represent the learnable linear projection weights and biases, respectively. Preset A learnable spectral band Each spectral band From the learnable center With bandwidth Description; Calculate the soft-assigned weights for each eigenvalue to belong to each frequency band using a Gaussian kernel: in, Representative eigenvalues To the Gaussian kernel scoring for each spectral band and Representing the first The learnable center and bandwidth of each spectral band Representative eigenvalues Assigned to the Weighting of each spectral band Represents an exponential function; The value is non-negative and for Summation is Within each spectral band, the eigenvalue embeddings are weighted and summed according to the assigned weights, and then a learnable band identity vector is superimposed. The frequency band marking of this frequency band is obtained. : in, This means the current graph falls on the [number]th [position]. The sum of weights within each frequency band Representing the Frequency band markings for each frequency band Representative eigenvalues Spectral embedding, Representing the Learnable frequency band identity vectors for each frequency band. Represents a small constant to prevent division by zero; Will Each frequency band marker is stacked into a matrix. After interaction through a pre-normalized multi-head self-attention layer, the frequency band representation after interaction is obtained: in, This represents a matrix composed of stacked frequency band markers. Representative level normalization, Represents the bulls' self-attention. The frequency band representation after interaction; Then, the filter acting on each eigenvalue is reconstructed from the frequency band representation: first, each... Obtained through linear decoding The frequency band response is then interpolated back to each characteristic value using the aforementioned weighted allocation, resulting in... Candidate filters for each eigenvalue: in, Representing the The frequency band in the first Band response per unit size and Representing the Learnable decoding weights and biases for size Represents the number of heads. Representative eigenvalues In the The response of the candidate filter on the head; Each feature value is controlled by a frequency-varying gating network. A set of sums is assigned among the filter candidates. The weights are then weighted and fused to obtain the final filter: in, Representative eigenvalues Assigned to the The mixing weights of the candidate filters, Represents the aforementioned eigenvalues The spectral embedding obtained by sinusoidal encoding and linear projection. Representing a gated linear unit multilayer perceptron, it outputs a dimensional vector, Indicates taking its first... One portion, That is, this component represents the gating network's response to the first... The scores given by the candidate filters. Representative eigenvalues The filter ultimately used.
3. The cross-domain graph node classification method based on spectral band decomposition as described in claim 1, characterized in that, The graph data used in this pre-training step is a mixture of homographs and heterographs; Furthermore, this graph data is paper graph data, where nodes represent papers, edges represent citation relationships between papers, node features are text vectors of the papers, and labels and classification results indicate the subject area to which the papers belong; or This graph data is social graph data. Nodes in the graph represent users, edges represent following, friend, or interaction relationships, node features are user registration information and behavioral statistics, and tags and classifications are user attributes; or This graph data is shopping graph data. In the graph data, the nodes are users, the edges are relationships of joint purchase, browsing or clicking, the node features are the attribute text or image vectors of the products, and the labels and classification results are the user's preference categories.
4. A cross-domain graph node classification device based on spectral band decomposition, characterized in that, include: The initial module acquires data from multiple graphs, each graph... Its node set is The number of nodes is Edge set is The adjacency matrix is The degree matrix is The node feature matrix is ,picture Each node has a category label; The filtering module, the spectral filter generator, uses this adjacency matrix. and the degree matrix , calculation graph Normalized graph Laplace matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors ; Spectral filter generator utilizes eigenvectors Projecting the node feature matrix X onto the frequency domain yields the frequency components, and the eigenvalues are then used... Filter each frequency component; The convolutional module, the convolutional layer, combines the filtered result with the feature vector matrix. Multiply to obtain the eigenvector matrix Reverting back to the node domain yields the node representation after frequency reweighting. ; Prediction module, downstream task head Represent this node Mapping to a graph The label space is used to obtain the image. The category prediction results for each node; The pre-training module constructs a loss function based on the prediction results and label of the category to train the spectral filter generator and the downstream task head. This yields the first generator and the first classification head; The retraining module, after the pre-training is completed, obtains the image in the few-shot scenario. Then, execute the initial module to the prediction module again, based on the few-sample scenario shown in the figure below. The class prediction results and class labels of each node are used to construct a loss function to train only the first classifier head to obtain the second classifier head; The classification module integrates the first generator, the convolutional layer, and the second classification head into a graph classification model. The graph to be classified is input into the graph classification model to obtain the classification results of each node in the graph to be classified.
5. The cross-domain graph node classification device based on spectral band decomposition as described in claim 4, characterized in that, The filtering module includes: Through the adjacency matrix Degree matrix Calculate the normalized graph Laplacian matrix Then, eigenvalues of the frequency representation map are obtained by eigenvalue decomposition. With feature vectors : in, Represents the identity matrix. Represents the adjacency matrix. Degree matrix, Eigenvalues a diagonal matrix, Representing the 1 eigenvalue, Represents the number of eigenvalues. The eigenvector matrix; Each feature value Encode as a 3D Spectrum Embedding The encoding method is to first... Perform sinusoidal encoding, then add a linear projection layer: in, Represents the spectral embedding function. Represents a set of preset frequency coefficients. and These represent the learnable linear projection weights and biases, respectively. Preset A learnable spectral band Each spectral band From the learnable center With bandwidth Description; Calculate the soft-assigned weights for each eigenvalue to belong to each frequency band using a Gaussian kernel: in, Representative eigenvalues To the Gaussian kernel scoring for each spectral band and Representing the first The learnable center and bandwidth of each spectral band Representative eigenvalues Assigned to the Weighting of each spectral band Represents an exponential function; The value is non-negative and for Summation is Within each spectral band, the eigenvalue embeddings are weighted and summed according to the assigned weights, and then a learnable band identity vector is superimposed. The frequency band marking of this frequency band is obtained. : in, This means the current graph falls on the [number]th [position]. The sum of weights within each frequency band Representing the Frequency band markings for each frequency band Representative eigenvalues Spectral embedding, Representing the Learnable frequency band identity vectors for each frequency band. Represents a small constant to prevent division by zero; Will Each frequency band marker is stacked into a matrix. After interaction through a pre-normalized multi-head self-attention layer, the frequency band representation after interaction is obtained: in, This represents a matrix composed of stacked frequency band markers. Representative level normalization, Represents the bulls' self-attention. The frequency band representation after interaction; Then, the filter acting on each eigenvalue is reconstructed from the frequency band representation: first, each... Obtained through linear decoding The frequency band response is then interpolated back to each characteristic value using the aforementioned weighted allocation, resulting in... Candidate filters for each eigenvalue: in, Representing the The frequency band in the first Band response per unit size and Representing the Learnable decoding weights and biases for size Represents the number of heads. Representative eigenvalues In the The response of the candidate filter on the head; Each feature value is controlled by a frequency-varying gating network. A set of sums is assigned among the filter candidates. The weights are then weighted and fused to obtain the final filter: in, Representative eigenvalues Assigned to the The mixing weights of the candidate filters, Represents the aforementioned eigenvalues The spectral embedding obtained by sinusoidal encoding and linear projection. Representing a gated linear unit multilayer perceptron, it outputs a dimensional vector, Indicates taking its first... One portion, That is, this component represents the gating network's response to the first... The scores given by the candidate filters. Representative eigenvalues The filter ultimately used.
6. The cross-domain graph node classification device based on spectral band decomposition as described in claim 4, characterized in that, The graph data used in this pre-training module is a mixture of homographs and heterographs; Furthermore, this graph data is paper graph data, where nodes represent papers, edges represent citation relationships between papers, node features are text vectors of the papers, and labels and classification results indicate the subject area to which the papers belong; or This graph data is social graph data. Nodes in the graph represent users, edges represent following, friend, or interaction relationships, node features are user registration information and behavioral statistics, and tags and classifications are user attributes; or This graph data is shopping graph data. In the graph data, the nodes are users, the edges are relationships of joint purchase, browsing or clicking, the node features are the attribute text or image vectors of the products, and the labels and classification results are the user's preference categories.
7. A client for implementing any of the cross-domain graph node classification methods based on spectral band decomposition as described in claims 4-6.
8. An electronic device, characterized in that, The device includes a cross-domain graph node classification method based on spectral band decomposition as described in claims 4-6. The electronic device may be connected to an information display device, which is used to display the classification result using user-set display parameters, attributes, or through an artificial intelligence model.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cross-domain graph node classification method based on spectral band decomposition as described in any one of claims 1-3.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the cross-domain graph node classification method based on spectral band decomposition as described in any of claims 1-3.