This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2021-189955, filed on Nov. 24, 2021, the entire contents of which are incorporated herein by reference.
Embodiments discussed herein are related to a storage medium, an information processing apparatus, and an information processing method.
For use of drugs, it is important to predict an unexpected action (side effect) in advance. Pharmaceutical manufacturers and distributors, those involved in pharmaceuticals, and the like are obliged to report to the Minister of Health, Labor and Welfare pursuant to the provisions of Article 68-10 of Pharmaceutical and Medical Device Act when they become aware of cases suspected to be due to side effects.
Pharmaceuticals and Medical Devices Agency (PMDA) discloses reports of domestic side effects reported from the manufacturers and distributors in a line list format and a comma-separated values (CSV) file format. Analysis and prediction are performed based on the data of these reports. For example, when a user inputs attributes, a disease, and an administered drug of a patient to an information processing apparatus, the information processing apparatus outputs a determination as to whether or not the patient has a possibility of a vein occlusion occurring as a side effect.
There has been disclosed a technique for providing information close to a user's search intention from knowledge graphs in consideration of the context of contents in searching.
There has also been disclosed a technique for embedding relational information composed of three data pieces (triples) in a vector space of the knowledge graph to predict links in the knowledge graph. An example of the technique for embedding in a vector space of a knowledge graph is TransE.
The technique for embedding in a vector space of the knowledge graph is a method for providing a vector representation for approximating a relationship among a subject, a property, and an object in the knowledge graph by an inner product similarity or the like. The knowledge graph embedding is considered as a promising technique for compensating for missing portions in knowledge graphs by prediction.
By using these techniques, it is possible to prepare knowledge graphs in which attributes, diseases, and administered drugs of patients are expressed, apply the technique for embedding in knowledge graphs to obtain vector data, and perform training by using the obtained vector data as compositions to predict a side effect.
According to an aspect of the embodiments, a non-transitory computer-readable storage medium storing an information processing program that causes at least one computer to execute a process, the process includes acquiring a graph dataset that includes one or more graphs each having a subject, a predicate, and an object from a knowledge graph; setting the acquired graph dataset as a positive example graph dataset that includes one or more positive example graphs; generating a negative example graph dataset that includes one or more negative example graphs each having a subject, a predicate, and an object, a predicate of each negative example graph being same as a predicate of one of the positive example graphs, an object of the negative example graph being different from an object of the one of the positive example graphs, the negative example graph being excluded from the negative example graph dataset when the object of the negative example graph is different from each object to which a predicate of any other of the positive example graphs is linked; and training for embedding in the knowledge graph by using the positive example graph dataset and the negative example graph dataset.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
The training process used in the technique for embedding in a knowledge graph performs training by using positive example graph datasets and negative example graph datasets. For example, the training process performs the training by regarding linked data pieces in the knowledge graph as a positive example graph dataset, and unlinked data pieces in the knowledge graph as a negative example graph dataset. In the training process, a negative example graph dataset is generated by arbitrarily selection, and is used for training. For example, the training process arbitrarily selects obviously impossible graph datasets and uses the graph datasets for the training. For this reason, the training process using the technique for embedding in a knowledge graph has problems that training efficiency is low and a generated model achieves only low prediction accuracy.
According to an aspect of the embodiments, it is an object to improve training accuracy of the training process using the technique for embedding in a knowledge graph.
According to one embodiment, the training accuracy of a training process using the technique for embedding in a knowledge graph may be improved.
Hereinafter, embodiments of an information processing apparatus, an information processing program, and an information processing method disclosed herein will be described in detail based on the drawings. The present disclosure is not limited by the embodiments.
First, description will be given of the technique for embedding relational information composed of multiple data pieces in a knowledge graph in order to perform link prediction in the knowledge graph (knowledge graph embedding technique). The knowledge graph embedding technique is a technique for embedding, in a vector space, a set of knowledge graphs each composed of three data pieces as a group of relational information, and converting vectors by a machine learning technique to obtain a predetermined data structure. The predetermined data structure refers to a data structure in which vectors V of respective h, r, and t where (h, r, t) (h: subject, r: predicate, and t: object) denote a group of relational information are such that Vh+Vr is as equal as possible to Vt. Use of data structures thus machine-learned makes it possible to perform a calculation such as Vh+Vr≈Vt, and thus predict t corresponding to Vh+Vr. The use of the machine-learned data structures also makes it possible to predict h corresponding to Vt−Vr and r corresponding to Vt−Vh.
As a group of relational information composed of three data pieces such as (h, r, t), data in a data format describing a relationship in which “a predicate of a subject is an object” is referred to as resource description framework (RDF) data. Although the RDF data is described which has a data structure including a group of three data pieces named a subject, a predicate, and an object, the subject may be referred to as a “subject”, the predicate may be referred to as a “property”, and the object may be referred to as an “object”. Hereinafter, the subject will be referred to as a “subject”, the predicate will be referred to as a “property”, and the object will be referred to as an “object”.
A training process used in the knowledge graph embedding technique performs training by using positive example graph datasets and negative example graph datasets. For example, the training process performs the training by treating data pieces linked in a knowledge graph as a positive example graph dataset, and data pieces unlinked in a knowledge graph as a negative example graph dataset. In the training process, a negative example graph dataset is generated by arbitrarily selection, and is used for training.
Under such a situation, in the training process, data pieces linked in a graph dataset is set as a positive example graph dataset. For example, since (drug A, disease, X disease) are linked, they are set as a positive example graph dataset (see a positive example 1). In contrast, (drug A, disease, Z disease) are set as a negative example graph dataset (see a negative example 2) by arbitrarily selecting “Z disease” because “Z disease” is unlinked to (drug A, disease). Even though “side effect a” is apparently unlinked to (drug A, disease), “side effect a” is arbitrarily selected and (drug A, disease, side effect a) are set as a negative example graph dataset (see a negative example 3). This “side effect a” is unlinked to “disease” represented as a property in any graph dataset. However, “side effect a” that is apparently unlinked to “disease” is arbitrarily selected and is set as a negative example graph dataset.
For this reason, the training process has problems that training efficiency is low and a generated training model achieves only low prediction accuracy.
To address this, the following embodiment will be described for an information processing apparatus that generates negative example graph datasets so as to improve training accuracy of a training process to be used in the knowledge graph embedding technique.
[Functional Configuration of Information Processing Apparatus]
The information processing apparatus 1 is coupled to a user device 3 and includes a control unit 10 and a storage unit 20. The control unit 10 includes a conversion unit 11, a generation unit 12, a training unit 13, and a prediction unit 14. The generation unit 12 is an example of an acquisition unit, a setting unit, and a generation unit. The training unit 13 is an example of a training unit.
The storage unit 20 stores various kinds of data. The storage unit 20 has table data 21, knowledge graphs 22, and training data 23.
The table data 21 is a database (DB) that stores data to be converted into graph datasets. In the embodiment, the table data 21 is a DB that stores data requested for predicting a side effect in use of a drug. An example of the table data 21 will be described with reference to
As an example, in a case where an item name of b_name (disease) is “type 2 diabetes”, “male” is stored as an item name of c_gender (sex), “60-69 kg” is stored as an item name of c_weight (body weight), “60 s” is stored as an item name of c_age (age), and “160-169 cm” is stored as an item name of c_height (height). Additionally, “metformin hydrochloride” is stored as an item name of dd_gname (drug), and “toxic skin eruption” is stored as an item name of nn_name (side effect).
Returning to
As an example, (“drug A”, “disease”, “X disease”) are stored as (subject, property, object) in the relational information. For example, this relational information has a relationship in which the “disease” of the “drug A” is the “X disease”. In the relational information, (“drug A”, “side effect”, “side effect a”) are stored as (subject, property, object). For example, this relational information has a relationship in which the “side effect” of the “drug A” is the “side effect a”.
Returning to
The conversion unit 11 converts the table data 21 into graph datasets. For example, the conversion unit 11 converts the table data 21 into graph datasets in accordance with an entity relationship (ER) diagram and generates the knowledge graphs 22 having the graph datasets. The conversion unit 11 concatenates each graph dataset with background knowledge. In the case of a drug, the background knowledge includes, for example, ingredients and the like of the drug. A conversion into graph datasets will be briefly described with reference to
According to the ER diagram described above, the conversion unit 11 converts each line of the table data 21 into graph datasets. The knowledge graphs 22 having the graph datasets are illustrated on the right side of
For example, for the first line of the table data 21 illustrated in
Returning to
Generation of negative example datasets according to Embodiment 1 will be described with reference to
Knowledge graphs 22 are illustrated on the left side of
The generation unit 12 generates a negative example graph dataset having the same property as the property contained in the positive example graph dataset but having a different object as follows. For example, the generation unit 12 acquires the other positive example graph datasets each having the same property as the property of the positive example graph dataset. The generation unit 12 narrows down negative example graph datasets to be generated and generates only negative example graph datasets each having the object contained in one of the other positive example graph datasets acquired. The generation unit 12 generates a negative example graph dataset having the same property as the property “disease” contained in the graph dataset a0 of the positive example 1 but having an object different from “X disease” as follows. For example, the generation unit 12 acquires another positive example graph dataset a1 having the property “disease”. The generation unit 12 generates a negative example graph dataset having the object “Z disease” contained in the acquired graph dataset a1 (see a negative example 2).
For example, the generation unit 12 excludes, from targets for negative example graph datasets, item names not contained in the item that is stored in the table data 21 and corresponds to the property in the positive example graph dataset. The item name “side effect a” is contained in the item “side effect” corresponding to the property, but is not contained in the item “disease” corresponding to the property. Accordingly, the generation unit 12 excludes a graph dataset having the item name “side effect a” that is not contained in the item “disease” corresponding to the property from the targets for negative example graph datasets (see a negative example 3). For example, the generation unit 12 excludes “side effect a” that is apparently unlinked to “disease” from the targets for the negative example graph datasets.
Other knowledge graphs 22 are illustrated on the left side in
When the item names of multiple elements are contained in the item corresponding to the property, the generation unit 12 generates negative example graph datasets by using the multiple elements as targets. In
In this case, the generation unit 12 generates a negative example graph dataset having the object “side effect c” contained in the other positive example graph dataset b1 having the item “side effect” corresponding to the property (see a negative example 2).
In addition, the generation unit 12 uses “Y disease” and “X disease” as targets for negative example graph datasets because “Z disease” contained in “disease” exists in the item “side effect” corresponding to the property as illustrated in reference sign b2. For example, the generation unit 12 generates a negative example graph dataset in which the property is “side effect” and the object is “Y disease” contained in “disease” (see a negative example 3). The generation unit 12 may generate a negative example graph dataset in which the property is “side effect” and the object is “X disease” contained in “disease”.
In this way, the generation unit 12 may generate graph datasets desired as negative example graph datasets by excluding data pieces apparently unlinked.
Returning to
An example of a training process will be described with reference to
Each of items (subject, property, object) is already initialized in n dimensions. For convenience, description will be given by assuming two dimensions. The training unit 13 arranges the initialized vectors. The training unit 13 performs training such that the vector obtained by adding the vector of the property to the vector of the subject approaches the vector of the object. As illustrated in
As illustrated in
As illustrated in
In this way, the training unit 13 iterates the above processing on each positive example graph dataset until its inter-vector distance is sufficiently reduced. The number of iterations is determined in advance as one of hyperparameters. As a result, the training unit 13 generates the vectors between which the distance is sufficiently reduced as a training result. The training unit 13 stores the training result in the training data 23. The training result is a set of the trained vectors. Although not illustrated, the training unit 13 may perform training on a negative example graph dataset such that the vector obtained by adding the vector of the property to the vector of the subject becomes farther from the vector of the object.
Returning to
As an example, in a case of prediction of “what is the “side effect” of “drug D”?”, (subject, property, object) are (“drug D”, “side effect”, t), and the object is a prediction target. In this case, the prediction unit 14 searches for the selected vector Vt such that the vector obtained by subtracting the selected vector Vt from the vector obtained by adding the vector Vr of “side effect” to the vector Vh of “drug D” is smaller than the score. The prediction unit 14 predicts the character string t corresponding to the selected vector Vt, which is searched out, as the prediction target.
[Flowchart of Training Process]
As illustrated in
On the other hand, when determining that the training has not been performed the predetermined number of times (step S12; No), the training unit 13 performs the training using the extracted one graph dataset (subject, property, object) as a positive example (step S13). For example, the training unit 13 uses the positive example graph dataset to perform training for embedding in the knowledge graphs 22.
The generation unit 12 extracts one object a from the same item as the object (step S14). For example, the generation unit 12 extracts another object contained in the same item as the object from the table data 21. For example, as negative example graph datasets each having the same property as the property linked to the object contained in the positive example graph dataset but having a different object, the generation unit 12 generates only negative example graph datasets each having an object present in another positive example graph dataset. As an example, in a case where the positive example graph dataset is (drug A, side effect, side effect a), the generation unit 12 generates only the negative example graph datasets having the different objects “side effect c” and “Z disease” contained in the item “side effect (nn_name)” which is the item in the table dataset 21 and is the same as the object “side effect a” (see
The generation unit 12 determines whether or not (subject, property, object a) are contained in the knowledge graphs 22 (step S15). When determining that (subject, property, object a) are contained in the knowledge graphs 22 (step S15; Yes), the generation unit 12 proceeds to step S14 to extract a next object.
On the other hand, when determining that (subject, property, object a) are not contained in the knowledge graphs 22 (step S15; No), the training unit 13 performs the training by using (subject, property, object a) as a negative example (step S16). For example, the training unit 13 uses the negative example graph dataset to perform the training for embedding in the knowledge graphs 22. After that, the training unit 13 proceeds to step S11 in order to extract a next graph dataset.
According to Embodiment 1 described above, the information processing apparatus 1 acquires graph datasets each containing a subject, a property, and an object from the knowledge graphs 22 in the training for embedding in the knowledge graphs 22. The information processing apparatus 1 sets the acquired graph datasets as positive example graph datasets. When the information processing apparatus 1 generates negative example graph datasets each having the same property as the property linked to the object contained in one of the positive example graph datasets but having a different object, the information processing apparatus 1 narrows down negative example graph datasets to be generated and generates only negative example graph datasets each having another object linked to the concerned property existing in another positive example graph dataset. By using the positive example graph datasets and the negative example graph datasets, the information processing apparatus 1 performs the training for embedding in the knowledge graphs 22. In this way, by using only objects that exist in other positive example graph datasets for negative example graph datasets, the information processing apparatus 1 is capable of excluding an object that is apparently unlinked and stopping generation of unnecessary negative example graph datasets. As a result, the information processing apparatus 1 skips the training on unnecessary negative example graph datasets, so that it is possible to speed up convergence of the training and improve prediction accuracy.
In Embodiment 1, when the information processing apparatus 1 generates a negative example graph dataset having the same property as the property linked to an object contained in a positive example graph dataset but having a different object, the information processing apparatus 1 generates the negative example graph dataset to be generated as follows. As described above, the information processing apparatus 1 generates only the negative example graph datasets each having the object existing in another positive example graph dataset. However, the information processing apparatus 1 is not limited to this. Instead, in a case where a class of every object is set in an ontology, the information processing apparatus 1 may generate only negative example graph datasets each having an object in the same class as the class of the object contained in a positive example graph dataset.
Embodiment 2 will be described for a case where the information processing apparatus 1 generates only negative example graph datasets each having an object in the same class as the class of the object contained in a positive example graph dataset when the class of every object is set in the ontology.
[Functional Configuration of Information Processing Apparatus]
The ontology 31 provides data used in a certain domain for modeling of the certain domain. The ontology 31 is information on the certain domain using relational information in which three data pieces are grouped. Each group of relational information includes three data pieces (triples) of a subject, a property, and an object. A class (type) of every data piece is set in the ontology 31. As an example, “disease name” is set as a class of “X disease”, “Y disease”, and “Z disease”. Then, “reaction” is set as a class of “side effect a” and “side effect c”. These classes are defined by international standards.
The generation unit 12A generates positive and negative example graph datasets to be used for training. For example, the generation unit 12A acquires a graph dataset composed of a subject, a property, and an object from the knowledge graphs 22. The generation unit 12A sets the acquired graph dataset as a positive example graph dataset. By referring to the ontology 31, the generation unit 12A generates negative example graph datasets each having an object in the same class as the class of the object contained in the positive example graph dataset. For example, when objects in multiple classes may exist in the objects linked to the property, the generation unit 12A generates negative example graph datasets by using the objects in the multiple classes as training targets. As an example, in a case where an object “Y disease” in a “disease name” class and an object “side effect c” in a “reaction” class exist in a property “side effect”, the generation unit 12A generates negative example graph datasets by using objects in the “disease name” class and the “reaction” class as training targets.
Generation of negative example datasets according to Embodiment 2 will be described with reference to
The generation unit 12A acquires a graph dataset specifying a subject, a property, and an object from the knowledge graphs 22. The generation unit 12A sets the acquired graph dataset as a positive example graph dataset. In this example, the generation unit 12A acquires a graph dataset d0 specifying (drug A, side effect, side effect a) as relational information from the knowledge graphs 22. The generation unit 12A sets the acquired graph dataset d0 as a positive example graph dataset (see a positive example 1).
In a case where the class of every object is set in the ontology 31, the generation unit 12A generates a negative example graph dataset having another object in the same class as the class of the object contained in the positive example graph dataset by referring to the ontology 31. The class of the object “side effect a” contained in the positive example graph dataset d0 is set to be “reaction” marked with reference sign c1. Accordingly, the generation unit 12A generates a negative example graph dataset having another object “side effect c” d2 in the same class as the class “reaction” c1 of the object “side effect a” contained in the positive example graph dataset d0 (see a negative example 2).
The generation unit 12A acquires a graph dataset specifying a subject, a property, and an object from the knowledge graphs 22. The generation unit 12A sets the acquired graph dataset as a positive example graph dataset. In this example, the generation unit 12A acquires a graph dataset d1 specifying (drug A, side effect, Z disease) as relational information from the knowledge graphs 22. The generation unit 12A sets the acquired graph dataset d1 as a positive example graph dataset (not illustrated).
In a case where the class of every object is set in the ontology 31, the generation unit 12A generates a negative example graph dataset having another object in the same class as the class of the object contained in the positive example graph dataset by referring to the ontology 31. The class of the object “Z disease” contained in the positive example graph dataset d1 is set to be “disease name” marked with reference sign c2. Accordingly, the generation unit 12A generates a negative example graph dataset having another object “Y disease” d3 in the same class as the class “disease name” c2 of the object “Z disease” contained in the positive example graph dataset d1 (see a negative example 3).
In this way, the generation unit 12A is capable of excluding an object that is apparently unlinked, and stopping generation of unnecessary negative example graph datasets. As a result, the training unit 13 skips the training on unnecessary negative example graph datasets, so that it is possible to speed up convergence of the training and improve prediction accuracy.
[Flowchart of Training Process]
As illustrated in
On the other hand, when determining that the training has not been performed the predetermined number of times (step S22; No), the training unit 13 performs the training using the extracted one graph dataset (subject, property, object) as a positive example (step S23). For example, the training unit 13 uses the positive example graph dataset to perform training for embedding in the knowledge graphs 22.
The generation unit 12A extracts one object a from the same class as the class of the object (step S24). For example, by referring to the ontology 31, the generation unit 12A generates negative example graph datasets each having an object in the same class as the class of the object contained in the positive example graph dataset.
The generation unit 12A determines whether or not (subject, property, object a) are contained in the knowledge graphs 22 (step S25). When determining that (subject, property, object a) are contained in the knowledge graphs 22 (step S25; Yes), the generation unit 12A proceeds to step S24 to extract a next object.
On the other hand, when determining that (subject, property, object a) are not contained in the knowledge graphs 22 (step S25; No), the training unit 13 performs the training on (subject, property, object a) as a negative example (step S26). For example, the training unit 13 uses the negative example graph dataset to perform the training for embedding in the knowledge graphs 22. After that, the training unit 13 proceeds to step S21 in order to extract a next graph dataset.
According to Embodiment 2 described above, when the class of every object is set in the ontology 31, the information processing apparatus 1 further narrows down negative example graph datasets to be generated and generates only negative example graph datasets each having another object in the same class as the class of an object contained in a positive example graph dataset. In this way, the information processing apparatus 1 is capable of excluding an object that is apparently unlinked, and stopping generation of unnecessary negative example graph datasets. As a result, the information processing apparatus 1 skips the training on unnecessary negative example graph datasets, so that it is possible to speed up convergence of the training and improve prediction accuracy.
Embodiment 2 has been described for the case where the information processing apparatus 1 narrows down negative example graph datasets to be generated and generates only negative example graph datasets each having an object in the same class as the class of an object contained in a positive example graph dataset when the class of every object is set in the ontology 31. However, the information processing apparatus 1 is not limited to this. Instead, in a case where a class of every object is not completely set in the ontology 31, the information processing apparatus 1 may use a class predictor and thereby predict the class of an object that is not set. The information processing apparatus 1 may generate a negative example graph dataset having an object in the same class as the class of the object contained in a positive example graph dataset. The reason why the ontology 31 is incomplete is that, for example, there is a case where a new disease is not yet defined in the international standards and is not set in the ontology 31.
Embodiment 3 will be described for a case where the information processing apparatus 1 predicts a class of an object that is not set by using a class predictor and generates negative example graph datasets.
[Functional Configuration of Information Processing Apparatus]
Upon receipt of input of an object, the class predictor 32 predicts a class of the input object. For example, in a case where a class of the input object is found not to be set by referring to the ontology 31, the class predictor 32 analyzes a character string of the input object and searches for an object having a similar character string. If the class of the searched-out object is set, the class predictor 32 predicts the set class as the class of the input object. For example, when the ontology 31 is incomplete, the class predictor 32 uses a data piece whose class is set to predict a class of a data piece whose class is not set.
As an example, in a case where an input object is “ . . . disease” or “ . . . symptom”, the class predictor 32 searches for an object having a character string ending with “disease” or “symptom”. For example, when “disease name” is set as a class of the searched-out object, the class predictor 32 predicts that the set “disease name” class is the class of the input object. When the “reaction” class is set for the searched-out object, the class predictor 32 predicts that the set “reaction” class is the class of the input object.
The generation unit 12B generates positive and negative example graph datasets to be used for training. For example, the generation unit 12B acquires a graph dataset containing a subject, a property, and an object from the knowledge graphs 22. The generation unit 12B sets the acquired graph dataset as a positive example graph dataset. In a case where the class of every object is not completely set in the ontology 31, the generation unit 12B uses the class predictor 32 to predict the class of the object whose class is not set. By referring to the ontology 31 and the predicted class of the object, the generation unit 12B generates negative example graph datasets each having another object in the same class as the class of the object contained in the positive example graph dataset. For example, when objects in multiple classes may be linked to a property, the generation unit 12B generates negative example graph datasets by using the objects in the multiple classes as training targets.
Generation of negative example datasets according to Embodiment 3 will be described with reference to
An overview of the generation of negative example datasets will be described with reference to
A specific example of the generation of negative example datasets will be described with reference to
In a case where the class of every object is not completely set in the ontology 31, the generation unit 12B uses the class predictor 32 to predict the class of the object whose class is not set. Since any class is not set for the object “Z disease”, the generation unit 12B uses the class predictor 32 to predict that classes of the object “Z disease” may be “disease name” and “reaction”. For example, the class predictor 32 predicts that “Z disease” may be in “disease name” and “reaction”, and sets “disease name” and “reaction” as the classes. As an example, since “Z disease” is “ . . . disease”, the class predictor 32 searches for an object containing a character string ending with “disease” and searches out “Y disease”. Because the “disease name” class is set for the searched-out object “Y disease”, the class predictor 32 predicts that the “disease name” class may be the class of “Z disease”. Additionally, since the property of “Z disease” is “side effect”, the class predictor 32 predicts that “Z disease” may be in the “reaction” class.
By referring to the ontology 31 and the predicted class of the object, the generation unit 12B generates negative example graph datasets each having another object in the same class as the class of the object contained in the positive example graph dataset. The class of the object “side effect a” contained in the positive example graph dataset is set to be “reaction” marked with reference sign c1. Accordingly, the generation unit 12B generates a negative example graph dataset having another object “side effect c” (not illustrated) in the same class as the class “reaction” c1 of the object “side effect a” contained in the positive example graph dataset f0 (see a negative example 2).
The generation unit 12B acquires a graph dataset specifying a subject, a property, and an object from the knowledge graphs 22. The generation unit 12B sets the acquired graph dataset as a positive example graph dataset. In this example, the generation unit 12B acquires a graph dataset f1 specifying (drug A, side effect, Z disease) as relational information from the knowledge graphs 22. The generation unit 12B sets the acquired graph dataset f1 as a positive example graph dataset (not illustrated).
By referring to the ontology 31 and the predicted class of the object, the generation unit 12B generates negative example graph datasets each having another object in the same class as the class of the object contained in the positive example graph dataset. The classes of the object “Z disease” contained in the positive example graph dataset f1 are predicted to be “disease name” marked with reference sign e2 and “reaction” marked with reference sign c1. Accordingly, the generation unit 12B generates a negative example graph dataset having another object “Y disease” f3 in the same class as the class “disease name” e2 of the object “Z disease” contained in the positive example graph dataset f1 (see a negative example 3).
In this way, even when the ontology 31 is incomplete, the generation unit 12B is capable of stopping generation of unnecessary negative example graph datasets. As a result, the training unit 13 skips the training on unnecessary negative example graph datasets, so that it is possible to speed up convergence of the training and improve prediction accuracy.
[Flowchart of Training Process]
As illustrated in
On the other hand, when determining that the training has not been performed the predetermined number of times (step S32; No), the training unit 13 performs the training using the extracted one graph dataset (subject, property, object) as a positive example (step S33). For example, the training unit 13 uses the positive example graph dataset to perform training for embedding in the knowledge graphs 22.
By using the class predictor 32, the generation unit 12B extracts one object a from the same class as the class of the object (step S34). For example, by referring to the ontology 31 and the predicted class of the object, the generation unit 12B generates a negative example graph dataset having another object in the same class as the class of the object contained in the positive example graph dataset.
The generation unit 12B determines whether or not (subject, property, object a) are contained in the knowledge graphs 22 (step S35). When determining that (subject, property, object a) are contained in the knowledge graphs 22 (step S35; Yes), the generation unit 12B proceeds to step S34 to extract a next object.
On the other hand, when determining that (subject, property, object a) are not contained in the knowledge graphs 22 (step S35; No), the training unit 13 performs the training on (subject, property, object a) as a negative example (step S36). For example, the training unit 13 uses the negative example graph dataset to perform the training for embedding in the knowledge graphs 22. After that, the training unit 13 proceeds to step S31 in order to extract a next graph dataset.
According to Embodiment 3 described above, in a case where the class of every object is not completely set in the ontology 31, the information processing apparatus 1 uses the class predictor 32 to predict the class of an object that is not set. The information processing apparatus 1 generates a negative example graph dataset having another object in the same class as the class of the object contained in the positive example graph dataset. In this way, the information processing apparatus 1 is capable of stopping generation of unnecessary negative example datasets even when the ontology 31 is incomplete. As a result, the information processing apparatus 1 skips the training on unnecessary negative example graph datasets, so that it is possible to speed up convergence of the training and improve prediction accuracy.
The constituent elements of the information processing apparatus 1 illustrated do not necessarily have to be physically configured exactly as illustrated in the drawings. For example, the specific forms of distribution and integration of the information processing apparatus 1 are not limited to those illustrated in the drawings, and all or part thereof may be configured to be functionally or physically distributed or integrated in given units depending on various loads, usage states, and so on. For example, the generation unit 12 and the training unit 13 may be integrated with each other. The storage unit 20 may be coupled as an external device to the information processing apparatus 1 via a network.
The various kinds of processing described in the above embodiments may be implemented by a computer such as a personal computer or a workstation executing a program prepared in advance. Hereinafter, an example of a computer that executes an information processing program implementing the same functions as those of the information processing apparatus 1 illustrated in
As illustrated in
The driving device 213 is, for example, a device for a removable disk 210. The HDD 205 stores an information processing program 205a and information processing-related information 205b.
The CPU 203 reads the information processing program 205a, develops the information processing program 205a on the memory 201, and executes the information processing program 205a as processes. Such processes correspond to the respective functional units of the information processing apparatus 1. The information processing-related information 205b corresponds to the table data 21, the knowledge graphs 22, and the training data 23. For example, the removable disk 210 stores various kinds of information such as the information processing program 205a.
The information processing program 205a may not necessarily have to be stored in the HDD 205 from the beginning. For example, the information processing program 205a may be stored in a “portable physical medium”, such as a flexible disk (FD), a compact disk read-only memory (CD-ROM), a Digital Versatile Disk (DVD), a magneto-optical disk, or an integrated circuit (IC) card, to be inserted into the computer 200. The computer 200 may execute the information processing program 205a by reading the information processing program 205a from the portable physical medium.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2021-189955 | Nov 2021 | JP | national |