Device and computer implemented method for machine learning

The method generates interpretable embeddings for entities in knowledge graphs by determining relevant features and scores, addressing the lack of explainability in existing models and enabling automatic fault detection in technical systems.

JP2024167902APending Publication Date: 2024-12-04ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024082383
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-22
Filing Date
2024-05-21
Publication Date
2024-12-04

AI Technical Summary

Technical Problem

Existing machine learning methods lack the ability to generate interpretable representations of entities in knowledge graphs, making it difficult to understand and explain the predictions made by these models.

Method used

A computer-implemented method that determines a set of features for entities in a knowledge graph using a model, assigning scores to these features based on their relevance, and projects them to generate interpretable embeddings, which include information about relationships, neighborhoods, and labels within the graph.

Benefits of technology

Enables the generation of interpretable features for entities in knowledge graphs, allowing for explainable predictions and automatic fault detection in technical systems, enhancing the understanding and reliability of machine learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024167902000001_ABST
    Figure 2024167902000001_ABST
Patent Text Reader

Abstract

To provide a device and a computer implemented method for machine learning.SOLUTION: A method includes: providing an embedding of an entity of a knowledge graph (804); determining a set of features for the entity depending on the knowledge graph (806); and providing the entity with one feature from the set of features (808), the features being selected depending on a score that is assigned to the feature using a model (808). The model is configured to project the set of features to a prediction for the embedding of the entity and to determine the score depending on a difference between the prediction and the embedding.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] background The present invention relates to an apparatus and computer-implemented method for machine learning. [Background technology]

[0002] Disclosure of the Invention A computer-implemented method and apparatus for machine learning generates model explanations for knowledge graph embeddings or knowledge graph embedding models, i.e., generates interpretable representations of entities that perform similarly to the original entity embeddings, particularly for a particular given task. Summary of the Invention [Means for solving the problem]

[0003] The computer-implemented method includes providing an embedding of an entity in a knowledge graph, determining a set of features for the entity depending on the knowledge graph, and providing a feature from the set of features to the entity, the feature being selected depending on a score assigned to the feature using a model, the model being configured to project the set of features to a prediction for the embedding of the entity and to determine the score depending on the difference between the prediction and the embedding. Given a knowledge graph pre-computed by any given model and an embedding of an entity in the knowledge graph, the method generates interpretable features for the entity that approximate the respective embedding. The interpretable features include, for example, Boolean feature vectors. The obtained feature vector encodes information extracted from the neighborhood of the entity.

[0004] Determining the set of features may include determining at least one feature in dependence on at least one relation or at least one entity of the knowledge graph, the feature providing an explanation based on the relation or entity.

[0005] Determining the set of features may include determining at least one feature to include information about a relationship that the entity has in the knowledge graph with another entity in the knowledge graph, and / or about another entity in the knowledge graph that has a relationship with the entity in the knowledge graph, and / or about another entity or relationship that exists in a predetermined vicinity of the entity in the knowledge graph, and / or about an amount of relationships that the entity has to another entity in the knowledge graph or to other entities in the knowledge graph, and / or about an amount of relationships or entities that exist in a predetermined vicinity of the entity in the knowledge graph, which features provide an explanation based on the existence of the relationships or entities in the knowledge graph.

[0006] Providing the set of features may include providing quantitative information to indicate the number of outgoing or incoming relationships assigned to an entity in the knowledge graph. These features provide a statistically based description of the relationships.

[0007] Determining the set of features may include determining at least one feature to contain information regarding the absence of a relationship between the entity in the knowledge graph and another entity in the knowledge graph, and / or information regarding the absence of another entity in the knowledge graph having a relationship with the entity in the knowledge graph, and / or information regarding the absence of another entity or relationship in the knowledge graph in a predetermined vicinity of the entity, where these features provide an explanation based on the absence or presence of a relationship or entity in the knowledge graph.

[0008] The knowledge graph can include relations with labels, and providing the set of features includes determining information about the relation or the entity or another entity to indicate the label of the relation, the feature providing an explanation based on the label.

