Inference device, learning device, inference method, trained model generation method, inference program, and learning program

The inference device addresses the issue of ethically inappropriate sentence generation by using a trained model to infer candidate words based on control words, ensuring ethical appropriateness in language model outputs.

JP7758244B2Active Publication Date: 2025-10-22MITSUBISHI ELECTRIC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025503169
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2025-10-22
Estimated Expiration
2043-05-17

AI Technical Summary

Technical Problem

Training language models using randomly collected data can result in the generation of ethically inappropriate sentences due to the reflection of human discriminatory feelings towards race, gender, ethnicity, and culture.

Method used

An inference device that includes a mask data acquisition unit, word string acquisition unit, control information acquisition unit, and inference unit, which uses a trained model to infer candidate words based on control words and word strings, ensuring ethically appropriate sentence generation.

Benefits of technology

The device generates ethically appropriate sentences by inferring candidate words based on control words, improving the ethical appropriateness of language model outputs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007758244000014
    Figure 0007758244000014
  • Figure 0007758244000015
    Figure 0007758244000015
  • Figure 0007758244000016
    Figure 0007758244000016
Patent Text Reader

Abstract

The purpose of the present disclosure is to obtain an inference device that generates an ethically appropriate sentence. An inference device according to the present disclosure comprises: a mask data acquisition unit that acquires a character string including a mask portion; a word string acquisition unit that divides the character string for each word and acquires a word string composed of a plurality of words; a control information acquisition unit that acquires, as a control word, an adjective expression representing the nature or state of a thing; and an inference unit that infers a candidate word for the mask portion from the control word and the word string, and that outputs a character string in which the mask portion and the candidate word are swapped.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an inference device, a learning device, an inference method, a method for generating a trained model, an inference program, and a learning program. [Background technology]

[0002] In recent years, language models using AI (Artificial Intelligence) have achieved significant improvements in accuracy. For example, Patent Document 1 proposes a language model using an attention-based sequence-to-sequence network. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 6884871 Summary of the Invention [Problem to be solved by the invention]

[0004] However, training a language model requires a large amount of text data, and if training is performed using randomly collected data, the language model may reflect human discriminatory feelings toward race, gender, ethnicity, culture, etc., and an inference device using such a language model may generate ethically inappropriate sentences.

[0005] The present disclosure has been made to solve the above-mentioned problems, and aims to provide an inference device that generates ethically appropriate sentences. [Means for solving the problem]

[0006] The inference device according to the present disclosure includes: a mask data acquisition unit that acquires a character string including a mask portion; a word string acquisition unit that divides the character string into words and acquires a word string consisting of a plurality of words; User or designer inputThe system includes a control information acquisition unit that acquires an adjective that expresses the nature or state of a thing as a control word, and an inference unit that infers a candidate word for a masked portion from the control word and a word string, and outputs a character string in which the masked portion and the candidate word are replaced. the inference unit receives as input the control word, a word included in the word string, and a word included in the word dictionary, and infers the candidate word to be replaced with the masked portion from a word included in the word dictionary based on the mutual self information output using a trained model that outputs mutual self information between the control word, the word included in the word string, and the word included in the word dictionary. . [Effects of the Invention]

[0007] The inference device according to the present disclosure includes a control information acquisition unit that acquires, as control words, adjectives that express the properties or states of things, and an inference unit that infers candidate words for the masked portion from the control words and word strings, and outputs a string in which the masked portion and the candidate words are swapped. Therefore, by inferring candidate words based on the control words, it is possible to generate ethically appropriate sentences. [Brief explanation of the drawings]

[0008] [Figure 1] 1 is a configuration diagram showing the configuration of a language processing system 10 according to a first embodiment. [Figure 2] 1 is a configuration diagram showing the configuration of a learning device 100 according to a first embodiment. [Figure 3] FIG. 2 is a conceptual diagram showing a specific example of processing by the morphological analysis unit 121 according to the first embodiment. [Figure 4] FIG. 2 is a conceptual diagram showing a specific example of processing by the lexicalization unit 122 according to the first embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of a word string. [Figure 6] FIG. 1 is a conceptual diagram illustrating an example of a trained model. [Figure 7] FIG. 1 is a conceptual diagram showing a specific example of adjective-item PMI. [Figure 8] 1 is a hardware configuration diagram illustrating an example of the hardware configuration of a computer that realizes a learning device 100 according to the first embodiment. [Figure 9] 4 is a flowchart showing the operation of the learning device 100 according to the first embodiment. [Figure 10] 1 is a configuration diagram showing the configuration of a language model storage device 300 according to the first embodiment. [Figure 11]FIG. 10 is a configuration diagram showing the configuration of an inference device 200 according to a second embodiment. [Figure 12] FIG. 10 is a conceptual diagram showing a specific example of a word string including a mask portion. [Figure 13] FIG. 10 is a conceptual diagram showing a specific example of forward Ngram likelihood. [Figure 14] FIG. 10 is a conceptual diagram showing a specific example of backward Ngram likelihood. [Figure 15] FIG. 10 is a conceptual diagram for explaining a specific example of the process in which the first inference unit 251 acquires self-mutual information using a trained model. [Figure 16] 1 is a hardware configuration diagram showing an example of the hardware configuration of a computer that realizes an inference device 200 according to the first embodiment. [Figure 17] 4 is a flowchart showing the operation of inference device 200 according to the first embodiment. [Figure 18] FIG. 10 is a configuration diagram showing the configuration of a language processing system 2010 according to a second embodiment. [Figure 19] FIG. 10 is a configuration diagram showing the configuration of a learning device 2100 according to a second embodiment. [Figure 20] FIG. 10 is a conceptual diagram for explaining a specific example of processing by a bias removal unit according to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0009] Embodiment 1 FIG. 1 is a diagram showing the configuration of a language processing system 10 according to the first embodiment. The language processing system 10 includes a learning device 100, an inference device 200, and a language model storage device 300.

[0010] The language processing system 10 automatically generates sentences and can be used, for example, in chatbots and automated voice response systems. As will be described later, the language processing system 10 generates sentences by inferring words that fit the masked portion of a string of characters that includes a masked portion. Here, a string of characters and a sentence are treated as synonyms.

[0011] First, the learning phase in which the learning device 100 generates a trained model will be described, and then the inference phase in which the inference device 200 performs inference using the trained model will be described.

[0012] In addition, in the present disclosure, the trained model refers to an adjective-term PMI (Pointwise Mutual Information) model, which will be described later.

[0013] <Learning Phase> FIG. 2 is a diagram showing the configuration of the learning device 100 according to the first embodiment. The learning device 100 includes a learning data acquisition unit 110, a word string acquisition unit 120, a type determination unit 130, an Ngram model generation unit 140, and a learning unit 150.

[0014] The learning data acquisition unit 110 acquires a character string D1 as learning data included in the learning data set. More specifically, the learning data acquisition unit 110 acquires multiple character strings by dividing the text data input as learning data into sentences. In other words, in the following, one character string corresponds to one sentence.

[0015] Furthermore, the learning data set is stored in a storage device (not shown), and the learning data acquisition unit 110 acquires the learning data from the storage device during learning.

[0016] The word string acquisition unit 120 divides the character string D1 acquired by the learning data acquisition unit 110 into words to acquire a word string D3 consisting of multiple words. Here, the word string D3 means a set of multiple words with part-of-speech information.

[0017] In addition, dividing into words does not only mean dividing a string directly into words, but also includes dividing a string into larger units, such as phrases, and then dividing into words, or dividing into smaller units, such as morphemes, and then concatenating the morphemes to divide into words.

[0018] In the first embodiment, the word string acquiring unit 120 includes a morphological analysis unit 121 and a lexicalization unit 122 .

[0019] The morphological analysis unit 121 divides the character string D1 acquired by the learning data acquisition unit 110 into morphemes, which are the smallest grammatical units, and acquires a morpheme string D2 consisting of a plurality of morphemes with part-of-speech information.

[0020] A specific example of the processing of the morphological analysis unit 121 will be described with reference to FIG. FIG. 3 is a conceptual diagram showing a specific example of the processing of the morphological analysis unit 121. As shown in FIG. For example, when the character string "Installing nets to protect against crows is effective," is input, the morphological analysis unit 121 divides the string into "crow," "countermeasures," "to," "net," "to," "install," "to do," "of," "is," "effective," "target," "desu," and "." Part-of-speech information is then assigned, such that "crow" is a noun and "ni" is a particle. More detailed grammatical information, such as common noun or case particle, may also be assigned. This part-of-speech information can be, for example, classified by UniDic. UniDic is an electronic dictionary of Japanese text. Electronic dictionaries other than UniDic may be used as long as they can assign part-of-speech information similar to that of UniDic.

[0021] The lexicalization unit 122 connects the morphemes included in the morpheme string D2 output by the morphological analysis unit 121 based on the part-of-speech information to obtain a word string D3. Here, lexicalization refers to the process of generating words by concatenating the preceding and following morphemes contained in a morpheme string. UniDic uses short units, which are linguistic units defined with an emphasis on uniformity based on the smallest units, and therefore performs this type of lexicalization to handle the meaning of words.

[0022] In the following, a word will be defined as a combination of one or more morphemes, i.e., both unconnected morphemes that can form a word on their own, and connected morphemes.

[0023] The processing of the lexicalization unit 122 will now be described in detail. The lexicalization unit 122 receives the morpheme string output by the morpheme analysis unit 121, checks the part of speech of each morpheme, concatenates morphemes that can be concatenated, and outputs a lexicalized morpheme string.

[0024] The lexicalization unit 122 concatenates morphemes when a morpheme preceding a morpheme is a prefix or a morpheme following a morpheme is a suffix. The lexicalization unit 122 also assigns the part of speech of the concatenated morpheme to the part of speech of the morpheme concatenated at the end.

[0025] A specific example of the processing of the lexicalization unit 122 will be described with reference to FIG. FIG. 4 is a conceptual diagram showing a specific example of the processing of the lexicalization unit 122. As shown in FIG. For example, when the morpheme string "crow," "countermeasure," "to," "net," "to," "install," "to do," "of," "is," "effective," "target," and "desu" described in FIG. 3 are input, the lexicalization unit 122 generates the vocabulary "effective" by concatenating "effect" and "target," which precede "target," because the part of speech of "target" is a suffix.

[0026] As another example, when morphological analysis is performed on the character string "Installing nets to prevent crows is ineffective," the morphological analysis unit 121 first divides the character string into morphemes: "crow," "measures," "to," "net," "to," "install," "to do," "of," "is," "ineffective," "effective," "target," "is," and "."

[0027] Then, since "hi" is a prefix, the lexicalization unit 122 concatenates "effect" and "hi" that follow "hi" to form "ineffective," and further concatenates "ineffective" and "target" to generate the word "ineffective."

[0028] The type determination unit 130 determines the type D4 of the sentence indicated by the word string D3 acquired by the word string acquisition unit 120. The type determination unit 130 outputs the determined sentence type D4 to the learning unit 150. The sentence type D4 determined here is either an affirmative sentence, a negative sentence, or an interrogative sentence.

[0029] The processing performed by the type determination unit 130 will now be described in detail. The type determination unit 130 determines the type of sentence based on the part of speech information and word notation included in the word string, for example, according to the following rules. If the sentence ends with "?" (auxiliary symbol), the sentence type is determined to be a question. If the last word, excluding the auxiliary symbol at the end of the sentence, is "nai (particle)", the type of sentence is determined to be a negative sentence. Sentences other than those mentioned above are determined to be affirmative sentences.

[0030] The type determination unit 130 may use other existing determination methods. For example, a method for determining whether a sentence is a negative sentence may be a method for automatically detecting negative elements and the focus of negation in a sentence. Furthermore, whether a sentence is a question or not may be determined based on whether an expression commonly used in questions, such as "kana," "kane," "ka," "noka," or "darou" is used at the end of the sentence.

[0031] The Ngram model generation unit 140 generates an Ngram model D5 based on the word string D3 acquired by the word string acquisition unit 120. The Ngram model generation unit 140 outputs the generated Ngram model D5 to the Ngram model storage unit 310 included in the language model storage device 300.

[0032] Here, the Ngram model is a language model in which the occurrence probability of each word depends only on the N-1 words immediately before or after the word.

[0033] The Ngram model generation unit 140 generates a word w in a word string consisting of m words as shown in FIG. i N chain of "w i-N+1 ,…,w i-1 ,w i Calculate the forward Ngram likelihood for " using the following formula:

[0034]

number

[0035] In addition, the Ngram model generation unit 140 generates a backward N-chain “w i ,w i+1 ,…,w i+N-1 The backward Ngram likelihood for " is calculated using the following formula:

[0036]

number

[0037] The Ngram model generation unit 140 generates an N-chain “w i-N+1 ,…,w i-1 ,w i ” and the corresponding forward Ngram likelihood pair, and the N-chain “w i ,w i+1 ,…,w i+N-1 An Ngram model is generated by storing pairs of " and the corresponding backward Ngram likelihood. Hereinafter, the logarithmic likelihoods obtained from the Ngram model, that is, the forward Ngram likelihoods and the backward Ngram likelihoods, will be collectively referred to as Ngram likelihoods.

[0038] The learning unit 150 receives an adjective that expresses the nature or state of an object and two words as input, and generates a trained model D6 that outputs the mutual information between the adjective and the two words based on the occurrence probability of the words included in the word string D3 in the training dataset.

[0039] More specifically, the learning unit 150 generates the trained model D6 based on the occurrence probability in the training dataset of a first word, which is an adjective expression included in the word sequence D3, the occurrence probability in the training dataset of a second word included in the word sequence D3, the occurrence probability in the training dataset of a third word included in the word sequence, and the simultaneous occurrence probability in the training dataset of the first word, the second word, and the third word.

[0040] Here, the adjective expression is either an adjective, an adjectival verb, or an adjectival noun. Here, adjectival nouns refer to nouns that are followed by "na" (the attributive form of the auxiliary verb "da") and become adjectival verbs, such as "safety" and "anxiety." When using UniDic's classification, adjectival expressions can be classified as adjectives, adjectival nouns, noun-common noun-possible adjectival nouns, noun-common noun-possible sa-variant adjectival nouns, suffix-noun-possible adjectival nouns, suffix-adjectival nouns, and suffix-adjectival nouns.

[0041] Furthermore, in the first embodiment, the learning unit 150 receives input of an adjective expression, two words, and also a sentence type, and generates a trained model D6 that outputs self-mutual information.

[0042] More specifically, the learning unit 150 receives as input the sentence type, adjective, and two words determined by the type determination unit, and generates a fourth-order tensor that outputs the mutual information between the adjective and the two words as the learned model D6.

[0043] The tensor learning process performed by the learning unit 150 will be described in detail below. First, the learning unit 150 classifies the word strings D3 by sentence type D4. Next, the learning unit 150 counts the total number of words Z and the number of occurrences c(w) of each word w for each sentence type D4.

[0044] Next, the learning unit 150 compares the adjective A and the word w for each sentence type D4. x and w y The number of simultaneous occurrences of c(A, w x ,w y ) and c(A, w y ,w x ) are counted. More specifically, from each word string, an arbitrary adjective (A) and two words (w x ,w y ) and extract the permutation (A, w x ,w y ) and permutation (A,w y ,w x ) is added one by one for all word sequences. Here, the reverse order is also added to make it robust to sparseness, but as will be described later, it is also possible to generate an asymmetric tensor without adding the reverse order. Also, for words that appear more than once in a word sequence, it is possible to count them only once, and x =w y The diagonal elements may be treated differently from the off-diagonal elements depending on the purpose.

[0045] Then, the learning unit 150 calculates the stored triplet of adjective expression and term PMI values ​​(self-mutual information) using Equations 3 to 7.

[0046]

number

[0047]

number

[0048]

number

[0049]

number

[0050]

number

[0051] In this case, w=A is the first word of the adjective, w=w x is the second word, w=w y is the third word, and P(A), P(w x ), P(w y ), P(A,w x ,w y ) is the probability of occurrence of each. x ,w y When the triplet of PMI(A, w x ,w y ) is negative, PMI(A,w x ,w y ) and store it.

[0052] Finally, the learning unit 150 combines the triplet of adjective-term PMI values ​​for each sentence type D4 into one fourth-order tensor based on Equation 8 to generate a trained model D6.

[0053]

number

[0054] FIG. 6 is a conceptual diagram illustrating an example of a generated trained model. In Figure 6, due to the limitations of paper, the fourth-order tensor is represented as three rectangular parallelepipeds, and the mutual information is given at each point of the rectangular parallelepiped, which is specified by the sentence type and three words. The dimension of the sentence type G (first argument) is 3, the dimension of the adjective A (second argument) is p, and the dimension of the word w x (third argument) and the word w y The dimension of (the fourth argument) is q. Both p and q are positive integers, where p is the number of adjectives in the word dictionary (vocabulary size of adjectives), and q is the total number of words in the word dictionary (total vocabulary size).

[0055] For example, if the sentence type is "affirmative sentence", the adjective A is "good", and the word w x If is "person", then w y When words that are highly related to "people" and "good," such as "love," "grow," "protect," and "thrive," are input, PMI(G,A,w x ,w y ) indicates a large value. For example, if the sentence type is "negative sentence", the adjective expression is A "good", and the word w x If is a "person", then w y When words such as "die," "hurt," "lose," and "sad" are entered, PMI(G,A,w x ,w y ) indicates a large value. Furthermore, for example, if the sentence type is "affirmative sentence", the adjective A is "good", and the word w x , w y When word pairs such as "all" and "cure", "happiness" and "call", and "bad" and "cure" are input, PMI(G,A,w x ,w y ) indicates a large value. For example, if the sentence type is "affirmative sentence", the adjective expression is A "good", and the word w x , w y When word pairs such as "wound" and "are", "person" and "die", and "treatment" and "become" are input, PMI(G,A,w x ,w y ) indicates a small value. In this way, by calculating the information amount of "good" not just for a single word but for a word pair, it is possible to accurately calculate the likelihood according to the context of the input sentence. Figure 7 shows a training sample of the mutual information calculated by Equation 8.

[0056] Next, a description will be given of the hardware configuration of learning device 100 in Embodiment 1. Each function of learning device 100 is realized by a computer. FIG. 8 is a configuration diagram showing an example of the hardware configuration of a computer that realizes learning device 100.

[0057] The hardware shown in FIG. 8 includes a processing device 1000 such as a CPU (Central Processing Unit), and a storage device 1001 such as a ROM (Read Only Memory) or a hard disk.

[0058] 2 are realized by the processing device 1000 executing a program stored in the storage device 1001. Here, the above configuration is not limited to a configuration realized by a single processing device 1000 and storage device 1001, but may be a configuration realized by a plurality of processing devices 1000 and storage devices 1001.

[0059] Furthermore, the method of realizing each function of the learning device 100 is not limited to the combination of hardware and programs described above, but may be realized by hardware alone, such as an LSI (Large Scale Integrated Circuit) in which a program is implemented in a processing device, or some functions may be realized by dedicated hardware and some functions may be realized by a combination of a processing device and a program.

[0060] The learning device 100 according to the first embodiment is configured as described above.

[0061] Next, an explanation will be given of the operation of the learning device 100 according to embodiment 1. Fig. 9 is a flowchart showing the operation of the learning device 100 according to embodiment 1. The operation of the learning device 100 corresponds to a method for generating a trained model, and a program that causes a computer to execute the operation of the learning device 100 corresponds to a learning program.

[0062] Furthermore, the operation of the learning data acquisition unit 110 corresponds to a learning data acquisition process, the operation of the word string acquisition unit 120 corresponds to a word string acquisition process, the operation of the type discrimination unit 130 corresponds to a type discrimination process, the operation of the Ngram model generation unit 140 corresponds to an Ngram model generation process, and the operation of the learning unit 150 corresponds to a learning process.

[0063] First, in step S1, the learning data acquisition unit 110 acquires a character string D1 as learning data included in the learning data set.

[0064] Next, in step S2, the morphological analysis unit 121 divides the character string D1 acquired by the training data acquisition unit 110 in step S1 into morphemes, which are the smallest grammatical units, and acquires a morpheme string D2 consisting of multiple morphemes with part-of-speech information.

[0065] Next, in step S3, the lexicalization unit 122 concatenates the morphemes included in the morpheme string D2 acquired by the morphological analysis unit 121 in step S2 based on the part-of-speech information to acquire a word string D3.

[0066] Next, in step S4, the type determining unit 130 determines the type D4 of the sentence indicated by the word string D3 acquired by the word string acquiring unit 120, based on the part-of-speech information and word spellings included in the word string D3.

[0067] Next, in step S5, the Ngram model generation unit 140 counts the number of occurrences of N-chain word strings included in the word string D3 acquired by the word string acquisition unit 120.

[0068] Next, in step S6, the learning unit 150 counts the number of occurrences of each word included in the word string D3, and the number of occurrences of triplet pairs each consisting of an adjective and two other words extracted from the word string.

[0069] Next, in step S7, the training data acquisition unit 110 determines whether there is training data to be processed next in the training data set. If the training data acquisition unit 110 determines that there is data to be processed next, it returns to step S1 and acquires the next training data, but if it determines that there is no data to be processed next, it proceeds to steps S8-9 and causes the Ngram model generation unit 140 and the training unit 150 to generate an Ngram model D5 and a trained model D6, respectively.

[0070] In step S8, the Ngram model generation unit 140 calculates the forward Ngram likelihood and the reverse Ngram likelihood of each N chain based on the number of occurrences of the word string in the N chain counted in step S5, and generates an Ngram model D5 by storing each N chain in association with the forward Ngram likelihood and the reverse direction.

[0071] In step S9, the learning unit 150 calculates the occurrence probability of each word and each triplet based on the number of occurrences of each word and each triplet counted in step S6. Then, the learning unit 150 calculates the self-mutual information of each triplet based on the occurrence probability of each word and each triplet, and generates a trained model D6 by storing the sentence type, triplet, and self-mutual information in association with each other.

[0072] Through the above-described operations, the learning device 100 according to embodiment 1 can generate a trained model that inputs an adjective that describes the nature or state of an object and two words, and outputs the self-mutual information between the adjective and the two words, thereby generating a trained model that can infer ethically appropriate candidate words that have a large amount of self-mutual information with an adjective that has a positive meaning, and ultimately can generate ethically appropriate sentences using the trained model.

[0073] Furthermore, the learning device 100 according to embodiment 1 determines the type of sentence indicated by a word string, inputs the sentence type in addition to an adjective and two words, and generates a trained model that outputs self-mutual information. Therefore, by outputting self-mutual information for each sentence type, it is possible to generate a trained model that can infer candidate words with higher accuracy.

[0074] Furthermore, the learning device 100 according to embodiment 1 divides a character string into morphemes, which are the smallest grammatical units, to obtain a morpheme string consisting of a plurality of morphemes with part-of-speech information, and then concatenates the morphemes included in the morpheme string based on the part-of-speech information to obtain a word string. Therefore, by generating words that summarize the meanings of the morphemes, it is possible to generate a trained model that can infer candidate words with higher accuracy.

[0075] For example, if "Effective" and "Defined" were processed separately, "Effective" would be recognized as an adjective and the self-mutual information with "Defined" would be learned because "Effective" is a noun and "Defined" is a suffix-morphological noun. However, by combining "Effective" and "Defined" and processing them as the word "Effective," it is possible to learn the self-mutual information for words whose meaning is easier for humans to understand. Furthermore, by treating prefixes such as "Not" and "Non" in conjunction with the following morpheme, it is possible to learn the self-information of antonyms appropriately.

[0076] <Inference phase> Next, we will explain the inference phase, which generates sentences using the trained model (adjective-term PMI model) generated in the training phase.

[0077] First, before explaining the inference device 200, the language model storage device 300 will be explained. FIG. 10 is a diagram showing the configuration of the language model storage device 300 according to the first embodiment. The language model storage device 300 includes an Ngram model storage unit 310, a trained model storage unit 320, and a neural language model storage unit 330.

[0078] The Ngram model storage unit 310 stores the Ngram model generated by the Ngram model generation unit 140.

[0079] The trained model storage unit 320 stores the trained model generated by the training unit 150.

[0080] The neural language model storage unit 330 stores a neural language model generated by a learning device (not shown) separate from the learning device 100. The neural language model will be described in detail later.

[0081] The language model storage device 300 is realized by a storage device such as a ROM (Read Only Memory) or a hard disk. The language model storage device 300 may be implemented as a single server, multiple servers distributed on the cloud, or as part of an edge storage device. For example, when the language processing system 10 is used in an automatic response system for a robot, each model may be stored in a server that collectively manages the robots, or each model may be stored in the robot itself.

[0082] Next, the inference device 200 will be described. FIG. 11 is a diagram showing the configuration of inference device 200 according to the first embodiment. The inference device 200 includes a mask data acquisition unit 210 , a word string acquisition unit 220 , a type determination unit 230 , a control information acquisition unit 240 , and an inference unit 250 .

[0083] The mask data acquisition unit 210 acquires a character string D11 including a masked portion. Here, the masked portion refers to the portion of the character string where a normal word is missing and the special word [MASK] is applied. Here, the word that is replaced with the special word [MASK] is the inference target of the inference device 200. Furthermore, the masked data is text data that indicates the character string D11 that includes the masked portion.

[0084] The word string acquisition unit 220 divides the character string D11 acquired by the mask data acquisition unit 210 into words to acquire a word string D13 consisting of multiple words, and performs the same processing as the word string acquisition unit 120 provided in the learning device 100.

[0085] The word string acquisition unit 220 includes a morphological analysis unit 221 and a lexicalization unit 222 .

[0086] The morphological analysis unit 221 divides the character string D11 acquired by the mask data acquisition unit 210 into morphemes, which are the smallest grammatical units, and acquires a morpheme string D12 consisting of multiple morphemes with part-of-speech information, and performs the same processing as the morphological analysis unit 121.

[0087] The lexicalization unit 222 connects the morphemes included in the morpheme string based on the part-of-speech information to obtain the word string D13, and performs the same processing as the lexicalization unit 122.

[0088] The type determination unit 230 determines the type D14 of the sentence indicated by the word string 13, and performs the same processing as the type determination unit 130 included in the learning device 100.

[0089] The control information acquisition unit 240 acquires control information D15 from an input by the user. More specifically, the control information acquisition unit 240 acquires adjectives that express the properties or states of things as control words, and also acquires weighting coefficients of the self-mutual information and Ngram likelihood as control strengths. Here, the weighting coefficients of the self-mutual information and Ngram likelihood are interpreted as weighting coefficients of the adjective-term PMI model and the Ngram model.

[0090] The control information acquisition unit 240 acquires control information D15 from an input from a user or designer of the language processing system 10 via an input device (not shown), such as a keyboard or a touch panel. The input from the user or designer may be made at the time of inference, or the control information D15 input in advance may be stored and the stored control information D15 may be read out at the time of inference.

[0091] The control strength may also be set for each type of sentence, for example, a large value for affirmative sentences, a small value for negative sentences, and an intermediate value for interrogative sentences, such as 0.8 for affirmative sentences, 0.2 for negative sentences, and 0.5 for interrogative sentences.

[0092] The inference unit 250 infers candidate words for the masked portion and outputs a string D19 in which the masked portion and the inferred candidate words are swapped, and is provided with a first inference unit 251, a second inference unit 252, and an inference result integration unit 253. As will be described later, in the first embodiment, the inference unit 250 infers candidate words for the masked portion from the control words acquired by the control information acquisition unit 30 and the word string D13 acquired by the word string acquisition unit 220.

[0093] The inference unit 250 outputs the character string in which the masked portion and the inferred candidate word have been replaced to a display or speaker, thereby conveying the character string, i.e., the generated sentence, to the user.

[0094] The first inference unit 251, the second inference unit 252, and the inference result integration unit 253 included in the inference unit 250 will be described below.

[0095] The first inference unit 251 infers candidate words for the masked portion from the control words acquired by the control information acquisition unit 30 and the word string D13 acquired by the word string acquisition unit 220.

[0096] More specifically, the first inference unit 251 takes the control word, the words included in the word string, and the candidate words as input, and infers the candidate words using a trained model that outputs the self-mutual information of the control word, the words included in the word string, and the candidate words.

[0097] Furthermore, the first inference unit 251 infers candidate words using the mutual information obtained from the trained model and the Ngram likelihood obtained from the Ngram model.

[0098] For example, when the length of the word string is m and the masked part is the nth word in the word string, the first inference unit 251 can infer a candidate word based on the following Equation 9: where α is the control strength and β is the flooring coefficient.

[0099]

number

[0100] The processing of the first inference unit 251 will be described in detail below. When formula 9 is used as is, only one candidate word is determined, but in the following processing, the first inference unit 251 selects multiple words with the highest likelihood in the argmax function of formula 9, starting from the top, and outputs the set of selected multiple candidate words to the inference result integration unit 253 as a first candidate word group D16.

[0101] First, the first inference unit 251 acquires the sentence type D14 from the type determination unit 230, the word string D13 from the word string acquisition unit 220, and the control information D15 (control words and control strength) from the control information acquisition unit 240.

[0102] Next, the first inference unit 251 inserts N-1 special words [NULL] in order to take into account the preceding connection at the beginning of the sentence and the following connection at the end of the sentence.

[0103] The first inference unit 251 finds the special word [MASK] from the word string and n Let's say.

[0104] The first inference unit 251 is n The N-1 words before and after are extracted as N-chain words in the forward and backward directions, respectively.

[0105] The first inference unit 251 extracts and determines words to be included in [MASK] from a word dictionary, and obtains forward Ngram likelihood and backward Ngram likelihood using an Ngram model.

[0106] A specific example of the process of acquiring the Ngram likelihood from the Ngram model will be described with reference to FIGS. Here, for simplicity, N=3.

[0107] FIG. 12 is a conceptual diagram showing a specific example of a word string including a mask portion. For example, assume that the words or word sequences for which [MASK] is to be estimated are "net", "wo", "[MASK]", "do", and ".".

[0108] At this time, the forward Ngrams are arranged as shown in FIG. 13 in descending order of the forward Ngram likelihood. For example, the likelihood of "tsukau" is obtained as 9.397643358, and the likelihood of "tsuujiru" is obtained as 9.146110803.

[0109] Similarly, the backward Ngrams are arranged as shown in FIG. 14 in descending order of the backward Ngram likelihood. For example, the likelihood of "sonzai" is obtained as 8.709336799, and the likelihood of "shoukai" is obtained as 8.144842576.

[0110] Next, the inference of candidate words using the learned model will be described. The first inference unit 251 acquires the learned model D6 from the learned model storage unit 320.

[0111] The first inference unit 251 generates a set of three words where the first word is a control word, the second word is a word included in the word sequence, and the third word is a word included in the word dictionary.

[0112] The first inference unit 251 uses the learned model to acquire the self - mutual information amount of the generated three - tuple in the sentence type D14.

[0113] A specific example of the process of acquiring the self - mutual information amount from the learned model will be described using FIG. 15.

[0114] Similar to the case of the Nrgam model, the word sequence in FIG. 12 will be used as an input for explanation. Also, assume that "good" is input as the control word.

[0115] At this time, the sentence type G is an "affirmative sentence", the descriptive expression A is "good" input as the control word, the word w x includes "net", "wo", "do", ".", and the candidate word w yAs the input, words contained in the dictionary such as "installation," "creation," and "removal" are input, and mutual information is obtained for each input.

[0116] The first inference unit 251 calculates the Ngram likelihood and the self mutual information for all words in the dictionary, and then sorts the candidate words in descending order of the sum of these (hereinafter referred to as the first likelihood).

[0117] The first inference unit 251 outputs, to the inference result integration unit 253, those candidate words sorted by the first likelihood whose first likelihood is equal to or greater than a preset threshold as a first candidate word group D16.

[0118] The second inference unit 252 infers candidate words for the masked portion using a neural language model D17. A neural language model is a language model that uses a neural network, and known existing neural language models include, for example, a language model that uses a recurrent neural network and a language model that uses an attention mechanism such as Transformer or BERT (Bidirectional Encoder Representations from Transformers).

[0119] Here, as an example, a case where a forward propagation neural language model using a forward propagation neural network is used will be described.

[0120] In the feedforward neural language model, like the Ngram model, the next word is predicted using a chain of N-1 words. If the nth word is a mask part, the n-N+1th to n-1th words are converted into a one-hot vector as input and input to the feedforward neural network.

[0121] Then, a linear transformation is performed on the vector output from the feedforward neural network to convert it into a vector of the same dimension as the vocabulary size of the word dictionary, and then the vector is substituted into a softmax function.

[0122] The vector output from the softmax function above is the probability distribution of the nth word, and each element of the vector corresponds to the probability of a word appearing in the dictionary.

[0123] Therefore, by performing maximum likelihood estimation using the vector output from the softmax function, candidate words for the masked portion can be inferred.

[0124] Here, a forward propagation neural network has been described as an example, but it is also possible to use an existing neural language model, such as a language model using a recurrent neural network as described above, or a language model using an attention mechanism such as Transformer or BERT (Bidirectional Encoder Representations from Transformers).

[0125] The second inference unit 252 outputs to the inference result integration unit 253, as a second candidate word group D18, those candidate words inferred using the neural language model D17 whose likelihood obtained from the neural language model (hereinafter referred to as second likelihood) is equal to or greater than a predetermined threshold.

[0126] The inference result integration unit 253 determines candidate words that are commonly included in the first candidate word group D16, which is a set of multiple candidate words inferred by the first inference unit 251, and the second candidate word group D18, which is a set of multiple candidate words inferred by the second inference unit 252, as candidate words to be replaced with the masked portion.

[0127] For example, if the candidate words included in the first candidate word group are "introduction," "installation," and "utilization," and the candidate words included in the second candidate word group are "attack," "destruction," and "installation," the word included in both the first and second candidate word groups is "installation," so the output integration unit 270 determines that the word to be placed in the masked portion is "installation."

[0128] In addition, if there are multiple candidate words included in the first candidate word group and the second candidate word group, the candidate word in the second candidate word group that has the highest second likelihood among the commonly included candidate words may be determined as the candidate word to replace the masked portion.

[0129] This is because neural language models generally have high inference accuracy, so the candidate words included in the second candidate word group are more likely to be appropriate to the context, and if a candidate word among them is also included in the first candidate word group, it is likely not an ethically inappropriate word. In other words, in this case, the adjective-term PMI model is used to remove ethically inappropriate words from the candidate words inferred by the neural language model.

[0130] Next, a description will be given of the hardware configuration of inference device 200 in embodiment 1. Each function of inference device 200 is realized by a computer. Fig. 16 is a configuration diagram showing an example of the hardware configuration of a computer that realizes inference device 200.

[0131] The hardware shown in FIG. 16 includes a processing device 1100 such as a CPU (Central Processing Unit), and a storage device 1101 such as a ROM (Read Only Memory) or a hard disk.

[0132] 11 are realized by the processing device 1100 executing a program stored in the storage device 1101. Here, the above configuration is not limited to a configuration realized by a single processing device 1100 and storage device 1101, but may be a configuration realized by a plurality of processing devices 1100 and storage devices 1101.

[0133] Furthermore, the method of realizing each function of the inference device 200 is not limited to the combination of hardware and programs described above, but may be realized by hardware alone, such as an LSI (Large Scale Integrated Circuit) in which a program is implemented in a processing device, or some functions may be realized by dedicated hardware and some functions may be realized by a combination of a processing device and a program.

[0134] Inference device 200 according to the first embodiment is configured as described above.

[0135] Next, the operation of inference device 200 according to the first embodiment will be described. 17 is a flowchart showing the operation of inference device 200 according to embodiment 1. The operation of inference device 200 corresponds to an inference method, and a program that causes a computer to execute the operation of inference device 200 corresponds to an inference program.

[0136] Furthermore, the operation of the mask data acquisition unit 210 corresponds to a mask data acquisition process, the operation of the word string acquisition unit 220 corresponds to a word string acquisition process, the operation of the type discrimination unit 230 corresponds to a type discrimination process, the operation of the control information acquisition unit 240 corresponds to a control information acquisition process, and the operation of the inference unit 250 corresponds to an inference process.

[0137] First, in step S11, the mask data acquisition unit 210 acquires a character string D11 including a masked portion.

[0138] Next, in step S12, the morphological analysis unit 221 divides the character string D11 acquired by the mask data acquisition unit 210 in step S11 into morphemes, which are the smallest grammatical units, and acquires a morpheme string D12 consisting of multiple morphemes with part-of-speech information.

[0139] Next, in step S13, the lexicalization unit 222 concatenates the morphemes included in the morpheme string D12 acquired by the morphological analysis unit 221 in step S12 based on the part-of-speech information to acquire a word string D13.

[0140] Next, in step S14, the type determining unit 230 determines the type of sentence D14 indicated by the word string D13 acquired by the word string acquiring unit 220, based on the part-of-speech information and word spellings included in the word string D13.

[0141] Next, in step S15, the control information acquisition unit 240 acquires control information D15 (control words and control strength) based on input from the user.

[0142] Next, in step S16, the first inference unit 251 acquires the trained model D6 from the trained model storage unit 320 and the Ngram model D5 from the Ngram model storage unit 310, and infers candidate words for the masked portion using the mutual information obtained from the trained model D6 and the Ngram likelihood obtained from the Ngram model D5. The first inference unit 251 outputs multiple candidate words whose first likelihood is equal to or greater than a preset threshold to the inference result integration unit 253 as a first candidate word group D16.

[0143] Next, in step S17, the second inference unit 252 acquires the neural language model D17 from the neural language model storage unit 330, and infers candidate words for the masked portion using the acquired neural language model D17. The second inference unit 252 outputs multiple candidate words whose second likelihoods are equal to or greater than a preset threshold to the inference result integration unit 253 as a second candidate word group D18.

[0144] Finally, in step S18, the inference result integration unit 253 compares the first candidate word group D16 with the second candidate word group D18 and determines the candidate words included in both groups as the final inference result. The inference result integration unit 253 outputs a character string D19 in which the masked portion has been replaced with the candidate words determined as the final inference result to an external display or speaker.

[0145] Through the above operations, the inference device 200 according to the first embodiment can infer ethically appropriate candidate words by inferring candidate words for the masked portion from adjectives and word strings that express the properties or states of things, thereby generating ethically appropriate sentences. In this example, the generated sentence is a character string in which the masked portion and candidate words are swapped.

[0146] For example, if "good" or "beautiful" is input as a control word, candidate words highly related to "good" or "beautiful" are inferred. Words highly related to "good" or "beautiful" are considered to be ethically appropriate words, so when a user or designer inputs a control word with a positive meaning, reasoning device 200 can infer ethically appropriate candidate words and generate ethically appropriate sentences.

[0147] Furthermore, the inference device 200 according to embodiment 1 infers candidate words using a trained model that takes as input a control word, a word contained in a word string, and a candidate word, and outputs the mutual information between the control word, the word contained in the word string, and the candidate word. This enables the inference of candidate words that are highly related to the control word and the word contained in the word string, and the generation of natural and ethically appropriate sentences.

[0148] Furthermore, the inference device 200 according to embodiment 1 determines the type of sentence indicated by a word string, and infers candidate words using a trained model that inputs the sentence type in addition to adjectives, words included in the word string, and candidate words, and outputs self-mutual information, thereby enabling more accurate inference of candidate words.

[0149] Furthermore, the inference device 200 according to embodiment 1 divides a character string into morphemes, which are the smallest grammatical units, obtains a morpheme string consisting of a plurality of morphemes with part-of-speech information, and concatenates the morphemes included in the morpheme string based on the part-of-speech information to obtain a word string. Therefore, by generating words that summarize the meanings of the morphemes, it is possible to infer candidate words with greater accuracy.

[0150] <Modification> A modification of the language processing system 10 according to the first embodiment will be described.

[0151] The learning device 100 and the inference device 200 according to the first embodiment are configured to distinguish between types of sentences in order to infer candidate words with greater accuracy. However, if accuracy is not required or if it is desired to reduce the amount of calculation required, the type may not be distinguished, or only positive sentences may be learned.

[0152] Furthermore, the learning device 100 and the inference device 200 acquire one sentence as a character string and process each sentence individually, but if the type of sentence is not to be determined, multiple sentences may be processed as one character string.

[0153] In the first embodiment, inference device 200 uses not only the adjective-term PMI model but also the Ngram model and neural language model to infer candidate words with higher accuracy, but if accuracy is not required or if it is desired to reduce calculations, it is possible to infer candidate words using only the adjective-term PMI model, or to infer candidate words using only the adjective-term PMI model and either the Ngram model or the neural language model. Furthermore, if an Ngram model is not used, control strength is not required, so it is sufficient to obtain only control words as control information.

[0154] Although inference device 200 is configured to acquire one word as the control word, it may also acquire multiple words. When multiple words are used as control words, for example, in Equation 9, the PMIs for all control words are added together.

[0155] The order of the steps in the flowchart may be changed as appropriate. For example, the process of generating a trained model in step S9 may be performed before the process of generating an Ngram model in step S8, or the processes of steps S8 and S9 may be performed simultaneously.

[0156] Also, for example, the processing by the second inference unit 252 in step S17 may be performed before the processing by the first inference unit 251 in step S16, or the processing of steps S16 and S17 may be performed simultaneously. The same applies to the other steps.

[0157] The trained model is w x and w y Although the case where w is symmetric has been explained, it may also be asymmetric. x and w y Although the reverse order of the permutations is also added to make it robust to sparseness, it is also possible to distinguish the meaning of the word order without adding the reverse order.

[0158] Embodiment 2 Next, a second embodiment will be described. In the second embodiment, a configuration will be described in which a bias removal unit that removes bias between two words is added to the configuration of the first embodiment.

[0159] In today's world where diversity is highly valued, it may be ethically inappropriate to rank two objects. The learning device 2100 of the second embodiment performs a process to remove bias between two words from a trained model, thereby eliminating bias in the objects represented by the two words and preventing the generation of ethically inappropriate sentences.

[0160] The configuration of a language processing system 2010 according to the second embodiment will be described. FIG. 18 is a diagram showing the configuration of a language processing system 2010 according to the second embodiment. The inference device 2200 provided in the language processing system 2010 has a configuration similar to that of the inference device 200 according to embodiment 1, except that it infers candidate words using a bias-removed trained model instead of the trained model described in embodiment 1, and the language model storage device 2300 has a configuration similar to that of the language model storage device 300 according to embodiment 1, except that it stores a bias-removed trained model instead of the trained model described in embodiment 1.

[0161] The configuration of a learning device 2100 according to the second embodiment will be described. FIG. 19 is a diagram showing the configuration of a learning device 2100 according to the second embodiment. The learning device 2100 includes a learning data acquisition unit 2110 , a word string acquisition unit 2120 , a type determination unit 2130 , an Ngram model generation unit 2140 , a learning unit 2150 , and a bias removal unit 2160 .

[0162] The learning data acquisition unit 2110, word string acquisition unit 2120, type determination unit 2130, Ngram model generation unit 2140, and learning unit 2150 perform the same processes as those in the first embodiment.

[0163] Furthermore, the hardware configuration of the learning device 2100 is the same as the hardware configuration of the learning device 100 according to embodiment 1 shown in FIG. 8, and the bias removal unit 2160 is realized by executing a program stored in the memory device 1001 on the processing device 1000.

[0164] The bias removal unit 2160 removes bias between two words by performing bias removal processing on the trained model D6 generated by the training unit 2150. More specifically, when the words from which bias is to be removed are a first bias word and a second bias word, the bias removal unit 2160 performs bias removal processing on the trained model D6 to set the self-mutual information output by the trained model when the first bias word is input to the trained model D6 to the same value as the self-mutual information output by the trained model D6 when a second bias word different from the first bias word is input, thereby generating a bias-removed trained model D26.

[0165] In the second embodiment, bias removing section 2160 averages the values ​​of the auto-mutual information using the following formulas 10 to 13.

[0166]

number

[0167]

number

[0168]

number

[0169]

number

[0170] A specific example of the processing of the bias removal unit 2160 will be described with reference to FIG. FIG. 20 is a conceptual diagram for explaining a specific example of the processing of the bias removal unit 2160. In FIG.

[0171] For example, a case will be described where the first bias word is "dog" and the second bias word is "cat." In this case, by substituting X = "dog" and Y = "cat" in formulas 10 to 13, the self-mutual information when the set of three words in the trained model includes "dog" and the self-mutual information when the set includes "cat" can be made the same value.

[0172] The learning device 2100 according to the second embodiment can generate a trained model with no superiority or inferiority between two words by generating a trained model with the bias removed using the bias removal unit 2160 as described above, and the inference device 2200 can avoid discriminatory expressions between two objects by inferring candidate words using the trained model with the bias removed.

[0173] The modification of the first embodiment is also applicable to the language processing system 2010 according to the second embodiment.

[0174] Up to this point, the description has been given taking the case where the character string to be processed is Japanese as an example, but this is not limiting. Both the first and second embodiments can be applied to languages ​​other than Japanese, such as English. In this case, by using a learning dataset, dictionary, etc. that are appropriate for the language to be applied, it is possible to realize an inference device, learning device, and language processing system for languages ​​other than Japanese. [Industrial Applicability]

[0175] The learning device and inference device according to the present disclosure are suitable for use in systems that automatically generate sentences and engage in dialogue with people, such as chatbots and automatic voice response systems. [Explanation of symbols]

[0176] 10,2010 Language processing system, 100,2100 Learning device, 200,2200 Inference device, 300,2300 Language model storage device, 110,2110 Learning data acquisition unit, 120,2120 Word sequence acquisition unit, 121,2121 Morphological analysis unit, 122,2122 Lexicalization unit, 130,2130 Type discrimination unit, 140,2140 Ngram model generation unit, 150,2150 Learning unit, 210 Mask data acquisition unit, 220 Word sequence acquisition unit, 221 Morphological analysis unit, 222 Lexicalization unit, 230 Type discrimination unit, 240 Control information acquisition unit, 250 Inference unit, 251 First inference unit, 252 Second inference unit, 253 Inference result integration unit, 310 Ngram model storage unit, 320 Trained model memory section, 330 neural language model memory section.

Claims

1. a mask data acquisition unit that acquires a character string including a mask portion; a word string acquisition unit that divides the character string into words and acquires a word string consisting of a plurality of words; a control information acquisition unit that acquires, as control words, adjectives that represent the properties or states of things input by a user or a designer; an inference unit that infers a candidate word for the masked portion from the control word and the word string, and outputs the character string in which the masked portion and the candidate word are replaced; Equipped with The inference unit receives as input the control word, the words included in the word string, and the words included in the word dictionary, and infers the candidate words to be replaced with the masked portion from the words included in the word dictionary based on the mutual self information output using a trained model that outputs the mutual self information between the control word, the words included in the word string, and the words included in the word dictionary.

2. The word string acquisition unit a morpheme analysis unit that divides the character string into morphemes, which are the smallest grammatical units, and acquires a morpheme string consisting of a plurality of morphemes with part-of-speech information; a lexicalization unit that connects morphemes included in the morpheme string based on the part-of-speech information to obtain the word string; 2. The inference device according to claim 1, further comprising:

3. a type determination unit that determines the type of sentence indicated by the word string, the trained model is a trained model that outputs mutual information between the control word, a word included in the word string, a word included in the word dictionary, and the sentence type, The inference unit inputs the control word, the words included in the word string, the words included in the word dictionary, and the sentence type, and infers the candidate word using the trained model that outputs mutual information between the control word, the words included in the word string, the words included in the word dictionary, and the sentence type.

2. The inference device according to claim 1.

4. The inference unit infers the candidate words using the mutual information obtained from the trained model and the Ngram likelihood of words included in the word dictionary obtained from an Ngram model.

2. The inference device according to claim 1.

5. the control information acquisition unit acquires a weighting coefficient of the mutual information and the Ngram likelihood as a control strength; The inference unit infers the candidate words by performing maximum likelihood estimation of the sum of the mutual information and the Ngram likelihood based on the control strength.

5. The inference device according to claim 4.

6. The inference unit a first inference unit that infers candidate words for the masked portion using the trained model; a second inference unit that infers candidate words for the masked portion using a neural language model; an inference result integration unit that determines a candidate word that is included in both a first candidate word group, which is a set of multiple candidate words inferred by the first inference unit, and a second candidate word group, which is a set of multiple candidate words inferred by the second inference unit, as a candidate word to be replaced with the masked portion; 2. The inference device according to claim 1, comprising:

7. a learning data acquisition unit that acquires character strings as learning data included in the learning dataset; a word string acquisition unit that divides the character string into words and acquires a word string consisting of a plurality of words; a learning unit that receives an adjective that expresses the nature or state of an object included in the word sequence and two words included in the word sequence, and generates a trained model that outputs mutual information between the adjective and the two words based on the occurrence probability of the words included in the word sequence in the training dataset; A learning device comprising:

8. The learning unit generates the trained model based on an appearance probability in a training dataset of a first word that is the adjective included in the word string, an appearance probability in the training dataset of a second word included in the word string, an appearance probability in the training dataset of a third word included in the word string, and a simultaneous appearance probability in the training dataset of the first word, the second word, and the third word.

8. The learning device according to claim 7.

9. a type determination unit that determines the type of sentence indicated by the word string, The learning unit inputs the type of sentence in addition to the adjective and the two words, and generates the trained model that outputs mutual information between the adjective, the two words, and the type of sentence.

9. The learning device according to claim 7 or 8.

10. The word string acquisition unit a morpheme analysis unit that divides the character string into morphemes, which are the smallest grammatical units, and acquires a morpheme string consisting of a plurality of morphemes with part-of-speech information; a lexicalization unit that connects morphemes included in the morpheme string based on the part-of-speech information to obtain the word string; The learning device according to claim 7, further comprising:

11. The learning device further a bias removal unit that performs a bias removal process on the trained model to set the self-mutual information output by the trained model when a first bias word is input to the trained model to the same value as the self-mutual information output by the trained model when a second bias word different from the first bias word is input; The learning device according to claim 7, further comprising:

12. a mask data acquisition step in which a computer acquires a character string including a mask portion; a word string acquisition step in which the computer divides the character string into words and acquires a word string consisting of a plurality of words; a control information acquisition step in which the computer acquires, as control words, adjectives that represent the properties or states of things input by a user or a designer; an inference step in which a computer infers a candidate word for the masked portion from the control word and the word string, and outputs the character string in which the masked portion and the candidate word are replaced; Including, The inference step is a step of inputting the control word, the words included in the word string, and the words included in the word dictionary, and inferring the candidate words to be replaced with the masked portion from the words included in the word dictionary based on the mutual self information output using a trained model that outputs mutual self information between the control word, the words included in the word string, and the words included in the word dictionary. Reasoning method.

13. An inference program that causes a computer to execute all the steps according to claim 12.

14. a training data acquisition step in which a computer acquires character strings as training data included in a training dataset; a word string acquisition step in which the computer divides the character string into words and acquires a word string consisting of a plurality of words; a learning process in which a computer inputs an adjective that expresses the nature or state of an object included in the word string and two words included in the word string, and generates a trained model that outputs mutual information between the adjective and the two words based on the occurrence probability of the words included in the word string in the training dataset; How to generate a trained model including:

15. A learning program that causes a computer to execute all the steps according to claim 14.

Citation Information

Patent Citations

  • Data expansion information acquisition device and data expansion information acquisition program

    JP2023039102A

  • Attention-based sequence-to-sequence neural network

    JP6884871B2

  • Learning device, inference device, program, learning method, and inference method

    WO2022219741A1