# Combining Semantic and Structural Features for Reasoning on Patent Knowledge Graphs
## 2 Methodology
### Patent Knowledge Graph Reasoning Method Based on Graph Structure Feature Learning
Within this, \(\theta_{m}\) aggregates these two feature representations into a new feature representation, \(W^{l}\) signifies the weight matrix of the \(l\)-th layer, which is used for learning the transformation of node features, as shown in Equation (2):  
\[\theta_{m}\Big{(}h_{i}^{l},h_{j}^{l}\Big{)}=W^{l}h_{j}^{l} \tag{2}\]  
The definition of the information propagation model concerning the entity variable within a multi-relational graph is based on the GCN model, as shown in Equation (3):  
\[h_{i}^{(l+1)}=\sigma\Bigg{(}\sum_{r\in R}\sum_{j\in N_{i}^{r}}\frac{1}{c_{i,r }}W_{r}^{l}h_{j}^{l}+W_{0}^{l}h_{i}^{l}\Bigg{)} \tag{3}\]  
To compute each entity in the knowledge graph related to the relationship, the parameter \(N_{i}^{r}\) is denoted as the index set of neighboring nodes that have a relationship \(r\in R\) with the \(i\)-th node in the knowledge graph. \(c_{i,r}\) is the normalization constant for the relationship \(r\) and the node pair (\(i\),\(j\)), \(W_{r}\) is the weight matrix associated with the relationship type \(r\), and \(\sigma(. )\) employs the ReLU activation function. The detailed method of information aggregation is illustrated in Figure 3:After embedding structural knowledge into the graph, a multi-layer neural network is added to the entire knowledge graph reasoning model, and the obtained feature information is used as the input for the decoder for reasoning purposes. By using negative sampling, feedback is provided to the information in the hidden layer for existing correct relationships during training. Negative and positive samples are processed using a random selection mode and negative sampling of \(\omega\). The result of the loss function, optimized through cross-entropy, is shown in Equation (4), where \(\omega\) acts as a parameter controlling the frequency of negative sampling. The normalization factor \(\frac{1}{(1+\omega)\left|\frac{\wedge}{\epsilon}\right|}\) uses \(\left|\frac{\wedge}{\epsilon}\right|\) to standardize the loss, where \(\left|\frac{\wedge}{\epsilon}\right|\) represents the size of the positive sample set, \((s,r,o,y)\) for missing triples, \(T\) for all sets of missing triples, \(s\) as the subject entity, \(r\) as the relation, \(o\) as the object entity, \(y\) as a label indicating the existence of the triple, \(l\) as the optimized loss value, \(f\) as the model's predicted probability of the existence of the triple, and \(sigma\) as the output processed through the activation function. \[ \begin{split}& l=-\frac{1}{(1+\omega)\left|\frac{\wedge}{\epsilon} \right|}\sum\limits_{(s,r,o,y)\in T}y\log(sigma(f(s,r,o)))+\\ &(1-y)\log(1-sigma(f(s,r,o)))\end{split}  \tag{4}\]  
As illustrated in Figure 4, the architecture of the graph convolutional network model for knowledge graph relation reasoning consists of a convolutional information propagation network and a scoring model. 1. Acquiring Structural Information in Graph Neural Networks: Utilizing the theory of isomorphic knowledge graph mapping, structural information from the knowledge graph can be extracted. The process begins by identifying the target head and tail entities, incorporating their associated nodes, entities, and relationships as the structural information of the graph. In detail, information from the K-hop neighborhood of the target nodes \(u\) and \(v\) is concurrently obtained, denoted as \(N_{k(v)}\) and \(N_{k(u)}\), respectively. The intersection of \(N_{k(v)}\) and \(N_{k(u)}\) forms the structure from which the corresponding structural information is derived. Figure 3: Schematic diagram of converting graph text into vectors. After acquiring the graph structure, entities and triples within the structure surrounding \(u\) and \(v\) are labeled with information and the shortest path length is denoted as \((d(i,u),d(i,v))\), where \(d(i,u)\) represents the distance between nodes \(i\) and \(u\), and \(d(i,v)\) signifies the relative positions of other nodes to the target node.