Device, computer program and computer-implemented method for determining negative samples for training a knowledge graph embedding of a knowledge graph

The method addresses the challenge of generating negative triples by using an ontology to identify and replace entities in contradictory triples, enhancing the training of knowledge graph embeddings to prevent incorrect predictions.

JP7826592B2Active Publication Date: 2026-03-10ROBERT BOSCH GMBH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Generating suitable negative triples for training knowledge graph embeddings is challenging due to the difficulty in creating incorrect facts systematically.

Method used

A method is provided to determine negative samples by using a knowledge graph augmented with an ontology, where contradictory triples are identified and replaced with semantically similar entities to create inconsistent triples, which are then used for training.

Benefits of technology

This approach systematically generates negative samples that help in training the knowledge graph embedding to avoid predicting incorrect triples, improving the accuracy and consistency of the knowledge graph.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007826592000034
    Figure 0007826592000034
  • Figure 0007826592000035
    Figure 0007826592000035
  • Figure 0007826592000036
    Figure 0007826592000036
Patent Text Reader

Abstract

To provide a method, a program and a device for determining negative samples for training a knowledge graph embedding of a knowledge graph.SOLUTION: A method includes the steps of: determining predicted triples 310, using knowledge graph embedding 308; determining a set 312 of triples including at least one triple of a knowledge graph 302, and at least one of the predicted triples 310 that are inconsistent with respect to ontology 304; determining, from the set 312 of triples, a replacement entity for object entity in the triple of the prediction triple 310; determining a negative sample 306-1 so as to include a relation, subject entity and replacement entity; or determining, from a subset 312, a replacement entity for the subject entity in the predicted triples 310; and determining the negative sample 306-1 so as to include the relation, the object entity and the replacement entity.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a computer-implemented method for determining negative samples for training a knowledge graph embedding of a knowledge graph KG. [Background technology]

[0002] KGs can be trained with either positive or negative triples, and since KGs explicitly store only positive triples as KG facts, generating suitable negative triples is recognized as a very difficult problem. Summary of the Invention [Problem to be solved by the invention]

[0003] It would be desirable to provide a method that has a systematic approach to providing negative samples that are in fact incorrect facts. [Means for solving the problem]

[0004] Disclosure of the Invention 1. A computer-implemented method for determining negative samples for training a knowledge graph embedding of a knowledge graph, the knowledge graph being augmented with an ontology, the ontology including at least one constraint for distinguishing facts in the knowledge graph from false facts, the method comprising the following steps: determining predicted triples using the knowledge graph embedding; determining a set of triples comprising at least one triple from the knowledge graph and at least one of the predicted triples that is contradictory with respect to the ontology, wherein at least one of the predicted triples comprises a subject entity, a relation, and an object entity from the knowledge graph; determining, from the set of triples, a replacement entity for the object entity in at least one of the predicted triples, and determining the negative sample to comprise the relation, the subject entity, and the replacement entity; or determining, from a subset, a replacement entity for the subject entity in at least one of the predicted triples, and determining the negative sample to comprise the relation, the object entity, and the replacement entity. The set of triples comprising triples from the input knowledge graph and the predicted triples created by the embedding represents an explanation for the contradiction. This explanation leads to the inference of further, semantically similar, contradictory triples, which are determined via generalization of the contradictory triples inferred by the embedding model. The triples generated by this method are negative examples that are inconsistent with the knowledge graph and its associated ontology.

[0005] The method may include determining a replacement entity for the object entity such that triples resulting from replacing the object entity with the replacement entity differ from at least one predicted triple and from triples in the knowledge graph, or determining a replacement entity for the subject entity such that triples resulting from replacing the subject entity with the replacement entity differ from at least one predicted triple and from triples in the knowledge graph.

[0006] Determining a replacement entity for the subject entity may include determining a local type of the subject entity within the set of triples, and selecting a replacement entity having a local type within a predetermined order from the local types of the subject entity, which means that nearby entities in the knowledge graph are found as replacements for the subject entity.

[0007] Determining a replacement entity for the object entity may include determining a local type of the object entity within the set of triples, and selecting a replacement entity having a local type within a predetermined order from the local types of the object entity, which means that nearby entities in the knowledge graph are found as replacements for the object entity.

