<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Updating Knowledge Graph Embeddings by Intermediate Estimations on Numerical Attributes</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vrije Universiteit Amsterdam</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>De Boelelaan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>HV Amsterdam</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>The Netherlands</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Workshop</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Knowledge Graphs, Graph Embedding Model</institution>
          ,
          <addr-line>Dynamic Data, IoT measurement data</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Graph embedding methods are used to create representations of knowledge graph entities in a high-dimensional vector space. These embeddings can be used in downstream tasks such as classification or link prediction. However, typically graph embedding methods require training on the entire knowledge graph, making them less eficient when a knowledge graph is expected to be dynamic, such as with IoT measurements graphs, which are updated throughout the day with new numerical measurements. This paper introduces a method for eficiently creating embeddings for new knowledge graph entities, without retraining the embedding model. The proposed method estimates an embedding for new entities, by averaging the embeddingkonfetahreest neighbors, where nearness is based on numerical attributes associated with the entities. We investigate the performance of this method, both on a synthetic knowledge graph, and five real-world knowledge graphs. In these experiments, we employ RDF2vec as the embedding method, and classification as the downstream task. We compare three distance measures for determining nearest entities. We observe a trade-of between the accuracy and eficiency of estimating the embeddings and retraining the embedding model. Resulting in a significant decrease of training time, compared to retraining the full model, with only a relatively small reduction in precision. Results show that in cases where the attributes are representative enough our method is an efective and eficient method to incrementally adjust graph embeddings.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>CEUR</p>
      <p>ceur-ws.org</p>
      <p>We detail the method and its parameters in Sec3t.ion</p>
      <p>We evaluate this method both on a synthetic knowledge graph and on real-world knowledge graphs
(Sections4 and5). The synthetic knowledge graph allows us to adjust the amount of noise in the
numerical values of the graph. By adjusting this noise level we can explore the efect of noise between
the numerical values and the classification targets, on the efectiveness of the embedding estimation
method. We further test the embedding estimation method with five diferent knowledge graphs from
diferent domains. In both experiments, we examine the trade-of between loss of accuracy due to the
estimated nature of the new embeddings and time improvements.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>Knowledge graphs are data structures consisting of entities and relations connected in a graph, with the
entities as nodes, and the relations as ed8g].eTsh[e data can be expressed as RDF triples, which use
the following shape: e&lt;ntity1, relation, entity2&gt;. In this section we present work related to changing
graphs (Section2.1 and2.2), the related topic of inductive learning (Sec2.t3i)oannd diferent methods
that can be used for entity representation learning (S2.e4catniodnSection2.5)).</p>
      <sec id="sec-2-1">
        <title>2.1. Learning on Dynamic Graphs</title>
        <p>Learning representations for entities in dynamic knowledge graphs has been researched in the past.
