* [34] E. Jiménez-Ruiz, B. Cuenca Grau, Y. Zhou, and I. Horrocks.  Large-scale Interactive Ontology Matching: Algorithms and Implementation.  In 20th European Conference on Artificial Intelligence (ECAI), pages 444–449, 2012.
  * [35] E. Jiménez-Ruiz, B. C. Grau, I. Horrocks, and R. B. Llavori.  Logic-based assessment of the compatibility of UMLS ontology sources.  J. Biomed. Semant., 2(S-1):S2, 2011.
  * [36] R. Kadlec, O. Bajgar, and J. Kleindienst.  Knowledge base completion: Baselines strike back.  In P. Blunsom, A. Bordes, K. Cho, S. B. Cohen, C. Dyer, E. Grefenstette, K. M. Hermann, L. Rimell, J. Weston, and S. Yih, editors, Proceedings of the 2nd Workshop on Representation Learning for NLP, Rep4NLP@ACL 2017, Vancouver, Canada, August 3, 2017, pages 69–74. Association for Computational Linguistics, 2017.
  * [37] S. Kim, E. E. Bolton, and S. H. Bryant.  Similar compounds versus similar conformers: complementarity between PubChem 2-D and 3-D neighboring sets.  Journal of Cheminformatics, 8(1):62, Nov 2016.
  * [38] S. Kim, J. Chen, T. Cheng, A. Gindulyte, J. He, S. He, Q. Li, B. A. Shoemaker, P. A. Thiessen, B. Yu, L. Zaslavsky, J. Zhang, and E. E. Bolton.  PubChem 2019 update: improved access to chemical data.  Nucleic Acids Research, 47(D1):D1102–D1109, 10 2018.
  * [39] D. P. Kingma and J. Ba.  Adam: A method for stochastic optimization.  In Y. Bengio and Y. LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
  * [40] M. Kulmanov, W. Liu-Wei, Y. Yan, and R. Hoehndorf.  EL embeddings: Geometric construction of models for the description logic EL++.  In S. Kraus, editor, Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 6103–6109. ijcai.org, 2019.
  * [41] C. LaLone, D. Villeneuve, H. Helgen, and G. Ankley.  Sequence alignment to predict across-species susceptibility.  SETAC Europe, Basel, SWITZERLAND, May 11 - 15,, 2014.
  * [42] M. lare (Skolelaboratoriet i realfag ved Universitetet i Bergen).  Smdyr i ferskvann.  Accessed 11.06.2020.
  * [43] F. Lécué and J. Wu.  Semantic explanations of predictions.  CoRR, abs/1805.10587, 2018.
  * [44] J. Lehmann, R. Isele, M. Jakob, A. Jentzsch, D. Kontokostas, P. N. Mendes, S. Hellmann, M. Morsey, P. van Kleef, S. Auer, and C. Bizer.  Dbpedia - A large-scale, multilingual knowledge base extracted from wikipedia.  Semantic Web, 6(2):167–195, 2015.
  * [45] V. I. Levenshtein.  Binary Codes Capable of Correcting Deletions, Insertions and Reversals.  Soviet Physics Doklady, 10:707, Feb 1966.
  * [46] X. Liang, D. Li, M. Song, A. Madden, Y. Ding, and Y. Bu.  Predicting biomedical relationships using the knowledge and graph embedding cascade model.  PLOS ONE, 14(6):1–23, 06 2019.
  * [47] G. A. Miller.  Wordnet: A lexical database for english.  Commun. ACM, 38(11):39–41, Nov. 1995.
  * [48] S. K. Mohamed, V. Novácek, P. Vandenbussche, and E. Muñoz.  Loss functions in knowledge graph embedding models.  In M. Alam, D. Buscaldi, M. Cochez, F. Osborne, D. R. Recupero, and H. Sack, editors, Proceedings of the Workshop on Deep Learning for Knowledge Graphs (DL4KG2019) Co-located with the 16th Extended Semantic Web Conference 2019 (ESWC 2019), volume 2377 of CEUR Workshop Proceedings, pages 1–10. CEUR-WS.org, 2019.
  * [49] S. Mumtaz and M. Giese.  Hierarchy-based Semantic Embeddings for Single-valued & Multi-valued Categorical Variable.  Journal of Intelligent Information Systems, 2021.  (in press).
  * [50] E. B. Myklebust, E. Jimenez-Ruiz, J. Chen, R. Wolf, and K. E. Tollefsen.  Knowledge graph embedding for ecotoxicological effect prediction.  The Semantic Web – ISWC 2019, page 490–506, 2019.
  * [51] E. B. Myklebust, E. Jiménez-Ruiz, J. Chen, R. Wolf, and K. E. Tollefsen.  Ontology alignment in ecotoxicological effect prediction.  In 15th International Workshop on Ontology Matching, 2020.
  * [52] E. B. Myklebust, E. Jimenez-Ruiz, C. Jiaoyan, R. Wolf, and K. E. Tollefsen.  Toxicological Effect and Risk Assessment (TERA) Knowledge Graph, November 2020.  (Version 1.1.0) [Data set]. Zenodo. http://doi.org/10.5281/zenodo.4244313.
  * [53] M. Nayyeri, C. Xu, Y. Yaghoobzadeh, H. S. Yazdi, and J. Lehmann.  Toward understanding the effect of loss function on then performance of knowledge graph embedding, 2019.
  * [54] D. Q. Nguyen, T. D. Nguyen, D. Q. Nguyen, and D. Q. Phung.  A novel embedding model for knowledge base completion based on convolutional neural network.  In M. A. Walker, H. Ji, and A. Stent, editors, Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT, pages 327–333, 2018.
  * [55] M. Nickel, L. Rosasco, and T. A. Poggio.  Holographic embeddings of knowledge graphs.  In D. Schuurmans and M. P. Wellman, editors, Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA, pages 1955–1961. AAAI Press, 2016.
  * [56] NLM.  Medical Subject Headings (MeSH) RDF, 2020.  https://id.nlm.nih.gov/mesh/.
  * [57] C. S. Parr, N. Wilson, P. Leary, K. Schulz, K. Lans, L. Walley, J. Hammock, A. Goddard, J. Rice, and M. Studer.  The encyclopedia of life v2: Providing global access to knowledge about life on earth., 2014.
  * [58] C. S. Parr, N. Wilson, P. Leary, K. S. Schulz, K. Lans, L. Walley, J. A. Hammock, A. Goddard, J. Rice, M. Studer, J. T. G. Holmes, and J. Robert J. Corrigan.  The Encyclopedia of Life v2: Providing Global Access to Knowledge About Life on Earth.  Biodiversity Data Journal, 2:e1079, 2014.
  * [59] R. Parthasarathi and A. Dhawan.  Chapter 5 - in silico approaches for predictive toxicology.  In A. Dhawan and S. Kwon, editors, In Vitro Toxicology, pages 91 – 109. Academic Press, 2018.
  * [60] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay.  Scikit-learn: Machine learning in Python.  Journal of Machine Learning Research, 12:2825–2830, 2011.
  * [61] M. A. N. Pour, A. Algergawy, R. Amini, D. Faria, I. Fundulaki, I. Harrow, S. Hertling, E. Jiménez-Ruiz, C. Jonquet, N. Karam, A. Khiat, A. Laadhar, P. Lambrix, H. Li, Y. Li, P. Hitzler, H. Paulheim, C. Pesquita, T. Saveta, P. Shvaiko, A. Splendiani, É. Thiéblin, C. Trojahn, J. Vatascinová, B. Yaman, O. Zamazal, and L. Zhou.  Results of the ontology alignment evaluation initiative 2020.  In P. Shvaiko, J. Euzenat, E. Jiménez-Ruiz, O. Hassanzadeh, and C. Trojahn, editors, Proceedings of the 15th International Workshop on Ontology Matching co-located with the 19th International Semantic Web Conference (ISWC 2020), Virtual conference (originally planned to be in Athens, Greece), November 2, 2020, volume 2788 of CEUR Workshop Proceedings, pages 92–138. CEUR-WS.org, 2020.
  * [62] J. Pujara, E. Augustine, and L. Getoor.  Sparsity and noise: Where knowledge graph embeddings fall short.  In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1751–1756, Copenhagen, Denmark, Sept. 2017\. Association for Computational Linguistics.
  * [63] A. Rossi, D. Barbosa, D. Firmani, A. Matinata, and P. Merialdo.  Knowledge graph embedding for link prediction: A comparative analysis.  ACM Trans. Knowl. Discov. Data, 15(2):14:1–14:49, 2021.
  * [64] E. W. Sayers, T. Barrett, D. A. Benson, S. H. Bryant, K. Canese, V. Chetvernin, D. M. Church, M. DiCuccio, R. Edgar, S. Federhen, M. Feolo, L. Y. Geer, W. Helmberg, Y. Kapustin, D. Landsman, D. J. Lipman, T. L. Madden, D. R. Maglott, V. Miller, I. Mizrachi, J. Ostell, K. D. Pruitt, G. D. Schuler, E. Sequeira, S. T. Sherry, M. Shumway, K. Sirotkin, A. Souvorov, G. Starchenko, T. A. Tatusova, L. Wagner, E. Yaschenko, and J. Ye.  Database resources of the National Center for Biotechnology Information.  Nucleic Acids Research, 37(suppl_1):D5–D15, 10 2008.
  * [65] A. K. Sharma, G. N. Srivastava, A. Roy, and V. K. Sharma.  Toxim: A toxicity prediction tool for small molecules developed using machine learning and chemoinformatics approaches.  Frontiers in pharmacology, 8:880–880, Nov 2017.
  * [66] P. Shvaiko and J. Euzenat.  Ontology matching: State of the art and future challenges.  IEEE Trans. Knowl. Data Eng., 25(1):158–176, 2013.
  * [67] N. P. O. Skrindebakke.  Understanding the Role of Background Knowledge in Predictions, 2020\.  Master’s thesis.
  * [68] F. Z. Smaili, X. Gao, and R. Hoehndorf.  Opa2vec: combining formal and informal content of biomedical ontologies to improve similarity-based prediction.  Bioinform., 35(12):2133–2140, 2019.
  * [69] F. M. Suchanek, G. Kasneci, and G. Weikum.  Yago: a core of semantic knowledge.  In C. L. Williamson, M. E. Zurko, P. F. Patel-Schneider, and P. J. Shenoy, editors, Proceedings of the 16th International Conference on World Wide Web, WWW 2007, Banff, Alberta, Canada, May 8-12, 2007, pages 697–706. ACM, 2007.
  * [70] Z. Sun, Z. Deng, J. Nie, and J. Tang.  Rotate: Knowledge graph embedding by relational rotation in complex space.  In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
  * [71] M. Swain et al.  PubChemPy: Python wrapper for the pubchem pug rest api., 2014.  [Online; accessed 15.08.2019].
  * [72] M. E. Tipping and C. M. Bishop.  Probabilistic principal component analysis.  Journal of the Royal Statistical Society. Series B (Statistical Methodology), 61(3):611–622, 1999.
  * [73] T. Trouillon, J. Welbl, S. Riedel, É. Gaussier, and G. Bouchard.  Complex embeddings for simple link prediction.  CoRR, abs/1606.06357, 2016.
  * [74] U.S. Environmental Protection Agency.  Ecotox user guide: Ecotoxicology knowledgebase system. version 5.3., 2020\.
  * [75] U.S. Environmental Protection Agency.  ToxCast & Tox21 Summary Files from invitrodb_v3, 2020.
  * [76] D. Vrandecic and M. Krötzsch.  Wikidata: a free collaborative knowledgebase.  Commun. ACM, 57(10):78–85, 2014.
  * [77] A. Waagmeester, G. Stupp, S. Burgstaller, B. Good, M. Griffith, O. Griffith, K. Hanspers, H. Hermjakob, T. Hudson, K. Hybiske, S. Keating, M. Manske, M. Mayers, D. Mietchen, E. Mitraka, A. Pico, T. Putman, A. Riutta, N. Queralt-Rosinach, and A. Su.  Wikidata as a knowledge graph for the life sciences.  eLife, 9, 03 2020.
  * [78] Q. Wang, Z. Mao, B. Wang, and L. Guo.  Knowledge graph embedding: A survey of approaches and applications.  IEEE Trans. Knowl. Data Eng., 29(12):2724–2743, 2017.
  * [79] E. Willighagen.  InChIKey collision: the DIY copy/pastables, 2011.
  * [80] C. Wittwehr, P. Blomstedt, J. P. Gosling, T. Peltola, B. Raffael, A.-N. Richarz, M. Sienkiewicz, P. Whaley, A. Worth, and M. Whelan.  Artificial intelligence for chemical risk assessment.  Computational Toxicology, page 100114, 2019.
  * [81] Y. Wu and G. Wang.  Machine learning based toxicity prediction: From chemical structural description to transcriptome analysis.  International Journal of Molecular Sciences, 19:2358, 08 2018.
  * [82] Z. Wu, W. Lu, D. Wu, A. Luo, H. Bian, J. Li, W. Li, G. Liu, J. Huang, F. Cheng, and Y. Tang.  In silico prediction of chemical mechanism of action via an improved network-based inference method.  British Journal of Pharmacology, 173(23):3372–3385, 2016.
  * [83] B. Yang, W. Yih, X. He, J. Gao, and L. Deng.  Embedding entities and relations for learning and inference in knowledge bases.  In Y. Bengio and Y. LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
  * [84] H. Yang, L. Sun, W. Li, G. Liu, and Y. Tang.  In silico prediction of chemical toxicity for drug design using machine learning methods and structural alerts.  Frontiers in chemistry, 6:30, 2018.
  * [85] W. J. Youden.  Index for rating diagnostic tests.  Cancer, 3(1):32–35, 1950.
  * [86] Z. Zhang, J. Cai, Y. Zhang, and J. Wang.  Learning hierarchy-aware knowledge graph embeddings for link prediction.  In The Thirty-Fourth AAAI Conference on Artificial Intelligence, pages 3065–3072. AAAI Press, 2020.