[0008] Preferably, the method comprises the steps of determining a plurality of replacement entities within the set of triples, and determining a negative sample for each replacement entity within the plurality of replacement entities.

[0009] To make negative samples available for further training, the method includes determining and / or storing training data that includes at least one negative sample.

[0010] The method may include training the knowledge graph embedding within an iteration using at least one negative sample from a previous iteration.

[0011] A device for determining negative samples for training a knowledge graph embedding of a knowledge graph, wherein the knowledge graph is extended with an ontology, wherein the ontology includes at least one constraint for distinguishing facts of the knowledge graph from false facts, the device is configured to perform the method.

[0012] The computer program comprises computer readable instructions which, when executed by a computer, cause the computer to perform the method.

[0013] Further preferred embodiments can be derived from the following description and drawings. [Brief explanation of the drawings]

[0014] [Figure 1] FIG. 1 illustrates an exemplary knowledge graph. [Figure 2] FIG. 1 illustrates a schematic diagram of a device for determining negative samples for training a knowledge graph embedding of a knowledge graph. [Figure 3] FIG. 1 illustrates a portion of a method for determining negative samples for training a knowledge graph embedding of a knowledge graph. DETAILED DESCRIPTION OF THE INVENTION

[0015] A Knowledge Graph (KG) includes a set of entities and a set of relationships. The KG describes facts about a given domain of interest by expressing a fact using at least one entity from the set of entities, which is interconnected to at least one other entity from the set of entities via at least one relationship from the set of relationships.

[0016] In the KG representation, entities are represented by nodes of the KG, and relationships between two entities are represented by edges of the KG between these nodes.

[0017] A fact is a triple with a subject, predicate and object. In KG, the subject is an entity, the object is also an entity, and the predicate is a relationship.

[0018] Knowledge Graph Embedding of KG In KGE, entities are represented by embeddings. In KGE, relationships are represented by embeddings. The triple of subject embedding, predicate embedding, and object embedding of a fact represents a fact in KGE.

[0019] The KG may be used to predict a relationship between a first given entity and a second given entity. The relationship may be selected from a set of relationships depending on a score. The score may be determined using a score function that maps an embedding of the first entity in the KGE, an embedding of the second entity in the KGE, and an embedding of the relationship in the KGE to a score.

[0020] The KGE may be used to predict a first entity that has a given relationship to a given second entity. The first entity may be selected from a set of entities depending on a score. The score may be determined using a score function that maps an embedding of the first entity in the KGE, an embedding of the given second entity in the KGE, and an embedding of the given relationship in the KGE to a score.

[0021] The embedding may be a vector in a vector space. Determining the score using the score function may include determining a vector sum or vector multiplication. Different formulas may also be used to determine the score. Determining the vector sum may include adding a vector representing the relationship to a vector representing the first entity. Determining the score may include determining the distance of the vector sum to a vector representing the second entity. This distance may also be determined from vector multiplication or a different formula.

[0022] The embedding of an entity may be a vector in a first vector space. The embedding of a relationship may be a vector in the first vector space or a second vector space. Determining the score may include determining a mapping between a first vector representing a first entity in the first vector space and a first vector in the second vector space. Determining the score may include determining a mapping between a second vector representing a second entity in the first vector space and a second vector in the second vector space. Determining the score using a score function may include determining a vector sum. Determining the vector sum may include adding a vector representing the relationship in the second vector space to the first vector. Determining the score may include determining a distance of the vector sum to the second vector.

[0023] In one example, this distance is the Euclidean distance.

[0024] To predict a relationship in a KG, an input including two given entities may be mapped to an output including a relationship. The relationship may be selected from a set of relationships. In one example, the selected relationship has a higher score than at least one other relationship in the set of relationships. Preferably, the relationship is selected to be the highest-scoring relationship in the set of relationships.

[0025] To predict an entity using a KG, an input including a given entity and a predetermined relationship may be mapped to an output including the entity. The entity may be selected from a set of entities. In one example, the selected entity has a higher score than at least one other entity in the set of entities. Preferably, the entity selected is the highest-scoring entity in the set of entities.

[0026] A neural network may be trained to represent a KG. The neural network may be trained with training data that includes embedded triples. The training data may include triples that represent true facts of the KG. The training data may also include triples that represent triples that are not true facts of the KG.

[0027] The neural network may be trained to map a first embedding of a given first entity and a second embedding of a given second entity of the set of entities to a score for each relationship in the set of relationships, where the relationship score represents a probability for the relationship that the relationship is between the given first entity and the given second entity.

[0028] The neural network may be trained to map the embedding of a given entity and the embedding of a given relationship in the set of relationships to a score for each entity in the set of entities, where the score for an entity represents the probability for that entity that it is the entity that has the given relationship to the given entity.

[0029] KGs are widely used in natural question and answering, web search, the Internet of Things, and data analysis. KGs store information about millions of facts.

[0030] The KG may be constructed automatically or semi-automatically, or may be constructed at least in part manually, for example, by using crowdsourcing techniques.

[0031] In training, a KG or KGE, particularly a neural network, can be trained with training data to represent available knowledge, which may include positive triples that represent true facts and negative triples that represent incorrect facts.

[0032] The KG or KGE, particularly the neural network, may be trained using positive triples or negative triples.

[0033] The method described below provides a systematic approach to providing negative triples that are invalid facts.

[0034] The method recognizes legal or positive triples and illegal or negative triples.

[0035] A KG represents an interlinked collection of factual information. A KG may be encoded as a set of triples (subject; predicate; object), e.g., (john;worksAt;bosch). The subject or object of such a triple is called an entity, and the predicate is called a relationship. A set of triples in a KG can be represented as a directed graph with labeled vertices and edges. The triples in a KG are called facts. A KG fact can be expressed as follows: man(john),worksAt(john;bosch) It can be expressed as a unary or binary ground predicate.

[0036] 1 shows a schematic representation of a knowledge graph 100. The knowledge graph 100 includes multiple entities and multiple relationships. From the knowledge graph 100, the following knowledge graph facts can be derived: (102,120,104) (110,122,104) (106,124,102) (106,128,108) (110,126,106) (110,130,108) (112,132,114) A knowledge graph fact in this example is defined by a triple (X, Y, Z), where X denotes the subject entity, Y denotes the relationship, and Z denotes the object entity.

[0037] In this example, entity 102 is "hpi", entity 104 is "germany", entity 106 is "bob", entity 108 is "person", entity 110 is "john", entity 112 is "bosch", and entity 114 is "company". In this example, relationship 120 is "locatedIn", relationship 122 is "livesIn", relationship 124 is "worksAt", relationship 126 is "friendOf", relationship 128 is "type", relationship 130 is "type", relationship 132 is "type", and relationship 134 is "locatedIn". Other entities and other relationships may exist.

[0038] In this example, relation 134 is a false predicted fact. In this example, relations 120, 122, 124, 126, 128, 130 and 132 are true facts.

[0039] KGs are extended with ontologies, which contain representations, formal naming and definitions of the individuals, classes and properties that instantiate the respective domains of discourse. Ontologies contain formal explicit descriptions of classes and / or properties and axioms about said classes and / or properties.

[0040] The ontology may be provided to detect or avoid inconsistencies in the KG, where an inconsistency means, for example, that there is a contradiction between one or more facts in the first dataset and one or more axioms in the ontology.

[0041] The KG in Figure 1, for example, has the following content:

number

[0042] In the context of this disclosure, the set of types is referred to as the set of class names N C and the set of relations is called a set of property names, N p and the set of entities is called the set of individuals N I It is called.

[0043] Set N of property names p contains the relation rdf:type, which is called type.

[0044] A KGG is a set of triples of the form 〈s,o,p〉, where s∈N I , p∈Np, if p≠type then o∈N I , otherwise o∈N C is.

[0045] KG follows the open-world assumption, which means that only parts of a fact that are true can be stored. For example, given the KG in Figure 1, <john,type,person> and <john,livesIn,germany> are true KG facts, but it is unknown which is <john,worksAt,bosch>.

[0046] Given a triple α, Ent(α) denotes the set of all entities that appear in α. For a set of triples, this means that Ent(G)=U α∈G It is expanded as Ent(α).