Dynamic graph convolutional networ9k]sle[arn from the dynamic aspect of a graph. By considering
each timestamp as a snapshot of the graph and learning over all these versions of the graphs the
temporal aspect can be captured. These networks are able to learn from dynamic data, but still require
all data to be available when they are being trained. Instead our method allows for new information to
be processed directly. Note that in contra9s]t, otuor[ method is limited to dealing with incremental
addition of entities only, and does not deal with other types of alterations, such as restructuring or
entity removal.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Learning on Temperal Graphs</title>
        <p>By adding timestamps to every property of the graph, a temporal knowledge graph is created, which
can also be utilized to represent dynamic knowledge graphs. In the T-GAP m1o0]d,eflo[r example,
the authors use the timestamp of the query to determine which parts of the graph are most relevant
in answering the query. Even though adding such timestamps introduces a temporal element, this is
not what we want to capture in this research. Such models for temporal knowledge with timestamps
graphs do not learn from new knowledge.</p>
        <p>
          There are frameworks created to handle data streams for situations where data is expected to be
added regularly, such as Kafka-ML 1[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. This framework provides a way to combine data streams with
machine learning (ML) methods. The data from a data stream is stored in the framework, allowing ML
methods to use the data for training. Contrary to our method, in this framework, new data received
after training the method will not be taken into account for the training of the model. Our proposed
estimation method can therefore be seen as an addition to the framework.
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Inductive Learning</title>
        <p>The field of inductive learning focuses on creating methods to use with previously unseen entities or
relations. For example, by creating an embedding generator for entities in a graph, and then using it to
create embeddings for new entities in that gr1a2]p.h [</p>
        <p>
          Shi et al. 1[
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] propose ConMask, a model to create embeddings for unseen entities by exploiting the
string names of entities. They first create embeddings for the known entities and then train a second
model, which uses the entity names (as embeddings retrieved from a language model) as input, and
the created embeddings as output. When presented with unseen entities ConMask is used to create
embeddings for them, which can then be used in combination with the original entities.
        </p>
        <p>Another inductive learning approach is proposed by Gesese et al.: R A14IL],Dw[hich in addition to
learning representations to entities, also learns representations for relations, for the specific task of link
prediction. The textual representations of entities and relations are encoded using a language model.</p>
        <p>The work of Galkin et al.15[] takes inductive learning a step further by introducing ULTRA, which
not only works on unseen entities, but on completely unseen graphs. It uses a pre-trained foundation
model that creates representations for relations in a graph based on the interactions between those
relations. Since it is pre-trained on another graph it does not have be trained on new entities.</p>
        <p>What sets our approach apart from previous inductive learning approaches is that we leverage
the numerical properties of the graph and the entities in order to make an estimation for the entity
embedding. Additionally, we do not use a learning approach for the estimation part, using only
information already available, while inductive learning trains requires more preparation, such as an
additional model for the creation of embeddings for unseen en1t6i]t.ies [
2.4. GCNs
Graph convolutional neural networks (GCNs) are used in approaches such as Graph1S6A]GanEd[
the more recent Dynamic Knowledge Graph Embedding (DKG1E7)][and Lifelong Knowledge Graph
Embedding (LKGE) [18], to learn representations for entities. By only taking into account the direct
context for each entity they learn embeddings for entities without considering the entire graph.
Therefore, when a new entity is added to the graph, an embedding can be created for it by only considering its
new context, without altering the model or the other embeddings. However, GCNs need to be trained
end-to-end, while our method considers graph embedding methods that are trained independently of
various possible downstream tasks. Additionally the embedding estimation method is able to capture
longer range dependencies between entities, by using the numerical values of the entities, which is a
challenge in GCN-based approaches.</p>
        <p>
          Leveraging modalities was investigated in multimodal lear1n9i]n, gw[here the authors create a
pipeline with a dedicated neural network for specific modalities, and then combining their embeddings
with a GCN to learn more specific representations. However these methods were trained end-to-end,
with the learned representation only being relevant for a specific task. Our estimation method is able
to use embeddings created to represent entities from the knowledge graph independently of a task.
Additionally our method would not require any changes to the pipeline in place, only the addition of
the method.
2.5. RDF2Vec
RDF2Vec [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] is a graph embedding model that generalises the Word22V0e]ca[lgorithm to work with
graphs. It learns representations from knowledge graph entities by considering the entities as “words”,
and random walks through the graph as “sentences”. Entities are embedded in a vector space based
on the nodes that occur in their neighbourhood in such random walks. During training, more similar
entities will be embedded closer together in the embedding space, and dissimilar entities will be further
apart. Because all embeddings afect each other during training it is not possible to add new embeddings
without retraining all the other embeddings. We primarily design our method to extend RDF2Vec with
this capability.
        </p>
        <p>
          Recent work by2[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] updates both existing and new embeddings by what the authors refer to as
resuming the training of a RDF2Vec model, by which they mean re-starting the training process:
retrieving new walks for all new entities (or relations), and retraining the existing RDF2Vec model with
these new walks. While this approach shows promising results, even out performing the retrained
model of evaluation tasks, it difers to the embeddings estimation method proposed in this paper in
terms of the kind of scenario where both would be applied. Where the approach from Hahn et al. suits
large knowledge graph which have a large update, our embedding approach suits the knowledge graphs
with a small update, where the estimated embedding is used as an interim solution.
        </p>
        <p>Our estimation method intends to supplement RDF2Vec, or any other task agnostic graph embedding
model. We base the estimated embeddings for new entities on the existing embeddings, by leveraging
the related numerical attributes of the entities.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. The Embedding Estimation Method</title>
      <p>In this section, we present the main contribution of this paper, which is the embedding estimation
method. The setup of the experiment and its results follow in Se4ctainodn5, respectively. The method
estimates an embedding for new entities based on the embeddings of most similar previously embedded
entities (we refer to the latter as “original entities”). Similarity between original entities and new entities
is determined with a distance measure (Sect3i.2o)nbetween the numerical attribute values of the
entities.</p>
      <sec id="sec-3-1">
        <title>3.1. Estimation Method</title>
        <p>Algorithm1 provides pseudocode of our method for one individual new entity. Besides the new entity
it requires: all original entities (including their previously calculated embeddings) and pka,rameter
which determines the number of original entities used to calculate the embedding for the new entity.</p>
        <p>The first step is calculating the distance between the attribute values of the new entities and each
individual original entity. By sorting these distances in ascending order we create a ranking of original
entities most similar to every new entity. The embeddings okfmtohset similar entities are averaged to
create the embedding for the new entity. In other words, the distance measure between the attributes is
used as aproxy for the (ideal) distance in the embedding space.</p>
        <p>In this implementation of the estimation method we do not apply normalization. The estimation
method assumes that the attribute values will be a reasonable representation for the entities, using
them to estimate a new embedding for each new entity.</p>
        <p>Algorithm 1 Calculates the estimated embedding for a new entity, based on the similarity between its
attributes and those of the original entities.</p>
        <p>= 1 new entity for which we want an embedding
  = All original entities with embeddings
 = number of nearest entities to consider
function embedding_estimator(
for all   ∈</p>
        <p>← distance_measure(
end for
ℎ = sort_ascending()
 _ℎ = get_top_k(ℎ, )
 = get_embeddings( _ℎ, 
   = average()
return   
end function
3.2. Distance Measures
do
 ,</p>
        <p>,  )
., 

)
 .)
We implement three diferent distance measures: Euclidean, Chebyshev and Manhattan distance. Below
we give a short description of each distance measure. WeAtraenadtB as vectors. The length of the
vectors depends on the number of numerical values the knowledge graph contains.</p>
        <p>Euclidean distance = √∑ ( − )</p>
        <p>2, The shortest line between two points.</p>
        <sec id="sec-3-1-1">
          <title>Entity</title>
          <p>DaGtarappohints
Classification</p>
          <p>Task</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Accuracy</title>
          <p>Chebyshev distance = max | − | , The longest distance between two points, in any one of the
dimensions of the points.</p>
          <p>Manhattan distance = ∑ | − | , the summed distance between two points over all dimensions of
the points.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experiment</title>
      <p>In order to test the efectiveness of the estimation method, we measure the accuracy and runtime of
the classification task on 10 variants of a synthetic knowledge graph and five real-world knowledge
graphs, comparing the estimation method against the retraining method. The setup of this experiment
is described in Sectio4n.1.</p>
      <p>The creation of the ten variations of the synthetic knowledge graph are detailed 4in.2.S1e.cBtyion
adjusting the noise level in the synthetic knowledge graph we will determine the efect of noise on the
efectiveness of the estimation method, and the efect of changing vak.lue</p>
      <p>The five domain knowledge graphs presented in Sectio4n.2s.2, 4.2.3 and4.2.4 demonstrate how the
embedding estimation method performs on real-world knowledge graph.
4.1. Setup
The setup of the experiment assumes there already existosriagninal pipeline, from which multiple
elements will be reused by the estimation method. An example of how we expect such a pipeline to
look like is given in Figur1e.</p>
      <p>For the embedding estimation method we reuse the original embeddings and entities from the graph
to create the embedding estimator, which uses the new entities to create the new embeddings. By
reusing the classification method, new accuracies are calculated. We use 21 values for parameter
ranging between 1 and 250, a n,dwith being the total amount of original entities. This results in the
average embedding of all original entities to be used for all new entities. This is added as a baseline.
The experiments are repeated, with all three distance measures, to determine the efect of choosing the
distance metric.</p>
      <p>The retraining method combines the new and original knowledge graph and original entities to
completely retrain all models created in the original pipeline, reusing nothing.</p>
      <p>
        RDF2Vec [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is used to compute the embedding model, using the PyRDF2Vec libra3]r,yw[ith a
walk-length of 2 and 25 walks per entity. The model is trained for 20 epochs. Each specific knowledge
graph has a specific downstream classification task, described in the following sections. In each case,
a MLP is used to create the classification model, by deploying the pyTorch lib2r2a]r. yT[he model
consists of two hidden ReLu layers, each with 512 nodes, trained for 40 epochs. All code is available on
GitHub1.
      </p>
      <p>The experiment is performed with: a synthetic knowledge graph using the SAREF ontology, two
smart building knowledge graphs and a selection of three knowledge graphs from diferent domains,
based on the availability of attributes, from KGBe2n3]c.hN[umerical attributes of entities are collected
from the knowledge graph, both for the original entities and new entities, by querying the knowledge
graphs.
1https://github.com/RoderickvanderWeerdt/Embedding_Estimator
saref:isPropertyOf
saref:relatesTo</p>
      <p>Property saref:hasMeasurement</p>
      <p>saref:FeatureOfInterest
saref:UnitOfMeasure
saref:isMeasuredIn
saref:hasValue</p>
      <p>saref:isMeasurementOf
saref:isMeasured</p>
      <p>ByDevice
saref:isControlled</p>
      <p>ByDevice
saref:Property
saref:relatesTo</p>
      <p>Measurement
saref:measuresProperty
saref:measurement</p>
      <p>MadeBy
saref:makesMeasurement
saref:accomplishes ice:hasRoundedValue
ice:RoundedValue
ice:measuredAtTime
ice:Timestamp
saref:Measurement</p>
      <p>measurement
saref:hasTimestamp
timestamp
ice:previousMeasurement ice:nextMeasurement
saref:Measurement</p>
      <sec id="sec-4-1">
        <title>4.2. Datasets</title>
        <p>For the experiments we use six diferent knowledge graphs. First we discuss the creation of the synthetic
knowledge graph. Because real world knowledge graph are noisy and incomplete we also perform the
same experiments with real world knowledge graphs from multiple domains.
4.2.1. Synthetic Knowledge Graph
In order to test the efect of noise on the embedding estimation method we create a synthetic knowledge
graph with adjustable noise levels. The noise level is a value that describes how much noise (random
variation) is added to the numerical data in the knowledge graph.2Fsihgouwres the template used for
the knowledge graph. The synthetic knowledge graph uses the SAREF onto2l4o]gtyo[model devices
with measurements that directly correspond to the target class that we will be predicting. By adding
noise (corresponding to the noise level), we gradually decrease this direct relation. The noise level is
added to the measurements directly by adding random values between -noise_level and noise_level
to each measurement, thereby creating increasing levels of noise to the data. We create 10 synthetic
knowledge graphs, with noise levels ranging from 1 through 10. In addition to the SAREF ontology we
use the extension proposed in5][(using theice prefix) to enhance the learnability of the graph.</p>
        <p>The synthetic knowledge graph consists of 10 devices making a total of 8000 measurements, resulting
in a knowledge graph of 1.2 million triples. The files that are used to create the synthetic knowledge
graph are made available onli2n. e</p>
        <p>By making the measurements (and their values) and classes directly related we expect the classification
to be very accurate. By increasing the noise level this relation between the values and the classes will
decrease, but the relation between the measurements and classes will remain, because the structure
from the graph will not be changed. We perform the experiments on 10 variants of the synthetic graph,
with noise levels increasing from 1 up to 10.
4.2.2. OPSD Household data
The OPSD household dataset25[] contains the hourly energy consumption of devices in multiple
residences. The dataset has been mapped to a knowledge gr2a6p]h. W[e used the data from one
2https://github.com/RoderickvanderWeerdt/Synthetic_Noisy_IoT_KG_creator
residential household (household 4 in the dataset), since it is large enough to be realistic, but not so
large that it takes multiple hours to train the embedding model. The attributes in the graph are: general
energy export, general energy import, solar panels, dishwasher, electrical vehicle, freezer, washing
machine. Each entity in the graph is a timepoint at which energy consumption measurements were
taken. The graph contains 0.9 million triples.</p>
        <p>Given the continuous source of data from hourly energy consumption updates the knowledge graph
can be considered a good representation for the kind of knowledge graph for which our estimation
method is intended. The classification task classifies each time point whether the outside temperature
was in the warm half of the measurements, or in the cold half of the measurements. Although this
classification task is not a hard task, we consider it a useful task to show the capabilities of the embedding
estimation method.
4.2.3. OficeGraph
Similarly to OPSD, OficeGraph contains hourly smart building measurements from devi2c7e]s. B[ut
instead of only energy measurements, OficeGraph contains nine heterogeneous types of measurements
made by IoT devices, such as: temperature, 2ClOevels and humidity measurements. Due to memory
constrains we only use the measurements from devices on the 7th floor, which allows experiments to be
performed on a consumer grade machine, instead of having to resort to a super computer or distributed
computing environment. The resulting graph contains 13 devices and consists of 3.9 million triples.</p>
        <p>Using the local outside temperature we create a similar classification task as with OPSD, predicting
whether the outside weather is in the warm or cold half of the total measurements.
4.2.4. KG-Bench
We use three diferent knowledge graphs from the KGBench knowledge graph benchmark repository
[23], which includes benchmark tasks and train/test splits: the Amsterdam Museum Dataset (AM), the
Dutch Monument Graph (DMG), and the Movie Dataset (MD). These knowledge graphs were chosen
because they include numerical attributes in their knowledge graphs, as required by our estimation
method. All image hashes and geodata were removed from the graph, since these would not be used in
the experiments and it greatly decreases the file size.</p>
        <p>The majority of entities lack one or more attributes, e.g. not all movies in MD have a box ofice value.
more details can be found in the KGBench pap2e3r].[ Entities without any attributes were removed
since our method provides no way to estimate an embedding for these entities.</p>
        <p>DMG. Entities are monuments in the Netherlands, and the knowledge graph contains three attributes
for each monument: “year”, “population” (of the city were the monument is located),
“codeNationalMonument”. The graph contains 0.7 million triples and the classification task classifies the type of
monument, out of five monument classes.</p>
        <p>MD. The entities are movies, and knowledge graph contains three attributes: “duration”, “boxofice”,
“cost”. The graph contains 2.4 million triples and the classification task classifies the genre of the movie,
out of 12 genres.</p>
        <p>AM. The entities are museum objects and the graph contains one numerical value: “dimension”, but
it refers to multiple diferent dimensions which for these experiments are all considered as diferent
attributes. The diferent dimensions are separated based on the units of measurement used for the
dimension: “gram”, “mm”, “cm”, “ml”, “gr”, “kg”, “G”, “gr.”, “m”, “liter”. When multiple similar units are
available for one entity they are all stored, and sorted on size, in order to maintain as many attributes as
possible. Despite the fact that “gram” and “gr.” refer to the kind of measurement, they are not considered
to be identical, as some entities have dimensions with both units. This resulted in 57 attributes. The
graph contains 1.1 million triples and the classification task classifies the museum object out of eight
museum object classes.</p>
        <p>For all the used KGBench knowledge graphs we use the default subsets provided, being the training
set and validation set. For DMG and MG, the training set (as defined in the benchmark) is used to
create the original entities, and the validation set is used to create the new entities. For AM the original
entities are created similarly, but for the new entities a subset is taken from the validation set, because
the complete validation set is larger then the train set. The estimation method is intended to be used
when new entities become available, but when many new entities become available the model should
be retrained, instead of continuing to accumulate estimated embeddings. When this should happen
should be determined per task. For our experiments we use a rule of thumb that the number of new
entities should not be more than 20% of the original entities. For AM* we randomly select entities from
the validation set, until their are as many entities as 20% from the training set.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.3. Metrics</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Results</title>
      <p>In the experiment we use two metrics to determine the impact of the embedding estimation method.
The first is the accuracy of the classification task of each knowledge graph, from classifying the new
entities. The second is the time in seconds that the method requires to finish calculating the new
embeddings. For the embedding estimator this is the time the embedding estimation takes plus the
time the classifier takes. For the re-training part of the experiment this is the time it takes to retrain the
embedding, retrain the classifier and perform the classification.</p>
      <p>We present the results of our experiments in three tables and describe them in the following subsections.
We first report on the experiments on the synthetic knowledge graph in se5c.t1i,5o.n2sand5.3 where
we explore the efect ofk, the distance measure and time gained respectively. Then in Se5c.4t,iowne
describe the same results for the five real-world domain knowledge graphs.</p>
      <sec id="sec-5-1">
        <title>5.1. Diferent sizes of k</title>
        <p>In order to test the efect of changing the sizke wofe perform the experiment with the synthetic
knowledge graphs with increasing valueskf,orranging from 1 to 250, as can be seen in the first part of
Table1, using the Euclidean distance measure. This is repeated for noise levels from 1 through 10 (as
described in Sectio4n.2.1). We observe two main efects, 1) higher noise levels produce lower accuracies,
and 2) synthetic knowledge graphs with higher noise levels achieve their highest accuracies at higher
values fork.</p>
        <p>By examining the highest accuracy for each noise level we see the accuracy decrease as a result of
increasing the noise level. This is expected behavior, because the embedding estimation method relies
on the relation between the values in the graph and the target classes. As the noise between these two
increases, the accuracy drops.</p>
        <p>When increasing the noise level, the highest accuracy is achieved for increasing vka, lsuheoswoifng
a correlation between the noise level and optki.mTahlis correlation is also expected, since if the noise
level is higher thek nearest neighbors of the new entity will be less likely to be similar to the new
entity and by increasinkgthis is counterbalanced.</p>
      </sec>
      <sec id="sec-5-2">
        <title>5.2. Results of diferent distance measures</title>
        <p>To explore the impact of changing the distance measure we repeat the same experiments, but instead of
using the Euclidean distance measure, we use the Manhattan distance or the Chebyshev distance, which
are described in sectio3n.2). Similarly to the Euclidean distance measure results, when the noise level
increases, a higher value fokris needed to reach the highest accuracy. When examining the highest
accuracies from the distance measures for each noise level (which are colored green) we see that the
Manhattan distance measures achieves the highest accuracies for each noise level.</p>
      </sec>
      <sec id="sec-5-3">
        <title>5.3. Estimator versus Re-Training</title>
        <p>To examine the trade-of in using the embedding estimation method instead of re-training the pipeline
