Attention generation device, attention generation method and program

JPWO2024147226A5Active Publication Date: 2025-09-11NEC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024568695
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-02
Filing Date
2023-11-02
Publication Date
2025-09-11
Estimated Expiration
2043-11-02

AI Technical Summary

Technical Problem

In data processing, when data is weighted, there is a challenge in avoiding or reducing repetition of data portions in the output, as existing methods fail to effectively manage weighting coefficients to prevent repetitive processing.

Method used

An attention generation device and method that calculates and modifies weighting coefficients for input data portions based on previously generated output data portions, using an attention calculation unit, similarity determination unit, coverage set update unit, and attention correction unit to adjust and normalize coefficients, thereby reducing repetitive data generation.

Benefits of technology

The solution effectively reduces repetitive data generation by dynamically adjusting weighting coefficients, ensuring that data processing focuses on different portions of the input data, thereby improving the accuracy and efficiency of data output.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

Attention, which is a weight coefficient for each part of input data, is calculated for each part of output data for the generation of the part of output data. Furthermore, the device corrects an object attention, which is an attention for generating the part to be generated among the parts of the output data, on the basis of the attention for generating the part that has already been generated among the parts of the output data.
Need to check novelty before this filing date? Find Prior Art

Description

Attention generation device, attention generation method, and recording medium

[0001] The present disclosure relates to an attention generation device, an attention generation method, and a recording medium.

[0002] In data processing, data to be processed may include multiple parts, and weighting may be applied to these multiple parts. For example, in Patent Document 1, when feature values ​​for each frequency domain of a speech frame are input to a speech recognition model, attention weights are used to determine which of the feature values ​​for each frequency domain of the speech frame is to be given more importance.

[0003] Japanese Patent Application Publication No. 2018-109760

[0004] When weighting is performed on portions of data to be processed in data processing, it is preferable to be able to avoid or reduce repetition of portions of data in the data obtained by data processing.

[0005] An example of a 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.

[0006] According to a first aspect of this disclosure, an attention generation device comprises an attention calculation means that calculates attention, which is a weighting coefficient for each portion of input data, for each portion of output data for generating that portion of output data, and an attention correction means that corrects target attention, which is attention for generating the portion of the output data that is to be generated, based on attention for generating the portion of the output data that has already been generated.

[0007] According to a second aspect of this disclosure, the attention generation method includes a computer calculating, for each portion of output data, attention, which is a weighting coefficient for each portion of input data, for generating that portion of output data, and modifying target attention, which is attention for generating the portion of the output data that is to be generated, based on attention for generating the portion of the output data that has already been generated.

[0008] According to a third aspect of this disclosure, the recording medium stores a program for causing a computer to calculate, for each portion of output data, attention, which is a weighting coefficient for each portion of input data, for generating that portion of output data, and modifying target attention, which is attention for generating the portion of the output data that is to be generated, based on attention for generating the portion of the output data that has already been generated.

[0009] 1 is a diagram illustrating an example of the configuration of an attention generation device according to some embodiments of the present disclosure. FIG. 2 is a diagram illustrating an example of attention calculated by an attention calculation unit according to some embodiments of the present disclosure. FIG. 3 is a diagram illustrating an example of attention modification by an attention modification unit according to some embodiments of the present disclosure. FIG. 4 is a diagram illustrating an example of a processing procedure by which an attention generation device according to some embodiments of the present disclosure generates attention. FIG. 5 is a diagram illustrating an example of a processing procedure by which an attention generation device according to some embodiments of the present disclosure updates a coverage set. FIG. 6 is a diagram illustrating an example of the configuration of an attention generation device according to some embodiments of the present disclosure. FIG. 7 is a diagram illustrating an example of an attention modification by an attention modification unit according to some embodiments of the present disclosure. FIG. 8 is a diagram illustrating an example of a processing procedure by which an attention generation device according to some embodiments of the present disclosure generates attention. FIG. 9 is a diagram illustrating an example of the configuration of a data generation device according to some embodiments of the present disclosure. FIG. 10 is a diagram illustrating an example of data input / output in each unit of a data generation device according to some embodiments of the present disclosure. FIG. 11 is a diagram illustrating an example of the configuration of an attention generation device according to some embodiments of the present disclosure. FIG. 12 is a diagram illustrating an example of processing procedures in an attention generation method according to some embodiments of the present disclosure. FIG. 13 is a schematic block diagram illustrating the configuration of a computer according to at least one embodiment.

[0010] The following describes embodiments of this disclosure, but the following embodiments do not limit the scope of the invention as claimed. Furthermore, not all of the combinations of features described in the embodiments are necessarily essential to the solution of the invention.

[0011] 1 is a diagram illustrating 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 attention. The attention here refers to a weighting coefficient indicating the weight for each part of input data when generating a part of output data in a process of generating output data that can be divided into parts based on input data that can be divided into parts. The weighting coefficient for each part of input data indicated by attention is also referred to as an attention element. Attention can be considered as data indicating which part of input data should be given attention and to what extent when generating a part of output data.

[0013] The input data and output data for which the attention generation device 10 generates attention are not limited to a specific type of data, and the division units of the input data and the output data are also not limited to a specific type.

[0014] For example, when the attention generation device 10 is used to generate attention for a speech recognition device, the input data may be voice data, and the output data may be character string data in which the voice data is transcribed. In this case, the divided parts of the input data may be each part of the voice data that is the input data divided into predetermined time lengths. Furthermore, the divided parts of the output data may be each character included in the character string, each word, or each segment.

