# A Knowledge Graph Embedding Model Based on Cyclic Consistency--Cyclic CKGE
## 4 Method
### The Knowledge Graph Embedding Model Is Constructed  
According to the cyclic consistency and ConvE model, a new convolutional neural network model is constructed in this paper. Specifically, for semantic matching tasks, the  
Figure 3: Cyclic consistency generation adversarial network diagram. Figure 2: Cyclic consistency of the transformation process. resulting entities should be consistent with one-to-one mapping constraints. The initial measure of similarity follows a rule from one to many. The correspondence with the highest score can be treated as an input value, and each feature can correspond to multiple features as shown in Figure 4a. Therefore, a circular consistency policy is introduced to encourage one-to-one matching. Similar to the process of closest mutual matching between images, the association relationship between the two feature representations is estimated to impose their one-to-one matching constraints, and the associations p\(\rightarrow\)q and p\(\leftarrow\)q are calculated, as shown in Figure 4b. Each initial triplet in Figure 4 contains all pairs of one-way fractions from the original triplet to the target triplet. Feature representation p can match multiple features. The circular consistency constraint is used to encourage one-to-one matching in Figure 4b. In this paper, a convolutional and fully coupled neural network connection prediction model is established. The main feature of the model is that the scores are determined by embedding two-dimensional convolution. Formally, the evaluation function is defined as shown in Formula (4). \(\mathbf{r}_{r}\in\mathbb{R}^{k}\) is a relational parameter dependent on r, and \(\mathbf{e}_{h}\) and \(\mathbf{r}_{r}\) represent two-dimensional reconstructions of \(\mathbf{e}_{h}\) and \(\mathbf{r}_{r}\), respectively: if \(\mathbf{e}_{h},\mathbf{r}_{r}\in\mathbb{R}^{k}\), \(\mathbf{e}_{h},\mathbf{r}_{r}\in\mathbb{R}^{k_{w}\times k_{h}}\), where \(\mathrm{k}=\mathbf{k}_{w}\times k_{h}\). \[\Psi_{r}(\mathbf{e}_{h},\mathbf{e}_{t})=\mathrm{f}\big{(}\mathrm{vec}\big{(} \mathrm{f}\big{(}[\mathbf{e}_{h},\mathbf{r}_{r}]^{*}\omega\big{)}\big{)} \big{)}\mathrm{W}\big{)}\mathbf{e}_{t} \tag{4}\]  
In the forward transfer process, the model performs a row vector search operation in two embedded matrices; one is the entity matrix, referred to as \(\mathrm{E}^{|\epsilon|\times\mathrm{k}}\), and the other is the relation matrix, denoted as \(\mathrm{R}^{|\mathrm{R}|\times\mathrm{k}}\), where k and k' are the embedded dimensions of entities and relationships, and \(|\epsilon\mid\) and \(|\mathrm{R}\mid\) represent the number of entities and relationships. The model then connects \(\mathbf{e}_{h}\) and \(\mathbf{r}_{r}\) and feeds them as inputs into a two-dimensional convolution layer with filter \(\omega\). This layer returns a feature mapping tensor \(\tau\in\mathbb{R}^{c\times\mathrm{m}\times\mathrm{n}}\), where c is the number of 2D feature mappings of dimension m and n. The tensor \(\tau\) is then reshaped into the vector \(\mathrm{vec}(\tau)\in\mathbb{R}^{\mathrm{cmn}}\), which is then projected into the K-dimensional space using a linear transformation with the matrix \(\mathrm{W}\in\mathbb{R}^{\mathrm{cmn}\times\mathrm{k}}\) and matched to the embedded object \(\mathbf{e}_{\circ}\). With the inner product, the parameters and matrix W of the convolution filter are independent of the parameters of entity s and o and the r relationship. To train the model parameters, the activation function applies the logarithmic sigmoid function \(\sigma(. )\), or \(\mathrm{p}=\sigma(\Psi_{r}(\mathbf{e}_{s},\mathbf{e}_{\circ}))\), and minimizes the following binary cross entropy loss, as shown in Formula (5). Where t is the label vector, and the dimension is \(\mathbb{R}^{|\mathrm{x}|}\) for 1-1 scores and \(\mathbb{R}^{1\times\mathrm{N}}\) for 1-N scores. The elements of vector t have relation 1; otherwise, they are 0.