[0009] Providing the set of features may include providing features indicative of at least one path, particularly of a given length, having the entity as its start or end point, or features indicative of the absence of at least one path, particularly of a given length, having the entity as its start or end point, which provides an explanation based on the one or more paths.

[0010] The method may include using the model to assign respective scores to a plurality of features of the set of features, determining an average of the scores assigned to the plurality of features, and selecting a feature from the set of features depending on a result of a comparison between the scores assigned to the feature and the average. Thus, the explanation is based on the most relevant features. The explanation may be based on features having a score greater than a threshold.

[0011] The entities may represent events in the technical system, the knowledge graph associates the entities with entities in the knowledge graph that represent categories of events, the knowledge graph associates the entities representing the categories with at least one other entity that represents a different event in the technical system or in another technical system, the method comprising detecting an event occurring in the technical system, triggering the technical system or automatically detecting a failure of the technical system depending on a comparison between a characteristic and a predefined characteristic assigned to the at least one other entity, whereby the technical system is automatically made to behave in an explainable manner.

[0012] An apparatus for determining an encoding of an entity of a knowledge graph comprises at least one processor and at least one memory, the at least one memory being executable by the at least one processor and storing instructions that, when executed by the at least one processor, cause the apparatus to perform the method.

[0013] The computer program is executable by a computer and contains instructions which, when executed by the computer, cause the computer to carry out the method.

[0014] Further embodiments of the invention can be derived from the following description and drawings. [Brief description of the drawings]

[0015] [Figure 1] FIG. 1 shows a schematic diagram of an apparatus for operating a technical system. [Diagram 2] FIG. 2 is a schematic diagram of an exemplary knowledge graph. [Diagram 3] FIG. 2 is a schematic diagram of an exemplary knowledge graph fragment; [Figure 4] FIG. 2 is a schematic diagram illustrating an exemplary feature vector for a snippet entity; [Diagram 5] FIG. 2 is a schematic diagram illustrating an exemplary feature vector for an entity of an exemplary knowledge graph; [Figure 6] FIG. 2 is a schematic diagram illustrating a numerical representation of entities of an exemplary knowledge graph; [Figure 7] FIG. 2 is a schematic diagram illustrating an encoding of entities of an exemplary knowledge graph; [Figure 8] 1 is a flow chart of a method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] FIG. 1 shows a schematic diagram of an apparatus 100 .

[0017] The apparatus 100 includes at least one processor 102 and at least one memory 104. The at least one memory 104 stores instructions executable by the at least one processor 102 and that, when executed by the at least one processor 102, cause the apparatus 100 to perform the method.

[0018] The device 100 may be configured to operate a technical system 106 .

[0019] The technical system 106 is a physical system in the real world. The technical system 106 may be a robot. The technical system 106 may be a manufacturing machine, a vehicle, a home appliance, a power tool, a personal assistant system, or an entrance control system.

[0020] An event may occur in the technical system 106. The event may be a change in the internal mechanical state of the technical system 106 or it may be a change in the environment of the technical system 106.

[0021] The technical system 106 may include a sensor or a controller for detecting an event. The device 100 may include a sensor for detecting an event.

[0022] The apparatus 100 generates an encoding of an entity E of a knowledge graph G.

number

[0023] The knowledge graph G may include entities that represent events and entities that represent categories of events. The knowledge graph G may include relationships that indicate relationships between the entities that represent events and the entities that represent categories. An entity E is represented by a node in the knowledge graph G. The knowledge graph G includes edges. A relationship between two entities is represented by an edge that is associated with a relationship and connects two nodes that represent the two entities.

[0024] encoding

number

number

number

number

[0025] A feature F is a set of m relations R={r1, ,r m}

[0026] A knowledge graph G represents factual information encoded, for example, as a set of <subject, predicate, object> triples or in the predicate (subject, object) of a logical form.

[0027] The knowledge graph G may, for example, include more than 100, more than 1000, more than 10000 or more than 100000 entities.

[0028] The knowledge graph G may, for example, include more than 100, more than 1000, more than 10000 or more than 100000 relations.

[0029] Knowledge Graph Embedding Model

number

[0030] For a given entity e iThe features assigned to an entity e i The feature vector v assigned to i It is represented by:

[0031] Encoding of entity E

number

number

number

number

[0032] The function W is, for example, a regression model that can provide insight into the importance of each part of the input of the function W to the prediction of the function W. The function W receives as input to the function W a vector of features F, e.g., constructed from entities E, relations R, and edges of a knowledge graph, and learns to reproduce a particular knowledge graph node embedding from this input. The knowledge graph node embedding is interpreted as a knowledge graph embedding model.

number

[0033] FIG. 2 illustrates a schematic of an exemplary knowledge graph 200 with n=11 entities and m=5 relationships.

[0034] The knowledge graph 200 includes a first entity 202, e.g., representing a first manufacturer, a second entity 204, e.g., representing a second manufacturer, a third entity 206, e.g., representing a third manufacturer, a fourth entity 208, e.g., representing a fourth manufacturer, a fifth entity 210, e.g., representing a first individual, a sixth entity 212, e.g., representing a second individual, a seventh entity 214, e.g., representing a first country, an eighth entity 216, e.g., representing a second country, a ninth entity 218, e.g., representing a first product, a tenth entity 220, e.g., representing a second product, and an eleventh entity 222, e.g., representing a third product.

[0035] The knowledge graph 200 includes a first directed relation 224, e.g., "produces", a second directed relation 226, e.g., "competitorOf", a third directed relation 228, e.g., "workAt", a fourth directed relation 230, e.g., "livesIn", and a fifth directed relation 232, e.g., "exportedTo".

[0036] The first entity 202 and the ninth entity 218 are connected by a first directed relationship 224. The second entity 204 and the ninth entity 218 are connected by a first directed relationship 224.

[0037] The fourth entity 208 and the second entity 204 are connected by a second directed relationship 224. The third entity 206 and the tenth entity 220 are connected by a first directed relationship 224. The fourth entity 208 and the eleventh entity 222 are connected by a first directed relationship 224.

[0038] The second entity 204 and the third entity 206 are connected by a second directed relationship 226 .

[0039] The fifth entity 210 and the third entity 206 are connected by a third directed relationship 226. The fifth entity 210 and the eighth entity 216 are connected by a fourth directed relationship 230.

[0040] The sixth entity 212 and the fourth entity 208 are connected by a third directed relationship 226. The sixth entity 212 and the seventh entity 214 are connected by a fourth directed relationship 230.

[0041] The eleventh entity 222 and the seventh entity 214 are connected by a fifth directed relationship 232. The tenth entity 220 and the eighth entity 216 are connected by a fifth directed relationship 232.

[0042] FIG. 3 illustrates a schematic of a fragment 300 of an exemplary knowledge graph 200 .

[0043] FIG. 4 illustrates generally an example feature vector 400 for the third entity 206 of the snippet 300 .

[0044] The feature vector 400 is a set of p=19 features F={f1, ,f 19}. According to this example, 1 codes features that are TRUE and 0 codes features that are FALSE according to knowledge graph 200. According to this example, according to knowledge graph 200, R codes outgoing directional relations with labels, R - encodes the incoming directional relationship with the label.

[0045] FIG. 5 illustrates a feature F={f1, . . . , f 19 5 illustrates an example feature vector 500 that includes:} In the feature vector, black filled circles code for 1 or TRUE, and white filled circles code for 0 or FALSE.

[0046] 6 shows a schematic of an embedding 600 of the knowledge graph 200. The embedding 600 is a representation of the entities E=e1,...,e of the exemplary knowledge graph 200 with embedding dimension d=7. 11 Numerical representation of

number

[0047] FIG. 7 illustrates an exemplary encoding 700 of entities of the knowledge graph 200, i.e.,

number

[0048] Figure 8 shows the encoding of entity E.

number

[0049] The method includes step 802.

[0050] Step 802 includes providing a knowledge graph G.

[0051] A knowledge graph G is a set of entities E={e1, , e n} and m relations R={r1, ,r m}. The knowledge graph G may include relations with labels.

[0052] The method can use embedding-based entity representations to compress the data in the knowledge graph G.

[0053] For example, knowledge graph 200 is provided with entities 202,...,222 and directed relationships 224,...,232.

[0054] The method includes step 804 .

[0055] Step 804 is to generate a knowledge graph embedding model.

number

[0056] Knowledge Graph Embedding Model

number

number

[0057] For example, for 11 entities 202, . . . , 222, entities e1, . . . , e 11 Numerical representation of

number

[0058] According to one example, the knowledge graph embedding model

number

number

[0059] The method includes step 806 .

[0060] Step 806 includes providing features F for an entity E that encode information about the given entity about its neighborhood in the knowledge graph G. The neighborhood of an entity e is, in this example, characterized by the relationships that the entity e has and / or by entities in the knowledge graph G that have a relationship r∈R with the entity e. The neighborhood may include a single entity e′ that has a relationship r with the entity e in the knowledge graph G. At least one feature of the plurality of features may include information about the existence or non-existence of a relationship between the entity in the knowledge graph and another entity in the knowledge graph.

[0061] At least one feature of the plurality of features may include information regarding the presence or absence of another entity of the knowledge graph having a relationship between the entity in the knowledge graph.

[0062] At least one feature of the plurality of features may include information regarding the presence or absence of another entity or relationship within a given vicinity of the entity in the knowledge graph.

[0063] The method may include generating features.

[0064] The method can use entity representations based on feature vectors to compress the data in the knowledge graph G.

[0065] The method builds a set of features for an entity E, where the features for a particular entity e are based on the neighborhood of this particular entity e in the knowledge graph G. The initial set of features may be constructed manually or may be computed automatically, for example using rule learning.

[0066] In one example, interpretable feature vector representations for entities are determined, and these interpretable feature vector representations are optionally combined with a knowledge graph embedding model.

number

[0067] According to one example, for an entity e∈E of a plurality of entities E, a feature f∈F of a plurality of features F is determined depending on a relation r∈R of a plurality of relations R assigned to this entity e.

[0068] According to one example, a feature is provided that indicates whether an entity participates in a given relationship.

[0069] For a relation r, we can provide a feature ∃r that describes, for an entity, that the entity has an outgoing relation with an entity. - This feature ∃r - describes for an entity that this entity has an incoming relation with some other entity.

