Computer-implemented method and device for machine learning of facts, in particular for populating knowledge base
The method addresses information loss in string embeddings by using meta-embeddings to associate embeddings from different vocabularies, enhancing the accuracy of fact identification in knowledge bases.
Patent Information
- Application Number
- JP2024068343
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-20
- Filing Date
- 2024-04-19
- Publication Date
- 2024-10-31
AI Technical Summary
Existing machine learning models that rely on string embeddings for identifying facts in knowledge bases suffer from information loss due to word separation, leading to inaccurate predictions.
A method that utilizes meta-embeddings to associate embeddings from different vocabularies, allowing for finer granularity in identifying parts of strings, thereby reducing information loss and improving prediction accuracy.
The method enhances the accuracy of fact identification in knowledge bases by preserving more information through the use of meta-embeddings, which are independent of specific embeddings and consider multiple embeddings per part of the string.
Smart Images

Figure 2024155887000001_ABST
Abstract
Description
[Technical field]
[0001] Background technology The present invention relates to a computer-implemented method and apparatus for machine learning facts, and in particular for filling a knowledge base. [Background technology]
[0002] To machine learn facts, models are used that rely on string embeddings to identify facts. The model uses sentence word segmentation to identify parts of the string. Embeddings are then identified for each of these parts. This results in a loss of information. Summary of the Invention [Problem to be solved by the invention]
[0003] Disclosure of the Invention A computer-implemented method and apparatus for machine learning facts, and in particular for filling a knowledge base, avoids such losses. [Means for solving the problem]
[0004] In this method, it is assumed that a string is provided, a first set of embeddings of parts of the string is determined, a second set of embeddings of parts of the string is determined, a fact is determined, in particular in a knowledge base, depending on the variables for predicting the fact, and from these sets, one variable of the variables for predicting the fact is determined for each corresponding embedding. The variables are meta-embeddings, which are determined from the parts of the string whose embeddings correspond to each other. This means that, depending on the embedding vocabulary, one embedding is associated with a part of the string occurring in the word segmentation method, or several embeddings are associated with this part. This allows a granularity comparable to or more precise than that of the word segmentation method. This allows less information loss when more than one embedding occurs per part.
[0005] Preferably, these variables are identified independent of embeddings from the first set for which the second set does not contain a corresponding embedding, meaning that embeddings of the first set without a corresponding embedding in the second set remain unconsidered.
[0006] Preferably, for embeddings from the first set for which the second set does not contain a corresponding embedding, an embedding is provided string-independently and one of the variables for predicting a fact is identified depending on the embedding from the first set and the provided embedding string-independently, which means that embeddings of the first set without a corresponding embedding in the second set are considered.
[0007] Preferably, for a first embedding from the first set for which the second set does not contain a corresponding embedding, a second embedding from the first set for which the second set does contain a corresponding embedding is identified and one variable of the variables for predicting a fact is identified from the second set depending on the first embedding and the second embedding and an embedding corresponding to the second embedding, which means that an embedding from the first set without a corresponding embedding in the second set is considered together with an embedding from the first set for which there is a corresponding embedding in the second set.
[0008] Preferably, the variables for predicting the fact are identified depending on the first embedding and the second embedding and an embedding corresponding to the second embedding and depending on the average of the first embedding and the second embedding, whereby the two embeddings are taken into account together.
[0009] Preferably, mutually corresponding embeddings are identified depending on their position in the order of the parts of the string, whereby parts that correspond in the order of separation of the string are made to correspond to each other.
[0010] Preferably, corresponding embeddings are identified depending on common characters, in particular at the beginning of each part of the string, whereby corresponding parts are associated with each other based on the characters at the separation of the strings.
[0011] Preferably, the string is partitioned into a first list of portions that are uniquely associated with embeddings from a first set, the string is partitioned into a second list of portions that are uniquely associated with embeddings from a second set, the mutually corresponding portions of the lists being defined depending on the order in which the portions are arranged in the lists, and corresponding embeddings are identified depending on the mutually corresponding portions of the lists.
[0012] Preferably, the first set of embeddings is specified depending on a first vocabulary and the second set of embeddings is specified depending on a second vocabulary different from the first vocabulary, the first vocabulary and the second vocabulary being different embedding vocabularies leading to different embeddings.
[0013] Preferably, the string is broken down into parts of the string according to certain characters of the string and / or according to word separation and / or syllable separation and / or letter separation rules.
[0014] Preferably, corresponding embeddings from the set are concatenated, added or multiplied together to identify the variables.
[0015] An apparatus for machine learning facts, in particular for filling a knowledge base, includes at least one processor and at least one memory, where the at least one processor is configured to execute instructions that, when executed on the at least one processor, perform the method, and where the at least one memory is configured to store the instructions.
[0016] A program for machine learning facts, in particular for filling a knowledge base, comprises instructions for carrying out the method when executed on at least one processor.
[0017] Further advantageous embodiments will become apparent from the following description and the drawings. [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is a schematic diagram of an apparatus for machine learning. [Diagram 2] FIG. 1 illustrates the architecture of a portion of a model for predicting facts. [Diagram 3] FIG. 1 illustrates steps in a method for machine learning. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] In FIG. 1, a schematic diagram of an apparatus 100 for machine learning is shown generally.
[0020] The apparatus 100 includes at least one processor 102 and at least one memory 104 .
[0021] The at least one processor 102 is configured to execute instructions that, when executed, perform a method for machine learning on the at least one processor 102.
[0022] The at least one memory 104 is configured to store instructions.
[0023] A program for machine learning facts includes instructions. At least one processor 102 is configured to execute the program.
[0024] The at least one memory 104, in this example, is configured to store a knowledge base, such as a knowledge graph.
[0025] A knowledge base contains facts, represented for example by subjects, objects and predicates, where the predicates characterize the relationships between the subjects and objects.
[0026] Facts can represent knowledge about different data types, for example text data, image data or audio data. Facts can be used for semantic segmentation.
[0027] A knowledge base may contain, for example, more than 100, more than 1000, more than 10,000, or more than 100,000 facts.
[0028] FIG. 2 shows a schematic architecture of a portion of a model 200 for predicting facts.
[0029] The model 200 includes an input 202 for strings and an output 204 for facts. The model 200 is configured to identify facts depending on the strings.
[0030] For example, a string includes characters representing a subject and an object, a fact includes a subject, an object, and a predicate, and the predicate is predicted by the model 200 for the subject and object.
[0031] The model 200 includes a first layer 206 between an input side 202 and an output side 204, the first layer 206 configured to determine embeddings of portions of the string depending on the string and a first vocabulary. The model 200 includes a second layer 208 between the input side 202 and the output side 204, the second layer 208 configured to determine embeddings of portions of the string depending on the string and a second vocabulary. The first vocabulary and the second vocabulary are different embedding vocabularies in this example.
[0032] The first layer 206 uses strings as input variables and maps the strings to embeddings of parts of the strings.
[0033] The second layer 208 uses strings as input variables and maps the strings to embeddings of parts of the strings.
[0034] For example, the first layer 206 maps the string Acetaminophen to an embedding of the parts "Ace", "tami" and "nophen". For example, the second layer 208 maps the string Acetaminophen to the parts "Acetami" and "nophen".
[0035] The first layer 206 is a first embedding layer E1 in this example. The second layer 208 is a second embedding layer E2 in this example. For n vocabularies, there may be n layers, i.e., n embedding layers E1, E2, ..., En. The embedding layers E1, E2, ..., En may produce different separations.
[0036] Based on the embedding of the parts, the string is separated into its parts, without requiring that the string itself be separated into its parts.
[0037] The model 200 includes a third layer 210 between the first layer 206 and the second layer 208, which is configured to combine corresponding embeddings from the first layer 206 and the second layer 208 into variables for predicting facts.
[0038] It may be envisioned to have more than two layers, for example n layers, to identify embeddings for different vocabularies. It may be envisioned to combine the corresponding embeddings from these layers into variables for prediction.
[0039] The model 200 includes functions 212 between the first layer 206 and the output 204, and between the second layer 208 and the output 204, for predicting facts depending on the variables.
[0040] The functions 212 include, for example, an encoder 214 configured to map variables to encoded variables and a decoder 216 configured to map the encoded variables to facts at the output side 204.
[0041] The function 212 may be implemented, for example, as a transformer model, a recurrent recurrent network (RRN), a long short-term memory (LSTM), or another neural network. The third layer 210 is the first layer of the function 212 in this example.
[0042] This means, for example, that for the transducer model, meta-embeddings are created in the first layer of the transducer model, allowing it to handle two or more different vocabularies, whereby additional domain-specific or language-specific embeddings are integrated.
[0043] FIG. 3 shows steps in a method for machine learning.
[0044] The method is implemented to machine learn facts, in this example with which a knowledge base is populated.
[0045] In step 302, a string is provided.
[0046] For example, the word Acetaminophen is provided.
[0047] In step 304, a first set of embeddings for portions of the string are identified.
[0048] The first set of embeddings is identified, for example, depending on the first vocabulary.
[0049] In this example, the string is split into a first list of parts, each of which is uniquely associated with an embedding from a first set.
[0050] For example, a first vocabulary specifies an embedding for Ace, an embedding for tami, and an embedding for nophen.
[0051] In step 306, a second set of embeddings for portions of the string are identified.
[0052] The second set of embeddings is identified, for example, depending on a second vocabulary that is different from the first vocabulary.
[0053] For example, a second vocabulary specifies an embedding for Acetami and an embedding for nophen.
[0054] In this example, the string is split into a second list of parts, each of which is uniquely associated with an embedding from a second set.
[0055] It may be envisaged to identify more than two sets of embeddings, for example depending on mutually distinct vocabularies. It may be envisaged to split the string into lists of parts, set by set, where the parts of each list are uniquely associated with the embeddings of the set associated with each list.
[0056] In step 308, for the corresponding embeddings from these sets, one variable each is identified for predicting the fact.
[0057] Corresponding embeddings from these sets are, for example, concatenated, added, or multiplied to identify variables.
[0058] Mutually corresponding embeddings are identified, for example, depending on their position in the ordering of the parts of the string.
[0059] For example, based on the order, Ace and Acetami are identified as first in the order and therefore corresponding.
[0060] Corresponding embeddings are identified, for example, depending on common characters, particularly at the beginning of each portion of the string.
[0061] For example, "Ace" is identified as corresponding in the parts Ace and Acetami based on the beginning of words in the matching strings.
[0062] It may be assumed that variables are identified without relying on embeddings from the first set for which the second set does not contain a corresponding embedding.
[0063] For example, from the first set, the embedding for tami is not used.
[0064] It may be assumed that variables are identified without relying on embeddings from a second set for which the first set does not contain a corresponding embedding.
[0065] It may be assumed that for embeddings from a set where at least one other set does not contain a corresponding embedding, the embedding is provided string-independent.
[0066] For example, from the first set, the embedding for tami is used and a corresponding embedding is provided for this.
[0067] It may be assumed that for each set that does not contain a corresponding embedding, an embedding is provided that is string independent for embeddings from a set for which at least one other set does not contain a corresponding embedding.
[0068] It may be assumed that one of the variables for predicting a fact is identified depending on an embedding from a set where at least one other set does not contain a corresponding embedding and depending on at least one embedding provided independent of the string.
[0069] It may be assumed that for a first embedding from the first set for which the second set does not contain a corresponding embedding, a second embedding from the first set for which the second set does contain a corresponding embedding is identified.
[0070] It may be assumed that one of the variables for predicting a fact is identified from the second set depending on the first embedding and the second embedding and an embedding corresponding to the second embedding.
[0071] The variables for predicting the facts are identified depending on the embedding corresponding to the second embedding, for example depending on the average of the first embedding and the second embedding.
[0072] It may be assumed that mutually corresponding parts of a list are defined depending on the order in which they are arranged in the list.
[0073] Corresponding embeddings are identified, for example, depending on the mutually corresponding portions of the lists.
[0074] In step 310, facts are identified depending on the variables for predicting the facts.
[0075] The facts are stored in this example in a knowledge base, for example a knowledge graph.
[0076] Facts relate to information extracted from, for example, strings of characters.
[0077] For example, a fact includes a subject, an object, and a predicate, and the predicate defines the relationship between the subject and the object. The subject is a knowledge-based entity that represents, in this example, a medicine, e.g. Acetaminophen. The object is a knowledge-based entity that represents, in this example, a group, e.g. Nichtopioid-Analgetika (non-opioid analgesics). A string includes, for example, a subject, in this example, Acetaminophen. This method is used to identify the belonging of a subject to, for example, a group of medicines. A relationship is, for example, the belonging of a subject to a group specified in the object of a fact. The information extracted from the string is, for example, an object, in this example, Nichtopioid-Analgetika.
[0078] Facts may also relate to different classifications, i.e. different associations, of strings.
[0079] Facts are used to fill a knowledge base or, for example, in the following application areas of Neuro-Linguistic Programming (NLP): Machine translation of strings, Extracting information from strings, In particular, responses to strings in Dialog System, Video or audio analysis based on string classification or regression; Time series analysis based on string classification or regression; Anomaly Identification Based on String Classification or Regression may be related to one of the following:
[0080] The variables are meta-embeddings, which in this example stand in for the first layer of the transducer model. The identification of variables can be applied to other tasks that can be addressed by the transducer model, including the NLP tasks listed, other NLP tasks, and non-NLP tasks.
[0081] A transformer model may consist of, for example, one embedding layer followed by multiple encoder and / or decoder layers. Meta-embedding replaces the embedding of this first embedding layer of the transformer model by a meta-embedding.
[0082] Alternatively, meta-embeddings can be used with other model architectures and embedding methods, allowing these to be linked, generally at a finer granularity than words.
Claims
1. 1. A computer-implemented method for machine learning facts, in particular for filling a knowledge base, comprising the steps of: A string is provided (302), A first set of embeddings for portions of the string are identified (304); A second set of embeddings for portions of the string are identified (306); The fact is identified (310), particularly in the knowledge base, depending on the variables for predicting the fact; For the corresponding embeddings, a respective one of the variables is identified from the set for predicting the fact (308). A method comprising:
2. The variables are identified (308) independent of embeddings from the first set for which the second set does not contain a corresponding embedding. The method of claim 1.
3. For embeddings from the first set for which the second set does not include a corresponding embedding, an embedding is provided independent of the string, and one of the variables for predicting the fact is identified depending on the embedding from the first set and the embedding provided independent of the string (308). The method according to claim 1 or 2.
4. For a first embedding from the first set to which the second set does not have a corresponding embedding, a second embedding from the first set to which the second set does have a corresponding embedding is identified, and one of the variables for predicting the fact is identified from the second set depending on the first embedding and the second embedding and the embedding corresponding to the second embedding (308).
4. The method according to claim 1 .
5. The variables for predicting the fact are identified (308) depending on the first embedding and the second embedding and the embedding corresponding to the second embedding and depending on an average of the first embedding and the second embedding. The method according to claim 4.
6. Corresponding embeddings are identified (308) depending on their position in the ordering of the portions of the string.
6. The method according to any one of claims 1 to 5.
7. Corresponding embeddings are identified (308) depending on the common characters, particularly at the beginning of each portion of the string.
7. The method according to any one of claims 1 to 6.
8. The string is split (304) into a first list of portions that are uniquely associated with the embeddings from the first set; The string is split (306) into a second list of portions that are uniquely associated with the embeddings from the second set; Corresponding portions of the lists are defined depending on the order in which they are arranged in the lists, and corresponding embeddings are identified depending on the corresponding portions of the lists (308).
8. The method according to any one of claims 1 to 7.
9. The first set of embeddings is identified (304) depending on a first vocabulary; The second set of embeddings is identified (306) depending on a second vocabulary different from the first vocabulary.
9. The method according to any one of claims 1 to 8.
10. The string is decomposed (302) into the portions of the string according to certain characters of the string and / or according to rules for word separation and / or syllable separation and / or letter separation; 10. The method according to any one of claims 1 to 9.
11. Corresponding embeddings from the set are concatenated, added, or multiplied together to identify the variables (308).
11. The method according to any one of claims 1 to 10.
12. An apparatus (100) for machine learning of facts, in particular for filling a knowledge base, comprising: At least one processor (102); At least one memory (104); Including, The at least one processor (102) is configured to execute instructions, which, when executed on the at least one processor (102), perform the method of any one of claims 1 to 11, The at least one memory (104) is configured to store the instructions.
1. An apparatus (100).
13. A program for machine learning facts, in particular for filling a knowledge base, comprising: The method includes instructions for performing the method according to any one of claims 1 to 11 when the instructions are executed on at least one processor (102). A program characterized by:
