Table data feature mining method and system based on hypergraph neural network
By mapping tabular data into a hypergraph structure through a hypergraph neural network and iteratively aggregating features using the GNN-Transformer joint architecture, the challenge of modeling high-order relationships in tabular data is solved, and comprehensive feature mining of tabular data and cross-table query capabilities are achieved.
Patent Information
- Application Number
- CN202511341656.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-10-28
AI Technical Summary
Existing technologies find it difficult to effectively capture the high-order complex relationships implicit in tables. Serialized modeling destroys the invariance of row and column arrangements. Graph neural networks cannot express the interactions between multiple rows and columns, are sensitive to the arrangement of rows and columns in tables, and lack cross-table association modeling.
A hypergraph neural network is used to map tabular data into a hypergraph structure. The GNN-Transformer joint architecture is used to iteratively aggregate features. A hierarchical table representation is constructed through a three-level architecture of table-level hyperedges, row hyperedges, and column hyperedges. Feature mining is enhanced through sparse coding and semantic initialization.
It significantly improves the comprehensiveness of table data feature mining and the ability to analyze complex relationships, supports cross-table joint queries, and solves the structural defects and data arrangement sensitivity problems in traditional methods.
Smart Images

Figure CN120849477A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of data mining and hypergraph neural network technology, and in particular to a method and system for feature mining of tabular data based on hypergraph neural networks. Background Technology
[0002] In the fields of data mining and databases, the mining of structured features of tabular data has always been one of the core challenges. Traditional methods, such as SQL queries or statistical modeling of relational databases, usually rely on explicit association rules of rows and columns, which are difficult to capture the high-order complex relationships hidden in the table. With the popularization of deep learning, tabular data representation learning (TDL) based on neural networks has gradually become a research hotspot, but existing methods have the following limitations: (1) Defects of serialization modeling: Mainstream large language models learn by forcibly serializing tables into text, which destroys the inherent row and column arrangement invariance and hierarchical structure of tables. This serialization assumption is contrary to the cognitive mode of human understanding of tables - humans usually analyze tables by comprehensively analyzing the relationship between titles, column names and cells, rather than reading them linearly. (2) Limitations of graph neural networks: Although graph neural networks (GNN) have been introduced into table learning (GNN4TDL) to model the relationship between entities, the edges of traditional GNNs can only connect two nodes, which cannot express the high-order interactions of multiple rows and columns in the table. For example, in credit card transaction data, the multi-dimensional relationships between transaction nodes, payment tokens, and addresses need to be fully modeled through hyperedges rather than ordinary edges. (3) Data arrangement sensitivity problem: Existing methods are sensitive to the arrangement order of table rows and columns. For example, graph construction methods based on KNN or threshold rules will cause the adjacency matrix to be reconstructed if the row and column order changes, which will destroy the generalization ability of the model. Hypergraphs can naturally solve this problem by transforming the row and column permutation invariance into the equivalence of hypergraph nodes. (4) Insufficient cross-table association modeling: In relational databases, multi-table associations depend on primary and foreign keys. Traditional GNNs require manual design of edge connection rules, which makes it difficult to automatically learn complex cross-table dependencies. Hypergraphs can directly construct hyperedges through primary and foreign keys, preserving the complete semantic structure of the database.
[0003] Currently, Hypergraph Neural Networks (HGNNs) have demonstrated advantages in handling high-order relationships in fields such as bioinformatics and recommender systems, but their application in tabular data is still in the exploratory stage. In vertical industries such as power, how to combine industry knowledge to construct hypergraph structures and support downstream tasks such as NL2SQL and SQL optimization still requires further research. Summary of the Invention
[0004] To address the aforementioned technical issues, this application provides a method and system for feature mining of tabular data based on hypergraph neural networks, thereby improving the comprehensiveness of feature mining of tabular data.
[0005] In a first aspect, embodiments of this application provide a method for feature mining of tabular data based on a hypergraph neural network, including: Retrieve the table data to be processed; The initial hypergraph dataset is constructed based on the table data. The initial hypergraph dataset is a hypergraph data structure, including a node set, a hyperedge set, and an association matrix. Each cell in the table data corresponds one-to-one with each node in the node set, and each row and column in the table data corresponds one-to-one with each hyperedge in the hyperedge set. The initial hypergraph dataset is input into a preset feature mining model, which generates the final hypergraph dataset through several feature aggregation iterations. In each feature aggregation iteration, the features of each current node and each current hyperedge in the current hypergraph dataset are sequentially aggregated to generate an updated hypergraph dataset, and the updated hypergraph dataset is then subjected to the next feature aggregation iteration. The feature mining model is constructed using a stacked hypergraph encoder, which is a joint architecture of graph neural network and Transformer. When the user's query text is obtained, a multi-table joint matching is performed on each Hypergraph dataset based on the query text to determine the query result corresponding to the query text.
[0006] This application provides a method for feature mining of tabular data based on hypergraph neural networks. By mapping tabular data to a hypergraph structure and iteratively aggregating features using a GNN-Transformer joint architecture, it fundamentally solves the structural defects of traditional table learning. By mapping the content of the table to a set of nodes and hyperedges in the hypergraph structure, and explicitly modeling row / column constraints using hyperedges, the two-dimensional topological semantics of the table are fully preserved, avoiding the destruction of row and column relationships by serialization methods. Then, based on the constructed hypergraph structure, a feature mining model is further used to mine features from the initial hypergraph dataset. By aggregating the features of each node and each hyperedge in each iteration, implicit features that are difficult to directly represent in the original table are fully mined, significantly improving the ability to resolve complex data relationships and enhancing the comprehensiveness of feature mining of tabular data. The final generated hypergraph dataset can directly support cross-table joint queries, providing a structured feature foundation for subsequent tasks such as power NL2SQL.
[0007] In one possible implementation, the step of constructing the corresponding initial hypergraph dataset based on the tabular data includes: Construct a blank hypergraph space; The data in each cell of the table data is mapped to each node in the hypergraph space to obtain a node set. Each row and column in the table data is mapped to a row hyperedge and a column hyperedge in the hypergraph space, wherein any row hyperedge or column hyperedge contains row-to-row or column-to-row relationships between several nodes. In the hypergraph space, a table-level hyperedge connecting all nodes is generated. By combining the table-level hyperedge, each row hyperedge, and each column hyperedge, a hyperedge set is constructed. Construct the corresponding association matrix based on the membership relationship between each node and each hyperedge; The initial hypergraph dataset is obtained by combining the node set, the hyperedge set, and the association matrix.
[0008] This application provides a method for constructing an initial hypergraph dataset. By introducing a three-level architecture of table-level hyperedges (connecting all nodes in the table), row hyperedges (nodes in the same row), and column hyperedges (nodes in the same column), fine-grained expression of table semantics is achieved. Table-level hyperedges capture global features, row hyperedges aggregate multi-parameter associations for single devices, and column hyperedges unify parameters of the same type across devices, thus constructing a hierarchical table representation. Furthermore, this application also solidifies the relationship between nodes and hyperedges by constructing an association matrix, ensuring the model's robustness to row and column permutations. The above hypergraph structure design solves the problem of traditional methods neglecting the semantic association between table headers and cells. Especially in power parameter tables, it can accurately distinguish the professional domain differences between equipment attribute columns and environmental monitoring columns, providing sufficient data preparation for subsequent feature mining of the table data.
[0009] Furthermore, the construction of the corresponding association matrix based on the dependency relationship between each node and each hyperedge includes: Based on the membership relationship between each node and each hyperedge, the initial hypergraph dataset is sparsely encoded to construct the corresponding association matrix. For any current node and current hyperedge, if the current node belongs to the current hyperedge, it is encoded as 1 at the corresponding position in the association matrix; otherwise, it is encoded as 0.
[0010] This application provides a method for constructing an association matrix, which encodes the subordinate relationships between nodes or hyperedges in a hypergraph structure into a sparse association matrix. Sparse coding can significantly reduce storage and computational overhead, adapt to massive power tables, make the data more compact, and at the same time completely preserve the structural information of the table, thereby improving the information density and interpretability of the hypergraph and providing data support for subsequent feature mining.
[0011] Furthermore, the table data feature mining method also includes, after constructing and obtaining the hyperedge set, performing semantic initialization on each hyperedge in the hyperedge set according to the content of the table data, specifically: For the table-level super-edge, the token of the table header of the table data is embedded; For each column superedge, the token in the table data corresponding to the column superedge header is embedded; For each row hyperedge, if there is no corresponding semantic information for the row hyperedge in the table data, then the row hyperedge is randomly initialized; otherwise, the text content of all cells in the row corresponding to the row hyperedge is extracted from the table data, and then each text content is converted into a corresponding text vector through BERT vectorization. Finally, the average operation of each text vector is performed and the result is embedded into the row hyperedge.
[0012] This application provides a semantic initialization method. In the process of constructing the initial hypergraph dataset, by embedding title tokens into table-level hyperedges, embedding table header tokens into column hyperedges, and randomly initializing row hyperedges or using the BERT model to vectorize inline text, the method injects domain prior knowledge into the initial hypergraph dataset, avoids information loss of table data during the mapping process, and helps the feature mining model to directly understand the contextual meaning of power industry terms, thereby improving the accuracy and efficiency of subsequent feature mining.
[0013] In one possible implementation, the step of sequentially aggregating the features of each current node and each current hyperedge in the current hypergraph dataset to generate an updated hypergraph dataset includes: For each current superedge, the current node features of each current node contained in the current superedge are aggregated to obtain the superedge aggregated feature corresponding to the current superedge; then the current superedge feature and the corresponding superedge aggregated feature are weighted and fused to obtain the superedge update feature corresponding to the current superedge. For each current node, the hyperedge update features of each current hyperedge to which the current node belongs are aggregated to obtain the node update features corresponding to the current node; Based on the update features of each hyperedge and each node, feature updates are performed on each current node and each current hyperedge in the current hypergraph dataset to generate the updated hypergraph dataset.
[0014] This application provides a method for feature aggregation in a single iteration. Through a bidirectional feature aggregation mechanism—node → hyperedge → node—dynamic semantic enhancement of hypergraph data is achieved. When a hyperedge aggregates the features of all its contained nodes, row- and column-level local patterns can be extracted; while when a node aggregates the updated features of its superedge, cross-dimensional contextual semantics are integrated. This bidirectional interaction allows individual cells to retain their original numerical characteristics while also being associated with the global structure. This enables the simultaneous capture of micro-parameter anomalies and macro-operating trends in power equipment analysis scenarios, solving the problem of the separation between local features and global semantics in traditional table learning methods and improving the comprehensiveness of feature mining of table data.
[0015] Furthermore, the step of weightedly fusing the current hyperedge features and the corresponding hyperedge aggregation features to obtain the hyperedge update features corresponding to the current hyperedge includes: The current hyperedge features and the hyperedge aggregate features are subjected to nonlinear transformation, residual connection and layer normalization processing by a preset multilayer perceptron to obtain the corresponding processed hyperedge features and processed hyperedge aggregate features. The processed hyperedge features and the processed hyperedge aggregate features are weighted and fused based on preset weight parameters to obtain the hyperedge update features corresponding to the current hyperedge.
[0016] In this embodiment, the specific process of weighted fusion of the current hyperedge features and the current hyperedge aggregated features is further defined. A multilayer perceptron is introduced in the hyperedge feature update stage for nonlinear transformation, residual connections, and layer normalization, significantly improving the expressive power of higher-order relationships. Specifically, the nonlinear transformation converts the original hyperedge features into a deep representation containing complex nonlinear relationships; residual connections ensure the stability of deep network training and avoid feature degradation caused by gradient vanishing; and layer normalization alleviates the scale differences of hyperedge features, enabling the model to maintain convergence efficiency when aggregating multi-column heterogeneous data, thus improving the efficiency and comprehensiveness of feature mining from tabular data.
[0017] Furthermore, the step of aggregating the hyperedge update features of each current hyperedge to which the current node belongs to obtain the node update features corresponding to the current node includes: Based on the attention mechanism and the preset global parameter vector, the hyperedge update features of each current hyperedge to which the current node belongs are extracted to obtain the corresponding key feature vectors. The global parameter vector is respectively connected with each of the key feature vectors and subjected to residual connection and layer normalization to obtain the corresponding first intermediate feature vectors. By performing nonlinear transformations on each of the first intermediate feature vectors using a pre-defined feedforward neural network, each corresponding second intermediate feature vector is obtained. Each of the first intermediate feature vectors and its corresponding second intermediate feature vector is subjected to residual concatenation and normalization to obtain the corresponding final feature vectors. The final feature vectors are fused to obtain the node update feature corresponding to the current node.
[0018] In this embodiment, the specific process of feature aggregation for updating hyperedge features is further defined. Dynamic weight allocation for node feature updates is achieved through an attention mechanism and a residual-normalization cascade structure. Specifically, the attention mechanism automatically learns the contribution weights of different hyperedges to nodes, addressing the problem of redundant columns interfering with core features in power tables. The global parameter vector serves as a baseline anchor point, preventing attention bias from causing the loss of important features. The multi-level application of residual connections and layer normalization forms a deep feature refinement pipeline, enhancing discriminative features while preserving original information, thus improving the comprehensiveness of feature mining from tabular data.
[0019] Secondly, embodiments of this application provide a tabular data feature mining system based on a hypergraph neural network, including an acquisition module, a hypergraph data construction module, a feature mining module, and a query module; The acquisition module is used to acquire the table data to be processed; The hypergraph data construction module is used to construct a corresponding initial hypergraph dataset based on the table data. The initial hypergraph dataset is a hypergraph data structure, including a node set, a hyperedge set, and an association matrix. Each cell in the table data corresponds one-to-one with each node in the node set, and each row and column in the table data corresponds one-to-one with each hyperedge in the hyperedge set. The feature mining module is used to input the initial hypergraph dataset into a preset feature mining model, so that the feature mining model generates the final hypergraph dataset through several feature aggregation iterations. In each feature aggregation iteration, the features of each current node and each current hyperedge in the current hypergraph dataset are aggregated sequentially to generate an updated hypergraph dataset, and the updated hypergraph dataset is subjected to the next feature aggregation iteration. The feature mining model is constructed by a stacked hypergraph encoder, which is a joint architecture of graph neural network and Transformer. The query module is used to perform multi-table joint matching in various hypergraph datasets based on the query text when the user's query text is obtained, so as to determine the query result corresponding to the query text.
[0020] In one possible implementation, the hypergraph data construction module constructs a corresponding initial hypergraph dataset based on the tabular data, including: Construct a blank hypergraph space; The data in each cell of the table data is mapped to each node in the hypergraph space to obtain a node set. Each row and column in the table data is mapped to a row hyperedge and a column hyperedge in the hypergraph space, wherein any row hyperedge or column hyperedge contains row-to-row or column-to-row relationships between several nodes. In the hypergraph space, a table-level hyperedge connecting all nodes is generated. By combining the table-level hyperedge, each row hyperedge, and each column hyperedge, a hyperedge set is constructed. Construct the corresponding association matrix based on the membership relationship between each node and each hyperedge; The initial hypergraph dataset is obtained by combining the node set, the hyperedge set, and the association matrix.
[0021] In one possible implementation, the feature mining module sequentially aggregates the features of each current node and each current hyperedge in the current hypergraph dataset to generate an updated hypergraph dataset, including: For each current superedge, the current node features of each current node contained in the current superedge are aggregated to obtain the superedge aggregated feature corresponding to the current superedge; then the current superedge feature and the corresponding superedge aggregated feature are weighted and fused to obtain the superedge update feature corresponding to the current superedge. For each current node, the hyperedge update features of each current hyperedge to which the current node belongs are aggregated to obtain the node update features corresponding to the current node; Based on the update features of each hyperedge and each node, feature updates are performed on each current node and each current hyperedge in the current hypergraph dataset to generate the updated hypergraph dataset. Attached Figure Description
[0022] Figure 1 A flowchart illustrating a method for feature mining of tabular data based on a hypergraph neural network, provided in an embodiment of this application; Figure 2 This is a schematic diagram illustrating the result of converting tabular data into an initial hypergraph dataset in a method for feature mining of tabular data based on a hypergraph neural network provided in an embodiment of this application. Figure 3A schematic diagram of the model architecture of the feature mining model in a tabular data feature mining method based on a hypergraph neural network provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a tabular data feature mining system based on a hypergraph neural network, provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0024] It should be noted that the step numbers in this document are only for the convenience of explaining the specific embodiments and are not intended to limit the order in which the steps are performed. In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0025] Example 1: like Figure 1 As shown, Embodiment 1 provides a method for feature mining of tabular data based on hypergraph neural networks, including steps S1-S4: Step S1: Obtain the table data to be processed; Step S2: Construct the corresponding initial hypergraph dataset based on the table data. The initial hypergraph dataset is a hypergraph data structure, including a node set, a hyperedge set, and an association matrix. Each cell in the table data corresponds one-to-one with each node in the node set, and each row and column in the table data corresponds one-to-one with each hyperedge in the hyperedge set. Step S3: Input the initial hypergraph dataset into a preset feature mining model, so that the feature mining model generates the final hypergraph dataset through several feature aggregation iterations. In each feature aggregation iteration, the features of each current node and each current hyperedge in the current hypergraph dataset are aggregated sequentially to generate an updated hypergraph dataset, and the updated hypergraph dataset is subjected to the next feature aggregation iteration. The feature mining model is constructed by a stacked hypergraph encoder, which is a joint architecture of graph neural network and Transformer. Step S4: When the user's query text is obtained, multi-table joint matching is performed in each hypergraph dataset according to the query text to determine the query result corresponding to the query text.
[0026] This application provides a method for feature mining of tabular data based on hypergraph neural networks. By mapping tabular data to a hypergraph structure and iteratively aggregating features using a GNN-Transformer joint architecture, it fundamentally solves the structural defects of traditional table learning. By mapping the content of the table to a set of nodes and hyperedges in the hypergraph structure, and explicitly modeling row / column constraints using hyperedges, the two-dimensional topological semantics of the table are fully preserved, avoiding the destruction of row and column relationships by serialization methods. Then, based on the constructed hypergraph structure, a feature mining model is further used to mine features from the initial hypergraph dataset. By aggregating the features of each node and each hyperedge in each iteration, implicit features that are difficult to directly represent in the original table are fully mined, significantly improving the ability to resolve complex data relationships and enhancing the comprehensiveness of feature mining of tabular data. The final generated hypergraph dataset can directly support cross-table joint queries, providing a structured feature foundation for subsequent tasks such as power NL2SQL.
[0027] In one possible implementation, step S2, which involves constructing the corresponding initial hypergraph dataset based on the tabular data, includes: Construct a blank hypergraph space; The data in each cell of the table data is mapped to each node in the hypergraph space to obtain a node set. Each row and column in the table data is mapped to a row hyperedge and a column hyperedge in the hypergraph space, wherein any row hyperedge or column hyperedge contains row-to-row or column-to-row relationships between several nodes. In the hypergraph space, a table-level hyperedge connecting all nodes is generated. By combining the table-level hyperedge, each row hyperedge, and each column hyperedge, a hyperedge set is constructed. Construct the corresponding association matrix based on the membership relationship between each node and each hyperedge; The initial hypergraph dataset is obtained by combining the node set, the hyperedge set, and the association matrix.
[0028] This application provides a method for constructing an initial hypergraph dataset. By introducing a three-level architecture of table-level hyperedges (connecting all nodes in the table), row hyperedges (nodes in the same row), and column hyperedges (nodes in the same column), fine-grained expression of table semantics is achieved. Table-level hyperedges capture global features, row hyperedges aggregate multi-parameter associations for single devices, and column hyperedges unify parameters of the same type across devices, thus constructing a hierarchical table representation. Furthermore, this application also solidifies the relationship between nodes and hyperedges by constructing an association matrix, ensuring the model's robustness to row and column permutations. The above hypergraph structure design solves the problem of traditional methods neglecting the semantic association between table headers and cells. Especially in power parameter tables, it can accurately distinguish the professional domain differences between equipment attribute columns and environmental monitoring columns, providing sufficient data preparation for subsequent feature mining of the table data.
[0029] Furthermore, the construction of the corresponding association matrix based on the dependency relationship between each node and each hyperedge includes: Based on the membership relationship between each node and each hyperedge, the initial hypergraph dataset is sparsely encoded to construct the corresponding association matrix. For any current node and current hyperedge, if the current node belongs to the current hyperedge, it is encoded as 1 at the corresponding position in the association matrix; otherwise, it is encoded as 0.
[0030] This application provides a method for constructing an association matrix, which encodes the subordinate relationships between nodes or hyperedges in a hypergraph structure into a sparse association matrix. Sparse coding can significantly reduce storage and computational overhead, adapt to massive power tables, make the data more compact, and at the same time completely preserve the structural information of the table, thereby improving the information density and interpretability of the hypergraph and providing data support for subsequent feature mining.
[0031] Furthermore, the table data feature mining method also includes, after constructing and obtaining the hyperedge set, performing semantic initialization on each hyperedge in the hyperedge set according to the content of the table data, specifically: For the table-level super-edge, the token of the table header of the table data is embedded; For each column superedge, the token in the table data corresponding to the column superedge header is embedded; For each row hyperedge, if there is no corresponding semantic information for the row hyperedge in the table data, then the row hyperedge is randomly initialized; otherwise, the text content of all cells in the row corresponding to the row hyperedge is extracted from the table data, and then each text content is converted into a corresponding text vector through BERT vectorization. Finally, the average operation of each text vector is performed and the result is embedded into the row hyperedge.
[0032] This application provides a semantic initialization method. In the process of constructing the initial hypergraph dataset, by embedding title tokens into table-level hyperedges, embedding table header tokens into column hyperedges, and randomly initializing row hyperedges or using the BERT model to vectorize inline text, the method injects domain prior knowledge into the initial hypergraph dataset, avoids information loss of table data during the mapping process, and helps the feature mining model to directly understand the contextual meaning of power industry terms, thereby improving the accuracy and efficiency of subsequent feature mining.
[0033] In a preferred embodiment, the tabular data is represented as Where M is the header, H is the m column headers, and R represents n rows, each row There are m cells The corresponding initial hypergraph dataset can be represented as: And the corresponding association matrix B, where V is the set of nodes and E is the set of hyperedges. The construction process of the initial hypergraph dataset includes node mapping and hyperedge mapping, association matrix construction, and semantic initialization, as follows: 1. Mapping between nodes and hyperedges Cells mapped to nodes: each table cell Mapped as a node in a hypergraph V represents the basic building block of a hypergraph. This one-to-one mapping ensures that each data point in the table can independently participate in information transmission.
[0034] Rows and columns are mapped to hyperedges: each row and each column Form column super edges respectively and the super-border These hyperborders connect cell nodes in the same row or column, explicitly modeling the relationships within rows and columns.
[0035] Map the entire table to a global hyperedge: the entire table It is represented as a special table-level hyperedge Connect all nodes to capture global information at the table level.
[0036] 2. Representation of the Incidence Matrix Two-way connection mechanism: Each cell node is simultaneously connected to three types of hyperedges (row, column, and table hyperedges), forming a multi-level information flow path. This design enables the model to consider both local (cell-level) and global (table-level) information.
[0037] Incidence matrix representation: The hypergraph structure is encoded as a sparse incidence matrix. Where m is the number of columns and n is the number of rows. It can only take two values, 0 or 1. This indicates that node i belongs to hyperedge j; otherwise... This representation method is both compact and retains the structural information of the table completely.
[0038] 3. Hierarchical Embedded Initialization Different types of hyperedges employ differentiated initialization strategies: column hyperedges use the token embedding of the corresponding table header; table-level hyperedges use the token embedding of the table title; row hyperedges are randomly initialized when there is no semantic information, and when there is semantic information, the text content of all cells in the row is extracted, all column content in the row is vectorized using BERT, and all vectors in the row are averaged to finally generate the row hyperedge.
[0039] like Figure 2 As shown, the above method is used to map data, transforming the tabular alarm table into an initial hypergraph dataset with a hypergraph structure.
[0040] In one possible implementation, step S3, which involves sequentially aggregating the features of each current node and each current hyperedge in the current hypergraph dataset to generate an updated hypergraph dataset, includes: For each current superedge, the current node features of each current node contained in the current superedge are aggregated to obtain the superedge aggregated feature corresponding to the current superedge; then the current superedge feature and the corresponding superedge aggregated feature are weighted and fused to obtain the superedge update feature corresponding to the current superedge. For each current node, the hyperedge update features of each current hyperedge to which the current node belongs are aggregated to obtain the node update features corresponding to the current node; Based on the update features of each hyperedge and each node, feature updates are performed on each current node and each current hyperedge in the current hypergraph dataset to generate the updated hypergraph dataset.
[0041] This application provides a method for feature aggregation in a single iteration. Through a bidirectional feature aggregation mechanism—node → hyperedge → node—dynamic semantic enhancement of hypergraph data is achieved. When a hyperedge aggregates the features of all its contained nodes, row- and column-level local patterns can be extracted; while when a node aggregates the updated features of its superedge, cross-dimensional contextual semantics are integrated. This bidirectional interaction allows individual cells to retain their original numerical characteristics while also being associated with the global structure. This enables the simultaneous capture of micro-parameter anomalies and macro-operating trends in power equipment analysis scenarios, solving the problem of the separation between local features and global semantics in traditional table learning methods and improving the comprehensiveness of feature mining of table data.
[0042] Furthermore, the step of weightedly fusing the current hyperedge features and the corresponding hyperedge aggregation features to obtain the hyperedge update features corresponding to the current hyperedge includes: The current hyperedge features and the hyperedge aggregate features are subjected to nonlinear transformation, residual connection and layer normalization processing by a preset multilayer perceptron to obtain the corresponding processed hyperedge features and processed hyperedge aggregate features. The processed hyperedge features and the processed hyperedge aggregate features are weighted and fused based on preset weight parameters to obtain the hyperedge update features corresponding to the current hyperedge.
[0043] In this embodiment, the specific process of weighted fusion of the current hyperedge features and the current hyperedge aggregated features is further defined. A multilayer perceptron is introduced in the hyperedge feature update stage for nonlinear transformation, residual connections, and layer normalization, significantly improving the expressive power of higher-order relationships. Specifically, the nonlinear transformation converts the original hyperedge features into a deep representation containing complex nonlinear relationships; residual connections ensure the stability of deep network training and avoid feature degradation caused by gradient vanishing; and layer normalization alleviates the scale differences of hyperedge features, enabling the model to maintain convergence efficiency when aggregating multi-column heterogeneous data, thus improving the efficiency and comprehensiveness of feature mining from tabular data.
[0044] Furthermore, the step of aggregating the hyperedge update features of each current hyperedge to which the current node belongs to obtain the node update features corresponding to the current node includes: Based on the attention mechanism and the preset global parameter vector, the hyperedge update features of each current hyperedge to which the current node belongs are extracted to obtain the corresponding key feature vectors. The global parameter vector is respectively connected with each of the key feature vectors and subjected to residual connection and layer normalization to obtain the corresponding first intermediate feature vectors. By performing nonlinear transformations on each of the first intermediate feature vectors using a pre-defined feedforward neural network, each corresponding second intermediate feature vector is obtained. Each of the first intermediate feature vectors and its corresponding second intermediate feature vector is subjected to residual concatenation and normalization to obtain the corresponding final feature vectors. The final feature vectors are fused to obtain the node update feature corresponding to the current node.
[0045] In this embodiment, the specific process of feature aggregation for updating hyperedge features is further defined. Dynamic weight allocation for node feature updates is achieved through an attention mechanism and a residual-normalization cascade structure. Specifically, the attention mechanism automatically learns the contribution weights of different hyperedges to nodes, addressing the problem of redundant columns interfering with core features in power tables. The global parameter vector serves as a baseline anchor point, preventing attention bias from causing the loss of important features. The multi-level application of residual connections and layer normalization forms a deep feature refinement pipeline, enhancing discriminative features while preserving original information, thus improving the comprehensiveness of feature mining from tabular data.
[0046] In a preferred embodiment, the model architecture of the feature mining model is as follows: Figure 3 As shown, a stacked design is adopted, consisting of multiple HyperGraphTrans layers (similar to the 12-layer structure of BERTbase). The stacked hypergraph encoder is typically designed with 24 layers. Each HyperGraphTrans layer includes three core modules: a node-to-hyperedge attention block, a hyperedge fusion block, and a hyperedge-to-node attention block. These modules execute the feature aggregation iteration method provided in this application once. Therefore, the feature mining model can perform 24 feature aggregation iterations on the input data to generate the final hypergraph dataset. The execution flow of each of the three core modules is as follows: Node-to-hyperedge blocks: Node-to-hyperedge blocks aggregate node features to their respective hyperedges, avoiding positional encoding interference by maintaining row / column arrangement invariance. Node-to-hyperedge blocks are based on multi-head attention, processing each hyperedge... Collect all the node features it contains. and through aggregate functions The processing is performed using the following formula: in, This represents the hyperedge aggregation feature obtained after hyperedge e passes through the (t+1)th layer node to the hyperedge block. This is a predefined hyperedge aggregation function used to aggregate node information to hyperedges. This represents all node features contained in the hyperedge e after the t-th feature aggregation iteration.
[0047] Hyperedge Fusion Block: The hyperedge fusion block uses a multilayer perceptron for nonlinear transformation, introduces residual connections and LayerNorm, and adds dynamic weights to enhance the expressive power of the hyperedge representation, fusing historical and current information. Its formula is as follows: in, This represents the updated feature of the superedge e obtained after passing through the (t+1)th layer of the superedge fusion block. After the t-th feature aggregation iteration, the hyperedge features of hyperedge e are... The hyperedge aggregation feature is obtained after hyperedge e passes through the (t+1)th layer node to the hyperedge block. The value represents the weight, ranging from 0 to 1. MLP is a nonlinear transformation function.
[0048] Hyperedge to Node Block: The hyperedge to node block distributes the updated hyperedge information to nodes through reverse propagation. First, for each node v, the update features of all its hyperedges are collected. And by parameterization The function processes the data and ultimately enables nodes to obtain global context information (table level) and local structure information (row and column level).
[0049] in, Let v be the node update feature obtained after node v passes through the (t+1)th layer of hyperedges to the node block. This is a preset node aggregation function. This represents the update features of all hyperedges belonging to node v during the (t+1)th feature aggregation iteration. LN is a normalization function used for normalization processing. Let I be the global parameter vector to be learned, and let I be the feature representation of the node or hyperedge. This is a multi-head ensemble attention function used to generate the key feature vector corresponding to I; FNN is a feedforward network. Softmax is... The similarity to the keys is converted into a function of probability distribution, which is used to weight and aggregate value vectors. Let i be the key of the attention distribution. Let be the value of the i-th attention distribution.
[0050] In a preferred embodiment, the application process of the feature mining method provided in this application is as follows: 1. Establish a hypergraph model based on the metadata of each business table in the power database and the structural characteristics of each row of data capture table.
[0051] 2. Feature propagation is performed through the structure in the hypergraph encoder, outputting table feature vectors and field feature vectors with hierarchical semantics.
[0052] 3. In the query task, accept natural language queries from users, embed the user's query into a semantic vector, perform multi-table joint matching in the hypergraph feature space, and return the optimal table and fields for subsequent SQL statement generation.
[0053] In summary, the beneficial effects of the embodiments of this application are as follows: 1. Enhance the representational power of structure awareness: By explicitly capturing four structural characteristics of tables through hypergraph modeling: row and column invariance, semantic consistency within rows and columns, higher-order multilateral relations, and hierarchical information organization, the representational power of structure awareness is enhanced.
[0054] 2. Efficient learning mechanism: The model can automatically separate cell, row, column and whole table representations into different semantic spaces. The efficiency is also reflected in the inference complexity. Its attention computation complexity is reduced from O((mn)²·d) of BERT-like methods to O(mnd).
[0055] 3. Task generalization advantage: Due to the compatibility of hypergraphs with different structural properties, the model's robustness to row and column permutations is far superior to serialization methods, while avoiding semantic destruction caused by complete disordering. Furthermore, the model supports table inputs of arbitrary sizes, breaking through the traditional method's 512-token length limit.
[0056] Example 2: like Figure 4 As shown, Embodiment 2 provides a tabular data feature mining system based on a hypergraph neural network, including an acquisition module 10, a hypergraph data construction module 20, a feature mining module 30, and a query module 40; The acquisition module 10 is used to acquire the table data to be processed. The hypergraph data construction module 20 is used to construct a corresponding initial hypergraph dataset based on the table data. The initial hypergraph dataset is a hypergraph data structure, including a node set, a hyperedge set, and an association matrix. Each cell in the table data corresponds one-to-one with each node in the node set, and each row and column in the table data corresponds one-to-one with each hyperedge in the hyperedge set. The feature mining module 30 is used to input the initial hypergraph dataset into a preset feature mining model, so that the feature mining model generates the final hypergraph dataset through several feature aggregation iterations. In each feature aggregation iteration, the features of each current node and the features of each current hyperedge in the current hypergraph dataset are aggregated to generate an updated hypergraph dataset, and the updated hypergraph dataset is subjected to the next feature aggregation iteration. The feature mining model is constructed by a stacked hypergraph encoder, which is a joint architecture of graph neural network and Transformer. The query module 40 is used to perform multi-table joint matching in various hypergraph datasets based on the query text when the user's query text is obtained, and then determine the query result corresponding to the query text.
[0057] In one possible implementation, the hypergraph data construction module 20 constructs a corresponding initial hypergraph dataset based on the tabular data, including: Construct a blank hypergraph space; The data in each cell of the table data is mapped to each node in the hypergraph space to obtain a node set. Each row and column in the table data is mapped to a row hyperedge and a column hyperedge in the hypergraph space, wherein any row hyperedge or column hyperedge contains row-to-row or column-to-row relationships between several nodes. In the hypergraph space, a table-level hyperedge connecting all nodes is generated. By combining the table-level hyperedge, each row hyperedge, and each column hyperedge, a hyperedge set is constructed. Construct the corresponding association matrix based on the membership relationship between each node and each hyperedge; The initial hypergraph dataset is obtained by combining the node set, the hyperedge set, and the association matrix.
[0058] Furthermore, the construction of the corresponding association matrix based on the dependency relationship between each node and each hyperedge includes: Based on the membership relationship between each node and each hyperedge, the initial hypergraph dataset is sparsely encoded to construct the corresponding association matrix. For any current node and current hyperedge, if the current node belongs to the current hyperedge, it is encoded as 1 at the corresponding position in the association matrix; otherwise, it is encoded as 0.
[0059] Furthermore, the table data feature mining method also includes, after constructing and obtaining the hyperedge set, performing semantic initialization on each hyperedge in the hyperedge set according to the content of the table data, specifically: For the table-level super-edge, the token of the table header of the table data is embedded; For each column superedge, the token in the table data corresponding to the column superedge header is embedded; For each row hyperedge, if there is no corresponding semantic information for the row hyperedge in the table data, then the row hyperedge is randomly initialized; otherwise, the text content of all cells in the row corresponding to the row hyperedge is extracted from the table data, and then each text content is converted into a corresponding text vector through BERT vectorization. Finally, the average operation of each text vector is performed and the result is embedded into the row hyperedge.
[0060] In one possible implementation, the feature mining module 30 sequentially aggregates the features of each current node and each current hyperedge in the current hypergraph dataset to generate an updated hypergraph dataset, including: For each current superedge, the current node features of each current node contained in the current superedge are aggregated to obtain the superedge aggregated feature corresponding to the current superedge; then the current superedge feature and the corresponding superedge aggregated feature are weighted and fused to obtain the superedge update feature corresponding to the current superedge. For each current node, the hyperedge update features of each current hyperedge to which the current node belongs are aggregated to obtain the node update features corresponding to the current node; Based on the update features of each hyperedge and each node, feature updates are performed on each current node and each current hyperedge in the current hypergraph dataset to generate the updated hypergraph dataset.
[0061] Furthermore, the step of weightedly fusing the current hyperedge features and the corresponding hyperedge aggregation features to obtain the hyperedge update features corresponding to the current hyperedge includes: The current hyperedge features and the hyperedge aggregate features are subjected to nonlinear transformation, residual connection and layer normalization processing by a preset multilayer perceptron to obtain the corresponding processed hyperedge features and processed hyperedge aggregate features. The processed hyperedge features and the processed hyperedge aggregate features are weighted and fused based on preset weight parameters to obtain the hyperedge update features corresponding to the current hyperedge.
[0062] Furthermore, the step of aggregating the hyperedge update features of each current hyperedge to which the current node belongs to obtain the node update features corresponding to the current node includes: Based on the attention mechanism and the preset global parameter vector, the hyperedge update features of each current hyperedge to which the current node belongs are extracted to obtain the corresponding key feature vectors. The global parameter vector is respectively connected with each of the key feature vectors and subjected to residual connection and layer normalization to obtain the corresponding first intermediate feature vectors. By performing nonlinear transformations on each of the first intermediate feature vectors using a pre-defined feedforward neural network, each corresponding second intermediate feature vector is obtained. Each of the first intermediate feature vectors and its corresponding second intermediate feature vector is subjected to residual concatenation and normalization to obtain the corresponding final feature vectors. The final feature vectors are fused to obtain the node update feature corresponding to the current node.
[0063] This application provides a tabular data feature mining system based on a hypergraph neural network. By mapping tabular data to a hypergraph structure and employing a GNN-Transformer joint architecture to iteratively aggregate features, it fundamentally solves the structural defects of traditional table learning. By mapping the content of the table to a set of nodes and hyperedges in the hypergraph structure, and using hyperedges to explicitly model row / column constraints, the two-dimensional topological semantics of the table are fully preserved, avoiding the destruction of row and column relationships by serialization methods. Then, based on the constructed hypergraph structure, a feature mining model is further used to mine features from the initial hypergraph dataset. By aggregating the features of each node and each hyperedge in each iteration, implicit features that are difficult to directly represent in the original table are fully mined, significantly improving the ability to resolve complex data relationships and enhancing the comprehensiveness of feature mining on tabular data. The final generated hypergraph dataset can directly support cross-table joint queries, providing a structured feature foundation for subsequent tasks such as power NL2SQL.
[0064] For a more detailed explanation of the working principle and procedures of this embodiment, please refer to the relevant description in Embodiment 1.
[0065] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.
Claims
1. A method for feature mining of tabular data based on hypergraph neural networks, characterized in that, include: Retrieve the table data to be processed; The initial hypergraph dataset is constructed based on the table data. The initial hypergraph dataset is a hypergraph data structure, including a node set, a hyperedge set, and an association matrix. Each cell in the table data corresponds one-to-one with each node in the node set, and each row and column in the table data corresponds one-to-one with each hyperedge in the hyperedge set. The initial hypergraph dataset is input into a preset feature mining model so that the feature mining model generates the final hypergraph dataset through several feature aggregation iterations. In each feature aggregation iteration, the features of each current node and the features of each current hyperedge in the current hypergraph dataset are aggregated to generate an updated hypergraph dataset, and the updated hypergraph dataset is subjected to the next feature aggregation iteration. The feature mining model is constructed by a stacked hypergraph encoder, which is a joint architecture of graph neural network and Transformer. When the user's query text is obtained, a multi-table joint matching is performed on each Hypergraph dataset based on the query text to determine the query result corresponding to the query text.
2. The method for feature mining of tabular data based on hypergraph neural networks as described in claim 1, characterized in that, The step of constructing the corresponding initial hypergraph dataset based on the table data includes: Construct a blank hypergraph space; The data in each cell of the table data is mapped to each node in the hypergraph space to obtain a node set. Each row and column in the table data is mapped to a row hyperedge and a column hyperedge in the hypergraph space, wherein any row hyperedge or column hyperedge contains row-to-row or column-to-row relationships between several nodes. In the hypergraph space, a table-level hyperedge connecting all nodes is generated. By combining the table-level hyperedge, each row hyperedge, and each column hyperedge, a hyperedge set is constructed. Construct the corresponding association matrix based on the membership relationship between each node and each hyperedge; The initial hypergraph dataset is obtained by combining the node set, the hyperedge set, and the association matrix.
3. The method for feature mining tabular data based on hypergraph neural networks as described in claim 2, characterized in that, The construction of the corresponding association matrix based on the dependency relationship between each node and each hyperedge includes: Based on the membership relationship between each node and each hyperedge, the initial hypergraph dataset is sparsely encoded to construct the corresponding association matrix. For any current node and current hyperedge, if the current node belongs to the current hyperedge, it is encoded as 1 at the corresponding position in the association matrix; otherwise, it is encoded as 0.
4. The method for feature mining of tabular data based on hypergraph neural networks as described in claim 2, characterized in that, The table data feature mining method further includes, after constructing and obtaining the hyperedge set, performing semantic initialization on each hyperedge in the hyperedge set according to the content of the table data, specifically: For the table-level super-edge, the token of the table header of the table data is embedded; For each column superedge, the token in the table data corresponding to the column superedge header is embedded; For each row hyperedge, if there is no corresponding semantic information for the row hyperedge in the table data, then the row hyperedge is randomly initialized; otherwise, the text content of all cells in the row corresponding to the row hyperedge is extracted from the table data, and then each text content is converted into a corresponding text vector through BERT vectorization. Finally, the average operation of each text vector is performed and the result is embedded into the row hyperedge.
5. The method for feature mining of tabular data based on hypergraph neural networks as described in claim 1, characterized in that, The step of sequentially aggregating the features of each current node and each current hyperedge in the current hypergraph dataset to generate an updated hypergraph dataset includes: For each current superedge, the current node features of each current node contained in the current superedge are aggregated to obtain the superedge aggregated feature corresponding to the current superedge; then the current superedge feature and the corresponding superedge aggregated feature are weighted and fused to obtain the superedge update feature corresponding to the current superedge. For each current node, the hyperedge update features of each current hyperedge to which the current node belongs are aggregated to obtain the node update features corresponding to the current node; Based on the update features of each hyperedge and each node, feature updates are performed on each current node and each current hyperedge in the current hypergraph dataset to generate the updated hypergraph dataset.
6. The method for feature mining tabular data based on a hypergraph neural network as described in claim 5, characterized in that, The step of weightedly fusing the current hyperedge features and the corresponding hyperedge aggregation features to obtain the hyperedge update features corresponding to the current hyperedge includes: The current hyperedge features and the hyperedge aggregate features are subjected to nonlinear transformation, residual connection and layer normalization processing by a preset multilayer perceptron to obtain the corresponding processed hyperedge features and processed hyperedge aggregate features. The processed hyperedge features and the processed hyperedge aggregate features are weighted and fused based on preset weight parameters to obtain the hyperedge update features corresponding to the current hyperedge.
7. The method for feature mining of tabular data based on hypergraph neural networks as described in claim 5, characterized in that, The step of aggregating the hyperedge update features of each current hyperedge to which the current node belongs to obtain the node update features corresponding to the current node includes: Based on the attention mechanism and the preset global parameter vector, the hyperedge update features of each current hyperedge to which the current node belongs are extracted to obtain the corresponding key feature vectors. The global parameter vector is respectively connected with each of the key feature vectors and subjected to residual connection and layer normalization to obtain the corresponding first intermediate feature vectors. By performing nonlinear transformations on each of the first intermediate feature vectors using a pre-defined feedforward neural network, each corresponding second intermediate feature vector is obtained. Each of the first intermediate feature vectors and its corresponding second intermediate feature vector is subjected to residual concatenation and normalization to obtain the corresponding final feature vectors. The final feature vectors are fused to obtain the node update feature corresponding to the current node.
8. A system for feature mining tabular data based on hypergraph neural networks, characterized in that, It includes an acquisition module, a hypergraph data construction module, a feature mining module, and a query module; The acquisition module is used to acquire the table data to be processed; The hypergraph data construction module is used to construct a corresponding initial hypergraph dataset based on the table data. The initial hypergraph dataset is a hypergraph data structure, including a node set, a hyperedge set, and an association matrix. Each cell in the table data corresponds one-to-one with each node in the node set, and each row and column in the table data corresponds one-to-one with each hyperedge in the hyperedge set. The feature mining module is used to input the initial hypergraph dataset into a preset feature mining model, so that the feature mining model generates the final hypergraph dataset through several feature aggregation iterations. In each feature aggregation iteration, the features of each current node and each current hyperedge in the current hypergraph dataset are aggregated sequentially to generate an updated hypergraph dataset, and the updated hypergraph dataset is subjected to the next feature aggregation iteration. The feature mining model is constructed by a stacked hypergraph encoder, which is a joint architecture of graph neural network and Transformer. The query module is used to perform multi-table joint matching in various hypergraph datasets based on the query text when the user's query text is obtained, so as to determine the query result corresponding to the query text.
9. The tabular data feature mining system based on a hypergraph neural network as described in claim 8, characterized in that, The hypergraph data construction module constructs the corresponding initial hypergraph dataset based on the tabular data, including: Construct a blank hypergraph space; The data in each cell of the table data is mapped to each node in the hypergraph space to obtain a node set. Each row and column in the table data is mapped to a row hyperedge and a column hyperedge in the hypergraph space, wherein any row hyperedge or column hyperedge contains row-to-row or column-to-row relationships between several nodes. In the hypergraph space, a table-level hyperedge connecting all nodes is generated. By combining the table-level hyperedge, each row hyperedge, and each column hyperedge, a hyperedge set is constructed. Construct the corresponding association matrix based on the membership relationship between each node and each hyperedge; The initial hypergraph dataset is obtained by combining the node set, the hyperedge set, and the association matrix.
10. The tabular data feature mining system based on a hypergraph neural network as described in claim 8, characterized in that, The feature mining module sequentially aggregates the features of each current node and each current hyperedge in the current hypergraph dataset to generate an updated hypergraph dataset, including: For each current superedge, the current node features of each current node contained in the current superedge are aggregated to obtain the superedge aggregated feature corresponding to the current superedge; then the current superedge feature and the corresponding superedge aggregated feature are weighted and fused to obtain the superedge update feature corresponding to the current superedge. For each current node, the hyperedge update features of each current hyperedge to which the current node belongs are aggregated to obtain the node update features corresponding to the current node; Based on the update features of each hyperedge and each node, feature updates are performed on each current node and each current hyperedge in the current hypergraph dataset to generate the updated hypergraph dataset.
Citation Information
Patent Citations
Data processing method, device and electronic equipment
CN111680159A
Network fault prediction method and device based on self-supervised unwrapping hypergraph attention
CN115174421A
Third-party library recommendation method and device based on high-order collaborative filtering
CN116821521A
Entity relationship extraction method fusing semantic information and syntactic information
CN119128154A
Semi-supervised cross-modal hash method based on hypergraph attention convolution
CN119785178A