[0070] According to one example, a feature is provided that indicates that at least one entity is connected to an entity via a relation with a given label, or that there is no connection via a relation with a given label. For example, ∃R{e'} describes for an entity that this entity has an outgoing relation with a label to an entity e'. For example, ∃R - {e'} describes an entity that this entity has an incoming relationship with a label from some entity e'.

[0071] In the case of the second entity 204 in the example knowledge graph 200, these features are ∃R{220}, ∃R - {204}.

[0072] According to one example, a feature is provided that indicates whether an entity is connected to an entity through a given relationship. For example, ∃r.{e'} describes an entity that this entity has an outgoing relationship with an entity e'. For example, ∃r - .{e'} describes, with respect to an entity, that this entity has an incoming relationship with some entity e'.

[0073] For the second entity 204 in the example knowledge graph 200, these features are ∃224.{220}, ∃226 - .{204}.

[0074] According to one example, features are provided that indicate paths, particularly paths of a given length k, that have a given entity as their start or end point.

[0075] For the third entity 206 in the example knowledge graph 200, and where k=2, one path feature for the third entity 206 is ∃224.∃232.

[0076] According to one example, a feature is provided that indicates that no path, particularly a path of a given length k, exists in the knowledge graph that has a given entity as its start or end point.

[0077] According to one example, a feature is provided that indicates the amount of outgoing or incoming relationships to an entity.

[0078] For example, we can use the notation =kR for the constructor:

number

[0079] For example, for the constructor =kR -You can use the notation:

number

[0080] For example, for the third entity 206 in the example knowledge graph 200, these features are: =1.R and =1.R - because there is one outgoing relationship and one incoming relationship to the third entity 206.

[0081] p features are grouped into a set F = {f1, ,f p}. An interpretable Boolean vector can be determined for the entity, where one interpretable Boolean vector

number

number

number

[0082] The example feature vector 400 includes p=19 features for the third entity 206 .

[0083] The method includes step 808.

[0084] Step 808 involves providing the entity with one feature from a set of features.

[0085] A feature from the set of features is provided to an entity in the knowledge graph, the feature being selected depending on the score assigned to that feature using the model. Multiple features from the set of features can be provided to an entity, selected depending on their respective scores.

[0086] The model is configured to project a set of features onto a prediction for the embedding of an entity and determine a score dependent on the difference between the prediction and the embedding.

[0087] The method may include providing one or more respective features to a plurality of entities of the knowledge graph to interpret the knowledge graph embedding or knowledge graph embedding model.

[0088] The model, in this example, is the encoding of entity E

number

number

number

[0089] The model may be a random forest regression model configured to determine a prediction for the embedding depending on a set of features.

[0090] The method involves entity embedding, i.e., numerical representation

number

number

[0091] According to one example, the encoding of entity e is

number

number

number

[0092] Encoding of entity E

number

[0093] The method derives entity embeddings from the acquired features F.

number

[0094] The method can use embedded feature selection techniques to select the features, for example, a subset of interpretable features is selected for which a random forest regression model achieves the highest accuracy for the respective task.

[0095] Let F be the feature, F, then

number

[0096] According to one example, a feature F can be a numerical representation of an entity E.

number

[0097] The model M is configured to output a score indicating the importance of a feature f ∈ F among a number of features F to the projection.

[0098] The score depends on the error of the projection, e.g., of the feature F using the model M and the numerical representation of the entity E.

number

[0099] This means that the encoding of entity E is

number

[0100] For example, if the score for feature f exceeds a threshold, we use this feature f to optimize the encoding of entity E.

number

number

[0101] For example, a score is determined for a number of features, and the threshold value is, for example, an average of the scores determined for the number of features.

[0102] This means that the method can include using the model to assign respective scores to multiple features in the set of features.

[0103] This means that the method may include determining an average of the scores assigned to a number of features.

[0104] This means that the method may comprise selecting a feature from the set of features depending on the outcome of a comparison between the score assigned to the feature and the average.

[0105] Knowledge Graph Embedding Model

number

[0106] The method may include step 810.

[0107] In step 810, the technical system 106 is operated.

[0108] According to one example, the knowledge graph comprises a first entity representing an event in the technical system 106 and a second entity representing a different event in the technical system 106 or a different technical system. The knowledge graph comprises edges connecting a node representing, for example, the first entity in the knowledge graph to another node in the knowledge graph, which another node represents an entity representing a category of events in the knowledge graph. The knowledge graph relates, for example, the second entity to the entity representing the category. The first entity is provided with a first feature or a first feature vector. The second entity is provided with a second feature or a second feature vector.

[0109] Step 810 may include detecting an event that occurs in the technical system 106 .

[0110] Step 810 may involve activating the technical system 106 or automatically detecting a fault in the technical system 106 depending on a comparison between the characteristics and predefined characteristics assigned to at least one other entity.

[0111] Once the first entity and the second entity have been classified into a particular category, the method can automatically identify one or more common characteristics shared by the entities.

[0112] The common feature or features provide a possible explanation for each classification outcome.

[0113] The absence of any common features may indicate that one of the events has been incorrectly assigned to that category. The presence of at least one common feature may indicate that the event has been correctly assigned to that category. The common features may provide an explanation for which part of the technical system 106 or the operation of the technical system 106 caused the event.

[0114] If one or more common features provide a possible explanation for the respective classification results, then when an event assigned to a category is detected in the knowledge graph, the technical system 106 can be triggered according to the action suggested by that category.

[0115] If one or more common features provide a possible explanation for the respective classification results, then upon detection of an event in the knowledge graph that is assigned to a category indicating a fault, the technical system 106 may be shut down.

[0116] A use case for the method, for example in the manufacturing domain, involves classifying failure events into specific categories (eg, high risk, low risk).

[0117] Predicting failure events is done by encoding

number

number

[0118] Given an entity e that represents a failure event i However, the knowledge graph embedding model

number

Claims

1. 1. A computer-implemented method for machine learning, comprising: The method comprises: Providing (804) embeddings of entities of the knowledge graph (200); determining (806) a set of features for the entity dependent on the knowledge graph (200); providing 808 a feature from the set of features to the entity, the feature being selected depending on a score assigned to the feature using a model; Including, the model is configured to project the set of features onto a prediction for an embedding of the entity and to determine the score in dependence on the difference between the prediction and the embedding. A method comprising:

2. determining (806) the set of features includes determining at least one feature dependent on at least one relationship or at least one entity of the knowledge graph (200); The method of claim 1.

3. Determining 806 the set of features may include: Information about relationships that the entity has in the knowledge graph (200) with other entities of the knowledge graph (200); and / or Information about another entity in the knowledge graph (200) that has a relationship between the entity in the knowledge graph (200); and / or Information about other entities or relationships that are in a given vicinity of the entity in the knowledge graph (200); and / or Information regarding the amount of relationships the entity has to another entity in the knowledge graph (200) or to other entities in the knowledge graph (200); and / or Information regarding the amount of relationships or entities that exist in a given vicinity of the entity within the knowledge graph. determining at least one characteristic to include The method according to claim 1 or 2.

4. providing (806) the set of features includes providing quantitative information to indicate a number of outgoing or incoming relationships assigned to the entity in the knowledge graph (200); The method according to claim 3.

5. Determining 806 the set of features may include: Information regarding the non-existence of a relationship between the entity in the knowledge graph (200) and another entity of the knowledge graph (200); and / or information about the non-existence of another entity of the knowledge graph having a relationship with the entity in the knowledge graph (200); and / or Information regarding the absence of other entities or relationships in the knowledge graph (200) in a given vicinity of the entity. determining at least one characteristic to include 5. The method according to any one of claims 1 to 4.

6. The knowledge graph (200) includes relations with labels; Providing 806 the set of features includes determining information about the relationship or the entity or the other entity to indicate a label of the relationship.

6. The method according to any one of claims 1 to 5.

7. Providing 806 the set of features may further comprise: or features indicative of at least one path, in particular of a given length, having said entity as its start or end point; or A feature indicating the absence of at least one path, particularly a path of a given length, having the entity as its start or end point. including providing 7. The method according to any one of claims 1 to 6.

8. The method comprises: assigning respective scores to a plurality of features in the set of features using the model; determining an average of the scores assigned to the plurality of features; and selecting said feature from said set of features depending on a result of a comparison between said score assigned to said feature and said average; Including, 8. The method according to any one of claims 1 to 7.

9. said entities represent events in a technical system (106), The knowledge graph (200) associates the entity with an entity in the knowledge graph (200) that represents a category of the event; the knowledge graph (200) relates entities representing the categories to at least one other entity representing different events in the technical system (106) or another technical system; The method comprises: - detecting an event occurring in said technical system (106), Activating said technical system (106), or - automatically detecting faults in said technical system (106) depending on a comparison between said characteristics and predetermined characteristics assigned to said at least one other entity. Including, 9. The method according to any one of claims 1 to 8.

10. An apparatus (100) for machine learning, comprising: The device (100) comprises: At least one processor (102); At least one memory (104); Equipped with The at least one memory (104) stores instructions executable by the at least one processor (102) and which, when executed by the at least one processor (102), cause the apparatus to perform a method according to any one of claims 1 to 9.

1. An apparatus (100).

11. A computer program comprising: The computer program is executable by a computer and contains instructions that, when executed by the computer, cause the computer to carry out the method according to any one of claims 1 to 9. A computer program comprising: