Apparatus and method for numerical reasoning based on knowledge graph

The proposed method uses an encoder model with attention mechanisms and contrast learning to improve numerical reasoning in knowledge graphs, addressing the limitations of existing technologies in handling rare numeric data and inferring relationships, thereby enhancing relationship inference and attribute importance identification.

WO2025023354A1PCT designated stage expired Publication Date: 2025-01-30LG ELECTRONICS INC +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2023/010997
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-01-30

AI Technical Summary

Technical Problem

Existing numerical reasoning methodologies for knowledge graphs are limited in handling rare number property information and fail to effectively infer relationships when numeric attribute data is scarce.

Method used

The method employs an encoder model to embed numeric properties and relationships in a knowledge graph, using attention mechanisms to generate attribute embeddings and calculate enhanced entities, and applies contrast learning with positive and fraudulent samples to improve relationship recognition.

Benefits of technology

This approach enhances the ability to infer relationships and identify important numeric attributes in knowledge graphs, even when data is sparse, by effectively learning from both revealed and hidden relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2023010997_30012025_PF_FP_ABST
    Figure KR2023010997_30012025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to a numerical reasoning technology using numerical attributes of a knowledge graph. According to an aspect of the present invention, a numerical reasoning method may comprise the steps of: receiving an input of a knowledge graph including a plurality of entities, relationships between the entities, a plurality of numerical attributes of each entity, and an attribute value of each numerical attribute; calculating, for each of the plurality of entities, a relationship recognition attribute including association information about each relationship between the plurality of numerical attributes on the basis of the plurality of numerical attributes, the attribute value, and the relationship, by using an encoder model; calculating an attribute strengthening entity by merging the relationship recognition attribute with an entity by using the encoder model; and inferring, on the basis of the attribute strengthening entity, at least one first tail entity related to a first head entity from among the plurality of entities.
Need to check novelty before this filing date? Find Prior Art

Description

Numerical reasoning device and method based on knowledge graph

[0001] The present invention relates to a numerical reasoning technique using numerical properties of a knowledge graph.

[0002] Numerical reasoning is a crucial task in machine learning applications such as recommendation systems and information retrieval. Numerical reasoning refers to inferring new relationships (e.g., "the key is greater") using given relational information and numerical attributes (e.g., the key of an entity) in a knowledge graph. However, existing methods are limited to adding simple encoders or regression loss functions to learn attributes. These methods suffer from the problem of being insecure when numerical attribute information is scarce.

[0003] An object of the present invention is to provide a technique for performing numerical reasoning based on numerical properties of a knowledge graph.

[0004] Additionally, it is an object of the present invention to provide a technique for determining which numerical attributes are important factors for the relationships in a knowledge graph.

[0005] According to one aspect of the present invention, a numerical reasoning method may include a step of receiving a knowledge graph including a plurality of entities, relationships between the entities, a plurality of numeric attributes of each entity, and attribute values ​​of each numeric attribute; a step of using an encoder model to generate, for each of the plurality of entities, a relationship-aware attribute including association information for a relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, attribute values, and relationships; a step of using the encoder model to generate an attribute-enhanced entity by merging the relationship-aware attribute with the entity; and a step of inferring, based on the attribute-enhanced entity, at least one first tail entity in a relationship with a first head entity among the plurality of entities.

[0006] In one embodiment, the association information may be a weight for each of a plurality of numeric attributes that determine the relationship.

[0007] In one embodiment, the step of calculating the relation-aware attribute may include generating a plurality of attribute embeddings by embedding each of a plurality of numeric attributes together with their attribute values, and applying an attention mechanism based on the relation embeddings that embed the relationships and the plurality of attribute embeddings to calculate the relation-aware attribute.

[0008] In one embodiment, the attention mechanism may query relation embeddings and multiple attribute embeddings as keys and values.

[0009] In one embodiment, the numerical inference method may further include the steps of: using an encoder model, generating an attribute-enhanced entity for each of a second head entity among a plurality of entities, at least one second tail entity in a relationship with the second head entity, and at least one third head entity having the second head entity as a tail entity; generating a positive sample based on the attribute-enhanced entity of the at least one second tail entity; generating a negative sample based on the attribute-enhanced entity of the at least one third head entity; and training the encoder model using a contrastive learning technique based on the positive sample and the negative sample.

[0010] In one embodiment, the step of training the encoder model may perform contrastive learning in a direction that reduces loss due to positive samples and increases loss due to negative samples.

[0011] In one embodiment, the step of generating a positive sample may include mixing an attribute-enhancing entity of at least one second tail entity and an attribute-enhancing entity of a second head entity to generate the positive sample.

[0012] In one embodiment, the step of generating a negative sample may generate a negative sample by mixing an attribute-enhancing entity of at least one third head entity and an attribute-enhancing entity of the second head entity.

[0013] In one embodiment, the step of training the encoder model may train the encoder model so that the value of the final loss function is reduced based on the final loss function generated by adding the loss function of the knowledge graph and the loss function of the contrastive learning.

[0014] In one embodiment, the loss function of the knowledge graph may be a knowledge graph loss function that uses as variables the attribute-enhanced entity of the second head entity, the attribute-enhanced entity of the second tail entity, and the attribute-enhanced entity of the third head entity.

[0015] According to another aspect of the present invention, a numerical reasoning method comprises the steps of: receiving a knowledge graph including a plurality of entities, relationships between the entities, a plurality of numeric attributes of each entity, and attribute values ​​of each numeric attribute; using an encoder model, for a second head entity among the plurality of entities, a relationship-aware attribute including association information for a relationship of each of the plurality of numeric attributes based on a plurality of numeric attributes, attribute values, and relationships, and merging the relationship-aware attribute with the entity to produce an attribute-enhanced entity; using an encoder model, for each of at least one second tail entity in a relationship with the second head entity, a relationship-aware attribute including association information for a relationship of each of the plurality of numeric attributes based on attribute values ​​and relationships, and merging the relationship-aware attribute with the entity to produce an attribute-enhanced entity; The method may include: using an encoder model, for each of at least one third head entity having a second head entity as a tail entity, a step of generating a relationship-aware attribute including association information for a relationship of each of a plurality of numeric attributes based on a plurality of numeric attributes, attribute values, and relationships; generating an attribute-enhanced entity by merging the relationship-aware attribute with the entity; generating a positive sample based on the attribute-enhanced entity of at least one second tail entity; generating a negative sample based on the attribute-enhanced entity of at least one third head entity; and training the encoder model using a contrastive learning technique based on the positive sample and the negative sample.

[0016] According to another aspect of the present invention, a numerical reasoning device may include a memory including instructions; and a processor that, by executing the instructions, receives a knowledge graph including a plurality of entities, relationships between the entities, a plurality of numeric attributes of each entity, and attribute values ​​of each numeric attribute, and, using an encoder model, calculates, for each of the plurality of entities, a relationship-aware attribute including association information for a relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, attribute values, and relationships, and, using the encoder model, merges the relationship-aware attribute with the entity to calculate an attribute-enhanced entity, and, based on the attribute-enhanced entity, infers at least one first tail entity in a relationship with a first head entity among the plurality of entities.

[0017] According to another aspect of the present invention, a numerical reasoning device comprises: a memory including instructions; And by executing a command, a knowledge graph including a plurality of entities, relationships between entities, a plurality of numeric attributes of each entity, and attribute values ​​of each numeric attribute is input, and using an encoder model, for a second head entity among the plurality of entities, a relationship-aware attribute including association information for the relationship of each of the plurality of numeric attributes based on a plurality of numeric attributes, attribute values, and relationships is produced, and an attribute-enhanced entity is produced by merging the relationship-aware attribute with the entity, and using the encoder model, for each of at least one second tail entity in a relationship with the second head entity, a relationship-aware attribute including association information for the relationship of each of the plurality of numeric attributes based on attribute values ​​and relationships is produced, and an attribute-enhanced entity is produced by merging the relationship-aware attribute with the entity, and using the encoder model, for each of at least one third head entity that has the second head entity as a tail entity, a relationship-aware attribute including association information for the relationship of each of the plurality of numeric attributes based on a plurality of numeric attributes, attribute values, and relationships is produced, and an attribute-enhanced entity is produced by merging the relationship-aware attribute with the entity, and at least one The processor may include a processor that generates a positive sample based on an attribute-enhanced entity of a second tail entity, generates a negative sample based on an attribute-enhanced entity of at least one third head entity, and trains an encoder model using a contrastive learning technique based on the positive sample and the negative sample.

[0018] According to one aspect of the present invention, it becomes possible to perform numerical reasoning based on numerical properties of a knowledge graph.

[0019] Additionally, according to another aspect of the present invention, it becomes possible to determine which numerical attributes are important factors for the relationships in a knowledge graph.

[0020] FIG. 1 is a diagram for explaining numerical reasoning according to one embodiment of the present invention.

[0021] FIG. 2 is a block diagram of a knowledge graph-based numerical reasoning device according to one embodiment of the present invention.

[0022] Figure 3 is a flowchart of a knowledge graph-based numerical reasoning method according to one embodiment of the present invention.

[0023] Figure 4 is a flowchart of an encoder model learning method according to one embodiment of the present invention.

[0024] FIG. 5 is a diagram for explaining the operation of an encoder model according to one embodiment of the present invention.

[0025] FIG. 6 is a diagram for explaining a process of learning an encoder model according to one embodiment of the present invention.

[0026] FIG. 7 and FIG. 8 are drawings for explaining an application example of a numerical inference device according to one embodiment of the present invention.

[0027] Figure 9 is a block diagram of a numerical inference device according to another embodiment of the present invention.

[0028] The advantages and features of the present invention, and the methods for achieving them, will become clearer with reference to the embodiments described in detail below with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below and may be implemented in various forms. These embodiments are provided solely to ensure that the disclosure of the present invention is complete and to fully inform those skilled in the art of the scope of the invention, and the scope of the present invention is defined solely by the claims.

[0029] In describing embodiments of the present invention, specific descriptions of known functions or configurations will be omitted unless actually necessary. Furthermore, the terms described below are defined based on their functions in the embodiments of the present invention and may vary depending on the intent or custom of the user or operator. Therefore, their definitions should be based on the overall content of this specification.

[0030] The terms ‘…bu’, ‘…gi’, etc. used hereinafter mean a unit that processes at least one function or operation, which can be implemented by hardware, software, or a combination of hardware and software.

[0031] FIG. 1 is a diagram for explaining numerical reasoning according to one embodiment of the present invention.

[0032] Referring to Fig. 1, Fig. 1 (A) shows an example of a knowledge graph, Fig. 1 (B) shows attributes and attribute values ​​of entity 1, Fig. 1 (C) shows attributes and attribute values ​​of entity 2, and Fig. 1 (D) shows attributes and attribute values ​​of entity 7.

[0033] In Figure 1 (A), the knowledge graph includes entities 1 through 7, and each solid arrow represents a relationship between entities. Here, the relationship means "is taller than." Dotted arrows represent relationships that are clearly visible in the knowledge graph, while solid arrows represent relationships that are not.

[0034] For example, if we look at the relationship between Entity 1 and Entity 5, Entity 1, which is the start of the solid arrow, is taller than Entity 5, which is the end of the solid arrow. In this way, the relationship between Entity 1 and Entities 3 to 6 is clearly shown in the knowledge graph.

[0035] However, the relationship between entities 1 and 2 indicated by the dotted arrow corresponds to a case where the relationship between entities 1 and 2 cannot be defined because, although there is an attribute value (170 cm) corresponding to the attribute key of entity 1 in Fig. 1 (B), there is no attribute value corresponding to the attribute key of entity 2 in Fig. 1 (C).

[0036] Additionally, the relationship between entity 1 and entity 7 indicated by the dotted arrow corresponds to a case where there is an attribute value corresponding to the attribute key of entity 7 in Fig. 1 (D), but the relationship between entity 1 and entity 7 is not specified in the knowledge graph.

[0037] In this specification, relationships specified in the knowledge graph, such as the relationship between Entity 1 and Entities 3 to 6, are defined as “revealed relationships,” and relationships not specified in the knowledge graph, such as the relationship between Entity 1 and Entity 2 and the relationship between Entity 1 and Entity 7, are defined as “hidden relationships.”

[0038] A numerical inference device and method according to one embodiment of the present invention can infer a relationship with Entity 1 even in a situation where numerical attribute information is insufficient, such as Entity 2, or in a case where numerical attributes are sufficient but the relationship is not specified in the knowledge graph, such as Entity 7, by extracting the association between attributes and relationships. A detailed description of the numerical inference device and method for this purpose will be described below.

[0039] FIG. 2 is a block diagram of a knowledge graph-based numerical reasoning device according to one embodiment of the present invention.

[0040] Referring to FIG. 2, a numerical inference device (2000) may include an input unit (2100), an embedding unit (2200), an attribute-enhanced entity production unit (2300), a model learning unit (2400), a relationship inference unit (2500), and an output unit (2600).

[0041] The input unit (2100) can receive a knowledge graph.

[0042] In one embodiment, a knowledge graph may include multiple entities, relationships between entities, attributes of each entity, and attribute values. The attributes may be numerical attributes, such as height, weight, or age.

[0043] In one embodiment, relationships can be plural. For example, relationships between entities can be plural, such as "taller," "heavier," and "older."

[0044] Additionally, the input unit (2100) may receive conditions for numerical inference. For example, when inferring at least one first tail entity in a first relationship (e.g., “taller”) for a first head entity, the input unit (2100) may receive the first head entity and the first relationship as conditions for numerical inference.

[0045] The embedding unit (2200) can embed a knowledge graph.

[0046] In one embodiment, the embedding unit (2200) embeds each of a plurality of entities of the knowledge graph to form a plurality of entity embeddings (entity embeddings, ) can be created.

[0047] In one embodiment, the embedding unit (2200) embeds relationships between entities of a knowledge graph to form relation embeddings (relation embeddings). ) can be created.

[0048] In one embodiment, when multiple relationships exist, the embedding unit (2200) can embed each of the multiple relationships to generate multiple relationship embeddings.

[0049] The attribute-enriched entity production unit (2300) produces an attribute-enriched vector (ATU) from a knowledge graph. ) can be produced, and for this purpose, an encoder model (2310) (RA Encoder, relation-aware entity encoder) can be included.

[0050] The encoder model (2310) can produce attribute-enhanced entities from a knowledge graph, and for this purpose, can include an attribute embedding module (2311), a relationship-aware attribute production module (2312), and an attribute-enhanced entity production module (2313).

[0051] The attribute embedding module (2311) embeds attributes based on the attributes and attribute values ​​of an entity. ) can be produced.

[0052] In one embodiment, the attribute embedding module (2311) can produce a plurality of attribute embeddings by embedding each of the plurality of attributes together with their attribute values ​​for each of the plurality of entities included in the knowledge graph.

[0053] The relation-aware attribute output module (2312) generates a relation-aware attribute vector (relation-aware attribute vector, 2312) based on attribute embedding and relationships, which includes association information for each of the multiple attributes. ) can be produced. Here, the association information can mean the weight of each of the multiple attributes in determining the relationship between entities.

[0054] In one embodiment, the relation-aware attribute production module (2312) can produce relation-aware attributes by applying an attention mechanism based on multiple attribute embeddings and relation embeddings. Here, the relation embedding is a projected relation embedding (projected relation embedding, in which the relation embedding is projected into an attribute embedding space). ) can mean.

[0055] In one embodiment, the relationship recognition attribute production module (2312) can perform an attention mechanism using the relationship embedding as a query and the multiple attribute embeddings as keys and values.

[0056] The attribute-enhanced entity production module (2313) can produce an attribute-enhanced entity by merging entity embedding and relationship-aware properties.

[0057] In one embodiment, the encoder model (2310) can produce an attribute-enhanced entity for each of a plurality of entities included in the knowledge graph.

[0058] In addition, the encoder model (2310) can produce an attribute-enhanced entity for each of an entity (hereinafter, a second head entity) randomly selected from among a plurality of entities included in a knowledge graph for learning an encoding model, at least one second tail entity in a first relationship with the second head entity, and at least one third head entity that has the second head entity as a tail entity.

[0059] In one embodiment, the second head entity may be an entity having a preset number (e.g., 50) or more second tail entities and a third head entity.

[0060] In one embodiment, the second head entity may be plural.

[0061] The model learning unit (2400) can train an encoder model (2310) to produce attribute-enhanced entities from a knowledge graph, and for this purpose, can include a sample generation module (2410) and a model learning module (2420).

[0062] The sample generation module (2410) can generate positive and negative samples to be used for training the encoder model (2310).

[0063] In one embodiment, the sample generation module (2410) may generate positive samples for the second head entity based on the second tail entity. For example, the sample generation module (2410) may generate positive samples based on the weights of attribute-enhancing entities for the second tail entities.

[0064] In one embodiment, the sample generation module (2410) may generate a positive sample by mixing the second tail entity and the second head entity. For example, the sample generation module (2410) may generate a positive sample by mixing the sum of the weights of the attribute enhancement entities for the second tail entities with the attribute enhancement entity of the second head entity.

[0065] In one embodiment, the sample generation module (2410) may generate negative samples for the second head entity based on the third head entity. For example, the sample generation module (2410) may generate negative samples based on the weights of attribute enhancement entities for the third head entity.

[0066] In one embodiment, the sample generation module (2410) may generate a negative sample by mixing the third head entity and the second head entity. For example, the sample generation module (2410) may generate a negative sample by mixing the sum of the weights of the attribute-enhancing entities for the third head entities with the attribute-enhancing entity of the second head entity.

[0067] The model learning module (2420) can train the encoder model (2310) to produce attribute-enhanced entities.

[0068] In one embodiment, the model learning module (2420) can train the encoder model (2310) by applying a contrastive learning technique based on positive and negative samples.

[0069] In one embodiment, the model learning module (2420) can train the encoder model (2310) in a direction in which the value of the loss function of the contrastive learning decreases.

[0070] In one embodiment, the model learning module (2420) may train the encoder model (2310) based on the loss function of the knowledge graph and the loss function of the contrastive learning. For example, the model learning module (2420) may combine the loss function of the knowledge graph and the loss function of the contrastive learning to generate a final loss function, and train the encoder model (2310) in a direction in which the value of the final loss function decreases.

[0071] In one embodiment, the model learning module (2420) can update the parameters (e.g., weights, etc.) of the encoder model (2310), i.e., the attribute embedding module (2311), the relationship recognition attribute output module (2312), and the attribute enhanced entity output module (2313), in a direction in which the value of the final loss function decreases.

[0072] In one embodiment, the model learning module (2420) may update the parameters of the encoder model (2310) using a backpropagation algorithm.

[0073] The relationship inference unit (2500) can infer relationships between entities through numerical inference.

[0074] In one embodiment, when the relation inference unit (2500) wants to infer at least one first tail entity for a first head entity among a plurality of entities included in a knowledge graph, if a command specifying the first head entity among the plurality of entities is input, the relation inference unit (2500) can infer at least one first tail entity, which is a tail entity for the first head entity, based on the first head entity and the attribute strengthening entities of each of the plurality of entities.

[0075] In one embodiment, the relationship inference unit (2500) can infer a first tail entity corresponding to a hidden relationship based on a first head entity and an attribute enhancement entity of each of the plurality of entities.

[0076] Figure 3 is a flowchart of a knowledge graph-based numerical reasoning method according to one embodiment of the present invention.

[0077] Hereinafter, the above method is described as an example performed by a numerical inference device (2000) illustrated in FIG. 2.

[0078] Referring to FIG. 3, in step S3100, a knowledge graph is input. Specifically, the numerical reasoning device (2000) can receive a knowledge graph including multiple entities, relationships between entities, and attributes and attribute values ​​of each entity. Here, the attributes may refer to numerical attributes such as height, weight, and age.

[0079] In one embodiment, relationships can be plural. For example, relationships between entities can be plural, such as "taller," "heavier," and "older."

[0080] In step S3200, an encoder model (2310) is trained. Specifically, the numerical inference device (2000) can train the encoder model (2310) to produce attribute-enhanced entities from a knowledge graph. A detailed description thereof will be provided below with reference to FIG. 4.

[0081] In step S3300, relationship-aware properties are calculated. Specifically, the numerical reasoning device (2000) can generate entity embeddings by embedding entities for each of a plurality of entities included in the knowledge graph using the encoder model (2310), and can generate relationship embeddings by embedding relationships. The numerical reasoning device (2000) can generate attribute embeddings by embedding each of a plurality of attributes together with their attribute values ​​for each of a plurality of entities using the encoder model (2310). The numerical reasoning device (2000) can generate relationship-aware properties that include association information for the relationships of each of the plurality of attributes based on the attribute embeddings and the relationships using the encoder model (2310). Here, the association information can mean the weight of each of the plurality of attributes in determining the relationships between entities.

[0082] In one embodiment, the numerical inference device (2000) can derive relation-aware attributes by applying an attention mechanism based on multiple attribute embeddings and relation embeddings. Here, the relation embedding may refer to a projected relation embedding, which is a relation embedding projected onto an attribute embedding space.

[0083] In one embodiment, the numerical inference device (2000) can perform an attention mechanism using the relational embedding as a query and the multiple attribute embeddings as keys and values.

[0084] In step S3300, an attribute-enhanced entity is generated. Specifically, the numerical inference device (2000) can generate an attribute-enhanced entity by merging entity embedding and relationship-aware attributes using an encoder model (2310).

[0085] In one embodiment, the numerical reasoning device (2000) can produce an attribute-enhanced entity for each of a plurality of entities included in a knowledge graph.

[0086] In step S3500, relationships between entities are inferred through numerical reasoning. Specifically, the numerical reasoning device (2000) can derive relationship recognition attributes for each of multiple entities included in the knowledge graph based on attributes, attribute values, and relationships.

[0087] In one embodiment, when the numerical reasoning device (2000) is intended to infer at least one first tail entity for a first head entity among a plurality of entities included in a knowledge graph, if a command specifying the first head entity among the plurality of entities is input, the numerical reasoning device (2000) can infer at least one first tail entity, which is a tail entity for the first head entity, based on the first head entity and the attribute strengthening entities of each of the plurality of entities.

[0088] In one embodiment, the numerical inference device (2000) can infer a first tail entity corresponding to a hidden relationship based on a first head entity and an attribute-enhancing entity of each of the plurality of entities.

[0089] Figure 4 is a flowchart of an encoder model (2310) learning method according to one embodiment of the present invention.

[0090] Hereinafter, the above method is described as an example performed by a numerical inference device (2000) illustrated in FIG. 2.

[0091] In step S4100, an attribute-enhanced entity for learning an encoder model (2310) is generated. Specifically, the numerical reasoning device (2000) can generate attribute embeddings for each of an entity (hereinafter, a second head entity) randomly selected from among a plurality of entities included in a knowledge graph, at least one second tail entity in a first relationship with the second head entity, and at least one third head entity that has the second head entity as a tail entity, using the encoder model (2310). The numerical reasoning device (2000) can generate relationship-aware attributes based on the attribute embeddings and relationship embeddings using the encoder model (2310).

[0092] In one embodiment, the second head entity may be an entity having a preset number (e.g., 50) or more second tail entities and a third head entity.

[0093] In one embodiment, the second head entity may be plural.

[0094] In step S4200, an attribute-enhanced entity is generated. Specifically, the numerical inference device (2000) can generate an attribute-enhanced entity by merging entity embeddings and relationship-aware attributes for each of the second head entity, the second tail entity, and the third head entity using an encoder model (2310).

[0095] In step S4200, positive and negative samples for contrastive learning are generated. Specifically, the numerical inference device (2000) can generate positive and negative samples based on the attribute-enhanced entities of the second head entity, the second tail entity, and the third head entity.

[0096] In one embodiment, the numerical reasoning device (2000) may generate positive samples for the second head entity based on the second tail entity. For example, the numerical reasoning device (2000) may generate positive samples based on the weights of attribute-enhancing entities for the second tail entities.

[0097] In one embodiment, the numerical reasoning device (2000) can generate a positive sample by mixing the second tail entity and the second head entity. For example, the numerical reasoning device (2000) can generate a positive sample by mixing the sum of the weights of the attribute-enhancing entities for the second tail entities with the attribute-enhancing entity of the second head entity.

[0098] In one embodiment, the numerical reasoning device (2000) may generate negative samples for the second head entity based on the third head entity. For example, the numerical reasoning device (2000) may generate negative samples based on the weights of attribute-enhancing entities for the third head entity.

[0099] In one embodiment, the numerical reasoning device (2000) can generate a negative sample by mixing the third head entity and the second head entity. For example, the numerical reasoning device (2000) can generate a negative sample by mixing the sum of the weights of the attribute-enhancing entities for the third head entities with the attribute-enhancing entity of the second head entity.

[0100] In step S4400, contrastive learning is performed. Specifically, the numerical inference device (2000) can train the encoder model (2310) by applying a contrastive learning technique based on positive and negative samples.

[0101] In one embodiment, the numerical inference device (2000) can train the encoder model (2310) in a direction in which the value of the loss function of contrastive learning decreases.

[0102] In one embodiment, the numerical reasoning device (2000) can train the encoder model (2310) based on the loss function of the knowledge graph and the loss function of the contrastive learning. For example, the numerical reasoning device (2000) can generate a final loss function by combining the loss function of the knowledge graph and the loss function of the contrastive learning, and train the encoder model (2310) in a direction in which the value of the final loss function decreases.

[0103] In one embodiment, the numerical inference device (2000) can update the parameters (e.g., weights, etc.) of the encoder model (2310), i.e., the attribute embedding module (2311), the relationship recognition attribute output module (2312), and the attribute enhanced entity output module (2313), in a direction in which the value of the final loss function decreases.

[0104] In one embodiment, the numerical inference device (2000) can update the parameters of the encoder model (2310) using a backpropagation algorithm.

[0105] The numerical inference device (2000) can perform learning on the encoder model (2310) by repeatedly performing steps S4100 to S4500 until the value of the final loss function becomes a preset value or a minimum value.

[0106] FIG. 5 is a diagram for explaining the operation of an encoder model according to one embodiment of the present invention.

[0107] Referring to FIG. 5, the encoder model (2310) may be composed of a numeric value embedding layer, a relation-aware attention layer, and a gating layer, which may correspond to the attribute embedding module (2311), the relation-aware attribute output module (2312), and the attribute-enhanced entity output module (2313) of FIG. 2, respectively.

[0108] The encoder model (2310) can receive entities, attributes (numerical values) of entities, and relations included in the knowledge graph.

[0109] The numeric value embedding layer uses the field embedding method to transform each attribute into an embedding space to integrate the context of the attribute while preserving the scalar characteristics of the attribute value (e.g., 170cm, 25 years old, 75kg, etc.), and the attribute value that is a scalar feature (e.g., 170cm, 25 years old, 75kg, etc.) can be mapped to a low-dimensional embedding space. The attribute value can be a missing value or an observable value, and in this case, as in the key of Fig. 2 (C), in the case of a missing attribute value, a specific value other than “” is used. ) can be used to distinguish between the case where the attribute value is actually “” and the case where the attribute value is missing. For example, the attribute embedding of the mth attribute among multiple attributes for entity i, can be expressed as in mathematical formula 1 below.

[0110]

[0111] Here, If the attribute value is missing, is the case when the attribute value is not missing. It means. is point-wise multiplication, is the embedding vector of the mth attribute, Is It refers to the attribute value of entity i corresponding to . and can learn attribute values ​​and attribute contexts as linear transformation matrices.

[0112] In one embodiment, the field embedding method may be a field embedding method disclosed in the open papers “An embedding learning framework for numerical features in CTR prediction. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining. 2910-2918” and “Feature interaction learning via self-attentive neural networks. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management. 1161-1170.”

[0113] Additionally, the numeric value embedding layer can create an entity embedding by embedding an entity i included in the knowledge graph, or can obtain an entity embedding created in the embedding unit (2200) of FIG. 2.

[0114] In addition, the numeric value embedding layer can create a relationship embedding by embedding the relationship between entities of the knowledge graph, or can obtain a relationship embedding created in the embedding unit (2200) of Fig. 2. The numeric value embedding layer is a single-layer perceptron, as shown in Equation 2 below. Using this, we can create a projected relation embedding by projecting the relation embedding into the attribute embedding space.

[0115]

[0116] A relation-aware attention layer can produce relation-aware attributes that include association information for the relationship between each of multiple attributes based on attribute embedding and relation embedding. Here, the association information can mean the importance (weight) that influences determining the relationship between each of multiple attributes. For example, if the relationship between Entity 1 and Entity 2 in Figure 1 is “acquaintance,” this is because, among attributes such as height, age, and weight, age should be considered more than other attributes when determining this relationship. Furthermore, if the relationship between Entity 1 and Entity 2 is “heighter,” this is because, among attributes such as height, age, and weight, height should be considered more than other attributes.

[0117] The relation-aware attention layer can perform a relation-aware attention mechanism that uses a multi-head self-attention mechanism that performs self-attention multiple times to determine the importance to be considered in determining the relationship for each of multiple attributes. Specifically, the relation-aware attention layer queries the relation embedding and the multiple attribute embeddings. ) can be used as keys and values ​​to perform the attention mechanism.

[0118] The relation-aware attention layer is an attribute embedding for the attention head h. Attention weight of can be calculated according to mathematical formulas 3 and 4 below.

[0119]

[0120] Here, and Each is a relational embedding and attribute embeddings is a linear transformation matrix that projects each of them into a low-dimensional subspace. is the inner product The attention score between the relationship and the attribute is output. Therefore, from mathematical expression 3, it is possible to determine which attribute among multiple attributes has a high importance.

[0121] Additionally, the relation-aware attention layer can perform an operation according to mathematical formula 3 for all multiple attributes (m=1, 2, …M) to determine the importance of each of the multiple attributes.

[0122] The relation-aware attention layer provides attention weights for each of the multiple attributes. Each is normalized according to the mathematical expression 4 below, and each normalized attention weight is multiplied by its corresponding attribute embedding as in the mathematical expression 5 below, and by adding these multiplied values, the final attention weight of entity i for head h is obtained. can be produced.

[0123]

[0124] Here, is a property embedding is a linear transformation matrix for projecting into a low-dimensional high space.

[0125]

[0126] In the present invention, through such normalization, it becomes possible to obtain the importance of each of multiple attributes for a relationship.

[0127] By repeating this process, the relation-aware attention layer calculates the attention weights for all attention heads (h = 1, 2, 3, …H). can be produced.

[0128] The relation-aware attention layer calculates the attention weights for all attention heads (h = 1, 2, 3, …H). Based on this, the relationship recognition property can be calculated according to the mathematical formula 6 below.

[0129]

[0130] Here, stands for concatenation operator.

[0131] Accordingly, the relationship recognition attribute may include the importance of each of the multiple attributes in determining the relationship, i.e., the association information for the relationship of each of the multiple attributes.

[0132] The gating layer is an entity embedding layer, according to the mathematical formula 7 below. and relationship recognition properties By merging, you can produce an attribute-enhanced entity.

[0133]

[0134] Here, , and denotes a linear transformation matrix, b denotes bias, is the sigmoid function, can mean the hyperbolic tangent function.

[0135] The gating layer can be created by modifying the layer of the Gated Recurrent Unit (GRU). That is, the gating layer of the present invention uses smaller parameters than the GRU layer.

[0136] FIG. 6 is a diagram for explaining a process of learning an encoder model according to one embodiment of the present invention.

[0137] Referring to FIG. 6, among the multiple entities included in the knowledge graph, if an entity whose attribute key value is 170cm is selected as the second head entity, then entities whose attribute key values ​​are 155cm, 160cm, and 165cm are determined as the second tail entities, and entities whose attribute key values ​​are 176cm and 180cm are determined as the third head entities, according to the direction of the solid arrow.

[0138] Here, since the second tail entity has the second head entity as its head entity, the second tail entity can be defined as a positive tail entity for the second head entity. Furthermore, since the third head entity has the second head entity as its tail entity, the third head entity can be defined as a negative tail entity for the second head entity.

[0139] Thereafter, the encoder model (2310) can generate attribute-enhanced entities for the second head entity, the second tail entity, and the third head entity.

[0140] Here, the encoder models (2310) that generate attribute-enhanced entities for each of the 2nd head entity, the 2nd tail entity, and the 3rd head entity are each divided into RA Encoder (Head), RA Encoder (positive sample), and RA Encoder (negative sample), but this is to help understand the present invention, so an attribute-enhanced entity can be generated through one encoder model (2310), or an attribute-enhanced entity can be generated through two or more encoder models (2310).

[0141] Thereafter, the sample generation module (2410) can generate positive samples and negative samples, and for this purpose, can include a positive generator that generates positive samples and a negative generator that generates negative samples.

[0142] positive sample, ) can be generated based on the attribute enhancement entity of the second tail entity according to the mathematical expression 8 below.

[0143]

[0144]

[0145] Here, P denotes the set of second tail entities (positive tail entities), can mean the weight of the sum for the diversity of representation.

[0146] Also, negative samples (negative samples, ) can be generated based on the attribute enhancement entity of the third head entity according to the mathematical expression 9 below.

[0147]

[0148]

[0149] Here, N represents the set of third head entities (negative tail entities), can mean the weight of the sum for the diversity of representation.

[0150] In this way, unlike the existing link prediction that configures entities unrelated to the second head entity as negative tail entities, the present invention configures third head entities with the second head entity as a tail entity as negative tail entities, thereby making it possible to further optimize numerical inference.

[0151] In addition, the present invention applies a mixup method to obtain a hard positive sample (hard positive sample, ) and hard negative sample, ) can be created.

[0152] hard positive sample, ) can be generated according to the mathematical formula 10 below.

[0153]

[0154] Here, means the mixing coefficient sampled from a uniform distribution in the range [0,1] for all epochs, may mean an attribute strengthening entity of the second head entity.

[0155] hard negative sample, ) can be generated according to the mathematical formula 11 below.

[0156]

[0157] Here, means the mixing coefficient sampled from a uniform distribution in the range [0,1] for all epochs, may mean an attribute strengthening entity of the second head entity.

[0158] Positive and negative samples are attributes of the second head entity. When mixed with , positive and negative samples may be difficult to distinguish because they come closer to the decision boundary.

[0159] In the present invention, a hard positive sample (hard positive sample, ) and hard negative samples, ) is always true because it does not cross the decision boundary.

[0160] At this time, the loss function of contrastive learning can be defined as in mathematical equation 12 below.

[0161]

[0162] Here, can mean a score function such as TransE.

[0163] This mixing technique makes it possible to obtain a quantity of tail entities that do not correspond to the training data, i.e., the second tail entity and the third head entity.

[0164] Therefore, the encoder model (2310) can better understand the attribute space that cannot be accessed using only training data.

[0165] Additionally, scores for truffles (h, r, i) for the second head entity, the second tail entity, and the third head entity are calculated.

[0166] In the present invention, the score of the truffle is the head entity and tail entities Entity that strengthens the attributes of the head entity other than and It should be generated based on. That is, to calculate the score of a knowledge graph, it may not be appropriate to use a score function for a traditional form of knowledge graph, such as TraseE, due to problems such as assigning entities with different attribute values ​​to the same location.

[0167] Therefore, in the present invention, a score function, such as mathematical expression 13 below, is used.

[0168]

[0169] Here, may refer to the weight of the numerical reasoning score function. is TransE( ), the head entity and tail entities Entity that strengthens the attributes of the head entity other than and It is replaced with , in order to preserve and maintain the structural information of the knowledge graph. is the score function of the order-embedding model ( ) in the head entity and tail entities Entity that strengthens the attributes of the head entity other than and It is replaced with and modified in some way. Projection parameter It plays a pivotal role in mapping entities to a relational-specific space, meaning that there is an order to each entity based on the relationships it is connected to.

[0170] In the present invention, the loss function of the knowledge graph is a binary cross-entropy loss function in ConvE and LiteralE, as in Equation 14. ) can be used. In the present invention, the head entity and tail entities Entity that strengthens the attributes of the head entity other than and is replaced with . Afterwards, a sigmoid function can be applied to the scores of truffles (h, r, i) to treat the scores of each truffle as probabilities.

[0171]

[0172] means a probability vector in which the i-th element represents the probability of a triple (h, r, i), represents the vector of the ground truth label, 1 means the presence of a triple, 0 means the other direction, means the i-th of y, can mean the i-th element of p.

[0173] In the present invention, the loss function of contrastive learning, mathematical expression 12, and the loss function of knowledge graph, mathematical expression 14, are combined to obtain the final loss function for learning the encoder model (2310). ) is used.

[0174]

[0175] Here, is the loss function of the knowledge graph, refers to the loss function of contrastive learning, may mean the weight of the contrastive learning loss.

[0176] In the present invention, the encoder model (2310) can be trained so that the value of the loss function of mathematical expression 15 becomes smaller.

[0177] At this time, the time complexity of the numerical inference device (2000) according to one embodiment of the present invention is expressed as in mathematical expression 16 below, and this can be approximated again as in mathematical expression 17.

[0178]

[0179]

[0180] The RA-encoder consists of a numeric value embedding layer, a relation-aware attention layer, and a gating layer.

[0181] The numeric value embedding layer converts attributes into embedding vectors. It takes time. Here, represents the number of properties.

[0182] The relation-aware attention layer performs the relation-aware attention mechanism. It takes time. The query is the number of relations. , and the key and value correspond to the number of properties.

[0183] The gating layer is an entity embedding and relationship recognition properties Since it merges, it does not change the time complexity.

[0184] Since contrastive learning generates positive and negative samples, the time complexity is the number of positive samples. and number of negative samples correspond to . P and N are relational triples of the training data. Since it is a triplet of , the time complexity of contrastive learning is It matches with .

[0185] With regard to the time complexity of the score function of the present invention, since the score function of TransE only computes addition or subtraction, the same remains true for the score function of the present invention to which it is applied.

[0186] Therefore, the time complexity of the present invention is equal to mathematical expression 16 or 17.

[0187] FIG. 7 and FIG. 8 are drawings for explaining an application example of a numerical inference device according to one embodiment of the present invention.

[0188] Referring to Figure 7, the height relationship between Baekdu Mountain and Seorak Mountain is not explicitly stated in the knowledge graph. However, according to the numerical inference device (2000) of the present invention, it is possible to infer the relationship that Baekdu Mountain is higher than Seorak Mountain.

[0189] Referring to FIG. 8 (A) and FIG. 8 (B), according to the numerical inference device (2000) of the present invention, even when the relationship between users 1 and 2 and products such as perfume, clothing, cake, and coffee is not clear, it is possible to recommend cake and coffee, which are products that users 1 and 2 can purchase, based on the maximum monthly purchase amount of users 1 and 2 and the prices of the products.

[0190] Figure 9 is a block diagram of a numerical inference device according to another embodiment of the present invention.

[0191] As illustrated in FIG. 9, the numerical reasoning device (2000) may include at least one of a processor (9100), a memory (9200), a storage unit (9300), a user interface input unit (9400), and a user interface output unit (9500), which may communicate with each other via a bus (9600). In addition, the numerical reasoning device (2000) may also include a network interface (9700) for connecting to a network. The processor (9100) may be a CPU or a semiconductor device that executes processing instructions stored in the memory (9200) and / or the storage unit (9300). The memory (9200) and the storage unit (9300) may include various types of volatile / non-volatile storage media. For example, the memory may include a ROM (9240) and a RAM (9250).