we can compare the accuracy with time consumption for both approaches. Time consumption is the
total time it takes to get a classification for a new entity. For re-training this is the time it takes to re-train
the embedding, re-train the classifier, and perform the classifications. For the embedding estimation
method this is the time it takes to perform the estimation and classification2.sThaobwles for each
noise level the accuracy and time consumption, when using the embedding estimation method or
re-training the entire pipeline. For each noise level of the synthetic knowledge graph when re-training
the pipeline the accuracy remains constant, at 100%. The consistency of the accuracy is expected due to
the graph structure not changing from the addition of noise. Since the graph embedding method does
not consider the values of the literals. The perfect accuracy is explained by the fact that the synthetic
knowledge graph was created to perform well on this task.</p>
        <p>For the accuracy of the embedding estimator, we observe that as the noise level increases, the accuracy
decreases. This indicates that the embedding estimation method is most useful when the “noise level”
of a knowledge graph is low.</p>
        <p>Re-training the pipeline takes almost 24 minutes (1437 seconds, as seen in2T),awblheile using the
embedding estimator for a new instance takes less then a second. This shows that the embedding
estimation method is less resource intensive, providing users with a clear trade-of between accuracy
and time.</p>
      </sec>
      <sec id="sec-5-4">
        <title>5.4. Diverse Domain Knowledge Graphs</title>
        <p>Table 2 visualises the results of the experiments with the domain knowledge graphs. For all knowledge
