Research Article

Multiview Translation Learning for Knowledge Graph Embedding

Algorithm 2

Learning multiview graph embedding.
Input: A set of Knowledge Graph and Subgraphs , vector dimension k, global-view margin , global-view learning rate .
Output: A set of generated vector spaces .
(1)  ⟵ Initialize empty set for vector spaces
(2) fordo
(3)  ifthen
(4)    ⟵ global-view margin , global-view learning rate
(5)  else
(6)    ⟵ Randomly initialize local-view margin and learning rate
(7)  end if
(8)   ⟵ All entities and relations in respectively
(9)   ⟵ Initialize uniform (, ) for each ,
(10)  loop
(11)   //Sample a minibatch of size b
(12)    //Initialize the set of pairs of triplets
(13)   fordo
(14)   //Sample corrupted triplet
(15)   
(16)   end for
(17)   Update vectors w.r.t
(18)     end loop
(19)   Δ ⟵ ()//Trained parameters are saved as one vector space
(20)    ⟵  //Add vector space to sets
(21)     end for