Character string generation device, character string generation method, and character string generation program

The character string generation device employs a personal identification unit and Monte Carlo tree search to generate personalized text without requiring large amounts of training data, effectively addressing the challenge of creating content that matches individual characteristics in text generation models.

WO2024257195A1PCT designated stage expired Publication Date: 2024-12-19NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/021814
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-12
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

Current text generation models require a large amount of training data to generate sentences that match the characteristics of a specific individual, making it difficult to create personalized content.

Method used

A character string generation device and method that uses a personal identification unit to evaluate the probability of generated text based on individual characteristics, combined with Monte Carlo tree search to optimize token selection and achieve high evaluation values, allowing for personalized text generation without extensive learning data.

Benefits of technology

Enables the generation of sentences that accurately reflect individual characteristics using minimal training data, effectively addressing the challenge of personalization in text generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023021814_19122024_PF_FP_ABST
    Figure JP2023021814_19122024_PF_FP_ABST
Patent Text Reader

Abstract

A character string generation device according to the present invention uses an individual identifier (AI that evaluates whether an inputted character string is a character string generated by a particular individual) when determining character strings for text by means of a text generation model. For example, the character string generation device uses the individual identifier to evaluate whether a character string that has been temporarily created using the text generation model is a character string generated by a specific individual and generates text while searching for character strings (tokens) such that the evaluation value goes up. The searching uses, for example, a Monte Carlo tree search.
Need to check novelty before this filing date? Find Prior Art

Description

String generation device, string generation method, and string generation program

[0001] The present invention relates to a character string generation device, a character string generation method, and a character string generation program.

[0002] By recreating each individual on a computer and having them create descriptions and impressions about a certain object, it becomes easier to understand the discrepancies between each individual's perceptions and impressions. In this case, when generating text about a certain object, it is necessary to generate text that is in line with the characteristics of each individual.

[0003] Brown, Tom, et al. "Language Models are Few-Shot Learners."Advances in neural information processing systems 33 (2020): 1877-1901.

[0004] A large amount of training data is required to train a sentence generation model, but often only a small amount of training data is available for a specific individual. This makes it difficult to generate sentences that are tailored to the individual's characteristics. Therefore, an objective of the present invention is to enable sentence generation that is tailored to the individual's characteristics without using a large amount of training data.

[0005] In order to solve the above-mentioned problems, the present invention is characterized by comprising: a personal identification unit that outputs the probability that a character string expressing a character string to be generated by a generator based on information indicating a character string to be generated and information indicating personal characteristics of the generator of the character string; a search unit that acquires a character string evaluation value indicating the probability that a character string temporarily generated by inputting information indicating the character string to be generated into a character string generation model was generated by the generator, and generates a character string while searching for tokens that constitute the character string by Monte Carlo tree search so that the evaluation value including the character string evaluation value becomes high; and an output processing unit that outputs the generated character string.

[0006] According to the present invention, it is possible to generate sentences that are suited to individual characteristics without using a large amount of training data.

[0007] Fig. 1 is a diagram for explaining an overview of a character string generation device. Fig. 2 is a diagram showing an example of the configuration of a character string generation device. Fig. 3 is a diagram for explaining a personal identifier. Fig. 4 is a diagram for explaining processing executed by the character string generation device. Fig. 5 is a flowchart showing an example of a processing procedure executed by the character string generation device. Fig. 6 is a diagram showing a computer that executes a character string generation program.

[0008] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a description will be given of an embodiment of the present invention with reference to the drawings, but the present invention is not limited to the embodiment.

[0009] First, an overview of the character string generation device of this embodiment will be described using Fig. 1. When information on a text generation target (for example, the image shown in Fig. 1) is input, the character string generation device generates a text that expresses the target in accordance with the characteristics of a specific individual. For example, the character string generation device generates a text ("beautiful horse") that expresses the image of a horse shown in Fig. 1 in accordance with the characteristics of a specific individual.

[0010] Here, when determining a character string of a sentence using a sentence generation model, the character string generation device uses a personal classifier (AI that evaluates whether an input character string is a character string generated by a specific individual). For example, the character string generation device uses the personal classifier to evaluate whether a character string temporarily generated using the sentence generation model is a character string generated by a specific individual, and generates a sentence while searching for character strings (tokens) that have a high evaluation value. For example, a Monte Carlo tree search is used for the search.

[0011] The training of the personal classifier does not require a large amount of data, so the character string generation device can generate sentences that are suited to the characteristics of an individual without using a large amount of training data.

[0012] [Configuration Example] Next, a configuration example of the character string generation device 10 will be described with reference to Fig. 2. The character string generation device 10 includes, for example, an input / output unit 11, a storage unit 12, and a control unit 13.

[0013] The input / output unit 11 is an interface that controls the input and output of various data. The input / output unit 11 receives inputs such as information indicating the target of sentence generation and information indicating the personality of the sentence generator. The input / output unit 11 also outputs sentences (character strings) generated by the control unit 13, for example.

[0014] The storage unit 12 stores data, programs, etc. that are referenced when the control unit 13 executes various processes. The storage unit 12 is realized by a semiconductor memory element such as a random access memory (RAM) or a flash memory, or a storage device such as a hard disk or an optical disk. For example, the storage unit 12 stores parameters of a personal classifier, parameters of a sentence generation model, etc.

[0015] The control unit 13 is responsible for overall control of the character string generation device 10. The functions of the control unit 13 are realized, for example, by a CPU (Central Processing Unit) executing a program stored in the storage unit 12.

[0016] The control unit 13 includes, for example, a personal identification unit 131 , a sentence generation unit 132 , a search unit 133 , a monotone conversion unit 134 , and an output processing unit 135 .

[0017] The individual identification unit 131 uses the above-mentioned individual identifier to evaluate whether the input character string is a character string generated by a certain individual.

[0018] For example, as shown in Figure 3, when the personal classifier receives input of information indicating the target for which text is to be generated (for example, an image of the target for generation), information indicating the personal characteristics of the creator of the text (personal characteristic data, for example, the results of a questionnaire response), and a character string expressing the target for which text is to be generated (character string to be evaluated), the personal classifier is trained to output the probability that the character string was generated by the generator (personal judgment probability value). For training, for example, a data set of an image of the target for which text is to be generated, a character string expressed by the generator of the text, and the personal characteristic data of the generator of the text is used.

[0019] Then, the personal identification unit 131 inputs personal characteristic data of an individual (e.g., questionnaire response results), an image representing the target for sentence generation (e.g., an image of a horse), and a character string to be evaluated (e.g., "big brown") into the trained personal identifier, and obtains the probability (e.g., personal judgment probability value "0.2") that the character string to be evaluated (e.g., "big brown") was generated by an individual for the image representing the target for sentence generation (e.g., an image of a horse).

[0020] Returning to the explanation of Fig. 2, the sentence generation unit 132 inputs information indicating the target of sentence generation and a character string (used character string) expressing the target of sentence generation to the sentence generation model, and outputs a probability distribution summarizing the probability that each token will come after the used character string.

[0021] The sentence generation model is a model that receives as input information indicating the target of sentence generation and a character string (used character string) that expresses the target of sentence generation, and outputs a probability distribution that summarizes the probability that each token will appear next after the used character string. An existing sentence generation model may be used as the sentence generation model.

[0022] For example, consider a case where the sentence generation unit 132 inputs information indicating the target of sentence generation (e.g., the image shown in FIG. 4) and the used string "brown" into the above sentence generation model. In this case, the sentence generation unit 132 outputs values ​​[0.03, 0.4, 0.002, 0.04, ...] indicating the probability that each token [wa, uma, o-ki, towa, ...] will appear after the used string "brown."

[0023] Returning to the explanation of Fig. 2, the search unit 133 generates a character string while searching for the next token using Monte Carlo tree search (see Reference 1).

[0024] Reference 1: Kocsis, Levente; Szepesvari, Csaba (2006). "Bandit based Monte-Carlo Planning". In Furnkranz, Johannes; Scheffer, Tobias; Spiliopoulou, Myra (eds.). Machine Learning: ECML 2006, 17th European Conference on Machine Learning, Berlin, Germany, September 18-22, 2006, Proceedings. Lecture Notes in Computer Science. 4212. Springer. pp. 282-293.

[0025] For example, for a used string held by the search unit 133, the search unit 133 acquires from the sentence generation unit 132 the probability distribution of each token that follows the used string. Then, the search unit 133 selects the next token of the used string using the probability distribution of each acquired token. The search unit 133 then generates a string by extending the used string with the selected token. After that, the search unit 133 acquires an evaluation value (string evaluation value) from the individual identification unit 131 for the generated string. The search unit 133 generates a string while searching for the next token of the used string so that the evaluation value (details will be described later) including the acquired string evaluation value becomes higher.

[0026] An example of the processing executed by the search unit 133 will be described with reference to FIG. 4. For example, the search unit 133 is assumed to hold a used string. When the search unit 133 acquires the probability distribution of each token that follows the used string from the sentence generation unit 132, the search unit 133 selects the next token of the used string based on the acquired probability distribution of each token. The search unit 133 then extends the used string with the selected token. The extended used string is set as the string to be evaluated.

[0027] The search unit 133 outputs the character string to be evaluated to the individual identification unit 131. The individual identification unit 131 outputs the individual judgment probability value of the character string to be evaluated. Thereafter, the search unit 133 acquires the individual judgment probability value (character string evaluation value) monotonically converted by the monotonous conversion unit 134.

[0028] The search unit 133 then generates a new string to be evaluated using the string evaluation value of the acquired string to be evaluated and the probability distribution of each token that follows the used string.The search unit 133 then outputs the generated string to be evaluated to the individual identification unit 131 and acquires the string evaluation value of the string to be evaluated.

[0029] For example, consider a case where the probability distribution of each token [wa, uma, ji, towa, ...] that follows the used character string "brown" is [0.03, 0.4, 0.002, 0.04, ...]. In this case, the search unit 133 generates the character string to be evaluated, "brown horse", based on the probability distribution of each token. The search unit 133 also outputs "brown horse" to the individual identification unit 131 and obtains a character string evaluation value of "0.44" for "brown horse".

[0030] Thereafter, the search unit 133 generates a new character string to be evaluated based on the character string evaluation value "0.44" of "brown horse" and the probability distribution [0.03, 0.4, 0.002, 0.04, ...] of each token [wa, horse, o-ki, towa, ...] that follows "brown". Then, the search unit 133 outputs the generated character string to be evaluated to the individual identification unit 131 and acquires the character string evaluation value of the character string to be evaluated.

[0031] The search unit 133 repeats the above process multiple times and determines the final next token based on the multiple evaluation values.

[0032] In addition, the evaluation value used when determining the final next token may include, in addition to the string evaluation value of the string to be evaluated, for example, the number of times the search unit 133 visits the token in searching for the token, the probability of the token, etc.

[0033] The token search method described above conforms to Monte Carlo tree search. The search unit 133 then extends the character string stored in the search unit 133 with the determined token and outputs it to the sentence generation unit 132. The search unit 133 executes the above process until a predetermined time has elapsed since the start of the process, or until the determined token becomes the end-of-sentence (EOS) token.

[0034] The monotonic conversion unit 134 receives the individual determination probability value output from the individual identification unit 131 as input, and outputs the monotonically converted value as the character string evaluation value. For example, if the individual determination probability value is 0.2 and the monotonic conversion function is tanh(x), the monotonic conversion unit 134 outputs a character string evaluation value of -0.197 (=tanh(0.2)). The output processing unit 135 outputs the sentence (character string) generated by the search unit 133.

[0035] [Example of Processing Procedure] Next, a description will be given of an example of processing procedure executed by the character string generation device 10. It is assumed that the personal classifier has already been trained.

[0036] First, the character string generation device 10 receives input of information indicating the target of sentence generation and personal characteristic data of the sentence generator (S1). Then, the sentence generation unit 132 outputs a probability distribution of the next token of the used character string based on the information indicating the target of sentence generation input in S1 (S2). Note that if a used character string does not yet exist, the sentence generation unit 132 outputs a probability distribution of the first token of the character string.

[0037] After S2, the search unit 133 generates a character string to be evaluated based on the probability distribution of the tokens output in S2 (S3).The search unit 133 then outputs the character string to be evaluated generated in S3 to the individual identification unit 131 and obtains a character string evaluation value for the character string to be evaluated (S4).

[0038] Furthermore, the search unit 133 generates a new character string to be evaluated again using the character string evaluation value of the character string to be evaluated obtained in S4 and the probability distribution of the token obtained in S2 (S5).

[0039] The search unit 133 repeats the above steps S4 and S5 multiple times and determines the final next token from the multiple evaluation values ​​(S6).The search unit 133 then extends the character string (used character string) with the token determined in S6 (S7).After that, if a predetermined time has elapsed since the start of processing, or if the token determined in S7 is EOS (end of sentence) (Yes in S8), the output processing unit 135 outputs the character string extended in S7 (S9).On the other hand, if the predetermined time has not yet elapsed since the start of processing and the token determined in S7 is not EOS (end of sentence) (No in S8), the process returns to S3.

[0040] By performing the above process, the character string generation device 10 can generate sentences that are suited to individual characteristics without using a large amount of training data.

[0041] [System Configuration, etc.] The components of each unit shown in the figure are conceptual functional units and do not necessarily have to be physically configured as shown. In other words, the specific form of distribution and integration of each device is not limited to that shown, and all or part of them can be functionally or physically distributed and integrated in any unit depending on various loads, usage conditions, etc. Furthermore, all or any part of the processing functions performed by each device can be realized by a CPU and a program executed by the CPU, or can be realized as hardware using wired logic.

[0042] Furthermore, among the processes described in the above embodiments, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically using a known method.In addition, the information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed as desired unless otherwise specified.

[0043] [Program] The character string generation device 10 can be implemented by installing a program (character string generation program) as package software or online software on a desired computer. For example, by executing the program on an information processing device, the information processing device can function as the character string generation device 10. The information processing device referred to here includes mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone Systems), as well as terminals such as PDAs (Personal Digital Assistants).

[0044] 6 is a diagram showing an example of a computer that executes a character string generation program. The computer 1000 includes, for example, a memory 1010 and a CPU 1020. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.

[0045] The memory 1010 includes a read-only memory (ROM) 1011 and a random access memory (RAM) 1012. The ROM 1011 stores a boot program such as a basic input / output system (BIOS). The hard disk drive interface 1030 is connected to a hard disk drive 1090. The disk drive interface 1040 is connected to a disk drive 1100. A removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to a display 1130, for example.

[0046] The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, the program that defines each process executed by the character string generation device 10 is implemented as a program module 1093 in which computer-executable code is written. The program module 1093 is stored, for example, in the hard disk drive 1090. For example, a program module 1093 for executing processes similar to those of the functional configuration of the character string generation device 10 is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

[0047] Data used in the processing of the above-described embodiment is stored as program data 1094, for example, in the memory 1010 or the hard disk drive 1090. The CPU 1020 then reads the program module 1093 or the program data 1094 stored in the memory 1010 or the hard disk drive 1090 into the RAM 1012 as necessary and executes them.

[0048] The program module 1093 and program data 1094 may not necessarily be stored in the hard disk drive 1090, but may also be stored in a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and program data 1094 may be stored in another computer connected via a network (such as a local area network (LAN) or a wide area network (WAN)). The program module 1093 and program data 1094 may then be read by the CPU 1020 from the other computer via the network interface 1070.

[0049] REFERENCE SIGNS LIST 10 String generation device 11 Input / output unit 12 Storage unit 13 Control unit 131 Personal identification unit 132 Sentence generation unit 133 Search unit 134 Monotone conversion unit 135 Output processing unit

Claims

1. A string generation device comprising: a personal identification unit that outputs the probability that a string expressing the target of the sentence to be generated was generated by the generator based on information indicating the target of the sentence and information indicating the personal characteristics of the generator of the sentence; a search unit that obtains a string evaluation value indicating the probability that a string temporarily generated by inputting the information indicating the target of the sentence to a sentence generation model was generated by the generator, and generates a string while searching for tokens that constitute the string by Monte Carlo tree search so that the evaluation value including the string evaluation value becomes high; and an output processing unit that outputs the generated string.

2. The string generation device described in claim 1, characterized in that the sentence generation model is a model that receives as input information indicating the target of the sentence to be generated and a string expressing the target of the sentence to be generated, and outputs a probability distribution indicating the probability that each token will come after the string, and the search unit generates a string while searching for the next token of the string so as to increase the evaluation value including the probability.

3. The string generation device according to claim 1, characterized in that the evaluation value further includes a value of the number of visits of the token in the search.

4. A string generation method executed by a string generation device, comprising: a step of outputting a probability that a string expressing the target of the sentence to be generated has been generated by the generator based on information indicating the target of the sentence to be generated and information indicating the personal characteristics of the generator of the sentence; a step of acquiring a string evaluation value indicating the probability that a string temporarily generated by inputting the information indicating the target of the sentence to be generated into a sentence generation model has been generated by the generator, and generating a string while searching for tokens that constitute the string by Monte Carlo tree search so that the evaluation value including the string evaluation value becomes high; and a step of outputting the generated string.

5. A string generation program for causing a computer to execute the steps of: outputting the probability that a string expressing the target of sentence generation was generated by the generator based on information indicating the target of sentence generation and information indicating the personal characteristics of the generator of the sentence; acquiring a string evaluation value indicating the probability that a string temporarily generated by inputting the information indicating the target of sentence generation into a sentence generation model was generated by the generator, and generating a string while searching for tokens that constitute the string by Monte Carlo tree search so that the evaluation value including the string evaluation value becomes high; and outputting the generated string.

Citation Information

Patent Citations

  • Language conversion processing system by use of a plurality of scales and processing program therefor

    JP2003076687A

  • Retrieval method, retrieval program and retrieval device

    JP2012190266A