##  Appendix A Knowledge Graph Embedding Models

In this work, we use 9 KGE models of three major categories: decomposition
models, geometric models, and convolutional models. The interested reader
please refer to [63] for a comprehensive survey.

###  A.1 Notation

Throughout this section we use bold letters to denote vectors while matrices
are denoted as $\mathbf{M}$. Common notation for all KGE models are,
$\left\lVert\cdot\right\rVert_{n}$ for the $n$-th norm,
$\left\langle\mathbf{x},\mathbf{y}\right\rangle$ for the inner product (dot
product) between $\mathbf{x}$ and $\mathbf{y}$, $[\mathbf{x};\mathbf{y}]$ is
the concatenation of $\mathbf{x}$ and $\mathbf{y}$, $\overline{\mathbf{x}}$
indicates the reshape of a one-dimensional vector into a two-dimensional image
(_not_ in HolE where it represent the complex conjugate), finally,
$\text{vec}(\mathbf{X})$ reshapes a matrix into a one-dimensional vector.

The vector representation of an entity and a relation are noted as
$\mathbf{e}_{e}$ and $\mathbf{e}_{p}$, respectively. These vectors are either
in $\mathbb{R}^{k}$ or $\mathbb{C}^{k}$, where $k$ is the embedding dimension.

###  A.2 Decomposition models

