Convolutional enabling hierarchical Tucker neural network knowledge representation learning method
Through the combination of hierarchical Tucker decomposition and convolutional neural network, the interactive information between entities and relationships in the knowledge graph is captured, solving the problems of low computational efficiency and data sparsity of traditional representation methods, and achieving better knowledge representation learning effects.
Patent Information
- Application Number
- CN202310149290.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional knowledge representation methods such as one-hot representation have problems of low computational efficiency and data sparsity. They cannot effectively capture the implicit semantic information between entities and relationships in the knowledge graph, and models based on Tucker decomposition ignore directed properties and implicit semantic information.
A knowledge representation learning model H-TuckER based on hierarchical Tucker decomposition is proposed, and combined with the convolutional neural network to design the convolution-empowered hierarchical Tucker neural network model CHTNN. By introducing transfer tensors and convolution operations, it captures the relationship between entities and relationships. interactive information, reduce model parameters, and improve representation capabilities.
In the link prediction task, the H-TuckER model performs better than the TuckER model. The CHTNN model is superior to existing models in parameter controllability and prediction capabilities, effectively improving the application effect of knowledge representation learning.
Smart Images

Figure CN118536582A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing, and mainly to the application field of knowledge representation learning which is closely related to knowledge graph technology. Specifically, the present invention provides a convolution-enabled hierarchical Tucker neural network knowledge representation learning method. Background Art
[0002] The knowledge base is an intelligent information storage system formed by extracting, restructuring and integrating logical semantic information fragments generated in human production activities. It contains a large amount of basic facts, logical rules and other vertical field information. It can be regarded as a collection of fragmented texts of human natural language. The knowledge base can empower artificial intelligence tasks that require a lot of logical reasoning and situational judgment. It has been widely used in knowledge-driven downstream tasks that require personalized recommendations, such as advertising recommendations, question-answering systems, and intelligent robots.
[0003] At present, many large-scale knowledge bases with excellent practical performance have been built at home and abroad. Wikipedia is the world's largest online encyclopedia based on the Wiki Project, which contains more than 46 million data items. The information entries can be queried and retrieved using the SPARQL method. Freebase is a creative sharing website similar to Wikipedia. All content is added by users, and the entries are stored in a structured data format. DBpedia builds an ontology library through crowdsourcing. It is a special application example of the semantic web. It uses semantic technology to establish information associations with Wikipedia and extract structured semantic data from it, thereby enriching the application functions of Wikipedia. YAGO is one of the largest link databases in the world. It was released by the Max Planck Institute in Germany. It contains about 2 billion triple facts and 64 million entities. It mainly integrates three large knowledge databases: Wikipedia, WordNet and Geonames. WordNet is a cognitive linguistic English vocabulary organized and constructed by the psycholinguistic research team of Princeton University. Nouns, verbs, adjectives and adverbs are stored in this database in the form of synonym sets, which contains a total of 117,000 synonym sets. CN-DBpedia is a large-scale general domain knowledge graph developed and maintained by the Knowledge Factory Laboratory of Fudan University, covering tens of millions of entities and hundreds of millions of relationships. The "Bollatu" knowledge production platform is an automated knowledge graph construction platform developed by the Knowledge Engineering Laboratory of Tsinghua University. The platform functions cover the entire knowledge engineering life cycle, including knowledge modeling, knowledge acquisition, knowledge fusion, knowledge management, etc., and supports deep semantic analysis and processing of large-scale heterogeneous encyclopedias and domain texts on the Internet.
[0004] In the process of knowledge base construction, a fact is usually represented as a triple structure. Entities represent specific things or some abstract concepts, while relations are the objective connections between subject entities and object entities. All fact data in a knowledge base are stored in this triple structure. Taking the fact that "Changsha is the capital of Hunan" as an example, this information is stored in the knowledge base as (Changsha, is... capital, Hunan), where Changsha is called the head entity (also called subject), the capital is called the tail entity (also called object), and is... capital is called the relation. Linking many fact triples to each other forms a knowledge graph containing a large amount of semantic information. The knowledge graph can be regarded as a semantic network that links a large amount of structured fact data. In a knowledge graph, the nodes representing entity data are connected to each other through several relationship edges. A point-to-point semantic structure is a fact contained in the knowledge graph.
[0005] Traditional knowledge representation methods mostly adopt the form of one-hot representation, that is, a fact is represented as a long vector, in which the data of other dimensions are all zero except for the data of a specific dimension. One-hot representation has the following two main disadvantages: first, the dimension of the long vector will expand with the increase of the length of the text being expressed, which is not suitable for text representation with a huge vocabulary. Secondly, any two words exist relatively isolated, and there is no connection between words, and it is impossible to express the association information between words at the semantic level. In short, the structural characteristics of one-hot representation vectors, in which a large number of dimensions are filled with zeros and the vectors are independent of each other, will increase the sparsity of the representation vector and reduce the computational efficiency, while losing a large amount of implicit semantic information contained in words and sentences.
[0006] In order to solve the problems of low computational efficiency and data sparsity, knowledge representation learning (KRL) technology has been widely studied and applied. Knowledge representation learning is based on the idea of distributed representation. It aims to map entities and relationships into a low-dimensional dense continuous vector space by optimizing a well-defined objective function. It uses the basic assumption that the distance between two semantically similar objects is also close to predict and complete unknown or missing entities in the graph. Due to the scarcity of facts in knowledge graphs, graphs are often incomplete. Link prediction and knowledge graph completion tasks infer and predict missing or unknown facts based on existing facts through knowledge representation learning methods, which can efficiently predict and complete missing or unknown facts in knowledge graphs. Summary of the invention
[0007] The first task is knowledge representation learning based on hierarchical Tucker decomposition. Tensor decomposition is a high-order extension of low-dimensional matrix decomposition technology. In essence, it is an operation to reduce the dimensionality of data in a higher dimension. Compared with the traditional singular value decomposition (SVD) and principal component analysis (PCA) performed on two-dimensional matrices, the high-order nature of its decomposition dimension can more completely retain the structural information of the data. TuckER is the latest knowledge representation learning model based on tensor decomposition, and it has achieved the most advanced prediction performance in link prediction tasks. However, many linear models represented by knowledge representation models based on Tucker decomposition usually ignore the directed nature of facts in knowledge graphs, and the parameter sharing mechanism based on multi-task learning often ignores the implicit semantic information between entities and relationships. In order to solve these problems, the present invention proposes a tensor decomposition model (H-TuckER) based on a hierarchical format, and its feature extraction is derived from the subspace nested nature of singular value decomposition. By restricting the exchangeable properties of the knowledge representation model structure through subspace nesting, and by introducing two transfer tensors, the model can capture the semantics between entities and entities, as well as the deeper interaction information between entities and relations. The knowledge representation learning model based on hierarchical Tucker decomposition has achieved better results than the TuckER model in link prediction tasks, and theoretically analyzed the full expression properties of the hierarchical Tucker decomposition model and its relationship with the original TuckER model.
[0008] The second task is to integrate the knowledge representation learning of convolutional neural networks on the basis of hierarchical Tucker decomposition. The main feature of convolutional neural networks is to extract the local features of adjacent data in time and space in a sparsely connected manner, and then integrate them into a whole through full connection and share filter weights at the same time. This edge detection and reintegration method can dig deeper into the feature information of the data and greatly reduce the training parameters. Combined with the knowledge representation learning task of convolutional neural networks, the main focus is on how to reduce the parameters used on the basis of greatly improving the expressive ability of the model to avoid model overfitting, thereby effectively improving the application effect of knowledge representation learning in downstream tasks. The present invention designs a convolution-powered hierarchical tucker neural network model (CHTNN). The CHTNN model follows the basic structure of the H-TuckER model, introduces convolution and nonlinear transformation on its basis, and considers the local correlation between adjacent nodes in the knowledge graph and the overall correlation characteristics of the graph. The model is specifically divided into one-dimensional convolution and two-dimensional convolution, and two different model structures are designed for the one-dimensional and two-dimensional cases respectively. Compared with the current optimal model, better experimental results are obtained in the link prediction task, and the good prediction ability and parameter controllability of the model are proved.
[0009] The CHTNN model uses the relation and entity vectors with fixed embedding dimensions as the input of the model. Before convolution, it is often necessary to integrate the input relation and entity vectors into a one-dimensional vector or a two-dimensional matrix by concatenation or outer product according to the dimension of the convolution. This is a process of reshaping the input data. The reshaped vector or matrix is called the convolution space in this article. For convolution, the size and number of filters must be fixed first. The size corresponds to the dimension of the filter, and the number corresponds to the number of feature images after convolution. The dimension of the filter is generally smaller than the dimension of the convolution space. During the convolution process, the convolution filter will perform convolution operations on all subspaces in the convolution space one by one according to the size and step size of the sliding window, and store the results in the corresponding position of the corresponding feature image. Since several feature images will be generated after the convolution is completed, it is necessary to map them into a one-dimensional vector with a dimension equal to the embedding size through a fully connected matrix in the projection layer, and then perform dot product operations with the object entities one by one to obtain a series of triplet scores, and finally pass the sigmoid activation function to obtain the final prediction result. The information learned is used to update all training parameters in the model through the back-propagation algorithm until the optimal solution of the model is reached. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 Overall architecture diagram of the H-TuckER model in this invention
[0011] Figure 2 Pseudocode description of the H-TuckER model algorithm in the present invention
[0012] Figure 3 The overall architecture diagram of the CHTNN model in this invention
[0013] Figure 4 Illustration of the hierarchical Tucker neural network model enabled by one-dimensional convolution in the present invention
[0014] Figure 5 Illustration of the hierarchical Tucker neural network model enabled by two-dimensional convolution in the present invention DETAILED DESCRIPTION
[0015] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0016] For the first task, the overall architecture is as follows Figure 1 As shown, the specific implementation method is as follows:
[0017] For the first task, Figure 2 The algorithm pseudocode description of the hierarchical Tucker decomposition model is given. First, each fact in the knowledge base fact triple data set is renumbered and reorganized according to the index order. The reorganized entity set is defined as E, the relationship set is defined as R, and other hyperparameters in the model are initialized. In order to avoid the model losing the nonlinear feature extraction ability and the gradient vanishing problem in back propagation, and to ensure that the variance of each layer of network input and output is the same, we use the xavier_normal() function that obeys the normal distribution to initialize the entity set E and the relationship set R respectively. The np.random.uniform() function is used to randomly sample the shared sheets. The adam algorithm is used to optimize the experimental parameters. The model is called for training. Each training extracts a set of entity-relationship pairs from the entity set E and the relationship set R. First, the entities are batch normalized, and then the correct fact triple set is divided into n sample batches of size 128, defined as, and the triple training set is assigned to empty. Then, for each set of training samples in the sample batch, the corresponding inverse relationship training samples are generated, and the two pairs of training samples are put into the training set together. After traversing all the fact triplets in the entire sample batch, the training set contains all the positive samples in this batch and their corresponding inverse relationship training samples. Finally, the predicted value is scored and the model parameters are updated by minimizing the Bernoulli non-negative log-likelihood loss function.
[0018] For the second task, the overall architecture is as follows Figure 3 As shown, the specific implementation method is as follows:
[0019] We propose two convolutional space construction methods, outer product pooling and vector concatenation, to adapt the hierarchical Tucker neural network model driven by knowledge representation learning tasks and fused with one-dimensional convolution. The main idea of applying outer product pooling is that the outer product operation between vectors can greatly expand the entity relationship hidden information contained in the convolution space, but this also causes the matrix dimension after the outer product to be too large, which consumes a lot of computing resources. Therefore, under the premise of compressing the matrix size while ensuring that most of the information is not lost, the maximum pooling technology is used to ignore some irrelevant data such as zero or negative values in the outer product matrix to compress the matrix and ensure the maximum integrity of the information. The main idea of applying vector concatenation is that compared with complex data such as images and speech, simple one-dimensional language sequence data may achieve better results using a simple convolutional space construction scheme. On the one hand, the vector concatenation method can effectively reduce the training cost of the model, and on the other hand, the convolution space obtained after concatenation retains the basic information of the entity and relationship itself to a certain extent. First, the system trains the model in a multi-task learning manner, and inputs the corresponding one-dimensional vectors in the entity and relationship matrix into the convolution layer in the network through indexing. Then, before the convolution, the convolution space is reorganized by two schemes: outer product pooling and splicing. The main step of outer product pooling is to first perform the outer product of the input vector to obtain an outer product matrix, and then compress the outer product matrix proportionally into a small matrix through pooling technology, and then vectorize the matrix to obtain the final convolution space ("image"). The main step of vector splicing is to integrate the two input vectors into a vector in an end-to-end manner, which is the convolution space. After the convolution space is constructed, it is convolved with the convolution filter ω to obtain several feature images. The feature images are converted into nonlinear features after linear rectification and output. Secondly, in the projection layer mapping matrix, the feature image is mapped into a feature vector equal to the dimension of the object entity. The feature vector is dot-producted with all the object entities in the entity matrix to obtain a preliminary rating vector. Finally, the final rating is obtained after processing with the sigmoid function. The final prediction result is generated by sorting all the ratings according to specific rules. The model architecture based on one-dimensional convolution is as follows Figure 4 .
[0020] We use two convolution filter construction methods, hypernetwork mapping and fixed parameter filtering, to adapt the hierarchical Tucker neural network model driven by knowledge representation learning tasks and fused with two-dimensional convolution. The main idea of applying hypernetwork mapping is that for traditional fixed parameter filters, their construction methods often do not take into account the hidden correlation between relations and entities. Since the main function of filters is to screen and extract features from input data, we believe that it is crucial to extract network features in two-dimensional convolution by strongly including filter components related to relational entities in filters. Therefore, we use a mapping tensor, namely a hypernetwork, to co-project the input relation and entity vectors into convolution filters specifically related to relational entities. The second convolution filter construction uses the traditional fixed parameter filtering method, which is in contrast to the hypernetwork mapping. First, from the perspective of single-instance input, the initial vector representation of entities and relations is obtained from the entity and relation matrices according to the index, and it is input into the convolution layer to be constructed into a two-dimensional matrix, namely the convolution space, by the outer product method. Then the convolution filter is constructed by hyperparameter mapping and fixed parameter filtering. The main step of hyperparameter mapping is to define a hyperparameter network H as the main training target in the process of convolution filter construction, convert the input relationship and entity vectors into several one-dimensional convolution filter vectors through the mapping of the hyperparameter network, and then convert the filter vector into several matrix forms through inverse quantization. Fixed parameter filtering only needs to define a filter matrix with fixed length and number. After the convolution filter is constructed, it is convolved with the convolution space "image" to obtain several feature images. The feature images are converted into nonlinear features after linear rectification and output. Secondly, in the projection layer mapping matrix, the feature image is mapped into a feature vector equal to the dimension of the object entity. The feature vector is dot-producted with all object entities in the entity matrix to obtain a preliminary rating vector. Finally, the final rating is obtained after processing with the sigmoid function. The final prediction result is generated by sorting all ratings according to specific rules. The model architecture based on two-dimensional convolution is as follows: Figure 5 .
[0021] Obviously, the described embodiment is only one possible embodiment of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection of the present invention.
Claims
1. We designed a new knowledge representation learning model based on hierarchical Tucker decomposition (H-TuckER), which effectively describes the directed nature of fact triples in the knowledge graph using the subspace embedding method, and fully mines the implicit semantics between entity relationships using two-level shared tensors. We theoretically prove the full expressiveness of the knowledge representation learning model based on hierarchical Tucker decomposition and provide boundaries for the entity and relationship embedding dimensions for full expressiveness, as well as the intrinsic connection with the TuckER model. Specific implementation steps of the algorithm: Use np.random.uniform() function to randomly sample shared sheets. Use adam algorithm to optimize experimental parameters. Call the model for training. Each training extracts a set of entity-relation pairs from entity set E and relationship set R. First, batch normalize the entities, then divide the set of correct fact triples into n sample batches of size 128, and define them as , and assign the triple training set to be empty. Then, for each set of training samples in the sample batch, generate its corresponding inverse relationship training samples, and put the two pairs of training samples into the training set together. After traversing all fact triples in the entire sample batch, the training set contains all positive samples in this batch and their corresponding inverse relationship training samples. Finally, score the predicted value and update the model parameters by minimizing the Bernoulli non-negative log-likelihood loss function.
2. A convolution powered hierarchical Tucker neural network (CHTNN) model is designed. The CHTNN model follows the basic structure of the H-TuckER model, introduces convolution and nonlinear transformation on its basis, and takes into account the local correlation between adjacent nodes in the knowledge graph and the overall correlation characteristics of the graph. Specifically, CHTNN is composed of two types of sub-model structures, namely one-dimensional convolution structure and two-dimensional convolution structure. For the one-dimensional convolution structure, considering the impact of the convolution space on the prediction performance, we use two convolution space construction methods, splicing and outer product pooling, and compare the impact of these two space construction methods on the prediction performance of the one-dimensional convolution model through experiments. For the two-dimensional convolution structure, the construction of the convolution space is often more reasonable using the vector outer product. Considering the impact of the filter structure on the model performance, we use two schemes, hyperparameter mapping and fixed parameter filtering, and compare the impact of these two filter learning schemes on the model prediction performance through experiments. The CHTNN model uses the relation and entity vectors with fixed embedding dimensions as the input of the model. Before convolution, it is often necessary to integrate the input relation and entity vectors into a one-dimensional vector or a two-dimensional matrix by concatenation or outer product according to the dimension of the convolution. This is a process of reshaping the input data. The reshaped vector or matrix is called the convolution space in this article. For convolution, the size and number of filters must be fixed first. The size corresponds to the dimension of the filter, and the number corresponds to the number of feature images after convolution. The dimension of the filter is generally smaller than the dimension of the convolution space. During the convolution process, the convolution filter will perform convolution operations on all subspaces in the convolution space one by one according to the size and step size of the sliding window, and store the results in the corresponding position of the corresponding feature image. Since several feature images will be generated after the convolution is completed, it is necessary to map them into a one-dimensional vector with a dimension equal to the embedding size through a fully connected matrix in the projection layer, and then perform dot product operations with the object entities one by one to obtain a series of triplet scores, and finally pass the sigmoid activation function to obtain the final prediction result. The information learned is used to update all training parameters in the model through the back-propagation algorithm until the optimal solution of the model is reached.
3. The knowledge representation learning method based on hierarchical Tucker decomposition according to claim 1, characterized in that: The subspace-embedded structure can effectively express the directionality of facts in the knowledge graph. At the same time, the multi-task sharing mechanism based on two core tensors can simultaneously capture the implicit semantic information between subject and object entities and between entity relationships.
4. The hierarchical Tucker neural network method based on convolutional empowerment according to claim 2, characterized in that: While introducing convolution and nonlinear transformation, the local correlation between adjacent nodes in the knowledge graph and the overall correlation characteristics of the graph are taken into account, thereby greatly improving the model's ability to express complex factual information.
Citation Information
Cited By
Transportation business quick response processing system based on large language model technology
CN119274350A