[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 character string data indicating a document to be translated, and the output data may be character string data indicating a document resulting from the translation. In this case, the parts into which the input data is divided may be each character included in the character string, each word, or each segment. The parts into which the output data is divided may also be each character included in the character string, each word, or each segment. The division units may be the same or different between the input data and the output data.

[0016] Alternatively, when the attention generation device 10 is used to generate attention for a character recognition device that detects and recognizes a character string included in an image, the input data may be image data, and the output data may be data indicating the character string detected and recognized from the image. In this case, the divided portions of the input data may be each portion obtained by dividing the input data by a predetermined number of pixels vertically and horizontally. The divided portions of the output data may be data indicating the character string detected and recognized from the divided portions of the input image.

[0017] Alternatively, when the attention generation device 10 is used to generate attention for an image recognition device that performs object recognition to detect objects appearing in an image, the input data may be image data. In this case, the output data may be character string data including an explanation 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 by a predetermined number of pixels. The divided parts of the output data may be character string data including an explanation of the object recognition result for the divided parts of the input image.

[0018] Note 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 input data and output data for a data generation device that generates output data based on input data, such as the above-mentioned speech recognition device, machine translation device, character recognition device, or image recognition device. A data generation device that generates output data based on input data is also simply referred to as a data generation device.

[0019] The input data to the attention generation device 10 may be data obtained by processing each portion of the input data to the data generation device. For example, the input data to the attention generation device 10 may be data indicating features extracted by the data generation device for each portion of the input data to the data generation device. The output data from the attention generation device 10 may be 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), or may be configured using dedicated hardware such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).

[0021] The attention calculation unit 11 calculates attention for each part of the output data for generating that part of the output data. As described above, attention is a weighting factor for each part 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 the attention is not limited to a specific method. For example, the attention calculation unit 11 may be configured using a known attention mechanism, or may calculate the attention using a known attention calculation algorithm.

[0023] The similarity determination unit 12 calculates the similarity between each of the attentions for generating the generated parts of the output data and the target attention. The target attention here refers to the attention for generating the part of the output data that is to be generated (the part to be generated next). The attention for generating the generated part of the output data is the attention that the attention generation device 10 generated before the target attention was generated.

[0024] The similarity determination unit 12 determines whether or not there is any attention similar to the target attention among the attentions for generating the generated portion of the output data, based on the calculated similarity. The similarity determination unit 12 corresponds to an example of a similarity determination means.

[0025] The degree of attention similarity calculated by the similarity determination unit 12 is not limited to a specific type of similarity. For example, attention can be represented by a vector, and the degree of attention similarity calculated by the similarity determination unit 12 can be any of various similarities that can be applied to the similarity between two vectors, such as a correlation coefficient or cosine similarity.

[0026] The coverage set update unit 13 updates the coverage set each time the attention calculation unit 11 calculates symmetric attention. The coverage set here is a set whose elements are indices that identify parts of the input data, and indicates parts of the input data that have been weighted higher than a predetermined condition. The coverage set can be considered as a set that indicates parts of the input data that have been paid attention to.

[0027] The coverage set update unit 13 adds, as an element of the coverage set, an index that identifies input partial data to which a weighting factor included in the target attention is determined to be greater than or equal to a predetermined condition. The coverage set update unit 13 corresponds to an example of a coverage set update means.

[0028] The attention correction unit 14 corrects the target attention based on the attention for generation of the part of the output data that has already been generated. The attention correction unit 14 corresponds to an example of an attention correction means.

[0029] Specifically, the attention correction unit 14 rewrites the value of the weighting coefficient included in the target attention that is associated with the index indicated in the coverage set before the information about the target attention is reflected to 0 or a value that is predetermined as a sufficiently small positive value.

[0030] The modification of the target attention performed by the attention modification unit 14 can be considered as a process of rewriting the value of the weighting coefficient included in the target attention, which is assigned to input partial data that has previously received attention, so as to lower the degree of attention. By modifying the target attention by the attention modification unit 14, it is expected that erroneous processing in which the data generation device repeatedly focuses on the same part of the input data and repeatedly generates the same partial data as part of the output data can be avoided or reduced.

[0031] When the similarity determination unit 12 determines that there is an attention similar to the target attention among the attentions for generating the already generated part of the output data, the attention correction unit 14 corrects the target attention based on the attention for generating the already generated part of the output data.

[0032] Then, the attention correction unit 14 multiplies each element of the target attention by a coefficient so that the sum of each element of the target attention is 1. Multiplying each element of the attention by a coefficient so that the sum of each element of the attention is 1 is also referred to as normalization to make the sum of each element of the attention 1.

[0033] The attention modification unit 14 calculates the sum of the elements of the target attention modified based on the coverage set. Then, the attention modification unit 14 calculates the reciprocal of the calculated sum as a coefficient for making the sum of each element of the target attention 1. The attention modification 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 modified target attention.

[0034] The attention modification unit 14 also generates a target attention for updating the coverage set. In generating the target attention for updating the coverage set, the attention modification unit 14 detects the largest element among the elements of the target attention after modification. The attention modification unit 14 then calculates the reciprocal of the largest element detected as a coefficient for generating the target attention for updating the coverage set. In other words, the attention modification unit 14 calculates a coefficient such that the maximum value of the attention element is 1 as the coefficient for generating the target attention for updating the coverage set.

[0035] The attention correction unit 14 multiplies each element of the corrected target attention by the calculated coefficient to generate a target attention for updating the coverage set. Multiplying each element of the attention by a coefficient that makes the maximum value of the attention element 1 is also called normalization for updating the coverage set. The coverage set update unit 13 adds, as an element of the coverage set, an index that identifies the input partial data to which an element of the target attention for updating the coverage set is applied that is determined to be greater than a predetermined condition.