[0192] The devices described above may be implemented as hardware components, software components, and / or a combination of hardware components and software components. For example, the devices and components described in the embodiments may be implemented using one or more general-purpose computers or special-purpose computers, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable array (FPA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing instructions and responding. The processing device may execute an operating system (OS) and one or more software applications running on the operating system.

[0193] Additionally, the processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, the processing device is sometimes described as being used alone; however, those skilled in the art will appreciate that the processing device may include multiple processing elements and / or multiple types of processing elements. For example, the processing device may include multiple processors, or a processor and a controller. Other processing configurations, such as parallel processors, are also possible.

[0194] Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing device to perform a desired operation or may, independently or collectively, command the processing device. The software and / or data may be permanently or temporarily embodied in any type of machine, component, physical device, virtual equipment, computer storage medium or device, or transmitted signal wave, for interpretation by the processing device or for providing instructions or data to the processing device. The software may also be distributed over networked computer systems and stored or executed in a distributed manner. The software and data may be stored on one or more computer-readable recording media.

[0195] The above description is merely an illustrative example of the technical idea of ​​the present invention, and those skilled in the art will appreciate that various modifications and variations can be made without departing from the essential quality of the present invention. Therefore, the embodiments disclosed in this specification are intended to illustrate rather than limit the technical idea of ​​the present invention, and the scope of the technical idea of ​​the present invention is not limited by these embodiments. The scope of protection of the present invention should be interpreted by the following claims, and all technical ideas within a scope equivalent thereto should be interpreted as being included in the scope of the rights of the present invention.

Claims

1. A numerical reasoning method performed by a numerical reasoning device, A step of receiving a knowledge graph including multiple entities, relationships between entities, multiple numeric attributes of each entity, and attribute values ​​of each numeric attribute; A step of using an encoder model to produce, for each of the plurality of entities, a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, the attribute values, and the relationship; A step of producing an attribute-enhanced entity by merging the relationship recognition attribute with the entity using the above encoder model; and A knowledge graph-based numerical reasoning method, comprising: a step of inferring at least one first tail entity in the relationship with a first head entity among the plurality of entities based on the above-mentioned property-enhanced entity; 2. In paragraph 1, The above correlation information is, A numerical reasoning method based on a knowledge graph, wherein each of the plurality of numerical attributes determines the relationship.

3. In paragraph 1, The step of calculating the above relationship recognition properties is: Generate multiple attribute embeddings by embedding each of the above multiple numeric attributes together with their attribute values, A knowledge graph-based numerical reasoning method that calculates the relationship recognition properties by applying an attention mechanism based on the relationship embedding embedding the above relationship and the multiple attribute embeddings.

4. In paragraph 3, The above attention mechanism is, A knowledge graph-based numerical reasoning method using the above relational embedding as a query and the above multiple attribute embeddings as keys and values.

5. In paragraph 3, Using the encoder model, a step of generating an attribute enhancement entity for each of the second head entity among the plurality of entities, at least one second tail entity in the relationship with the second head entity, and at least one third head entity having the second head entity as a tail entity; A step of generating a positive sample based on an attribute enhancement entity of at least one second tail entity; generating a negative sample based on an attribute strengthening entity of at least one third head entity; and A knowledge graph-based numerical reasoning method further comprising a step of training the encoder model using a contrastive learning technique based on the positive and negative samples.

6. In paragraph 5, The step of training the above encoder model is: A knowledge graph-based numerical reasoning method that performs the above-mentioned contrastive learning in a direction of reducing the loss due to the above-mentioned positive samples and increasing the loss due to the above-mentioned negative samples.

7. In paragraph 5, The step of generating the above positive sample is: generating the positive sample by mixing the attribute strengthening entity of the at least one second tail entity and the attribute strengthening entity of the second head entity; The step of generating the above negative sample is: A knowledge graph-based numerical reasoning method for generating the negative sample by mixing the attribute-enhancing entity of at least one third head entity and the attribute-enhancing entity of the second head entity.

8. In any one of paragraphs 5 to 7, The step of training the above encoder model is: A knowledge graph-based numerical inference method that trains the encoder model so that the value of the final loss function is reduced based on the final loss function generated by adding the loss function of the knowledge graph and the loss function of the contrastive learning.

9. In paragraph 8, The loss function of the above knowledge graph is, A knowledge graph-based numerical reasoning method, which is a knowledge graph loss function that uses the attribute-enhancing entity of the second head entity, the attribute-enhancing entity of the second tail entity, and the attribute-enhancing entity of the third head entity as variables.

10. A numerical reasoning method performed by a numerical reasoning device, A step of receiving a knowledge graph including multiple entities, relationships between entities, multiple numeric attributes of each entity, and attribute values ​​of each numeric attribute; A step of using an encoder model to produce a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, the attribute values, and the relationship, for a second head entity among the plurality of entities, and merging the relationship recognition attribute with the entity to produce an attribute-enhanced entity: Using the encoder model, for each of the second head entity and at least one second tail entity in the relationship, a step of generating a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the attribute value and the relationship, and merging the relationship recognition attribute with the entity to generate an attribute-enhanced entity; Using the encoder model, for each of at least one third head entity having the second head entity as a tail entity, a step of generating a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, the attribute values, and the relationship, and merging the relationship recognition attribute with the entity to generate an attribute-enhanced entity; A step of generating a positive sample based on an attribute enhancement entity of at least one second tail entity; generating a negative sample based on an attribute strengthening entity of at least one third head entity; and A knowledge graph-based numerical reasoning method comprising a step of training the encoder model using a contrastive learning technique based on the positive and negative samples.

11. Memory containing instructions; and A knowledge graph-based numerical reasoning device, comprising a processor, which receives a knowledge graph including a plurality of entities, relationships between entities, a plurality of numerical attributes of each entity, and attribute values ​​of each numerical attribute by executing the above command, and, using an encoder model, calculates, for each of the plurality of entities, a relationship-aware attribute including association information for the relationship of each of the plurality of numerical attributes based on the plurality of numerical attributes, the attribute values, and the relationship, and, using the encoder model, merges the relationship-aware attribute with the entity to calculate an attribute-enhanced entity, and, based on the attribute-enhanced entity, infers at least one first tail entity in the relationship with respect to a first head entity among the plurality of entities.

12. In paragraph 11, The above correlation information is, A numerical reasoning device based on a knowledge graph, wherein each of the plurality of numerical attributes determines the relationship.

13. In paragraph 11, The above processor, Generate multiple attribute embeddings by embedding each of the above multiple numeric attributes together with their attribute values, A knowledge graph-based numerical inference device that calculates the relationship recognition attribute by applying an attention mechanism based on the relationship embedding embedding the above relationship and the multiple attribute embeddings.

14. In paragraph 13, The above attention mechanism is, A knowledge graph-based numerical reasoning device that uses the above relation embedding as a query and the above multiple attribute embeddings as keys and values.

15. In paragraph 13, The above processor, A knowledge graph-based numerical reasoning device, which uses the encoder model to produce an attribute-enhanced entity for each of a second head entity among the plurality of entities, at least one second tail entity in the relationship with the second head entity, and at least one third head entity having the second head entity as a tail entity, generates a positive sample based on the attribute-enhanced entity of the at least one second tail entity, generates a negative sample based on the attribute-enhanced entity of the at least one third head entity, and trains the encoder model using a contrastive learning technique based on the positive sample and the negative sample.

16. In paragraph 15, The above processor, A knowledge graph-based numerical inference device that trains the encoder model by performing the contrastive learning in a direction that reduces the loss due to the positive sample and increases the loss due to the negative sample.

17. In paragraph 15, The above processor, generating the positive sample by mixing the attribute strengthening entity of the at least one second tail entity and the attribute strengthening entity of the second head entity; A knowledge graph-based numerical reasoning device that generates the negative sample by mixing the attribute-enhancing entity of at least one third head entity and the attribute-enhancing entity of the second head entity.

18. In any one of paragraphs 15 to 17, The above processor, A knowledge graph-based numerical inference device that trains the encoder model so that the value of the final loss function is reduced based on the final loss function generated by adding the loss function of the knowledge graph and the loss function of the contrastive learning.

19. In paragraph 18, The loss function of the above knowledge graph is, A knowledge graph-based numerical reasoning device, which is a knowledge graph loss function that uses the attribute-enhancing entity of the second head entity, the attribute-enhancing entity of the second tail entity, and the attribute-enhancing entity of the third head entity as variables.

20. Memory containing instructions; and By executing the above command, a knowledge graph including a plurality of entities, relationships between entities, a plurality of numeric attributes of each entity, and attribute values ​​of each numeric attribute is input, and using an encoder model, for a second head entity among the plurality of entities, a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, the attribute values, and the relationships is calculated, and an attribute-enhanced entity is produced by merging the relationship recognition attribute with the entity, and using the encoder model, for each of at least one second tail entity in the relationship with the second head entity, a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the attribute values ​​and the relationships is calculated, and an attribute-enhanced entity is produced by merging the relationship recognition attribute with the entity, and using the encoder model, for each of at least one third head entity having the second head entity as a tail entity, a relationship recognition attribute including association information for the relationship of each of the plurality of numeric attributes based on the plurality of numeric attributes, the attribute values, and the relationships is calculated. A knowledge graph-based numerical reasoning device, comprising a processor that produces an attribute-enhanced entity by merging the relationship recognition attribute with an entity, generates a positive sample based on the attribute-enhanced entity of at least one second tail entity, generates a negative sample based on the attribute-enhanced entity of at least one third head entity, and trains the encoder model using a contrastive learning technique based on the positive sample and the negative sample.

Citation Information

Patent Citations

  • Knowledge graph reasoning method and device for concerning neighbor entities

    CN110929047A

  • Method and system for embedding knowledge gragh reflecting logical property of relations, recording medium for performing the method

    KR1020180092194A

  • Porous absorbent unit for absorbing and accommodating aerosol-forming substrate

    KR1020240078121A

  • Multi-layer lamination method through 3D printing and coating process on metal surface

    KR102434157B1

  • KR20210036881A