[0047] In this example, the ontology O is

number

[0048] A class C, which denotes a set of entities, and a role R, which denotes a binary relationship between entities, can be expressed using the following syntax:

number

[0049] where A,B∈N C is an atomic class, P∈N P is an atomic property, i.e., a binary relation. An ontology O reflects the transitivity of relation R.

number

number

[0050] [Table 1]

[0051] In the above, A and R are the class name and property name, respectively, C and D are class expressions, P and S are property expressions, and a and b are entities.

[0052] The example KG shown in Figure 1, extended with ontology O, reflects domain knowledge about people and their work locations. This ontology specifies that (1) the domain of the “worksAt” relationship is “person”, (2) the scope of “locatedIn” is “location”, and (3) “person” is disjoint with “location”.

[0053] The semantics of the knowledge graph and ontology may be used to detect inconsistencies in the KG and provide explanations for them. The semantics of the KG and ontology are interpreted as follows: I = (Δ I ,· I ) and this interpretation I=(Δ I ,· I ) contains a non-empty set Δ I and the domain of I and each A∈N C Subset A I ⊆△ I and assign each R∈N R to the binary relation R I ⊆△ I ×△ I and assign each a∈N I element a I ∈△ I An interpretation function that assigns I It includes:

[0054] For particularly complex classes and roles, interpretation I is true if the corresponding condition holds, i.e.,

number

[0055] For KGG and an ontology O, I is a model of G∪O, i.e., for every axiom α∈G∪O,

number

number

number

[0056] KGG is inconsistent with respect to an ontology O if there is no model of G∪O. For example, G∪O is inconsistent if some facts of G contradict some axioms of O.

[0057] Under the considered ontology language, inconsistency in KG has the local property: the problem of checking inconsistency for KG with respect to an ontology O can be reduced to checking inconsistency for distinct KG modules with respect to O.

[0058] Given a KGG and an entity e∈Ent(G), the module of e with respect to G may be defined as M(e;G) = {α|α∈G and e occurs in α}. The set of modules for individuals occurring in G is denoted as MG = {M(e,G)|e∈Ent(G)}.

[0059] G∪O is consistent if M(a,G)∪O is consistent for all a∈Ent(G).

[0060] The explanation for the inconsistency of G∪O is G ⊆G and ε O ε=ε with ⊆O G ∪ε O This description ε is the smallest inconsistent subset of G∪O in this example.

[0061] For example, the facts in Figure 1, including the fact with relation 134, are inconsistent with ontology O. A possible explanation for this is that ε G ={〈bosch,locatedIn,john〉,〈john,type,person〉} and

number

[0062] The KGE in this example represents entities and relations in a continuous vector space as embeddings, i.e., vectors or matrices. These embeddings are, in this example, represented by a scoring function, i.e., f:N I ×N P ×N I is used to estimate the likelihood of a triple being true via

[0063] Specific scoring functions are defined based on various vector space assumptions. The likelihood of each assumption of the embedding method being true should be higher for triples within the KG than for negative samples outside the KG. The training process may be performed by minimizing the error induced by the assumptions given by the respective loss functions.

[0064] According to the paper "Translating embedding for modeling multi-relational data. In: NeurIPS. pp. 2787-2795 (2013)" by Bordes, A., Usunier, N., Garcia-Duran, A., Weston, J., Yakhnenko, O. et al., TransE embeds entities and relations as vectors and performs a hierarchical analysis of true triples.

number

number

[0065] According to the paper "Complex embedding for simple link prediction. In: ICML. pp. 2071-2080 (2016)" by Trouillon, T., Welbl, J., Riedel, S., Gaussier, E., Bouchard, G. et al., ComplEx embeds entities as vectors and relations as matrices, and for true triples, it finds the subject embedding v S A linear mapping M P But the object embedding v O :

number

number

[0066] The KGE may be trained using any of these loss functions, or other loss functions as well.

[0067] A device 200 for determining negative samples for training a KGE is shown schematically in Figure 2. The device 200 includes at least one storage and at least one processor.

[0068] In this example, storage 202 is configured to store KGs, KGEs, ontologies, positive samples, and negative samples.

[0069] In this example, processor 204 is configured to perform a method for determining negative samples for training a KGE, which method is described below with reference to Figure 3. Storage 202 may store computer-readable instructions that, when executed by processor 204, cause processor 204 to perform the method.

[0070] The inputs to the method are a KG 302 and an ontology 304. The KG 302 may be G, and the ontology 304 may be O. The output of the method is a set of negative samples 306-1. The method also includes providing positive samples 306-2 from the KG 302. These negative samples 306-1 and positive samples 306-2 are incorporated during the iterative training and tuning of the KGE 308 in at least one iteration.

[0071] The KGE 308 may be defined according to any embedding method, for example, TransE or ComplEx. The method aims to generate an extended KGE 308 that is trained to predict triples that are consistent with the KG 302 and ontology 304.

[0072] The negative sample 306-1 is obtained based on at least one predicted triple 310 and based on at least one set of triples 312 that expresses an explanation for the discrepancy with respect to the KG 302 and the ontology 304.

[0073] The method begins in the first training iteration with step 1, in which the model of the KGE 308 is initialized.

[0074] In step 1, negative samples 306-1 are determined from KG 302 using a negative sampling method, for example, according to the paper by Bordes, A., Usunier, N., Garcia-Duran, A., Weston, J., Yakhnenko, O. et al., "Translating embedding for modeling multi-relational data. In: NeurIPS. pp. 2787-2795 (2013)."

[0075] Then step 2 is performed.

[0076] In step 2, the method includes performing embedded training using negative samples 306-1 and positive samples 306-2 to build a model for KGE 308.

[0077] This KGE308 model is used to obtain predictions and compute a set of negative samples for the next training iteration.

[0078] Then step 3 is performed.

[0079] Step 3 involves determining at least one predicted triple 310 using the KGE 308 .

[0080] At least one triple 310 includes a subject entity and an object entity from the knowledge graph 302 and a relationship defined for the knowledge graph 302 .

[0081] Predicting at least one triple 310 may include object prediction and / or subject prediction. The method may include such prediction for each triple in the training data or for selected triples in the training data. The training data includes negative samples 306-1 and positive samples 306-2.

[0082] In object prediction, an object o is determined for a triple in the training set using the subject s and predicate p of the triple. Preferably, multiple candidate objects are predicted and ranked according to their likelihood of being the object that results in a consistent triple, and the top-ranked object o is selected from the multiple objects.

[0083] These result in the prediction triples 〈s,p,o〉 being extracted as the respective predictions of the model in KGE308.

[0084] In subject prediction, a subject s is determined for a triple in the training set using the object o and predicate p of that triple. Preferably, multiple candidate subjects are predicted and ranked according to their likelihood of being the subject that results in a consistent triple, and the top-ranked subject s is selected from the multiple subjects.

[0085] These result in the prediction triples 〈s,p,o〉 being extracted as the respective predictions of the model in KGE308.

[0086] In this example, triples not in the training set are considered predictors. Triples that are in the training set are not predictors.

[0087] Then step 4 is performed.

[0088] Step 4 includes determining the set of triples 312 to include at least one triple in the knowledge graph 302 and at least one predicted triple 310 that is contradictory with respect to the ontology 304 .

[0089] Step 4 may involve determining a set of explanations for the contradiction and selecting an explanation from this set. K number of explanations may be selected.

[0090] Then step 5 is performed.

[0091] Step 5 includes, for object prediction, determining a replacement entity for the object entity in at least one predicted triple 310 from the set of triples and determining a negative sample 306-1 to include a relation, a subject entity and a replacement entity.

[0092] Determining a replacement entity for the object entity may include determining a local type of the object entity within the set of triples 312, and selecting a replacement entity having a local type within a predetermined order from the local types of the object entity.

[0093] Preferably, a replacement entity for the object entity is determined such that the triple resulting from replacing the object entity with the replacement entity is different from at least one predicted triple and from the triples in the knowledge graph 302 .

[0094] Step 5 includes determining, for subject prediction, from the set of triples 312, a replacement entity for the subject entity in at least one triple of the predicted triples 310, and determining negative samples 306-1 to include a relation, an object entity, and a replacement entity.