[0036] 2 is a diagram showing an example of attention calculated by the attention calculation unit 11. In FIG. 2, the attention calculated by the attention calculation unit 11 is shown in a table format, where each column is associated with a position in the input data, and each row is associated with a position in the output data. The position here corresponds to an example of an index that identifies a portion of the data.

[0037] In the example of Figure 2, the attention calculation unit 11 calculates attention for each line in the order of positions 1, 2, 3, and 4 of the output data. Furthermore, the attention calculation unit 11 calculates attention so that the sum of the attention elements for one line is 1, with significant digits 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 values ​​that indicate the weighting coefficient for each part of the input data.

[0038] Fig. 3 is a diagram showing an example of attention correction by the attention correction unit 14. Fig. 3 shows an example in which the attention correction unit 14 corrects the attention in the example of Fig. 2. Fig. 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 target attention for generating one piece of output portion data is considered to be one time step. The target attention before correction is the target attention calculated by the attention calculation unit 11, and attention for positions 1, 2, 3, and 4 of the output data in the example of Figure 2 is shown in the order of time steps 1, 2, 3, and 4. Note that Figure 3 shows an example in which the data generation device generates a portion of the output data in time step 4 and then terminates the generation of the output data. Therefore, in time step 5, the attention generation device 10 does not generate attention.

[0040] As described above, the coverage set indicates a portion of the input data that has been weighted more than a predetermined condition. Here, the coverage set is represented by "C." The initial value of the coverage set C is set to the empty set φ.

[0041] In correcting the target attention, the similarity determination unit 12 determines whether or not there is any attention similar to the target attention among the attentions used for generating the generated portion of the output data. 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 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 of FIG. 3, the similarity determination unit 12 compares the target attention with the attention calculated by the attention calculation unit 11 before the calculation of the target attention and corrected by the attention correction unit 14. Furthermore, the similarity determination unit 12 determines whether or not the correlation coefficient of the two attentions is greater than a threshold t corr If the threshold t is greater than t, the two attentions are determined to be similar. corr The value is set to 0.8.

[0042] The attention correction unit 14 corrects the target attention when the similarity determination unit 12 determines that there is an attention similar to the target attention among the attentions used to generate a portion of the output data that has already been generated. The attention correction unit 14 rewrites the value of the element (each weight coefficient) of the target attention that is associated with the index indicated in the coverage set before the information about the target attention is reflected to 0 or a value that is predetermined as a sufficiently small positive value.

[0043] At time step 1, there is no attention that has been generated by the attention generation device 10 before the target attention is generated. Therefore, the similarity determination unit 12 determines that there is no attention that is similar to the target attention among the attentions used to generate the already generated part of the output data.

[0044] In this case, the attention correction unit 14 does not correct the target attention, and 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 for generating the output data portion by the data generation device.

[0045] The attention modification unit 14 further generates a target attention for updating the coverage set. The attention modification unit 14 detects the largest element (each weight coefficient) of the modified target attention. The attention modification unit 14 then calculates a coefficient so that the value of the detected largest element becomes 1, and multiplies each element of the modified target attention by the calculated coefficient. Alternatively, the coverage set update unit 13 may generate the target attention for updating the coverage set instead of the attention modification unit 14.

[0046] At time step 1, the maximum value of the elements of the corrected target attention is 0.93. Therefore, the attention correction unit 14 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 0.93 = 1.08. The attention correction unit 14 multiplies each element of the corrected target attention by the calculated coefficient 1.08 to generate the target attention for updating the coverage set.

[0047] The coverage set update unit 13 adds, as an element of the coverage set, an index that identifies the input partial data to which an element (each weight coefficient) of the target attention normalized for updating the coverage set is applied, the element being determined to be greater than or equal to a predetermined condition. In the example of FIG. 3, the coverage set update unit 13 adds, as an element of the coverage set, an index that identifies the input partial data to which an element (each weight coefficient) of the target attention normalized for updating the coverage set is applied, the threshold t cover The position of the input partial data that is multiplied by an element larger than is added as an element of the coverage set.

[0048] At time step 1, the coverage set update unit 13 adds the position "1" of the input partial data whose target attention element is "1.00" to the 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}.

[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. Furthermore, the attention after correction in time step 1 corresponds to the attention for generating the part of the output data that has already been generated. 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 is no similar attention.

[0050] In this case, the attention correction unit 14 does not correct the target attention, and 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 for generating the output data portion by the data generation device.

[0051] Furthermore, at time step 2, the maximum value of the elements of the corrected target attention is 0.84. Therefore, the attention correction unit 14 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 0.84 = 1.19. The attention correction unit 14 multiplies each element of the corrected target attention by the calculated coefficient 1.19 to generate the target attention for updating the coverage set. The coverage set update unit 13 adds position "2" of the input partial data, where the target attention element is "1.00," to the element 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. Furthermore, the attention after correction in each of time steps 1 and 2 corresponds to the attention for generating the 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 is no similar attention.

[0053] In this case, the attention correction unit 14 does not correct the target attention, and 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 for generating the output data portion by the data generation device.

[0054] Furthermore, at time step 3, the maximum value of the elements of the corrected target attention is 0.52. Therefore, the attention correction unit 14 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 0.52 = 1.92. The attention correction unit 14 multiplies each element of the corrected target attention by the calculated coefficient 1.92 to generate the target attention for updating the coverage set.

[0055] The coverage set update unit 13 adds position "3" of the input partial data where the target attention element is "1.00" and position "4" of the input partial data 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 the target attention are set relatively large, as in the modified target attention at time step 3, the constraint that the sum of the attention elements is 1 ensures that each element is within the threshold t coverOn the other hand, the data generator can be considered to generate the output data portion by focusing on the part of the input data that is multiplied by a relatively large weighting coefficient (attention element).

[0057] In this way, if the corrected target attention is used as is to update the coverage set C, it is conceivable that a coverage set that reduces the value of the weighting factor assigned to the input partial data that has previously received attention (lowers the level of attention) cannot be obtained. Since the value of the weighting factor assigned to the input partial data that has previously received attention cannot be reduced, it becomes impossible to avoid or reduce erroneous processing in which the data generation device repeatedly focuses on the same part of the input data and repeatedly generates the same partial data as part of the output data.

[0058] In response to this, the attention correction unit 14 performs normalization for updating the coverage set to generate a target attention for updating the coverage set. This allows the coverage set update unit 13 to update the coverage set so as to reduce the value of the weighting factor assigned to the input partial data that has previously been focused on, even when multiple weighting factors included in the target attention are set relatively large. By reducing the value of the weighting factor assigned to the input partial data that has previously been focused on, it is expected that erroneous processing, in which the data generation device repeatedly focuses on the same part of the input data and repeatedly generates the same partial data as part of the output data, can be avoided or reduced.

[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. In addition, the attention after correction in each of time steps 1, 2, and 3 corresponds to the attention for generating the part of the output data that has already been generated.

[0060] Of these corrected attentions, the corrected attention at time step 2 is similar to the uncorrected attention at time step 4. In other words, these two attentions satisfy the criterion that the correlation coefficient is greater than 0.8. The similarity determination unit 12 determines whether the uncorrected attention at time step 4 is similar to at least one of the corrected attentions at time steps 1, 2, and 3, and determines that similar attentions exist.

[0061] Based on this determination result, the attention correction unit 14 rewrites the values ​​of the elements of the target attention before correction, associated with indexes 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. For time step 4 in FIG. 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, from 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 each element of the target attention after the elements have been rewritten based on the coverage set by the calculated coefficient 8.33 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 a portion of the output data by the data generation device.

[0062] Furthermore, in time step 4, the maximum value of the elements of the corrected target attention is 1.00. Therefore, the attention correction unit 14 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 1.00 = 1.00. The attention correction unit 14 multiplies each element of the corrected target attention by the calculated coefficient 1.00 to generate the target attention for updating the coverage set. The coverage set update unit 13 adds position "5" of the input partial data, for which the target attention element is "1.00," to the element 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 finishes generating output data, and the attention generation device 10 also finishes generating attention.

[0063] 4 is a diagram showing an example of a processing procedure for generating attention by the attention generation device 10. In the processing of FIG. 4, the attention calculation unit 11 sets the value of a variable k indicating an identification number for identifying a target attention to 1 (step S101). The identification number for identifying a target attention indicated by the value of the variable k corresponds to the position of the output data in the example of FIG. 2.

[0064] Next, the attention calculation unit 11 calculates the kth attention (step S102). Next, the similarity determination unit 12 sets the value of a variable j, which indicates an identification number for identifying an attention for which similarity with the target attention is to be calculated, 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 kth attention (target attention before correction) and the jth attention (step S111). The similarity determination unit 12 may calculate the similarity between the kth attention and the jth attention before correction. Alternatively, the similarity determination unit 12 may calculate the similarity between the kth attention and the jth attention after correction. When the similarity determination unit 12 calculates the similarity between the kth attention and the jth attention after correction, if the attention correction unit 14 has not corrected the jth attention, the jth attention calculated by the attention calculation unit 11 (the jth attention before correction) is treated as the jth attention after correction.

[0066] Next, the similarity determination unit 12 determines whether the calculated similarity is a threshold value t corr It is determined whether the similarity is greater than the threshold value t corr If it is determined that the number is equal to or smaller than the number (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, the similarity is determined based on a threshold value t corr (Step S112: YES), the attention modification unit 14 modifies the target attention (Step S121). Specifically, the attention modification unit 14 rewrites the value of the element associated with the index indicated in the coverage set C, among the elements of the target attention, to 0 or a sufficiently small positive value that is predetermined.

[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). The attention generation device 10 also 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 generating device 10 determines whether the data generating device has output a terminal symbol (step S151). That is, the attention generating device 10 determines whether the data generating device has completed generating output data. If the attention generating device 10 determines that the data generating device has not output a terminal 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. Also, if the data generation device determines in step S151 that the terminal symbol has been output (step S151: YES), the attention generation device 10 ends the process of FIG.

[0071] Fig. 5 is a diagram showing an example of a processing procedure by the attention generation device 10 to update a coverage set. The attention generation device 10 performs the processing of Fig. 5 in step S141 of Fig. 4. In the processing of Fig. 5, the attention correction unit 14 normalizes the target attention to update the coverage set (step S201). That is, the attention correction unit 14 detects the largest element among the elements of the target attention, calculates a coefficient so 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 calculates the threshold t cover The coverage set update unit 13 then detects a larger element (step S202). Then, the coverage set update unit 13 adds, to the coverage set C, the indexes of the elements detected in step S202 that are not included in the coverage set C (step S203). After step S203, the attention generation device 10 ends the process of FIG. 5.

[0073] As described above, the attention calculation unit 11 calculates attention for each part of output data for generating that part of output data. The attention is a weighting coefficient for each part of input data. The attention modification unit 14 modifies the target attention based on the attention for generating the part of output data that has already been generated. The target attention is the attention for generating the part of output data that is to be generated.

[0074] According to the attention generation device 10, when generating target attention, it is possible to reflect the weighting status for each part of the input data by the attention for generating the part of the output data that has already been generated. In this respect, according to the attention generation device 10, when weighting is performed on the part of the data to be processed in data processing, it is expected that it will be possible to avoid or reduce the occurrence of repetition of parts of the data in the data obtained by the data processing.

[0075] Furthermore, the coverage set update unit 13 adds, as an element of the coverage set, an index that identifies a portion of the input data to which a weighting factor included in the target attention is determined to be greater than a predetermined condition. A coverage set is a set whose elements are indices that identify portions of the input data. The attention correction unit 14 rewrites, among the weighting factors included in the target attention, the value of the weighting factor associated with the index indicated in the coverage set before the information about the target attention is reflected to 0 or a value that is predetermined as a sufficiently small positive value.

[0076] The attention generation device 10 can store, in a coverage set, the portions of the input data that were focused on when generating the generated portions of the output data. In this respect, the attention generation device 10 can relatively easily modify the target attention.

[0077] The attention modification unit 14 generates a target attention for updating the coverage set by multiplying each weight coefficient of the target attention by a coefficient such that the largest weight coefficient among the weight coefficients included in the target attention is a predetermined value. The coverage set update unit 13 uses the target attention for updating the coverage set to add, as an element of the coverage set, an index that identifies a portion of the input data to which a weight coefficient whose value after multiplication by the coefficient is greater than a predetermined threshold is applied.

[0078] The coverage set update unit 13 can update the coverage set so as to reduce the value of the weighting factor assigned to the input partial data that has been focused on, even when multiple elements among the attention elements are set relatively large. By reducing the value of the weighting factor assigned to the input partial data that has been focused on, it is expected that erroneous processing in which the data generation device repeatedly focuses on the same part of the input data and repeatedly generates the same partial data as part of the output data can be avoided or reduced.

[0079] The similarity determination unit 12 also calculates the degree of similarity between each of the attentions for generating the generated portions of the output data and the target attention.The similarity determination unit 12 then determines whether or not there is any attention similar to the target attention among the attentions for generating the generated portions of the output data.When the similarity determination unit 12 determines that there is any attention similar to the target attention among the attentions for generating the generated portions of the output data, the attention correction unit 14 corrects the target attention based on the attentions for generating the generated portions of the output data.

[0080] The attention generation device 10 modifies the target attention only when it is determined that the target attention is similar to previously generated attention, and therefore, the target attention is modified relatively little to avoid or reduce repetition of parts of data. In this respect, the attention generation device 10 generates parts of output data using the target attention calculated by the attention calculation unit 11 relatively often, and it is expected that the output data can be generated with relatively high accuracy.

[0081] Fig. 6 is a diagram illustrating an example of the configuration of an attention generation device according to some embodiments of the present disclosure. In the configuration shown in Fig. 6, the attention generation device 20 includes an attention calculation unit 11, a coverage set update unit 13, and an attention correction unit 24. Among the components in Fig. 6, parts having similar functions to those in Fig. 1 are denoted by the same reference numerals (11, 13), and detailed descriptions thereof will be omitted here.

[0082] The attention generation device 20 differs from the attention generation device 10 in that it does not include a similarity determination unit 12. Accordingly, 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 other respects, the attention generation device 20 is similar to the attention generation device 10.

[0083] The attention correction unit 24 corrects 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 correct the target attention.

[0084] The method by which the attention modification unit 24 modifies the elements of the target attention is the same as that of the attention modification unit 14. The attention modification unit 24 rewrites the value of the elements (each weight coefficient) of the target attention that are linked to the index indicated in the coverage set before the information about the target attention is reflected to 0 or a value that is predetermined as a sufficiently small positive value.

[0085] The normalization performed by the attention modification unit 24 to make the sum of each element of the target attention equal to 1 is the same as that performed by the attention modification unit 14. The attention modification unit 24 calculates the sum of the elements of the target attention modified based on the coverage set. The attention modification unit 24 then calculates the reciprocal of the calculated sum as a coefficient for making the sum of each element of the target attention equal to 1. The attention modification unit 24 multiplies the calculated coefficient by each element of the target attention after the elements have been rewritten based on the coverage set, to generate the modified target attention.

[0086] The process by which the attention modification unit 24 generates target attention for updating the coverage set is similar to that of the attention modification unit 14. The attention modification unit 24 detects the largest element among the elements of the target attention after modification. The attention modification unit 24 then calculates the inverse of the largest element detected as a coefficient for generating the target attention for updating the coverage set. The attention modification unit 24 multiplies each element of the target attention after modification by the calculated coefficient to generate the target attention for updating the coverage set. The coverage set update unit 13 adds, as an element of the coverage set, an index that identifies the input partial data to which an element of the target attention for updating the coverage set that is determined to be larger than a predetermined condition is applied.

[0087] Fig. 7 is a diagram showing an example of attention correction by the attention correction unit 24. Fig. 7 shows an example of a case where the attention correction unit 24 corrects the attention in the example of Fig. 2. Fig. 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] 7, the time it takes for the attention generation device 20 to generate attention for generating one piece of output partial data is taken as one time step. The attention before correction is the attention calculated by the attention calculation unit 11, and the attentions for positions 1, 2, 3, and 4 of the output data in the example of FIG. 2 are shown in the order of time steps 1, 2, 3, and 4.

[0089] 7 shows an example in which the data generator terminates the generation of output data after generating a portion of the output data at time step 4. Therefore, the attention generator 20 does not generate attention at time step 5. Also, as in the case of FIG. 3, the initial value of the coverage set C is set to the empty set φ.

[0090] The attention correction unit 24 rewrites the value of the weighting coefficient included in the target attention that is associated with the index indicated in the coverage set before the information about the target attention is reflected to 0 or a value that is predetermined as a sufficiently small positive value.

[0091] At time step 1, the value of the 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, and 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 modification unit 24 further generates a target attention for updating the coverage set. The attention modification unit 24 detects the largest element (each weight coefficient) of the modified target attention. The attention modification unit 24 then calculates a coefficient so that the value of the detected largest element becomes 1, and multiplies each element of the modified target attention by the calculated coefficient. Alternatively, the coverage set update unit 13 may generate the target attention for updating the coverage set instead of the attention modification unit 24.

[0093] At 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 which an element (weighting coefficient) determined to be larger than a predetermined condition among the elements (weighting coefficients) included in the target attention after normalization for updating the coverage set is applied. In the example of Figure 3, the coverage set update unit 13 adds, as an element of the coverage set, an index that identifies the input partial data to which an element (weighting coefficient) determined to be larger than a predetermined condition among the elements of the target attention normalized for updating the coverage set, cover The position of the input partial data that is multiplied by an element larger than is added as an element of the coverage set.

[0095] At time step 1, the coverage set update unit 13 adds the position "1" of the input partial data whose attention element is "1.00" to the 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 indicated in coverage set C among the 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 coverage set C so that the sum of each attention element 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 attention for generating a portion of the output data by the data generation device.

[0097] Furthermore, at time step 2, the maximum value of the elements of the corrected target attention is 0.85. Therefore, the attention correction unit 24 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 0.85 = 1.18. The attention correction unit 24 multiplies each element of the corrected target attention by the calculated coefficient 1.19 to generate the target attention for updating the coverage set. The coverage set update unit 13 adds position "2" of the input partial data, where the target attention element is "1.00," to the element 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 value of the first element and the value of the second element indicated in coverage set C among the 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 coverage set C to make the sum of each attention element 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 attention for generating a portion of the output data by the data generation device.

[0099] Furthermore, at time step 3, the maximum value of the elements of the corrected target attention is 0.53. Therefore, the attention correction unit 24 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 0.53 = 1.89. The attention correction unit 24 multiplies each element of the corrected target attention by the calculated coefficient 1.89 to generate the target attention for updating the coverage set.

[0100] The coverage set update unit 13 adds position "3" of the input partial data where the target attention element is "1.00" and position "4" of the input partial data 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 first, second, third, and fourth elements shown in coverage set C among the 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 coverage set C to make the sum of each attention element 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 attention for generating a portion of the output data by the data generation device.

[0102] Furthermore, in time step 4, the maximum value of the elements of the corrected target attention is 1.00. Therefore, the attention correction unit 24 calculates the coefficient for generating the target attention for updating the coverage set as 1 / 1.00 = 1.00. The attention correction unit 24 multiplies each element of the corrected target attention by the calculated coefficient 1.00 to generate the target attention for updating the coverage set.

[0103] The coverage set update unit 13 adds position "5" of the input partial data, where the target attention element is "1.00", to the element 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] Fig. 8 is a diagram showing an example of a processing procedure for generating attention by the attention generation device 20. Steps S301 to S302 in Fig. 8 are the same as steps S101 to S102 in Fig. 4. After step S302, the attention correction unit 24 rewrites the elements of the kth attention calculated by the attention calculation unit 11 in step S302 that are indicated in the coverage set to 0 or a sufficiently small positive value that is predetermined (step S303).

[0105] Next, the attention correction unit 24 normalizes the attention after correction 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 of FIG. 5.

[0106] The attention generation device 20 also 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 generating device 20 determines whether the data generating device has output a terminal symbol (step S307). That is, the attention generating device 20 determines whether the data generating device has completed generating output data. If the attention generating device 20 determines that the data generating device has not output a terminal 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 it is determined in step S307 that the data generating device has output a terminal symbol (step S307: YES), the attention generating device 20 ends the process of FIG. 8.

[0108] The attention generation device 20 is expected to take a relatively short time to generate attention because it does not need to calculate the degree of similarity of attention.

[0109] As an explanation of some embodiments of the present disclosure, an example of a data generation device using the attention generation device 10 or the attention generation device 20 will be described. Fig. 9 is a diagram showing an example of the configuration of a data generation device according to some embodiments of the present disclosure. In the configuration shown in Fig. 9, the data generation device 30 includes a feature calculation unit 31, an attention generation unit 32, and an output data generation unit 33.

[0110] The data generating device 30 converts input data into output data using attention. The above-mentioned speech recognition device, machine translation device, character recognition device, and image recognition device are examples of the data generating device 30. However, the data generating device 30 is not limited to these.

[0111] The feature calculation unit 31 calculates the feature of each part 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 configured external to the data generation device 30. The output data generation unit 33 generates output data for each part based on the feature calculated by the feature calculation unit 31 and the attention generated by the attention generation unit 32.

[0112] The data generating 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 to convert the internal data of the neural network.

[0113] The data generating device 30 may be used in a smart speaker that understands a user's voice instructions through voice recognition and natural language processing and executes the instructions. For example, the data generating device 30 may be configured as a part of the smart speaker and perform voice recognition and / or natural language processing.

[0114] The data generating device 30 may be used in a smartphone having a voice assistant function (AI assistant function) that understands a user's voice instructions through voice recognition and natural language processing and executes the instructions. For example, the data generating device 30 may be configured as a part of the smartphone and perform voice recognition and / or natural language processing.

[0115] The data generating device 30 may be used in a text analysis system that accepts input of a natural language sentence by voice input or character string input and analyzes the input sentence. For example, the data generating device 30 may be configured as a part of the text analysis system and may perform voice recognition, natural language processing, and / or text analysis.

[0116] The data generating device 30 may be used in an image search system that searches for images by accepting user instructions in natural language, such as voice input or character string input. For example, the data generating device 30 may be configured as part of the image search system and perform voice recognition, natural language processing, and / or generation of descriptions of images in search results.

[0117] 10 is a diagram showing an example of data input / output at each unit of the data generating device 30. The feature calculation unit 31 calculates the feature of each portion of input data to the data generating device 30. The attention generation unit 32 generates attention based on the feature of each portion of the input data calculated by the feature calculation unit 31 and feedback information indicating the status of generation of the portion of output data by the output data generation unit 33. The output data generation unit 33 generates output data for each portion based on the feature of each portion of the input data calculated by the feature calculation unit 31, the attention generated by the attention generation unit 32, and feedback information indicating the status of generation of the portion of output data by the output data generation unit 33 itself.

[0118] The data generating device 30 is expected to be able to avoid or reduce repetition of parts of data in the output data.

[0119] 11 is a diagram illustrating an example of the configuration of an attention generation device according to some embodiments of the present disclosure. In the configuration illustrated in FIG. 11 , an attention generation device 610 includes an attention calculation unit 611 and an attention correction unit 612.

[0120] With this configuration, the attention calculation unit 611 calculates attention for each portion of output data for generating that portion of output data. The attention is a weighting coefficient for each portion of input data. The attention modification unit 612 modifies the target attention based on the attention for generating a portion of the output data that has already been generated. The target attention is the attention for generating a portion of the output data that is to be generated. The attention calculation unit 611 is an example of an attention calculation means. The attention modification unit 612 is an example of an attention modification means.

[0121] According to the attention generation device 610, when generating target attention, it is possible to reflect the weighting status for each part of the input data by the attention for generating the part of the output data that has already been generated. In this respect, according to the attention generation device 610, when weighting is performed on the part of the data to be processed in data processing, it is expected that it will be possible to avoid or reduce the occurrence of repetition of parts of the data in the data obtained by the data processing.

[0122] 12 is a diagram illustrating an example of a processing procedure of an attention generation method according to some embodiments of the present disclosure. The attention generation method illustrated in FIG. 12 includes calculating attention (step S611) and correcting attention (step S612).

[0123] In calculating attention (step S611), the computer calculates attention for each portion of output data for generation of that portion of output data. The attention is a weighting factor for each portion of input data. In modifying attention (step S612), the computer modifies target attention based on attention for generation of a portion of output data that has already been generated. The target attention is attention for generation of a portion of output data that is to be generated.

[0124] According to the attention generation method shown in Fig. 12, when generating target attention, it is possible to reflect the weighting status for each part of the input data by the attention for generating the part of the output data that has already been generated. In this respect, according to the attention generation method shown in Fig. 12, when weighting is performed on the part of the data to be processed in data processing, it is expected that it is possible to avoid or reduce the occurrence of repetition of parts of the data in the data obtained by data processing.

[0125] 13 is a schematic block diagram illustrating the configuration of a computer according to at least one embodiment. In the configuration shown in FIG. 13, a computer 700 includes a CPU 710, a main memory device 720, an auxiliary memory device 730, an interface 740, and a non-volatile recording medium 750.

[0126] One or more of the attention generation device 10, attention generation device 20, data generation device 30, and attention generation device 610, or a part thereof, may be implemented in the computer 700. In this case, the operation of each of the above-mentioned processing units 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 storage device 720, and executes the above-mentioned processing in accordance with the program. The CPU 710 also allocates storage areas in the main storage device 720 corresponding to each of the above-mentioned storage units in accordance with the program. Communication between each device and other devices is performed by the interface 740, which has a communication function and performs communication under the control of the CPU 710.

[0127] When the attention generation device 10 is implemented in the computer 700, the operations of the attention generation device 10 and each of its components are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads the program from the auxiliary storage device 730, loads it into the main storage device 720, and executes the above-mentioned processing in accordance with the program.

[0128] Furthermore, the CPU 710 allocates a storage area in the main memory device 720 for the attention generation device 10 to perform processing in accordance with the program. Communication between the attention generation device 10 and other devices is performed by the interface 740, which has a communication function and operates under the control of the CPU 710. Interaction between the attention generation device 10 and a user is performed by the interface 740, which has a display device and an input device, displaying various images under the control of the CPU 710 and accepting user operations.

[0129] When the attention generation device 20 is implemented in the computer 700, the operations of the attention generation device 20 and each of its components are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads the program from the auxiliary storage device 730, loads it into the main storage device 720, and executes the above-mentioned processing in accordance with the program.

[0130] Furthermore, the CPU 710 allocates a storage area in the main storage device 720 for the attention generation device 20 to perform processing in accordance with the program. Communication between the attention generation device 20 and other devices is performed by the interface 740, which has a communication function and operates under the control of the CPU 710. Interaction between the attention generation device 20 and a user is performed by the interface 740, which has 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 generating device 30 is implemented in the computer 700, the operations of the data generating device 30 and each of its components are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads the program from the auxiliary storage device 730, loads it into the main storage device 720, and executes the above-described processing in accordance with the program.

[0132] Furthermore, the CPU 710 allocates a storage area in the main storage device 720 for the data generating device 30 to perform processing in accordance with the program. Communication between the data generating device 30 and other devices is performed by the interface 740, which has a communication function and operates under the control of the CPU 710. Interaction between the data generating device 30 and a user is performed by the interface 740, which has 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 operations of the attention generation device 610 and each of its components are stored in the form of a program in the auxiliary storage device 730. The CPU 710 reads the program from the auxiliary storage device 730, loads it into the main storage device 720, and executes the above-mentioned processing in accordance with the program.

[0134] Furthermore, the CPU 710 allocates a storage area in the main storage device 720 for the attention generation device 610 to perform processing in accordance with the program. Communication between the attention generation device 610 and other devices is performed by the interface 740, which has a communication function and operates under the control of the CPU 710. Interaction between the attention generation device 610 and a user is performed by the interface 740, which has a display device and an input device, displaying various images under the control of the CPU 710 and accepting user operations.

[0135] Note that a program for executing all or part of the processing performed by the attention generation device 10, the attention generation device 20, the data generation device 30, and the attention generation device 610 may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be loaded into a computer system and executed to perform the processing of each unit. Note that the term "computer system" here includes hardware such as an OS and peripheral devices. Furthermore, the term "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs (Read Only Memory), and CD-ROMs (Compact Disc Read Only Memory), as well as storage devices such as hard disks built into the computer system. The program may be designed to implement part of the aforementioned functions, or may be capable of implementing the aforementioned functions in combination with a program already recorded on the computer system.

[0136] Although an embodiment of the present invention has been described above in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and includes designs within the scope of the gist of the present invention.

[0137] A part or all of the above-described embodiments can be described as, but not limited to, the following supplementary notes.

[0138] (Supplementary Note 1) An attention generation device comprising: attention calculation means for calculating, for each portion of output data, attention, which is a weighting coefficient for each portion of input data, for generating that portion of output data; and attention correction means for correcting target attention, which is attention for generating the portion of the output data to be generated among the portions of the output data, based on attention for generating the portion of the output data that has already been generated. (Supplementary Note 2) The attention generation device according to Supplementary Note 1 further comprises coverage set update means for adding, as an element of a coverage set, a set whose elements are indices identifying the portions of the input data to which a weighting coefficient included in the target attention is determined to be greater than or equal to a predetermined condition, the index identifying the portion of the input data to which the weighting coefficient included in the target attention is applied, and the attention correction means rewrites the value of the weighting coefficient included in the target attention, which is associated with the index indicated in the coverage set before information on the target attention is reflected, to 0 or a predetermined value that is a sufficiently small positive value. (Supplementary Note 3) The coverage update means uses 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, and adds, as an element of the coverage set, an index that identifies a portion of the input data to which a weight coefficient whose value after multiplication by the coefficient is greater than a predetermined threshold is applied.(Supplementary Note 4) The attention generation device according to any one of Supplementary Notes 1 to 3, further comprising a similarity determination means that calculates a similarity between each of the attentions for generation of the generated parts of the output data and the target attention, and determines whether or not there is any attention for generation of the generated parts of the output data that is similar to the target attention, and when the similarity determination means determines that there is any attention for generation of the generated parts of the output data that is similar to the target attention, the attention modification means modifies the target attention based on the attention for generation of the generated parts of the output data. (Supplementary Note 5) An attention generation method including a computer calculating, for each part of the output data, attention that is a weighting coefficient for each part of the input data for generating that part of the output data, and modifying the target attention that is attention for generation of the part of the output data that is to be generated based on the attention for generation of the generated parts of the output data. (Appendix 6) A recording medium storing a program for causing a computer to perform the following: calculating attention, which is a weighting coefficient for each portion of input data, for each portion of output data for generating that portion of output data; and modifying target attention, which is attention for generating the portion of the output data that is to be generated, based on attention for generating the portion of the output data that has already been generated.

[0139] This application claims priority based on Japanese Patent Application No. 2023-001310, filed January 6, 2023, the disclosure of which is incorporated herein in its entirety by reference.

[0140] The present disclosure may be applied to an attention generation device, an attention generation method, and a recording medium.

[0141] 10, 20, 610 Attention generation device 11, 611 Attention calculation unit 12 Similarity determination unit 13 Coverage set update unit 14, 24, 612 Attention correction unit 30 Data generation device 31 Feature calculation unit 32 Attention generation unit 33 Output data generation unit

Claims

1. attention calculation means for calculating, for each part of the output data, an attention, which is a weighting factor for each part of the input data, for generating that part of the output data; attention correction means for correcting target attention, which is attention for generation of a portion of the output data that is to be generated, based on attention for generation of a portion of the output data that has already been generated; An attention generation device comprising:

2. a coverage set update means for adding an index identifying a portion of the input data to which a weighting coefficient included in the target attention that is determined to be greater than a predetermined condition as an element of a coverage set, the coverage set being a set whose elements are the indexes identifying the portion of the input data; The attention correction means rewrites the value of a weighting coefficient included in the target attention, which is associated with an index indicated in the coverage set before the information about the target attention is reflected, to 0 or a value that is predetermined as a sufficiently small positive value. The attention generating device according to claim 1 .

3. The coverage set update means uses 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, and adds, as an element of the coverage set, an index that identifies a portion of the input data to which a weight coefficient whose value after multiplication by the coefficient is greater than a predetermined threshold is applied. The attention generating device according to claim 2 .

4. The apparatus further comprises a similarity determination means for calculating a similarity between each of the attentions for generating the generated part of the output data and the target attention, and determining whether or not there is an attention similar to the target attention among the attentions for generating the generated part of the output data, When the similarity determination means determines that there is an attention similar to the target attention among the attentions for generation of the already generated part of the output data, the attention correction means corrects the target attention based on the attentions for generation of the already generated part of the output data. The attention generating device according to any one of claims 1 to 3.

5. The computer Calculating, for each portion of the output data, an attention weighting factor for each portion of the input data for generating that portion of the output data; modifying a target attention, which is a generation attention for a portion of the output data that is a generation target, based on a generation attention for a portion of the output data that has already been generated; The attention generation method includes:

6. On the computer, calculating, for each portion of the output data, an attention weighting factor for each portion of the input data for generating that portion of the output data; modifying a target attention, which is a generation attention for a portion of the output data that is to be generated, based on a generation attention for a portion of the output data that has already been generated; A program to execute.