graphs time is saved, being at least 1000 times faster, up to 3300 times, when using the estimation
method compared to retraining the embedding model.</p>
        <p>Table 3 show a clear distinction between the smart building knowledge graphs and the other domain
knowledge graphs. OPSD and OficeGraph reach their highest accuracy with akl,owwhile DMG,
AM* and MD require a higkh to reach their highest accuracy. When we compare this with1T,able
where the synthetic knowledge graphs with higher noise levels reached their highest accuracy with
larger values fokr, we could argue that this indicates that DMG, AM* and MD have a higher noise level,
then OPSD and OficeGraph. which would make sense, since the numerical attributes of OPSD and
OficeGraph are measurement data, directly representing their entities. While DMG, AM* and MD have
only indirect numerical attributes.</p>
        <p>With DMG, the estimation method is not able to create embeddings that outperform the baseline.
The accuracy of attributes for DMG are also below the baseline, indicating that the attributes were
not at all representative for the entities of DMG. We analysed the knowledge graph and found that
for the available numerical attributes: “year”, “population” and “codeNationalMonument” only the
“codeNationalMonument” is present for every entity, and this is an identification number, so it is not
useful for comparisons with other entities. For this graph the embedding estimation method is not
efective.</p>
        <p>The results for both MD and AM show that there is a decrease in accuracy when comparing the