DistMult. Developed by [83] and shown to have state-of-the-art performance on
link prediction tasks under optimal hyper-parameters [36]. This model
represent the score of a triple as an Hadaman product (dot product) of the
vectors representing the subject, predicate, and object of a triple.

$\displaystyle
SF_{\text{DistMult}}(sb,p,ob)=\left\langle\mathbf{e}_{sb},\mathbf{e}_{p},\mathbf{e}_{ob}\right\rangle$
(23)

This model does not take the direction of the relation into account, that is,
$SF_{\text{DistMult}}(sb,p,ob)=SF_{\text{DistMult}}(ob,p,sb)$.

ComplEx. This model use the same scoring function as DistMult [73]. However,
the entity vector representation are in the complex space
($\mathbf{e}_{sb},\mathbf{e}_{p},\mathbf{e}_{ob}\in\mathbb{C}^{k}$) and
therefore, the drawback of lacking directionality in DistMult is solved.

$\displaystyle\begin{split}SF_{\text{ComplEx}}(sb,p,ob)&=\left\langle\mathbf{e}_{sb},\mathbf{e}_{p},\mathbf{e}_{ob}\right\rangle\\\
&=\left\langle\Re(\mathbf{e}_{sb})+i\Im(\mathbf{e}_{sb}),\Re(\mathbf{e}_{sb})\right\rangle\\\
&+\left\langle
i\Im(\mathbf{e}_{sb}),\Re(\mathbf{e}_{p})+i\Im(\mathbf{e}_{ob})\right\rangle\\\
&=\left\langle\Re(\mathbf{e}_{sb}),\Re(\mathbf{e}_{p}),\Re(\mathbf{e}_{ob})\right\rangle\\\
&+\left\langle\Im(\mathbf{e}_{sb}),\Re(\mathbf{e}_{p}),\Im(\mathbf{e}_{ob})\right\rangle\\\
&+\left\langle\Re(\mathbf{e}_{sb}),\Im(\mathbf{e}_{p}),\Im(\mathbf{e}_{ob})\right\rangle\\\
&+\left\langle\Im(\mathbf{e}_{sb}),\Im(\mathbf{e}_{p}),\Re(\mathbf{e}_{ob})\right\rangle\end{split}$
(24)

