Attention generation device, attention generation method, and program
The attention generation device and method address the issue of data repetition by calculating and correcting attention coefficients, ensuring accurate and efficient data generation by minimizing the focus on repeated input data portions.
Patent Information
- Authority / Receiving Office
- JP Β· JP
- Patent Type
- Patents
- Current Assignee / Owner
- NEC CORP
- Filing Date
- 2023-11-02
- Publication Date
- 2026-06-30
Smart Images

Figure 0007882349000001 
Figure 0007882349000002 
Figure 0007882349000003
Abstract
Description
[Technical Field]
[0001] This disclosure relates to an attention generation device, an attention generation method, and a recording medium. [Background technology]
[0002] In data processing, the data being processed may consist of multiple parts, and these parts may be weighted accordingly. For example, in Patent Document 1, when feature values ββfor each frequency domain of an audio frame are input to a speech recognition model, an attention weighting value determines which frequency domain's feature values ββamong the feature values ββfor each frequency domain of the audio frame are considered more important. [Prior art documents] [Patent Documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2018-109760 [Overview of the project] [Problems that the invention aims to solve]
[0004] In data processing, when weighting is applied to portions of the data being processed, it is preferable to avoid or reduce the repetition of data portions in the data obtained through data processing.
[0005] One example of the purpose of this disclosure is to provide an attention generation device, an attention generation method, and a recording medium that can solve the above-mentioned problems. [Means for solving the problem]
[0006] According to a first aspect of this disclosure, the attention generation device includes an attention calculation means for calculating an attention, which is a weight coefficient for each part of the input data, for each part of the output data for generating that part of the output data, and an attention correction means for correcting a target attention, which is the attention for generating the part of the output data that is to be generated, based on the attention for generating the already generated part of the output data.
[0007] According to a second aspect of this disclosure, the attention generation method includes a computer calculating an attention, which is a weight coefficient for each part of the input data, for each part of the output data for the generation of that part of the output data, and modifying a target attention, which is the attention for generation of the part of the output data that is to be generated, based on the attention for generation of the already generated part of the output data.
[0008] According to a third aspect of this disclosure, the recording medium stores a program that causes a computer to perform the following actions: calculate an attention, which is a weighting coefficient for each part of the input data, for each part of the output data for the generation of that part of the output data; and modify a target attention, which is the generation attention for the part of the output data that is to be generated, based on the generation attention for the part of the output data that has already been generated. [Brief explanation of the drawing]
[0009] [Figure 1] This figure shows an example of the configuration of an attention-generating device according to some embodiments of the present disclosure. [Figure 2] This figure shows an example of attention calculated by an attention calculation unit according to some embodiments of the present disclosure. [Figure 3] This figure shows examples of attention correction by the attention correction unit according to some embodiments of the present disclosure. [Figure 4]This figure shows an example of a processing procedure for generating attention using an attention generation device according to some embodiments of the present disclosure. [Figure 5] This figure shows an example of a processing procedure for updating a coverage set in an attention generation device according to some embodiments of the present disclosure. [Figure 6] This figure shows an example of the configuration of an attention-generating device according to some embodiments of the present disclosure. [Figure 7] This figure shows examples of attention correction by the attention correction unit according to some embodiments of the present disclosure. [Figure 8] This figure shows an example of a processing procedure for generating attention using an attention generation device according to some embodiments of the present disclosure. [Figure 9] This figure shows an example of the configuration of a data generation device according to some embodiments of this disclosure. [Figure 10] This figure shows examples of data input and output in various parts of a data generation device according to some embodiments of the present disclosure. [Figure 11] This figure shows an example of the configuration of an attention-generating device according to some embodiments of the present disclosure. [Figure 12] This figure shows an example of a processing procedure in an attention generation method according to some embodiments of the present disclosure. [Figure 13] This is a schematic block diagram showing the configuration of a computer according to at least one embodiment. [Modes for carrying out the invention]
[0010] The embodiments described below are not intended to limit the claims of the invention. Furthermore, not all combinations of features described in the embodiments are necessarily essential to the solution of the invention.
[0011] FIG. 1 is a diagram showing an example of the configuration of an attention generation device according to some embodiments of the present disclosure. In the configuration shown in FIG. 1, the attention generation device 10 includes an attention calculation unit 11, a similarity determination unit 12, a coverage set update unit 13, and an attention correction unit 14.
[0012] The attention generation device 10 generates an attention. Here, the attention is a weight coefficient indicating the weight of each part of the input data when generating a certain part of the output data in the process of generating output data that can be divided into parts based on the input data that can be divided into parts. The weight coefficient for each part of the input data indicated by the attention is also referred to as an element of the attention. The attention can be regarded as data indicating which part of the input data should be focused on and to what extent when generating a certain part of the output data.
[0013] The input data and output data for which the attention generation device 10 generates an attention are not limited to a specific type of data. Also, the unit of division of the input data and the unit of division of the output data are not limited to specific ones.
[0014] For example, when the attention generation device 10 is used for attention generation of a speech recognition device, the input data may be speech data, and the output data may be data of a character string obtained by converting the speech of the speech data into characters. In this case, the part into which the input data is divided may be each part obtained by dividing the speech data, which is the input data, at predetermined time lengths. Also, the part into which the output data is divided may be each character included in the character string, each word, or each clause.
[0015] Alternatively, when the attention generation device 10 is used to generate attention for a document-to-document machine translation device, the input data may be string data representing the document to be translated, and the output data may be string data representing the translated document. In this case, the parts of the input data that are divided may be each character, each word, or each segment contained in the string. Similarly, the parts of the output data that are divided may also be each character, each word, or each segment contained in the string. The units of division may be the same or different for the input data and the output data.
[0016] Alternatively, if the attention generation device 10 is used to generate attention for a character recognition device that detects and recognizes a string of characters contained in an image, the input data may be image data, and the output data may be data indicating the string of characters detected and recognized from the image. In this case, the divided parts of the input data may be each part obtained by dividing the input data vertically and horizontally into predetermined pixel intervals. The divided parts of the output data may be data indicating the string of characters detected and recognized from the divided parts of the input image.
[0017] Alternatively, if the attention generation device 10 is used to generate attention for an image recognition device that performs object recognition to detect objects in an image, the input data may be image data. In this case, the output data may be string data containing a description of the object recognition result. In this case, the divided parts of the input data may be each part obtained by dividing the input data vertically and horizontally into predetermined pixel intervals. The divided parts of the output data may be string data containing a description of the object recognition result for each divided part of the input image.
[0018] It should be noted that the input data and output data referred to here do not necessarily have to be input data and output data for the attention generation device 10. The input data and output data referred to here are, for example, input data and output data for a data generation device that generates output data based on input data, such as the speech recognition device, machine translation device, character recognition device, or image recognition device mentioned above. A data generation device that generates output data based on input data is also simply called a data generation device.
[0019] The input data to the attention generation device 10 may be data obtained by processing parts of the input data to the data generation device. For example, the input data to the attention generation device 10 may be data showing feature quantities extracted by the data generation device for each part of the input data to the data generation device. The output data from the attention generation device 10 may be the attention generated by the attention generation device 10.
[0020] The attention generation device 10 may be configured using a computer such as a personal computer (PC) or a workstation (WS). Alternatively, the attention generation device 10 may be configured using dedicated hardware, such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).
[0021] The attention calculation unit 11 calculates attention for each portion of the output data for the purpose of generating that portion of the output data. As described above, attention is a weighting coefficient for each portion of the input data. The attention calculation unit 11 is an example of an attention calculation means.
[0022] The method by which the attention calculation unit 11 calculates attention is not limited to a specific method. For example, the attention calculation unit 11 may be configured using a known attention mechanism, or the attention calculation unit 11 may calculate attention using a known attention calculation algorithm.
[0023] The similarity determination unit 12 calculates the similarity between each of the generation attentions for the already generated portion of the output data and the target attention. The target attention here refers to the generation attention for the portion of the output data that is being generated (the portion to be generated next). The generation attentions for the already generated portion of the output data are the attentions that the attention generation device 10 generated before the generation of the target attention.
[0024] The similarity determination unit 12 determines, based on the calculated similarity score, whether or not there are any attentions among the generated attentions in the output data portion that are similar to the target attention. The similarity determination unit 12 is an example of a similarity determination means.
[0025] The similarity of attention calculated by the similarity determination unit 12 is not limited to a specific type of similarity. For example, attention can be represented as a vector, and the similarity determination unit 12 can use various similarity measures applicable to the similarity of two vectors, such as the correlation coefficient or cosine similarity, as the similarity of attention calculated by the similarity determination unit 12.
[0026] The coverage set update unit 13 updates the coverage set each time the attention calculation unit 11 calculates symmetric attention. The coverage set, as referred to here, is a set whose elements are indices that identify parts of the input data, and it represents parts of the input data that have been assigned a weight greater than a predetermined condition. The coverage set can be understood as a set that shows parts of the input data that have been noticed.
[0027] The coverage set update unit 13 adds an index to the coverage set that identifies the input data to which weight coefficients that are determined to be larger than a predetermined condition among the weight coefficients included in the target attention are to be applied. The coverage set update unit 13 is an example of a coverage set update means.
[0028] The attention correction unit 14 corrects the target attention based on the generation attention for the already generated portion of the output data. The attention correction unit 14 is an example of an attention correction means.
[0029] Specifically, the attention correction unit 14 rewrites the weight coefficients included in the target attention that are linked to the index shown in the coverage set before the information about that target attention is reflected, to 0 or a predetermined value that is a sufficiently small positive value.
[0030] The attention correction unit 14 performs a correction of the target attention, which can be understood as a process of rewriting the values ββof the weight coefficients attached to input data portions that have been previously noted, in order to reduce their level of attention. By correcting the target attention, the attention correction unit 14 is expected to avoid or reduce errors in the data generation device that occur when it repeatedly focuses on the same portion of the input data and repeatedly generates the same portion of the output data.
[0031] The attention correction unit 14 modifies the target attention based on the generation attention of the generated portion of the output data if the similarity determination unit 12 determines that there is an attention similar to the target attention among the generation attention of the generated portion of the output data.
[0032] The attention correction unit 14 then multiplies each element of the target attention by a coefficient so that the sum of each element of the target attention becomes 1. Multiplying each element of the attention by a coefficient so that the sum of each element of the attention becomes 1 is also called normalization to make the sum of each element of the attention 1.
[0033] The attention correction unit 14 calculates the sum of the elements of the target attention that have been corrected based on the coverage set. The attention correction unit 14 then calculates the reciprocal of the calculated sum as a coefficient to make the sum of each element of the target attention equal to 1. The attention correction unit 14 multiplies each element of the target attention, after the elements have been rewritten based on the coverage set, by the calculated coefficient to generate the corrected target attention.
[0034] Furthermore, the attention correction unit 14 generates target attention for updating the coverage set. In generating target attention for coverage set updates, the attention correction unit 14 detects the largest element among the elements of the corrected target attention. The attention correction unit 14 then calculates the reciprocal of the detected largest element as a coefficient for generating target attention for coverage set updates. In other words, the attention correction unit 14 calculates a coefficient such that the maximum value of the elements of the attention becomes 1 as the coefficient for generating target attention for coverage set updates.
[0035] The attention correction unit 14 multiplies the calculated coefficient by each element of the corrected target attention to generate a target attention for coverage set update. Multiplying each element of the attention by a coefficient such that the maximum value of the attention elements becomes 1 is also called normalization for coverage set update. The coverage set update unit 13 adds an index to the coverage set that identifies the input data to which elements of the target attention for coverage set update that are determined to be larger than a predetermined condition are to be applied.
[0036] Figure 2 shows an example of attention calculated by the attention calculation unit 11. Figure 2 shows the attention calculated by the attention calculation unit 11 in a table format, where each column is linked to a position in the input data, and each row is linked to a position in the output data. Here, the position corresponds to an example of an index that identifies a portion of the data.
[0037] In the example shown in Figure 2, the attention calculation unit 11 calculates the attention for each line of output data in the order of positions 1, 2, 3, and 4. Furthermore, the attention calculation unit 11 calculates the attention so that the sum of the attention elements in one row equals 1, with significant figures up to two decimal places. However, the attention calculated by the attention calculation unit 11 is not limited to a specific one. The attention calculated by the attention calculation unit 11 is calculated for each part of the output data and can be various things that represent the weight coefficients for each part of the input data.
[0038] Figure 3 shows an example of attention correction by the attention correction unit 14. Figure 3 shows an example in which the attention correction unit 14 corrects the attention in the example in Figure 2. Figure 3 shows, for each time step, the coverage set before update at that time step, the target attention before correction by the attention correction unit 14, the target attention after correction by the attention correction unit 14, and the target attention for updating the coverage set.
[0039] In Figure 3, the time it takes for the attention generation device 10 to generate the target attention for generating one output portion data is defined as one time step. The target attention before correction is the target attention calculated by the attention calculation unit 11, and the attention for output data positions 1, 2, 3, and 4 in the example in Figure 2 is shown in the order of time steps 1, 2, 3, and 4. Figure 3 shows an example where the data generation device terminates output data generation after generating the output data portion in time step 4. Therefore, in time step 5, the attention generation device 10 does not generate any attention.
[0040] As described above, the coverage set represents the portion of the input data that has been assigned a weight greater than a predetermined condition. Here, the coverage set will be denoted as "C". The initial value of the coverage set C is set to the empty set Ο.
[0041] In modifying the target attention, the similarity determination unit 12 determines whether there are any attentions similar to the target attention among the generated attentions in the output data portion that have already been generated. The similarity determination unit 12 may compare the target attention with the attention calculated by the attention calculation unit 11 before the calculation of the target attention, and then corrected by the attention correction unit 14. Alternatively, the similarity determination unit 12 may compare the target attention with the attention calculated by the attention calculation unit 11 before the calculation of the target attention (the attention before correction by the attention correction unit 14). In the example shown in Figure 3, the similarity determination unit 12 compares the target attention with the attention calculated by the attention calculation unit 11 before the target attention was calculated, and then corrected by the attention correction unit 14. Furthermore, the similarity determination unit 12 determines that the correlation coefficient between the two attentions is within a threshold t. corr If the threshold t is greater than the threshold t, the two attentions are judged to be similar. corr The value is set to 0.8.
[0042] The attention correction unit 14 corrects the target attention if the similarity determination unit 12 determines that there is an attention similar to the target attention among the generated attentions in the portion of the output data that has already been generated. The attention correction unit 14 rewrites the values ββof the elements (each weight coefficient) of the target attention that are linked to the index shown in the coverage set before the information about that target attention is reflected to 0 or a value predetermined as a sufficiently small positive value.
[0043] In time step 1, there are no attentions that have already been generated by the attention generation device 10 before the generation of the target attention. Therefore, the similarity determination unit 12 determines that there are no attentions similar to the target attention among the attentions generated in the already generated portion of the output data.
[0044] In this case, the attention correction unit 14 does not correct the target attention, but instead adopts the target attention calculated by the attention calculation unit 11 as the corrected target attention. The attention generation device 10 outputs the target attention calculated by the attention calculation unit 11 as the attention used to generate the output data portion by the data generation device.
[0045] The attention correction unit 14 further generates target attention for coverage set update. The attention correction unit 14 detects the largest element (each weight coefficient) among the elements (each weight coefficient) of the corrected target attention. The attention correction unit 14 then calculates a coefficient so that the value of the detected largest element becomes 1, and multiplies each element of the corrected target attention by the calculated coefficient. Alternatively, the coverage set update unit 13 may generate target attention for coverage set update instead of the attention correction unit 14.
[0046] In time step 1, the maximum value of the elements in the corrected target attention is 0.93. Therefore, the attention correction unit 14 calculates a coefficient of 1 / 0.93 = 1.08 to generate the target attention for coverage set update. The attention correction unit 14 multiplies the calculated coefficient of 1.08 by each element of the corrected target attention to generate the target attention for coverage set update.
[0047] The coverage set update unit 13 adds an index to the coverage set that identifies the input data to which elements (each weight coefficient) of the normalized target attention that are determined to be larger than a predetermined condition are applied. In the example in Figure 3, the coverage set update unit 13 identifies the threshold t among the elements of the normalized target attention for updating the coverage set. cover The position of the input data where a larger element is multiplied is added as an element to the coverage set.
[0048] In time step 1, the coverage set update unit 13 adds the position "1" of the input data where the target attention element is "1.00" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from the empty set Ο to {1}.
[0049] In time step 2, the attention before correction in time step 2 corresponds to the target attention before correction by the attention correction unit 14. Also, the attention after correction in time step 1 corresponds to the attention for generating the already generated portion of the output data. The similarity determination unit 12 determines whether the attention before correction in time step 2 and the attention after correction in time step 1 are similar, and determines that there are no similar attentions.
[0050] In this case, the attention correction unit 14 does not correct the target attention, but instead adopts the target attention calculated by the attention calculation unit 11 as the corrected target attention. The attention generation device 10 outputs the target attention calculated by the attention calculation unit 11 as the attention used to generate the output data portion by the data generation device.
[0051] Furthermore, in time step 2, the maximum value of the elements in the corrected target attention is 0.84. Therefore, the attention correction unit 14 calculates a coefficient of 1 / 0.84 = 1.19 for generating the target attention for coverage set update. The attention correction unit 14 multiplies the calculated coefficient of 1.19 by each element of the corrected target attention to generate the target attention for coverage set update. The coverage set update unit 13 adds the position "2" of the input data where the target attention element is "1.00" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from {1} to {1,2}.
[0052] In time step 3, the attention before correction in time step 3 corresponds to the target attention before correction by the attention correction unit 14. Also, the attention after correction in time steps 1 and 2 respectively corresponds to the attention for generating the already generated portion of the output data. The similarity determination unit 12 determines whether the attention before correction in time step 3 is similar to at least one of the attention after correction in time steps 1 and 2, and determines that there are no similar attentions.
[0053] In this case, the attention correction unit 14 does not correct the target attention, but instead adopts the target attention calculated by the attention calculation unit 11 as the corrected target attention. The attention generation device 10 outputs the target attention calculated by the attention calculation unit 11 as the attention used to generate the output data portion by the data generation device.
[0054] Furthermore, in time step 3, the maximum value of the elements in the corrected target attention is 0.52. Therefore, the attention correction unit 14 calculates a coefficient of 1 / 0.52 = 1.92 for generating the target attention for coverage set update. The attention correction unit 14 multiplies the calculated coefficient of 1.92 by each element of the corrected target attention to generate the target attention for coverage set update.
[0055] The coverage set update unit 13 adds the input data position "3" where the target attention element is "1.00" and the input data position "4" where the attention element is "0.85" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from {1,2} to {1,2,3,4}.
[0056] When multiple elements of a target attention are set to be relatively large, as in the modified target attention in time step 3, the constraint that the sum of the elements of the attention must be 1 means that each element has a threshold t. cover It is conceivable that it will be smaller than that. On the other hand, the data generation device can be seen as generating the output data by focusing on the portion of the input data to which a relatively large weight coefficient (attention element) is multiplied.
[0057] Thus, if the corrected target attention is used directly to update the coverage set C, it is possible that a coverage set that reduces the weight coefficient values ββ(lowers the level of attention) assigned to input data parts that have been previously focused on will not be obtained. If the weight coefficient values ββassigned to input data parts that have been previously focused on cannot be reduced, the data generator will not be able to avoid or reduce the error of repeatedly focusing on the same part of the input data and repeatedly generating the same part data as part of the output data.
[0058] In response, the attention correction unit 14 performs normalization for updating the coverage set and generates target attention for updating the coverage set. As a result, the coverage set update unit 13 can update the coverage set so that even if several weight coefficients among the weight coefficients included in the target attention are set to be relatively large, the values ββof the weight coefficients attached to input partial data that have been previously noted are reduced. By reducing the values ββof the weight coefficients attached to input partial data that have been previously noted, it is expected that the data generation device can avoid or reduce the error of repeatedly noticing the same part of the input data and repeatedly generating the same partial data as part of the output data.
[0059] In time step 4, the attention before correction in time step 4 corresponds to the target attention before correction by the attention correction unit 14. Also, the attention after correction in time steps 1, 2, and 3 corresponds to the attention for generating the already generated portion of the output data.
[0060] Of these modified attentions, the modified attention in time step 2 is similar to the unmodified attention in time step 4. That is, these two attentions satisfy the criterion of having a correlation coefficient greater than 0.8. The similarity determination unit 12 determines whether the attention before modification in time step 4 is similar to at least one of the attention after modification in time steps 1, 2, and 3, and determines that there is a similar attention.
[0061] In accordance with the determination result, the attention correction unit 14 rewrites the values ββof the elements of the target attention before correction that are associated with indices 1, 2, 3, and 4 shown in coverage set C to "0.00". The attention correction unit 14 then performs normalization to make the sum of each element of the target attention equal to 1. In the case of time step 4 in Figure 3, the elements of the target attention before normalization to make the sum of each element of the target attention equal to 1 are "0.00", "0.00", "0.00", "0.00", and "0.12". The attention correction unit 14 divides the sum of these elements, 0.12, by 1 to calculate a coefficient of 1 / 0.12 = 8.33 to make the sum of each element of the target attention equal to 1. The attention correction unit 14 multiplies the calculated coefficient of 8.33 by each element of the target attention after rewriting the elements based on the coverage set to generate the corrected target attention. The attention generation device 10 outputs the corrected target attention generated by the attention correction unit 14 as attention for generating the output data portion by the data generation device.
[0062] Furthermore, in time step 4, the maximum value of the elements in the corrected target attention is 1.00. Therefore, the attention correction unit 14 calculates a coefficient of 1 / 1.00 = 1.00 for generating the target attention for coverage set update. The attention correction unit 14 multiplies each element of the corrected target attention by the calculated coefficient of 1.00 to generate the target attention for coverage set update. The coverage set update unit 13 adds the position "5" of the input data where the target attention element is "1.00" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from {1,2,3,4} to {1,2,3,4,5}. After time step 4, the data generation device has finished generating output data, and the attention generation device 10 has also finished generating attention.
[0063] Figure 4 shows an example of the processing procedure by which the attention generation device 10 generates attention. In the process of FIG. 4, the attention calculation unit 11 sets the value of the variable k indicating the identification number for identifying the target attention to 1 (step S101). In the example of FIG. 2, the identification number for identifying the target attention indicated by the value of the variable k corresponds to the position of the output data.
[0064] Next, the attention calculation unit 11 calculates the k-th attention (step S102). Next, the similarity determination unit 12 sets the value of the variable j indicating the identification number for identifying the attention for calculating the similarity with the target attention to 1 (step S103). Then, the similarity determination unit 12 determines whether j β₯ k (step S104).
[0065] If it is determined that j < k (step S104: NO), the similarity determination unit 12 calculates the similarity between the k-th attention (the target attention before correction) and the j-th attention (step S111). The similarity determination unit 12 may calculate the similarity between the k-th attention and the j-th attention before correction. Alternatively, the similarity determination unit 12 may calculate the similarity between the k-th attention and the j-th attention after correction. When the similarity determination unit 12 calculates the similarity between the k-th attention and the j-th attention after correction, if the attention correction unit 14 has not corrected the j-th attention, the attention calculation unit 11 treats the j-th attention (the j-th attention before correction) calculated as the j-th attention after correction.
[0066] Next, the similarity determination unit 12 determines whether the calculated similarity is greater than the threshold value t corr (step S112). If it is determined that the similarity is less than or equal to the threshold value t corr (step S112: NO), the similarity determination unit 12 adds 1 to the variable j (step S131). After step S131, the process returns to step S104.
[0067] On the other hand, in step S112, when the similarity is greater than the threshold value tcorr If it is determined to be greater than (Step S112: YES), the attention correction unit 14 corrects the target attention (Step S121). Specifically, the attention correction unit 14 rewrites the values ββof the elements of the target attention that are associated with the index shown in the coverage set C to 0 or a value predetermined as a sufficiently small positive value.
[0068] Next, the attention correction unit 14 normalizes the attention corrected in step S121 so that the sum of the elements becomes 1 (step S122). Next, the coverage set update unit 13 updates the coverage set C (step S141). Furthermore, the attention generation device 10 outputs the target attention (step S142). If the attention correction unit 14 corrects the target attention, the attention generation device 10 outputs the corrected target attention. On the other hand, if the attention correction unit 14 does not correct the target attention, the attention generation device 10 outputs the target attention calculated by the attention calculation unit 11.
[0069] Next, the attention generation device 10 determines whether the data generation device has output a termination symbol (step S151). That is, the attention generation device 10 determines whether the data generation device has completed the generation of output data. If the attention generation device 10 determines that the data generation device has not output a termination symbol (step S151: NO), the attention calculation unit 11 adds 1 to the variable k (step S161). After step S161, the process returns to step S102.
[0070] On the other hand, if the similarity determination unit 12 determines in step S104 that j β₯ k (step S104: YES), the process proceeds to step S141. Furthermore, if the data generation device determines in step S151 that it has output a termination symbol (step S151: YES), the attention generation device 10 terminates the process shown in Figure 4.
[0071] Figure 5 shows an example of the processing procedure by which the attention generation device 10 updates the coverage set. The attention generation device 10 performs the processing shown in Figure 5 in step S141 of Figure 4. In the processing shown in Figure 5, the attention correction unit 14 performs normalization for updating the coverage set for the target attention (step S201). That is, the attention correction unit 14 detects the largest element among the elements of the target attention, calculates a coefficient such that the detected element becomes 1, and multiplies each element of the target attention by the calculated coefficient.
[0072] Next, the coverage set update unit 13 selects a threshold t from among the elements of the normalized target attention. cover Detect the larger element (step S202). Then, the coverage set update unit 13 adds to the coverage set C any indices of elements detected in step S202 that are not included in the coverage set C (step S203). After step S203, the attention generation device 10 completes the process shown in Figure 5.
[0073] As described above, the attention calculation unit 11 calculates attention for each part of the output data for the purpose of generating that part of the output data. Attention is a weighting coefficient for each part of the input data. The attention correction unit 14 corrects the target attention based on the generation attention for the already generated portion of the output data. The target attention is the generation attention for the portion of the output data that is being generated.
[0074] According to the attention generation device 10, when generating target attention, it is possible to reflect the weighting status of each part of the input data by the attention generated for the already generated part of the output data. According to the attention generation device 10, in this respect, when weighting is performed on the parts of the data to be processed in data processing, it is expected that the repetition of data parts in the data obtained in the data processing can be avoided or reduced.
[0075] Furthermore, the coverage set update unit 13 adds an index to the coverage set that identifies the portion of the input data to which the weight coefficients included in the target attention are to be applied if they are determined to be larger than a predetermined condition. The coverage set is a set whose elements are indices that identify portions of the input data. The attention correction unit 14 rewrites the weight coefficients included in the target attention that are associated with the index shown in the coverage set before the information about that target attention is reflected to 0 or a predetermined value that is a sufficiently small positive value.
[0076] The attention generation device 10 can store the portions of the input data that were highlighted during the generation of the already generated portions of the output data in a coverage set. In this respect, the attention generation device 10 makes it relatively easy to modify the target attention.
[0077] Furthermore, the attention correction unit 14 generates a target attention for coverage set updating, in which each weight coefficient of the target attention is multiplied by a coefficient such that the largest weight coefficient among the weight coefficients included in the target attention becomes a predetermined value. The coverage set updating unit 13 uses the target attention for coverage set updating to add an index as an element of the coverage set that identifies the portion of the input data to which the weight coefficients, whose multiplied values ββare greater than a predetermined threshold, are applied.
[0078] The coverage set update unit 13 can update the coverage set so that the weight coefficient values ββassigned to input partial data that have been previously focused on are reduced, even when multiple elements of the attention are set to be relatively large. By reducing the weight coefficient values ββassigned to input partial data that have been previously focused on, it is expected that the data generation device can avoid or reduce the error of repeatedly focusing on the same part of the input data and repeatedly generating the same partial data as part of the output data.
[0079] Furthermore, the similarity determination unit 12 calculates the similarity between each of the generation attentions in the generated portion of the output data and the target attention. The similarity determination unit 12 then determines whether there are any attentions in the generated portion of the output data that are similar to the target attention. If the similarity determination unit 12 determines that there are attentions in the generated portion of the output data that are similar to the target attention, the attention correction unit 14 corrects the target attention based on the generation attentions in the generated portion of the output data.
[0080] The attention generation device 10 modifies the target attention only when it is determined to be similar to an attention previously generated, thus minimizing or reducing the repetition of data portions. In this respect, the attention generation device 10 is expected to generate output data with relatively high accuracy, as it relatively often uses the target attention calculated by the attention calculation unit 11 to generate portions of the output data.
[0081] Figure 6 shows an example of the configuration of an attention generation device according to some embodiments of the present disclosure. In the configuration shown in Figure 6, the attention generation device 20 comprises an attention calculation unit 11, a coverage collection update unit 13, and an attention correction unit 24. In Figure 6, parts that have the same function as those in Figure 1 are denoted by the same reference numerals (11, 13), and detailed explanations are omitted here.
[0082] The attention generation device 20 differs from the attention generation device 10 in that it does not have a similarity determination unit 12. Consequently, the processing performed by the attention correction unit 24 of the attention generation device 20 differs from the processing performed by the attention correction unit 14 of the attention generation device 10. In all other respects, the attention generation device 20 is the same as the attention generation device 10.
[0083] The attention correction unit 24 modifies the target attention based on the coverage set C each time the attention calculation unit 11 calculates the target attention. However, if the coverage set C is an empty set Ο, the attention correction unit 24 does not modify the target attention.
[0084] The method by which the attention correction unit 24 modifies the elements of the target attention is the same as in the case of the attention correction unit 14. The attention correction unit 24 rewrites the values ββof the elements (each weight coefficient) of the target attention that are associated with the index shown in the coverage set before the information about that target attention is reflected to 0 or a value predetermined as a sufficiently small positive value.
[0085] The normalization performed by the attention correction unit 24 to make the sum of each element of the target attention equal to 1 is the same as in the case of the attention correction unit 14. The attention correction unit 24 calculates the sum of the elements of the target attention that has been corrected based on the coverage set. Then, the attention correction unit 24 calculates the reciprocal of the calculated sum as a coefficient to make the sum of each element of the target attention equal to 1. The attention correction unit 24 multiplies each element of the target attention after the elements have been rewritten based on the coverage set by the calculated coefficient to generate the corrected target attention.
[0086] The process by which the attention correction unit 24 generates target attention for coverage set updates is the same as in the case of the attention correction unit 14. The attention correction unit 24 detects the largest element among the elements of the corrected target attention. The attention correction unit 24 then calculates the reciprocal of the detected largest element as a coefficient for generating target attention for coverage set updates. The attention correction unit 24 multiplies each element of the corrected target attention by the calculated coefficient to generate target attention for coverage set updates. The coverage set update unit 13 adds an index to the coverage set that identifies the input data to which elements of the target attention for coverage set update that are determined to be larger than a predetermined condition are to be applied.
[0087] Figure 7 shows an example of attention correction by the attention correction unit 24. Figure 7 shows an example in which the attention correction unit 24 corrects the attention in the example in Figure 2. Figure 7 shows, for each time step, the coverage set before update at that time step, the attention before correction by the attention correction unit 24, the attention after correction by the attention correction unit 24, and the attention for updating the coverage set.
[0088] In Figure 7, the time it takes for the attention generation device 20 to generate an attention for generating one output portion data is defined as one time step. The attention before correction is the attention calculated by the attention calculation unit 11, and the attention for output data positions 1, 2, 3, and 4 in the example in Figure 2 is shown in the order of time steps 1, 2, 3, and 4.
[0089] Figure 7 shows an example where the data generation device terminates output data generation after generating the output data portion in time step 4. Therefore, in time step 5, the attention generation device 20 does not generate any attention. Also, as in the case of Figure 3, the initial value of the coverage set C is set to the empty set Ο.
[0090] The attention correction unit 24 rewrites the weight coefficients included in the target attention that are associated with the index shown in the coverage set before the information about that target attention is reflected to 0 or a predetermined value that is a sufficiently small positive value.
[0091] In time step 1, the value of coverage set C is set to the initial value, the empty set Ο. In this case, the attention correction unit 24 does not correct the target attention, but adopts the target attention calculated by the attention calculation unit 11 as the corrected attention. The attention generation device 20 outputs the target attention calculated by the attention calculation unit 11 as the attention for generating the output data portion by the data generation device.
[0092] The attention correction unit 24 further generates the target attention for updating the coverage set. The attention correction unit 24 detects the largest element among the elements (each weight coefficient) of the corrected target attention. Then, the attention correction unit 24 calculates a coefficient such that the value of the detected largest element becomes 1, and multiplies the calculated coefficient by each element of the corrected target attention. Alternatively, instead of the attention correction unit 24, the coverage set update unit 13 may generate the target attention for updating the coverage set.
[0093] In time step 1, the maximum value of the elements of the corrected target attention is 0.93. Therefore, the attention correction unit 24 calculates the coefficient for generating the attention for updating the coverage set as 1 / 0.93 = 1.08. The attention correction unit 24 multiplies each element of the corrected target attention by the calculated coefficient 1.08 to generate the target attention for updating the coverage set.
[0094] The coverage set update unit 13 adds, as an element of the coverage set, an index that identifies the input partial data to be applied to the element (weight coefficient) that is determined to be greater than or equal to a predetermined condition among the elements (weight coefficients) included in the normalized target attention for updating the coverage set. In the example of FIG. 3, the coverage set update unit 13 is to add, as an element of the coverage set, the position of the input partial data to which an element greater than the threshold t cover is multiplied.
[0095] In time step 1, the coverage set update unit 13 adds the position "1" of the input partial data where the element of the attention is "1.00" as an element of the coverage set C. As a result, the coverage set update unit 13 updates the value of the coverage set C from the empty set Ο to {1}.
[0096] In time step 2, the attention correction unit 24 rewrites the value of the first element of the target attention (target attention before correction) calculated by the attention calculation unit 11, as indicated by the coverage set C, to "0.00". Then, the attention correction unit 24 normalizes the target attention corrected based on the coverage set C so that the sum of each element of the attention becomes 1, thereby generating the corrected target attention. The attention generation device 20 outputs the corrected target attention generated by the attention correction unit 24 as an attention for generating the output data portion by the data generation device.
[0097] Furthermore, in time step 2, the maximum value of the elements in the corrected target attention is 0.85. Therefore, the attention correction unit 24 calculates a coefficient of 1 / 0.85 = 1.18 for generating the target attention for coverage set update. The attention correction unit 24 multiplies the calculated coefficient of 1.19 by each element of the corrected target attention to generate the target attention for coverage set update. The coverage set update unit 13 adds the position "2" of the input data where the target attention element is "1.00" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from {1} to {1,2}.
[0098] In time step 3, the attention correction unit 24 rewrites the values ββof the first and second elements of the target attention (target attention before correction) calculated by the attention calculation unit 11 to "0.00". Then, the attention correction unit 24 normalizes the target attention corrected based on the coverage set C so that the sum of each element of the attention becomes 1, thereby generating the corrected target attention. The attention generation device 20 outputs the corrected target attention generated by the attention correction unit 24 as an attention for generating the output data portion by the data generation device.
[0099] Furthermore, in time step 3, the maximum value of the elements in the corrected target attention is 0.53. Therefore, the attention correction unit 24 calculates a coefficient of 1 / 0.53 = 1.89 for generating the target attention for coverage set update. The attention correction unit 24 multiplies the calculated coefficient of 1.89 by each element of the corrected target attention to generate the target attention for coverage set update.
[0100] The coverage set update unit 13 adds the input data position "3" where the target attention element is "1.00" and the input data position "4" where the attention element is "0.85" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from {1,2} to {1,2,3,4}.
[0101] In time step 4, the attention correction unit 24 rewrites the values ββof the 1st, 2nd, 3rd, and 4th elements of the target attention (target attention before correction) calculated by the attention calculation unit 11 to "0.00". Then, the attention correction unit 24 normalizes the target attention corrected based on the coverage set C so that the sum of each element of the attention becomes 1, thereby generating the corrected target attention. The attention generation device 20 outputs the corrected target attention generated by the attention correction unit 24 as an attention for generating the output data portion by the data generation device.
[0102] Furthermore, in time step 4, the maximum value of the elements in the corrected target attention is 1.00. Therefore, the attention correction unit 24 calculates a coefficient of 1 / 1.00 = 1.00 for generating the target attention for coverage set update. The attention correction unit 24 multiplies each element of the corrected target attention by the calculated coefficient of 1.00 to generate the target attention for coverage set update.
[0103] The coverage set update unit 13 adds the position "5" of the input data where the target attention element is "1.00" to the elements of coverage set C. As a result, the coverage set update unit 13 updates the value of coverage set C from {1,2,3,4} to {1,2,3,4,5}. After time step 4, the data generation device has finished generating output data, and the attention generation device 20 has also finished generating attention.
[0104] Figure 8 shows an example of the processing procedure by which the attention generation device 20 generates attention. Steps S301 to S302 in Figure 8 are the same as steps S101 to S102 in Figure 4. After step S302, the attention correction unit 24 rewrites the k-th attention element calculated by the attention calculation unit 11 in step S302, which is shown in the coverage set, to a value predetermined as 0 or a sufficiently small positive value (step S303).
[0105] Next, the attention correction unit 24 normalizes the attention corrected in step S302 so that the sum of the elements becomes 1 (step S304). Next, the coverage set update unit 13 updates the coverage set C (step S305). In step S305, the coverage set update unit 13 performs the process shown in Figure 5.
[0106] Furthermore, the attention generation device 20 outputs the target attention (step S306). If the attention correction unit 24 corrects the target attention, the attention generation device 20 outputs the corrected target attention. On the other hand, if the attention correction unit 24 does not correct the target attention, the attention generation device 20 outputs the target attention calculated by the attention calculation unit 11.
[0107] Next, the attention generation device 20 determines whether the data generation device has output a termination symbol (step S307). That is, the attention generation device 20 determines whether the data generation device has completed the generation of output data. If the attention generation device 20 determines that the data generation device has not output a termination symbol (step S307: NO), the attention calculation unit 11 adds 1 to the variable k (step S311). After step S311, the process returns to step S302. On the other hand, if the data generation device determines in step S307 that it has output a termination symbol (step S307: YES), the attention generation device 20 terminates the process shown in Figure 8.
[0108] The attention generation device 20 is expected to have a relatively short time required for generating attention, as it does not require the calculation of attention similarity.
[0109] As an example of some embodiments of this disclosure, an example of a data generation device using an attention generation device 10 or an attention generation device 20 will be described. Figure 9 shows an example of the configuration of a data generation device according to some embodiments of the present disclosure. In the configuration shown in Figure 9, the data generation device 30 comprises a feature calculation unit 31, an attention generation unit 32, and an output data generation unit 33.
[0110] The data generation device 30 converts input data into output data using attention. The speech recognition device, machine translation device, character recognition device, and image recognition device described above are examples of the data generation device 30. However, the data generation device 30 is not limited to these.
[0111] The feature calculation unit 31 calculates the feature quantities for each portion of the input data. The attention generation unit 32 generates attention. Either the attention generation device 10 or the attention generation device 20 is an example of the attention generation unit 32. The attention generation unit 32 may be an external component of the data generation device 30. The output data generation unit 33 generates output data in parts based on the features calculated by the feature calculation unit 31 and the attention generated by the attention generation unit 32.
[0112] The data generation device 30 may be configured using a neural network. For example, the feature calculation unit 31 and the output data generation unit 33 may each be configured using a neural network. Alternatively, the combination of the feature calculation unit 31 and the output data generation unit 33 may be configured using a single neural network. In this case, the attention generation unit 32 can be considered as a unit that transforms the internal data of the neural network.
[0113] The data generation device 30 may be used in a smart speaker that understands user voice instructions through speech recognition and natural language processing and executes those instructions. For example, the data generation device 30 may be configured as part of a smart speaker and perform speech recognition and / or natural language processing.
[0114] The data generation device 30 may be used in a smartphone that has a voice assistant function (AI assistant function) that understands the user's voice instructions through speech recognition and natural language processing and executes those instructions. For example, the data generation device 30 may be configured as part of a smartphone and perform speech recognition and / or natural language processing.
[0115] The data generation device 30 may be used in a text analysis system that accepts natural language text input via voice input or text input and analyzes the input text. For example, the data generation device 30 may be configured as part of a text analysis system and perform speech recognition, natural language processing, and text analysis, or one or more of these.
[0116] The data generation device 30 may be used in an image search system that receives user instructions in natural language via voice input or text input to search for images. For example, the data generation device 30 may be configured as part of an image search system and perform speech recognition, natural language processing, and generation of descriptive text for the search results images, or one or more of these.
[0117] Figure 10 shows examples of data input and output in each part of the data generation device 30. The feature calculation unit 31 calculates the feature quantities of each part of the input data to the data generation device 30. The attention generation unit 32 generates attention based on the feature quantities for each part of the input data calculated by the feature quantity calculation unit 31 and feedback information indicating the status of the generation of parts of the output data by the output data generation unit 33. The output data generation unit 33 generates output data in parts based on the feature quantities for each part of the input data calculated by the feature quantity calculation unit 31, the attention generated by the attention generation unit 32, and feedback information indicating the status of the generation of parts of the output data by the output data generation unit 33 itself.
[0118] According to the data generation device 30, it is expected that the repetition of data portions in the output data can be avoided or reduced.
[0119] Figure 11 shows an example of the configuration of an attention generation device according to some embodiments of the present disclosure. In the configuration shown in Figure 11, the attention generation device 610 comprises an attention calculation unit 611 and an attention correction unit 612.
[0120] In this configuration, the attention calculation unit 611 calculates attention for each part of the output data for the purpose of generating that part of the output data. Attention is a weighting coefficient for each part of the input data. The attention correction unit 612 corrects the target attention based on the generation attention for the portion of the output data that has already been generated. The target attention is the generation attention for the portion of the output data that is being generated. The attention calculation unit 611 is an example of an attention calculation means. The attention correction unit 612 is an example of an attention correction means.
[0121] According to the attention generation device 610, when generating target attention, it is possible to reflect the weighting status of each part of the input data by the generation attention of the already generated part of the output data. According to the attention generation device 610, in this respect, when weighting is performed on the part of the data to be processed in data processing, it is expected that the repetition of data parts in the data obtained in the data processing can be avoided or reduced.
[0122] Figure 12 shows an example of a processing procedure in an attention generation method according to some embodiments of the present disclosure. The attention generation method shown in Figure 12 includes calculating attention (step S611) and correcting attention (step S612).
[0123] In calculating attention (step S611), the computer calculates attention for each part of the output data for generating that part of the output data. Attention is a weighting coefficient for each part of the input data. In correcting the attention (step S612), the computer corrects the target attention based on the generation attention for the portion of the output data that has already been generated. The target attention is the generation attention for the portion of the output data that is to be generated.
[0124] According to the attention generation method shown in Figure 12, when generating target attention, it is possible to reflect the weighting of each part of the input data by the generation attention of the already generated part of the output data. According to the attention generation method shown in Figure 12, in this respect, when weighting is performed on the part of the data to be processed during data processing, it is expected that the repetition of data parts in the data obtained through data processing can be avoided or reduced.
[0125] Figure 13 is a schematic block diagram showing the configuration of a computer according to at least one embodiment. In the configuration shown in Figure 13, the computer 700 comprises a CPU 710, a main memory 720, an auxiliary memory 730, an interface 740, and a non-volatile recording medium 750.
[0126] One or more of the attention generation devices 10, 20, 30, and 610 described above, or parts thereof, may be implemented in the computer 700. In that case, the operation of each processing unit described above is stored in the auxiliary storage device 730 in the form of a program. The CPU 710 reads the program from the auxiliary storage device 730, expands it into the main memory 720, and executes the above processing according to the program. The CPU 710 also reserves memory areas in the main memory 720 corresponding to each of the above-mentioned storage units according to the program. Communication between each device and other devices is performed by the interface 740 having a communication function and communicating according to the control of the CPU 710.
[0127] When the attention generation device 10 is implemented in the computer 700, the operation of the attention generation device 10 and its various parts is stored in auxiliary storage device 730 in the form of a program. The CPU 710 reads the program from the auxiliary storage device 730, loads it into the main memory 720, and executes the above processing according to the program.
[0128] Furthermore, the CPU 710 reserves memory in the main memory 720 for the attention generation device 10 to process according to the program. Communication between the attention generation device 10 and other devices is performed by the interface 740 having a communication function and operating according to the control of the CPU 710. Interaction between the attention generation device 10 and the user is performed by the interface 740 equipped with a display device and an input device, displaying various images according to the control of the CPU 710 and accepting user operations.
[0129] When the attention generation device 20 is implemented in the computer 700, the operation of the attention generation device 20 and its various components is stored in auxiliary storage device 730 in the form of a program. The CPU 710 reads the program from auxiliary storage device 730, expands it into main memory 720, and executes the above processing according to the program.
[0130] Furthermore, the CPU 710 reserves memory in the main memory 720 for the attention generation device 20 to process according to the program. Communication between the attention generation device 20 and other devices is performed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the attention generation device 20 and the user is performed by the interface 740 equipped with a display device and an input device, displaying various images under the control of the CPU 710 and accepting user operations.
[0131] When the data generation device 30 is implemented in the computer 700, the operation of the data generation device 30 and its various components is stored in the auxiliary storage device 730 in the form of a program. The CPU 710 reads the program from the auxiliary storage device 730, loads it into the main memory 720, and executes the above processing according to the program.
[0132] Furthermore, the CPU 710 reserves memory in the main memory 720 for processing by the data generation device 30 according to the program. Communication between the data generation device 30 and other devices is performed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the data generation device 30 and the user is performed by the interface 740 equipped with a display device and an input device, displaying various images under the control of the CPU 710 and accepting user operations.
[0133] When the attention generation device 610 is implemented in the computer 700, the operation of the attention generation device 610 and its various components is stored in auxiliary storage device 730 in the form of a program. The CPU 710 reads the program from auxiliary storage device 730, loads it into main memory 720, and executes the above process according to the program.
[0134] Furthermore, the CPU 710 reserves memory in the main memory 720 for the attention generation device 610 to process according to the program. Communication between the attention generation device 610 and other devices is performed by the interface 740 having a communication function and operating under the control of the CPU 710. Interaction between the attention generation device 610 and the user is performed by the interface 740 equipped with a display device and an input device, displaying various images under the control of the CPU 710 and accepting user operations.
[0135] Alternatively, a program for executing all or part of the processing performed by the attention generation device 10, attention generation device 20, data generation device 30, and attention generation device 610 may be recorded on a computer-readable recording medium, and the processing of each part may be performed by having a computer system read and execute the program recorded on this recording medium. The term "computer system" here includes hardware such as the operating system and peripheral devices. Furthermore, "computer-readable recording media" refers to portable media such as flexible disks, magneto-optical disks, ROMs (Read Only Memory), CD-ROMs (Compact Disc Read Only Memory), and storage devices such as hard disks built into computer systems. The above-mentioned program may be intended to implement only a part of the functions described above, and may also be able to implement the above-mentioned functions in combination with programs already recorded in the computer system.
[0136] While embodiments of this invention have been described in detail above with reference to the drawings, the specific configuration is not limited to these embodiments and includes designs and the like that do not depart from the spirit of this invention.
[0137] Some or all of the above embodiments may also be described as follows, but are not limited to the following:
[0138] (Note 1) An attention calculation means calculates an attention coefficient, which is a weighting coefficient for each part of the input data, for each part of the output data, in order to generate that part of the output data. An attention correction means for correcting the target attention, which is the generation attention for the portion of the output data that is to be generated, based on the generation attention for the portion of the output data that has already been generated, An attention-generating device equipped with the following features. (Note 2) The coverage set update means further includes adding an index that identifies the portion of the input data to which the weight coefficients included in the target attention that are determined to be larger than a predetermined condition are to be applied, as an element of the coverage set, which is a set of indices that identify the portion of the input data. The attention correction means rewrites the value of the weight coefficient included in the target attention that is associated with the index shown in the coverage set before the information about that target attention is reflected to 0 or a predetermined value that is a sufficiently small positive value. The attention-generating device described in Appendix 1. (Note 3) The coverage update means adds an index to the coverage set that identifies the portion of the input data to which weight coefficients are applied, where the value after multiplication of the weight coefficients is greater than a predetermined threshold, using a target attention in which each weight coefficient of the target attention is multiplied by a coefficient such that the largest weight coefficient among the weight coefficients included in the target attention is a predetermined value. The attention-generating device described in Appendix 2. (Note 4) The system further includes a similarity determination means that calculates the similarity between each of the generation attentions of the generated portion of the output data and the target attention, and determines whether or not there are any attentions among the generation attentions of the generated portion of the output data that are similar to the target attention, The attention correction means modifies the target attention based on the generation attention of the generated portion of the output data if the similarity determination means determines that there is an attention among the generation attention of the generated portion of the output data that is similar to the target attention. An attention-generating device as described in any one of the appendices 1 to 3. (Note 5) Computers The attention coefficient, which is the weighting coefficient for each part of the input data, is calculated for each part of the output data to generate that part of the output data. The target attention, which is the generation attention for the portion of the output data that is to be generated, is modified based on the generation attention for the portion of the output data that has already been generated. An attention generation method that includes the following. (Note 6) On the computer, The attention coefficient, which is a weighting coefficient for each part of the input data, is calculated for each part of the output data to generate that part of the output data. The target attention, which is the generation attention for the portion of the output data that is to be generated, is modified based on the generation attention for the portion of the output data that has already been generated. A recording medium that stores a program to execute.
[0139] This application claims priority based on Japanese Patent Application No. 2023-001310, filed on January 6, 2023, and incorporates all of its disclosures herein. [Industrial applicability]
[0140] This disclosure may be applied to an attention generation device, an attention generation method, and a recording medium. [Explanation of symbols]
[0141] 10, 20, 610 Attention Generator 11, 611 Attention Calculation Unit 12 Similarity determination section 13 Coverage Set Update Section 14, 24, 612 Attention Correction Section 30 Data generation device 31 Feature Calculation Unit 32 Attention generation unit 33 Output data generation unit
Claims
1. An attention calculation means calculates an attention coefficient, which is a weighting coefficient for each part of the input data, for each part of the output data, in order to generate that part of the output data. An attention correction means for correcting the target attention, which is the generation attention for the portion of the output data that is to be generated, based on the generation attention for the portion of the output data that has already been generated, An attention-generating device equipped with the following features.
2. The coverage set update means further includes adding an index that identifies the portion of the input data to which the weight coefficients included in the target attention that are determined to be larger than a predetermined condition are to be applied, as an element of the coverage set, which is a set of indices that identify the portion of the input data. The attention correction means rewrites the value of the weight coefficient included in the target attention that is associated with the index shown in the coverage set before the information about that target attention is reflected to 0 or a predetermined value that is a sufficiently small positive value. The attention-generating device according to claim 1.
3. The coverage set updating means adds an index to the coverage set as an element of the coverage set that identifies the portion of the input data to which weight coefficients are applied, where the value after multiplication of the weight coefficients is greater than a predetermined threshold, using a target attention in which each weight coefficient of the target attention is multiplied by a coefficient such that the largest weight coefficient among the weight coefficients included in the target attention becomes a predetermined value. The attention-generating device according to claim 2.
4. The system further includes a similarity determination means that calculates the similarity between each of the generation attentions of the generated portion of the output data and the target attention, and determines whether or not there are any attentions among the generation attentions of the generated portion of the output data that are similar to the target attention, The attention correction means modifies the target attention based on the generation attention of the generated portion of the output data if the similarity determination means determines that there is an attention among the generation attention of the generated portion of the output data that is similar to the target attention. An attention-generating device according to any one of claims 1 to 3.
5. Computers The attention coefficient, which is the weighting coefficient for each part of the input data, is calculated for each part of the output data to generate that part of the output data. The target attention, which is the generation attention for the portion of the output data that is to be generated, is modified based on the generation attention for the portion of the output data that has already been generated. An attention generation method that includes the following.
6. On the computer, The attention coefficient, which is a weighting coefficient for each part of the input data, is calculated for each part of the output data to generate that part of the output data. The target attention, which is the generation attention for the portion of the output data that is to be generated, is modified based on the generation attention for the portion of the output data that has already been generated. A program to execute.