estimation method with retraining. This result is expected, since these are, after all, estimates based
on the limited information from the numerical attributes. However, both outperform the baseline of
k=N, showing that a meaningful representation is still learned for the entities. Combined with the time
gain of using the embedding estimation method we consider this a useful situation for the embedding
estimation method.</p>
        <p>Table 2 shows that with OPSD and OficeGraph the accuracy of the estimation method outperforms
the accuracy of retraining. When we consider T3awbelesee that OPSD and OficeGraph also difer in
that they reach their highest accuracy with a small vaklu(eeiftohrer 1 or 5) as opposed to the other
knowledge graphs, which require high values fko. rWe explain this by examining the classifier, which
only in the case of OPSD and OficeGraph was overfitted on the training data. Because the classifier is
not retrained we are using the same embeddings in the embedding estimator which are used in training
the (overfitted) classifier, therefor resulting in “better” embeddings than the ones that are kept in the
training set, during the re-training of the models. As future research we suggest investigating what the
efect is of re-training the classifier with the new entities, as compared to only using the test set for the
estimation process.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Discussion</title>
      <p>The results from OPSD, OficeGraph and DMG show that the estimation method has requirements from
the knowledge graph and entities in order to estimate useful embeddings. The attributes related to the
entities that are queried from the knowledge graph need to be representative enough to be able to find
the similar entities. When the usage scenario fits these requirements, as it does with MD and AM, the
estimation method can be useful as an interim solution, to use new data before having to retrain the
pipeline. As mentioned in Sectio4n.2.4, many entities in the knowledge graphs from KGBench are
missing one or more numerical attributes. Additionally, we use all available numerical attributes for
the entities in each knowledge graph. This results in the inclusion of possibly less desirable numerical
attributes, for example with “codeNationalMonument” from DMG. Future research should delve into
the selection process of numerical attributes.</p>
      <p>For the experiments we compare the resulting accuracies from re-training the models and from using