where $i=\sqrt{-1}$ and, $\Re(x)$ and $\Im(x)$ are the real and complex parts
of $x$, respectively. We can easily see that
$SF_{\text{ComplEx}}(\mathbf{e}_{sb},\mathbf{e}_{p},\mathbf{e}_{ob})=SF_{\text{DistMult}}(\mathbf{e}_{sb},\mathbf{e}_{p},\mathbf{e}_{ob})$
if
$\Im(\mathbf{e}_{sb})=\Im(\mathbf{e}_{p})=\Im(\mathbf{e}_{ob})=~{}\mathbf{0}$.

HolE. The Holographic embedding model is described in [55], and use a circular
correlation scoring function

$\displaystyle SF_{\text{HolE}}(sb,p,ob)$
$\displaystyle=\mathbf{e}_{p}^{T}[\mathbf{e}_{sb}\star\mathbf{e}_{ob}],$ (25)
$\displaystyle\mathbf{e}_{sb}\star\mathbf{e}_{ob}$
$\displaystyle=\mathcal{F}^{-1}[\overline{\mathcal{F}(\mathbf{e}_{sb})}\circ\mathcal{F}(\mathbf{e}_{ob})]$
(26)

where $\mathcal{F}$ and $\mathcal{F}^{-1}$ are the Fourier transform and its
inverse, for this model we use $\overline{x}$ as the elementwise complex
conjugate, $\circ$ denotes the Hadamard product (element-wise). HolE has been
show to be equivalent to ComplEx [30], and therefore, we expect the
performance to be similar.

###  A.3 Geometric models

TransE. The translational model has the scoring function [10]

$\displaystyle
SF_{\text{TransE}}(sb,p,ob)=||\mathbf{e}_{sb}+\mathbf{e}_{p}-\mathbf{e}_{ob}||_{n}.$
(27)

Such that if $(sb,p,ob)$ exists in the KG the relational embedding will
translate the subject embedding close to the object embedding.

RotatE. This model is inspired by Euler’s identity
($e^{i\theta}=\cos(\theta)+i\sin(\theta)$) and scores triples by rotating the
relation embedding in complex space. RotatE has been shown to be efficient of
modelling symmetric, inverse and composite relations [70]. The scoring
function of RotatE is defined as

$\displaystyle\begin{split}&SF_{\text{RotatE}}(sb,p,ob)=||\mathbf{e}_{sb}\circ\mathbf{e}_{p}-\mathbf{e}_{ob}||_{n}\\\
&=||\mathbf{e}_{sb}\circ(\cos(\mathbf{\theta}_{p})+i\sin(\mathbf{\theta}_{p}))-\mathbf{e}_{ob}||_{p}\\\
&=||[\Re(\mathbf{e}_{sb})\cos(\mathbf{\theta}_{p})-\Im(\mathbf{e_{sb}})\sin(\mathbf{\theta}_{p})-\Re(\mathbf{e}_{ob})\\\
&\quad;\Re(\mathbf{e}_{sb})\sin(\mathbf{\theta}_{p})+\Im(\mathbf{e_{sb}})\cos(\mathbf{\theta}_{p})-\Im(\mathbf{e}_{ob})]||_{n}.\end{split}$
(28)

Here, we concatenate the real and complex parts of
$\mathbf{e}_{sb}\circ\mathbf{e}_{p}-\mathbf{e}_{ob}$. The modulus constraint
of $\mathbf{e}_{p}$ is set equal to $1$ and is therefore not included in the
scoring function. See the original publication for details of derivation.

pRotatE. This model is described as a baseline for RotatE enabling comparison
when including modulus information in the model versus limiting to phase
information only [70]. pRotatE has the scoring function

$\displaystyle SF_{\text{RotatE}}(sb,p,ob)$
$\displaystyle=2MC||\sin(\frac{\mathbf{\theta}_{sb}+\mathbf{\theta}_{p}-\mathbf{\theta}_{ob}}{2})||_{n}$
(29)

where $\mathbf{\theta}_{x}=\angle\mathbf{e}_{x}$ (phase of $\mathbf{e}_{x}$)
and $MC$ is the modulus constraint on $\mathbf{e}_{sb}$ and $\mathbf{e}_{ob}$.

HAKE. The hierarchy-aware model use the modulus and the phase part of the
embedding vectors [86]. Such that entities at the same level in the hierarchy
is modelled using rotation, i.e., phase, and the entities at different levels
are modelled using the distance from the origin, i.e., modulus. Therefore, the
scoring function of HAKE is modelled in two parts

$\displaystyle SF_{\text{pRotatE}}(sb,p,ob)$
$\displaystyle=|||\mathbf{e}_{sb}|\circ|\mathbf{e}_{p}|-|\mathbf{e}_{ob}|||_{n}$
$\displaystyle+||\sin(\frac{\mathbf{\theta}_{sb}+\mathbf{\theta}_{p}-\mathbf{\theta}_{ob}}{2})||_{1}$
(30)

where $|\cdot|$ is the modulus of $\cdot$. The authors noted that a mixture
bias can be added to
$|||\mathbf{e}_{sb}|\circ|\mathbf{e}_{p}|-|\mathbf{e}_{ob}|||_{n}$ to improved
performance [86]. We omit these details here.

###  A.4 Convolutional models

The final set of models used in this work are convolutional models. We denote
convolutions between an image $X$ and filters $\omega$ is denoted as
$X\ast\omega$. The models also use dense layers, which is denoted by transform
matrices, e.g., $\mathbf{W}$, note that this also includes bias, even though
we do not explicit state it. Moreover, dropout layers are used between every
convolutional and dense layer.

ConvKB. The scoring function of ConvKB [54] use a single convolutional layer
and a single dense layer

$\displaystyle SF_{\text{ConvKB}}(sb,p,ob)$ $\displaystyle=$ $\displaystyle
f(\text{vec}(f([\mathbf{e}_{sb};\mathbf{e}_{p};\mathbf{e}_{ob}]\ast\omega))\mathbf{W}),$
(31)