[0095] Determining a replacement entity for the subject entity may include determining a local type of the subject entity within the set of triples 312 and selecting a replacement entity having a local type within a predetermined order from the local types of the subject entity.

[0096] The local type of an entity is defined as a tuple that includes other entities via type-relationships and also the input / output relationships to / from that entity. The local types of entities can be ordered based on some criteria, for example subset-relationships.

[0097] Preferably, a replacement entity for the subject entity is determined such that a triple resulting from replacing the subject entity with the replacement entity differs from at least one predicted triple and from a triple in the knowledge graph.

[0098] This means that at least one predicted triple 310 is generalized into a generalized triple for other semantically similar triples, which is used to obtain an expanded set of negative examples 306-1.

[0099] The calculated negative samples 306-1 are then fed back as inputs for training. Preferably, the negative samples for subject prediction and object prediction are fed back as inputs for training.

[0100] Then step 2 is performed.

[0101] Steps 4 and 5 are described for at least one predicted triple 310. If more than one predicted triple 310 is found to be inconsistent with respect to KG 302 and ontology 304, these triples may be treated similarly.

[0102] Preferably, a set of inconsistent triples is predicted in training. Therefore, once inconsistent predictions for triples are identified, step 5 may include detecting inconsistency patterns from the predictions and generalizing the inconsistency patterns to obtain entities in KG 302 that may be used as replacement entities to form other similar invalid triples. Similar invalid triples are triples generalized with respect to the inconsistent triples that were actually detected.

[0103] In this way, a sufficient number of negative samples 306-1 are calculated to retrain the model of KGE 308. The negative samples 306-1 provide hints to the model of KGE 308 about incorrectly learned patterns, which helps to avoid predicting similar incorrect triples in the next iteration.

[0104] For example, a predicted triple with inconsistent object predictions

number

number

number

[0105] However, the object

number

[0106] Objects that cause conflicts regarding ontology

number

number

[0107] For an example KGG and ontology O as in Figure 1, the predicted triple may be α = 〈bosch,locatedIn,john〉. This means that the KGE model 310 predicted "john" as the object entity given the subject "bosch" and the relation "locatedIn". The explanation for the inconsistency in Relv(α,G,G)∪O is that ε = ε G ∪ε O and this is ε G ={〈bosch,locatedIn,john〉,〈john,type,person〉} and

number

[0108] To formally obtain generalized triples, the notion of local types of entities according to Glimm, B., Kazakov, Y., Liebig, T., Tran, TK, Vialard, V. et al., ISWC. pp. 180-195 (2014), Glimm, B., Kazakov, Y., Tran, T. et al., Ontology materialization by abstraction refinement in horn SHOIF. In: AAAI. pp. 1114-1120 (2017), or Tran, T., Gad-Elrab, M. H., Stepanova, D., Kharlamov, E., Stroetgen, J. et al., Fast computation of explanations for inconsistency in large-scale kgs. In: WWW 2020. pp. 2613-2619 (2020) may be used, for example:

[0109] Local Type: Let T be a set of triples and e be an entity that occurs in T. Then, if T is clear from the context, the local type of e with respect to T, written as τ(e;T) or τ(e), is the tuple τ(e) = 〈τ i (e),τ c (e),τ o (e)〉, where τ i (e)={p|〈s,p,e〉∈G},τ c (e) = {t|〈e,type,t〉∈G} and τ o (e)={p'|〈e,p',o〉∈G}.

number

number

[0110] The local type of an entity is a set of types τ c , and an input relation τ for that entity in the set of triples i and the output relationship τ o Represents.

[0111] For the example KG of Figure 1, the local type of "bob" with respect to G is τ(bob) = 〈{friendOF},{person},{worksAt}〉. G The local type of 'john' with respect to \α is

number

number

[0112] A generalized triple may be determined as a generalized sample of the given conflicting predicted triple.

[0113] Generalized example: In the following, KG 302 is referred to as G, ontology 304 is referred to as O, and triple 310 is

number

number

number

number

number

number

number

[0114] In KGG, an ontology O and its triple α in Relv(α,G)∪O have explanation ε G ∪ε O GeneralizedSamples(α) is the set of generalized triples of α with respect to ε,G, and some entities occurring in α,Relv(β,G)∪O are inconsistent for β∈GeneralizedSamples(α).

[0115] The generalized triples of an iteration may be used as negative samples 306-1 for retraining the KGE model 308 in the next one or more iterations.

[0116] The predictive triples may relate to the state of a machine, the properties of an object in a digital image, or the answer to a question.

[0117] Such triples may describe the state of a machine, the properties of an object in a digital image, or the answer to a question.

[0118] The knowledge graph may represent knowledge about mappings of machine status messages to machine states. The method may include receiving a status message and outputting a machine state in response to the status message. The state may be determined by predicting, in the knowledge graph embedding model, whether there is a triple including a subject entity representing the status and an object entity representing the machine state. The method may include outputting the machine state.

[0119] In the case of digital image processing, the knowledge graph may be a description of objects recognized in object recognition for an image. Entities in the knowledge graph may represent the objects and / or their properties. The method may include receiving the objects and outputting a description according to the objects.

[0120] In a street view, an object may be a car, a person, a house, or other part of infrastructure. In a street view, a knowledge graph triple may describe an object and / or its relationship to other objects, particularly in a digital image. The method may include receiving an object and outputting a description according to the object.

Claims

1. 1. A computer-implemented method for determining negative samples (306-1) for training a knowledge graph embedding (308) of a knowledge graph (302), comprising:

1. A method, wherein the knowledge graph (302) is extended by an ontology (304), the ontology (304) including at least one constraint for distinguishing facts of the knowledge graph (302) from false facts, (3) determining predicted triples (310) using the knowledge graph embedding (308); determining a set of triples (312) comprising at least one triple from the knowledge graph (302) and at least one predicted triple (310) that is inconsistent with respect to the ontology (304), wherein at least one of the predicted triples (310) comprises a subject entity, a relation, and an object entity from the knowledge graph (302); determining (5) from the set of triples (312) a replacement entity for the object entity in at least one of the predicted triples (310) and determining the negative sample (306-1) to include the relation, the subject entity and the replacement entity; or determining (5) from the subset (312) a replacement entity for the subject entity in at least one of the predicted triples (310) and determining the negative sample (306-1) to include the relation, the object entity, and the replacement entity; 10. A computer-implemented method comprising:

2. 2. The method of claim 1, further comprising: determining (5) a replacement entity for the object entity such that triples resulting from replacing the object entity with the replacement entity differ from the at least one predicted triple and from triples in the knowledge graph (302); or determining (5) a replacement entity for the subject entity such that triples resulting from replacing the subject entity with the replacement entity differ from the at least one predicted triple and from triples in the knowledge graph (302).

3. 2. The method of claim 1, wherein determining (5) the replacement entity for the subject entity comprises determining a local type of the subject entity within the set of triples (312) and selecting the replacement entity having a local type in a predetermined order from the local types of the subject entity.

4. 2. The method of claim 1, wherein determining (5) the replacement entity for the object entity comprises determining a local type of the object entity within the set of triples (312) and selecting the replacement entity having a local type in a predetermined order from the local types of the object entity.

5. 2. The method of claim 1, comprising determining a plurality of replacement entities within the set of triples (312); and determining a negative sample (306-1) for each replacement entity within the plurality of replacement entities.

6. The method of claim 1, comprising determining and / or storing training data comprising at least one negative sample (306-1).

7. 2. The method of claim 1, comprising the step of: training (2) the knowledge graph embedding (308) within an iteration using at least one negative sample (306-1) from a previous iteration.

8. 1. A device (200) for determining negative samples (306-1) for training a knowledge graph embedding (308) of a knowledge graph (302), comprising:

1. A device (200) in which the knowledge graph (302) is extended by an ontology (304), the ontology (304) including at least one constraint for distinguishing facts of the knowledge graph (302) from false facts, A device (200) adapted to carry out the method according to any one of claims 1 to 7.

9. A computer program comprising computer readable instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for completing knowledge graph

    JP2018085116A

  • Method for computing explanation for inconsistency in ontology-based data sets

    JP2021034054A

  • Method and system for learning sequence encoders for temporal knowledge graph completion

    US20200065668A1