the embedding estimator. In future research we can broaden the scope of the scenario to be able to
include more methods, creating the possibility to use diferent methods, such as the ones discussed in
Section2.</p>
      <p>In this implementation we have not applied normalization to the numerical attributes of the entities,
which means that attributes with bigger numerical ranges can disproportionately influence the calculated
distances between entities. Future research should explore the efects of normalization of the numerical
attributes on the estimation quality. Future research could determine where the cut-of point for specific
knowledge graphs and tasks will be and at which point it will become necessary to re-train the entire
pipeline. Additional future research could explore the possibility of using the embedding estimation
method instead as a measure onfoaise k for a classification task. Where the nokisies the noise between
the values of a knowledge graph and the (classification) target. The higher the vka,lutheeomfore
noise exists between the data and the targets.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>In this paper, we present a method for estimating knowledge graph embeddings, which estimates an
embedding for a new entity in a graph for which an embedding model was already created.</p>
      <p>The experiments show that the estimation method can result in useful estimated embeddings, which,
although they have a lower accuracy, performs between 1,004-4,635 times faster. From the synthetic
knowledge graph results, we conclude that the accuracy is a good indicator of how well embedding
estimation method performs the estimation, since the increase of noise requires an inkcrteoase of
achieve the “best possible” accuracies. Using the Manhattan distance measure consistently resulted
in the highest accuracies for the synthetic knowledge graphs, but not for the real world knowledge
graphs. The creation process of the synthetic knowledge graphs and the implementation of the noise
values may have contributed to this. In future research other synthetic knowledge graph benchmarks,
such as GraphWorld2[8], can provide more insight into the efect of distance measure selection.</p>
    </sec>
    <sec id="sec-8">
      <title>Acknowledgments</title>
      <p>This work is part of the InterConnect project (interconnectproject.eu/) which has received funding
from the European Union’s Horizon 2020 research and innovation program under grant agreement
No 857237. Additionally, this work is also part of HEDGE-IoT (https://hedgeiot.eu) which has received
funding from the European Union’s Horizon Europe research and innovation program under grant
agreement No 101136216.
[4] V. de Boer, J. Wielemaker, J. van Gent, M. Oosterbroek, M. Hildebrand, A. Isaac, J. van Ossenbruggen,
G. Schreiber, Amsterdam museum linked open data, Semantic Web 4 (2013) 237–243.1d0o.i3:233/
SW-2012-0074.
[5] R. van der Weerdt, V. de Boer, L. Daniele, R. Siebes, F. van Harmelen, Evaluating the efect of
semantic enrichment on entity embeddings of iot knowledge graphs, Proceedings of the 1st
International Workshop on Semantic Web on Constrained Things at ESWC 2023. CEUR Workshop
Proceedings 3412 (2023). URLh:ttps://ceur-ws.org/Vol-3412/paper5.p.df
[6] R. Biswas, L.-A. Kafee, M. Cochez, S. Dumbrava, T. E. Jendal, M. Lissandrini, V. Lopez, E. L.</p>
      <p>Mencía, H. Paulheim, H. Sack, E. K. Vakaj, G. de Melo, Knowledge Graph Embeddings: Open
Challenges and Opportunities, Transactions on Graph Data and Knowledge 1 (2023) 4:1–4:32.
doi:10.4230/TGDK.1.1.4.
[7] R. Verdecchia, J. Sallou, L. Cruz, A systematic review of green ai, WIREs Data
Mining and Knowledge Discovery 13 (2023) e1507. URLh:ttps://wires.onlinelibrary.
wiley.com/doi/abs/10.1002/widm.1507. doi:https://doi.org/10.1002/widm.1507.
arXiv:https://wires.onlinelibrary.wiley.com/doi/pdf/10.1002/widm.1507.
[8] A. Hogan, E. Blomqvist, M. Cochez, C. d’Amato, G. D. Melo, C. Gutierrez, S. Kirrane, J. E. L. Gayo,
R. Navigli, S. Neumaier, et al., Knowledge graphs, ACM Computing Surveys 54 (2021) 1–37.
doi:10.1145/3447772.
[9] F. Manessi, A. Rozza, M. Manzo, Dynamic graph convolutional networks, Pattern Recognition 97
(2020). doi:10.1016/j.patcog.2019.107000.
[10] J. Jung, J. Jung, U. Kang, Learning to walk across time for interpretable temporal knowledge graph
completion, in: Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery &amp;
Data Mining, 2021, pp. 786–795. do1i:0.1145/3447548.3467292.
[11] C. Martín, P. Langendoerfer, P. S. Zarrin, M. Díaz, B. Rubio, Kafka-ml: Connecting the data stream
with ml/ai frameworks, Future Generation Computer Systems 126 (2022) 15–331.0d.o1i0:16/j.
future.2021.07.037.
[12] N. Hubert, P. Monnin, H. Paulheim, Beyond transduction: A survey on inductive, few shot, and
zero shot link prediction in knowledge graphs, arXiv preprint (202a3r).Xdiovi::2312.04997.
[13] B. Shi, T. Weninger, Open-world knowledge graph completion, Proceedings of the AAAI conference
on artificial intelligence 32 (2018). do1i0:.1609/aaai.v32i1.11535.
[14] G. A. Gesese, H. Sack, M. Alam, Raild: Towards leveraging relation features for inductive link
prediction in knowledge graphs, in: Proceedings of the 11th International Joint Conference on
Knowledge Graphs, 2022, pp. 82–90. doi1:0.1145/3579051.3579066.
[15] M. Galkin, X. Yuan, H. Mostafa, J. Tang, Z. Zhu, Towards foundation models for knowledge
graph reasoning, The Twelfth International Conference on Learning Representations (2023).
doi:10.48550/arXiv.2310.04562.
[16] W. Hamilton, Z. Ying, J. Leskovec, Inductive representation learning on large graphs, Advances in
neural information processing systems 30 (2017). 1d0o.i4:8550/arXiv.1706.02216.
[17] T. Wu, A. Khan, M. Yong, G. Qi, M. Wang, Eficiently embedding dynamic knowledge graphs,</p>
      <p>Knowledge-Based Systems 250 (2022) 109124. do1i0:.1016/j.knosys.2022.109124.
[18] Y. Cui, Y. Wang, Z. Sun, W. Liu, Y. Jiang, K. Han, W. Hu, Lifelong embedding learning and transfer
for growing knowledge graphs, Proceedings of the AAAI Conference on Artificial Intelligence 37
(2023) 4217–4224. doi:10.1609/aaai.v37i4.25539.
[19] X. Wilcke, P. Bloem, V. de Boer, R. van ’t Veer, F. van Harmelen, End-to-end entity classification
on multimodal knowledge graphs, arXiv preprint arXiv:2003.12383 (2020)1. 0d.o4i8:550/arXiv.
2003.12383.
[20] T. Mikolov, K. Chen, G. Corrado, J. Dean, Eficient estimation of word representations in vector
space, in: 1st International Conference on Learning Representations, ICLR 2013, Workshop Track
Proceedings, 2013. do1i:0.48550/arXiv.1301.3781.
[21] S. H. Hahn, H. Paulheim, Rdf2vec embeddings for updateable knowledge graphs–reuse,
don’t retrain!, Extended Semantic Web Conference, Poster Track (2024)h.tUtRpsL:://2024.
eswc-conferences.org/wp-content/uploads/2024/05/77770211..pdf
[22] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, et al., Pytorch: An imperative style,
highperformance deep learning library, Proceedings of NeurIPS. Advances in Neural Information
Processing Systems 32 (2019) 8024–8035. do1i0:.48550/arXiv.1912.01703.
[23] P. Bloem, X. Wilcke, L. van Berkel, V. de Boer, kgbench: A collection of knowledge graph
datasets for evaluating relational and multimodal machine learning, The Semantic Web: 18th
International Conference, ESWC 2021. Lecture Notes in Computer Science 12731 (2021) 614–630.
doi:10.1007/978-3-030-77385-4_37.
[24] L. Daniele, F. den Hartog, J. Roes, Created in Close Interaction with the Industry: the Smart
Appliances REFerence (SAREF) Ontology, in: International Workshop Formal Ontologies Meet
Industries, Springer, 2015, pp. 100–112. do10i:.1007/978-3-319-21545-7_9.
[25] Open Power System Data, Data Package Household Data, Version 2020-0h4t-t1p5s://data.
open-power-system-data.org/household_data/2020-04.-(1P5r/imary data from various sources,
for a complete list see URL)., 2020.
[26] R. van der Weerdt, V. de Boer, L. Daniele, B. Nouwt, R. Siebes, Making heterogeneous smart home
data interoperable with the SAREF ontology, International Journal of Metadata, Semantics and
Ontologies 15 (2021) 280–293. do1i:0.1504/IJMSO.2021.125893.
[27] R. van der Weerdt, V. de Boer, R. Siebes, R. Groenewold, F. van Harmelen, OficeGraph: A
Knowledge Graph of Ofice Building IoT Measurements, in: The Semantic Web: ESWC 2024. Lecture
Notes in Computer Science, volume 14665, 2024, pp. 94–109. d1o0i:.1007/978-3-031-60635-9_6.
[28] J. Palowitch, A. Tsitsulin, B. Mayer, B. Perozzi, Graphworld: Fake graphs bring real insights for
gnns, in: Proceedings of the 28th ACM SIGKDD conference on knowledge discovery and data
mining, 2022, pp. 3691–3701. doi:10.1145/3534678.3539203.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Ristoski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Rosati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Di</surname>
          </string-name>
          <string-name>
            <surname>Noia</surname>
          </string-name>
          , R. De Leone, H. Paulheim,
          <article-title>Rdf2vec: Rdf graph embeddings and their applications</article-title>
          ,
          <source>Semantic Web</source>
          <volume>10</volume>
          (
          <year>2019</year>
          )
          <fpage>721</fpage>
          -
          <lpage>752</lpage>
          .
          <year>d1o0</year>
          .i:3233/SW-180317.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>W. L.</given-names>
            <surname>Hamilton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Ying</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leskovec</surname>
          </string-name>
          ,
          <article-title>Representation learning on graphs: Methods and applications</article-title>
          ,
          <source>arXiv preprint arXiv:1709.05584</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>B.</given-names>
            <surname>Steenwinckel</surname>
          </string-name>
          , G. Vandewiele,
          <string-name>
            <given-names>T.</given-names>
            <surname>Agozzino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ongenae</surname>
          </string-name>
          , pyrdf2vec:
          <article-title>A python implementation and extension of rdf2vec</article-title>
          ,
          <source>in: The Semantic Web: ESWC 2023, Lecture Notes in Computer Science</source>
          , volume
          <volume>13870</volume>
          , Springer,
          <year>2023</year>
          , pp.
          <fpage>471</fpage>
          -
          <lpage>483</lpage>
          .
          <year>doi1</year>
          :
          <fpage>0</fpage>
          .1007/978-3-
          <fpage>031</fpage>
          -33455-9_
          <fpage>28</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>