where $\text{vec}(x)$ reshapes $x$ to a 1-dimensional vector. $\omega$ is the
convolution filters. $\mathbf{W}$ is the transformation matrix for the output
dense layer. ConvKB can easily be extended to use multiple convolution and
dense layers.

ConvE. In contrast to ConvKB, ConvE [19] only perform convolution over the
subject and predicate image (concatenated and reshaped) and multiples the
output dense layer with the object vector as such

$\displaystyle SF_{\text{ConvE}}(sb,p,ob)$ $\displaystyle=$ $\displaystyle
f(\text{vec}(f([\overline{\mathbf{e}_{sb}};\overline{\mathbf{e}_{p}}]\ast\omega))\mathbf{W})\mathbf{e}_{ob}^{T}$
(32)

where $\overline{\mathbf{x}}$ reshapes $\mathbf{x}$ into a 2-dimensional
image. Here, the last dimension of $\mathbf{W}$ is equal to the embedding
dimension. This model can also be extended with multiple convolution and dense
layers, however, [19] found that this did not yield improved results.

###  A.5 Loss functions

Work on KGE models usually define loss functions specific to the models.
However, as show in [53, 48] the choice of loss function has a huge impact on
model performance. In this work we use four loss functions. We experimented
with other loss functions, e.g., absolute/square error, however, these did not
materialize in improved results.

To optimize a loss function we need to generate negative examples. Under the
local closed world assumption we replace the object of each true triple with
all entities and sample negative examples from this set [21], i.e., we sample
from $\\{sb,p,ob^{\prime}\\}\not\in KG,ob^{\prime}\in\mathcal{E}$. This can be
expanded to the stochastic local closed world assumption, which corrupt both
the subject and the object of true triples (illustrated by Fig. 3 in [4]). The
number of negative samples sampled per positive sample is controlled by a
hyper-parameter. However, [36] show that the largest possible number is
favorable.

Pointwize hinge. The objective of pointwize losses minimize the scores of
negative triples and maximize the score of positive triples.

$\displaystyle L_{H_{1}}=\sum_{\mathbf{t}\in X}[\gamma-
y_{\mathbf{t}}S(\mathbf{t})]_{+}$ (33)

where $X$ is the set of positive and negative triples, $y$ is the triple label
($-1$ for false and $1$ for true) and $S(\mathbf{t})$ is the score of triple
$\mathbf{t}$. $\gamma$ is the margin hyper-parameter. $[x]_{+}$ is the
positive part of $x$.

Pointwize logistic. In contrast to hinge loss, logistic loss applies a larger
non-linear loss to predictions that are further away from the true label.

$\displaystyle L_{L_{1}}=\sum_{t\in
X}\text{log}(1+\text{exp}(-y_{\mathbf{t}}S(\mathbf{t}))$ (34)

Pairwise hinge. The objective of pairwise loss functions is to maximize the
distance (in score) between a positive and a negative triple.

$\displaystyle L_{H_{2}}=\sum_{\mathbf{t}^{+}\in X^{+}}\sum_{\mathbf{t}^{-}\in
X^{-}}[\gamma+S(\mathbf{x}^{-})-S(\mathbf{x}^{+})]_{+}$ (35)

where $X^{+}$ and $X^{-}$ are the sets of positive and negative triples,
respectively. $\gamma$ is the margin hyper-parameter, which for pairwise hinge
loss represents the maximum score discrepancy between a positive and negative
score.

Pairwise logistic. Akin to the move from pointwize to pairwize hinge, pairwize
logistic maximizes the distance between positive and negative triples,
however, in a non-linear way

$\displaystyle L_{L_{2}}=\sum_{\mathbf{t}^{+}\in X^{+}}\sum_{\mathbf{t}^{-}\in
X^{-}}\text{log}(1+\text{exp}(S(\mathbf{x}^{-})-S(\mathbf{x}^{+})).$ (36)

###  A.6 Implementation

We have implemented the KGE models in Keras [16] and the model codes are
available at https://github.com/NIVA-Knowledge-Graph/KGE-Keras. This enables
us to easily use the KGE models as components in other models as described in
Section 6.