Sentence associating device, learning device, sentence associating method, learning method, and program

The sentence matching device improves alignment accuracy by using context vectors to consider information from other sentences and documents, addressing the limitations of conventional methods that lack context awareness.

JP2024123669AActive Publication Date: 2024-09-12NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023031278
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2024-09-12
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

Conventional sentence matching technologies do not utilize context information, leading to decreased accuracy in sentence alignment, particularly across different domains or languages.

Method used

A sentence matching device that employs a machine learning model to calculate context vectors considering information from other sentences within the same document and information from the other document, using a multilingual language model to convert sentences into embedded expressions and a score calculation model to predict sentence correspondence.

Benefits of technology

Enhances the accuracy of sentence alignment by incorporating context information, allowing for faster and more precise matching of sentences across different domains and languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024123669000001
    Figure 2024123669000001
Patent Text Reader

Abstract

To provide a technology that can realize accurately associating sentences.SOLUTION: A sentence associating device according to one aspect of the present disclosure comprises: a context vector calculation unit that, by using a sentence vector representing the characteristic of a sentence included in a given document pair, calculates a context vector by a trained first machine learning model where a first parameter is set, in which information regarding other sentences in a document that includes a sentence corresponding to the sentence vector and information regarding a document that does not include the sentence corresponding to the sentence vector are taken into account as context information; and a score calculation unit that calculates, by using the context vector, a score for associating a sentence or a sentence aggregate between documents included in the document pair, by a trained second machine learning model where a second parameter is set.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a sentence alignment device, a learning device, a sentence alignment method, a learning method, and a program. [Background technology]

[0002] Identifying a pair of corresponding sentences or sentence sets in two documents that correspond to each other is called sentence alignment. A known conventional technique for performing sentence alignment is a technique that performs recursive DP (Dynamic Programming) matching based on the similarity of sentence vectors that represent the multilingual embedded representations (feature quantities) of sentences (Non-Patent Document 1). [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Brian Thompson and Philipp Koehn. Vecalign: Improved sentence alignment in linear time and space. In Proceedings of EMNLP-2019, pp. 1342-1348, 2019. Summary of the Invention [Problem to be solved by the invention]

[0004] However, since the above conventional techniques do not use context information, the accuracy may decrease depending on the domain of the documents to be aligned (for example, the language of the documents to be aligned).

[0005] The present disclosure has been made in consideration of the above points, and provides a technique that can achieve accurate sentence alignment. [Means for solving the problem]

[0006] A sentence alignment device according to one embodiment of the present disclosure includes a context vector calculation unit that uses a sentence vector representing characteristics of a sentence included in a given document pair to calculate a context vector taking into account, as context information, information about other sentences in a document including a sentence corresponding to the sentence vector and information about documents not including a sentence corresponding to the sentence vector, using a first machine learning model set with trained first parameters; and a score calculation unit that uses the context vector to calculate a score for matching sentences or sentence sets between documents included in the document pair using a second machine learning model set with trained second parameters. Effect of the Invention

[0007] A technique is provided that can achieve accurate sentence alignment. [Brief description of the drawings]

[0008] [Figure 1] FIG. 2 is a diagram illustrating an example of a hardware configuration of the sentence alignment device at the time of prediction. [Diagram 2] FIG. 13 is a diagram illustrating an example of a functional configuration of the sentence alignment device at the time of prediction. [Diagram 3] 4 is a diagram illustrating an example of a detailed functional configuration of a sentence alignment prediction unit in the first embodiment. FIG. [Figure 4] FIG. 11 is a diagram illustrating an example of a detailed functional configuration of a sentence alignment prediction unit in the second embodiment. [Diagram 5] 11 is a flowchart illustrating an example of a sentence matching process according to the embodiment. [Figure 6] 13 is a flowchart illustrating an example of a sentence alignment score prediction process in the first embodiment. [Figure 7] 13 is a flowchart illustrating an example of a sentence alignment score prediction process in the second embodiment. [Figure 8] FIG. 2 is a diagram illustrating an example of a functional configuration of the sentence alignment device during learning. [Figure 9] 10 is a flowchart illustrating an example of a learning process of a multilingual language model according to the present embodiment. [Figure 10] 10 is a flowchart showing an example of a process for creating learning data for a sentence alignment model according to the present embodiment. [Figure 11] 11 is a flowchart illustrating an example of a learning process of a sentence alignment model according to the present embodiment. [Figure 12] FIG. 13 is a diagram illustrating a modified example of the functional configuration of the sentence alignment device during learning. [Figure 13] FIG. 13 is a diagram illustrating a modified example of the functional configuration of the sentence alignment device at the time of prediction. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] An embodiment of the present invention will be described below. In the following, a sentence alignment device 10 capable of achieving accurate sentence alignment by considering context information will be described. Here, the sentence alignment device 10 according to this embodiment performs sentence alignment of a given document pair using a sentence alignment model realized by a machine learning model including a neural network or the like. Moreover, the sentence alignment device 10 according to this embodiment uses a multilingual language model realized by a machine learning model including a neural network or the like to obtain sentence vectors representing multilingual embedded expressions (feature values) of each sentence included in a given document pair.

[0010] For this reason, sentence alignment device 10 according to this embodiment has a learning time for learning parameters of a multilingual language model and a sentence alignment model, and a prediction time for predicting sentence alignment between document pairs using a multilingual language model and a sentence alignment model using the learned parameters. Therefore, the "prediction time" and "learning time" of sentence alignment device 10 will be described below.

[0011] Note that "at the time of prediction" may be called, for example, "at the time of inference". Moreover, sentence alignment device 10 at the time of learning may be called, for example, a "learning device". Furthermore, although the following description will be given on the assumption that sentence alignment device 10 at the time of prediction and sentence alignment device 10 at the time of learning are realized by the same device, they may be realized by different devices at the time of prediction and at the time of learning.

[0012] [When predicting] First, assuming that the parameters of the multilingual language model and the sentence alignment model have been trained, a case will be described in which sentence alignment is performed using the trained parameters of the multilingual language model and the sentence alignment model. Here, data representing document pairs to be subjected to sentence alignment (hereinafter referred to as input document pair data) is provided to sentence alignment device 10 at the time of prediction.

[0013] In the following, it is assumed that the document pair represented by the input document pair data is a document pair in a bilingual relationship between different languages ​​(e.g., Japanese and English). However, this is only one example, and the document pair represented by the input document pair data is not limited to a document pair in a bilingual relationship between different languages, and may be, for example, a document pair in a bilingual relationship between different dialects of the same language. More generally, any document pair can be used as the document pair represented by the input document pair data, as long as it is in a corresponding relationship between different domains and a sentence or set of sentences included in one document is to be associated with a sentence or set of sentences included in the other document.

[0014] <Example of Hardware Configuration of Sentence Alignment Device 10 at Prediction Time> An example of a hardware configuration of sentence alignment device 10 at the time of prediction is shown in Fig. 1. As shown in Fig. 1, sentence alignment device 10 at the time of prediction includes an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Furthermore, each of these pieces of hardware is connected to each other via a bus 109 so as to be able to communicate with each other.

[0015] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the sentence alignment device 10 does not necessarily have to include at least one of the input device 101 and the display device 102, for example.

[0016] The external I / F 103 is an interface with an external device such as a recording medium 103a. The sentence association device 10 can read and write data from and to the recording medium 103a via the external I / F 103. Examples of the recording medium 103a include a flexible disk, a CD (Compact Disc), a DVD (Digital Versatile Disk), a SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.

[0017] The communication I / F 104 is an interface for connecting the sentence alignment device 10 to a communication network. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a storage device (storage device) such as a hard disk drive (HDD), a solid state drive (SSD), or a flash memory. The processor 108 is an arithmetic device such as a central processing unit (CPU) or a graphics processing unit (GPU).

[0018] At the time of prediction, the sentence alignment device 10 has the hardware configuration shown in Fig. 1 and is therefore capable of implementing various processes described below. Note that the hardware configuration shown in Fig. 1 is merely an example, and the hardware configuration of the sentence alignment device 10 is not limited to this. For example, the sentence alignment device 10 may have multiple auxiliary storage devices 107 and multiple processors 108, may not have some of the hardware shown in the figure, or may have various hardware other than the hardware shown in the figure.

[0019] <Example of Functional Configuration of Sentence Alignment Device 10 at Prediction Time> An example of the functional configuration of sentence alignment device 10 at the time of prediction is shown in Fig. 2. As shown in Fig. 2, sentence alignment device 10 at the time of prediction includes sentence alignment problem generation unit 201, sentence conversion unit 202, sentence alignment prediction unit 203, and sentence alignment generation unit 204. Each of these units is realized, for example, by processing in which one or more programs installed in sentence alignment device 10 are executed by processor 108 or the like. Furthermore, sentence alignment device 10 at the time of prediction includes multilingual language model parameter storage unit 205 and sentence alignment model parameter storage unit 206. Each of these storage units can be realized, for example, by auxiliary storage device 107 or the like.

[0020] The sentence matching problem generation unit 201 converts the given input document pair data into a format that can be input to a sentence matching problem that uses a multilingual language model and a sentence matching model. Specifically, the sentence matching problem generation unit 201 creates data in which each document included in the document pair represented by the given input document pair data is divided into sentence units (hereinafter, also referred to as sentence-unit input document pair data).

[0021] In the following, the first document in the document pair represented by the input document pair data is divided into sentences and called document E={e 1 ,e 2 ,···,e |E|}, the second document is divided into sentences and the document F={f 1 ,f 2 ,f |F|}), where e i (i=1,2,...,|E|) is the i-th sentence in document E, f j (j=1,2,...,|F|) represents the j-th sentence contained in document F. Thus, the sentence-unit input document pair data is represented as (E,F).

[0022] The sentence conversion unit 202 includes a multilingual language model M 1 The sentence conversion unit 202 converts the multilingual model M into a multilingual language model M by using the trained multilingual model parameters stored in the multilingual model parameter storage unit 205. 1Each sentence in the sentence-unit input document pair data (E,F) is converted into a sentence vector that represents the multilingual embedding representation (feature) of the sentence. Note that these sentence vectors are obtained by converting each sentence into a feature, so context information is not taken into account.

[0023] Below, sentence e i Let (i=1,2,···,|E|) be the sentence vector i e ∈R d Similarly, let f j Let (j=1,2,···,|F|) be the sentence vector j f ∈R d Here, d is the dimension of the sentence vector.

[0024] Also, the sentence vector h i e ∈R d Let H be the matrix with |E| rows and d columns, where e =[h 1 e ,h 2 e ,···,h |E| e ]∈R |E|×d Similarly, the sentence vector h j f Let |F| row and d column matrix be H f =[h 1 f ,h 2 f ,···,h |F| f ]∈R |F|×d In the following, these matrices H e ,H f is called the sentence vector matrix.

[0025] In addition, the multilingual language model M 1 Any language model can be used as long as it can convert a sentence into a multilingual embedding representation. 1A pre-trained multilingual language model may be used as the multilingual language model M. For example, models such as LaBSE (Reference 1) and LASER (Reference 2) are used as the multilingual language model M. 1 It can be used as:

[0026] However, the multilingual language model M included in the sentence conversion unit 202 1 is not limited to a multilingual language model, and any sentence embedding model can be used as long as it can obtain embedded sentences in the domains to which the documents in the document pair to be aligned belong. For example, in the case of aligning sentences between a first dialect and a second dialect in the same language, the sentence conversion unit 202 may include a sentence embedding model that can obtain embedded sentences in the first dialect and the second dialect in the language.

[0027] The sentence alignment prediction unit 203 includes a sentence alignment model M 2 The sentence alignment prediction unit 203 uses the trained sentence alignment model parameters stored in the sentence alignment model parameter storage unit 206 to generate a sentence alignment model M 2 Therefore, the sentence vector matrix H e and H f A sentence vector (hereinafter also referred to as a context vector) taking into consideration context information is calculated from the document E, and a sentence alignment score is predicted from the context vector. The sentence alignment score is a matrix whose elements are scores for associating a sentence or a set of sentences included in document E with a sentence or a set of sentences included in document F. The detailed functional configuration of the sentence alignment prediction unit 203 will be described later.

[0028] The sentence alignment generation unit 204 uses the sentence alignment scores to match sentences or sentence sets with each other using existing techniques (e.g., DP matching, ILP (Integer Linear Programming Problem) matching, threshold processing, etc.) to match a sentence or sentence set contained in document E with a sentence or sentence set contained in document F, and then generates sentence alignment data representing the alignment (sentence alignment).

[0029] The multilingual language model parameter storage unit 205 stores the multilingual language model M 1 The trained parameters (trained multilingual language model parameters) of the above are stored.

[0030] The sentence alignment model parameter storage unit 206 stores the sentence alignment model M 2 The trained parameters (trained sentence alignment model parameters) of the

[0031] In the functional configuration example of the sentence alignment device 10 shown in FIG. 2, the sentence conversion unit 202 and the sentence alignment prediction unit 203 are separate, but for example, the sentence conversion unit 202 may be included in the sentence alignment prediction unit 203. In this case, the sentence alignment model M 2 Multilingual language model M 1 Includes:

[0032] <Example of detailed functional configuration of sentence alignment prediction unit 203> Hereinafter, a detailed functional configuration of the sentence alignment prediction unit 203 will be described in first and second embodiments.

[0033] Example 1 A detailed functional configuration example of the sentence alignment prediction unit 203 in the first embodiment is shown in Fig. 3. As shown in Fig. 3, the sentence alignment prediction unit 203 in the first embodiment includes a context vector calculation unit 211 and a score calculation unit 212. The context vector calculation unit 211 and the score calculation unit 212 calculate the sentence alignment model M 2 This is achieved by:

[0034] The context vector calculation unit 211 calculates the sentence vector matrix H e and H f More specifically, the context vector calculation unit 211 calculates a context vector from each sentence vector using, as context information, information on sentences other than the sentence represented by the sentence vector in the document to which the sentence vector belongs (i.e., extra-sentence context information in the same document) and information on other documents to which the sentence does not belong (i.e., information on other domain documents).

[0035] For example, the context vector calculation unit 211 calculates (C e ,C s ,C f )=g([H e ;s;H f ]) to calculate the context vector. Here, g(·) is self attention by the L-layer Transformer Encoder (Reference 3), and s is a trained parameter included in the trained sentence alignment model parameters. Also, the trainable parameters included in g(·) have been trained and are included in the trained sentence alignment model parameters. C e ∈R |E|×d H e is the output of g(·) corresponding to the context vector, and is a matrix of |E| rows and d columns, with each row being a context vector. Similarly, C f H f is the output of g(·) corresponding to the context vector, and is a matrix of |F| rows and d columns, C s is the output of g(·) corresponding to s. Note that context vector calculation unit 211 is realized by a context vector calculation model included in the sentence alignment model. Moreover, the learned parameters s and the learned parameters included in g(·) are context vector calculation model parameters, and are stored in context vector calculation model parameter storage unit 216 included in sentence alignment model parameter storage unit 206.

[0036] As a result, a matrix C consisting of context vectors that take into account the context information of documents E and F (hereinafter also referred to as the context vector matrix) is obtained. e and C f For example, the sentence vector e i The context vector corresponding to e i ', sentence vector f j The context vector corresponding to f j ', then the context vector matrix C e is the context vector e i ' is the i (1≦i≦|E|)th row of a matrix with |E| rows and d columns, and the context vector matrix C f is the context vector f jIt is expressed as a matrix of |F| rows and d columns, with C' being the jth row (1≦j≦|F|). s can also be obtained, but C s is not particularly used.

[0037] The score calculation unit 212 calculates the context vector matrix C e and C f From the sentence alignment score ^A∈R |E|×|F| Note that the hat "^" representing the predicted value (estimated value) is actually placed directly above A, but in the text of the specification, it is placed immediately before A.

[0038] For example, the score calculation unit 212 calculates the context vector matrix C e and C f The sentence alignment score ^A is calculated by inputting the Cartesian product of these two to the multi-layer perceptron layer. That is, score calculation unit 212 calculates the sentence alignment score ^A by the following formula (1).

[0039]

number

[0040] The above sentence alignment score ^A is the i-th row and j-th column element ^a ij The sentence i and sentence f j This represents the matching score between ij The larger the value, the more the sentence e i and sentence f j The smaller the value, the more likely the sentence e i and sentence f jThis indicates that the two cannot be associated.

[0041] In addition, since the above formula (1) can calculate the alignment scores of all alignment candidates (i.e., in Example 1, the sentences contained in document E and the sentences contained in document F) at once, the alignment scores can be calculated very quickly compared to score calculations of span prediction models such as SpanAlign (Reference 4).

[0042] Example 2 An example of a detailed functional configuration of the sentence alignment prediction unit 203 in the second embodiment is shown in Fig. 4. As shown in Fig. 4, the sentence alignment prediction unit 203 in the second embodiment includes a context vector calculation unit 211, a multi-sentence context vector calculation unit 213, and a score calculation unit 212. The context vector calculation unit 211, the multi-sentence context vector calculation unit 213, and the score calculation unit 212 calculate the sentence alignment model M 2 This is achieved by:

[0043] The context vector calculation unit 211 calculates the sentence vector matrix H e and H f From the context vector matrix C e and C f Calculate.

[0044] The multi-sentence context vector calculation unit 213 calculates a context vector matrix C e and C f The context vector contained in is expanded to the context vector of one or more consecutive sentences (hereinafter also referred to as a multi-sentence context vector).

[0045] For example, the multi-sentence context vector calculation unit 213 calculates a context vector matrix C e and C f The context vectors included in the multi-sentence context vector calculation unit 213 are expanded to sentence n-gram vectors, and a multi-sentence context vector matrix consisting of these sentence n-gram vectors is calculated. Specifically, the multi-sentence context vector calculation unit 213 calculates the multi-sentence context vector matrix C 1:N e and C 1:N fCalculate.

[0046] C 1:N e =[C 1 e ;···;C N e ] C n e =max_pooling n (C e ) C 1:N f =[C 1 f ;···;C N f ] C n f =max_pooling n (C f ) Here, N is a hyperparameter that represents the maximum number of sentences in a sentence n-gram. n represents a MaxPooling layer with kernel size (n,1) and stride 1.

[0047] In this case, the multi-sentence context vector matrix C 1:N e is the context vector matrix C e is an extension of the sentence n-gram, where each row is a multi-sentence context vector (sentence n-gram vector). 1:N Similarly, the multi-sentence context vector matrix C 1:N f is the context vector matrix C f This is an extension of |F| to sentence n-grams, where each row is a multi-sentence context vector (sentence n-gram vector). 1:N It is a matrix with | rows and d columns, where |E 1:N |=(N(2|E|-N+1)) / 2, |F 1:N |=(N(2|F|-N+1)) / 2.

[0048] For example, e i ',...,e i+n-1 The n-gram vector of the sentence i:i+n-1', the multi-sentence context vector matrix C 1:N e e 1 ',...,e |E| ',e 1:2 ',...,e |E|-N+1:|E| ' in the 1st line, , |E| line, |E|+1 line, , and |E 1:N |Line number|E 1:N It is expressed as a matrix with | rows and d columns. Similarly, f j ',...,f j+n-1 ' sentence n-gram vector f j:j+n-1 ', the multi-sentence context vector matrix C 1:N f f 1 ',...,f |F| ',f 1:2 ',...,f |F|-N+1:|F| ' in the 1st line, , |F| line, |F|+1 line, , and |F 1:N |Line number|F 1:N It is represented by a matrix with | rows and d columns.

[0049] This makes it possible to calculate a sentence alignment score for performing many-to-many sentence alignment (i.e., sentence alignment between sentence sets).The context vector calculation unit 211 and the multiple-sentence context vector calculation unit 213 are realized by a context vector calculation model included in the sentence alignment model.

[0050] The score calculation unit 212 calculates a multi-sentence context vector matrix C 1:N e and C 1:N f From score ^A∈R |E_(1:N)|×|F_(1:N)| Calculate |E_(1:N)| and |F_(1:N)| respectively. 1:N | and |F 1:N Represents |.

[0051] For example, the score calculation unit 212 calculates the multi-sentence context vector matrix C 1:N e and C 1:N fThe sentence alignment score ^A is calculated by inputting the Cartesian product of these two to the multilayer perceptron layer. e Instead of C 1:N e , C f Instead of C 1:N f Calculate the sentence alignment score ^A using

[0052] As in the first embodiment, the above formula (1) can calculate the alignment scores of all alignment candidates at once (i.e., in the first embodiment, the sentence n-grams of the sentences contained in document E and the sentence n-grams of the sentences contained in document F). Therefore, the alignment scores can be calculated very quickly compared to the score calculation of a span prediction model such as SpanAlign (Reference 4).

[0053] <Sentence matching process> The sentence matching process according to this embodiment will be described below with reference to FIG.

[0054] First, the sentence matching problem generating unit 201 inputs given input document pair data (step S101).

[0055] Next, the sentence matching problem generation unit 201 generates a sentence matching problem from the input document pair data input in the above step S101 (step S102). That is, the sentence matching problem generation unit 201 converts the input document pair data into sentence-unit input document pair data (E, F) that is in a format that can be input to a sentence matching problem. Note that, if the input document pair data input in the above step S101 is in a format that can be input to a sentence matching problem, the sentence matching problem generation unit 201 may simply use this input document pair data as it is as sentence-unit input document pair data.

[0056] Next, the sentence conversion unit 202 converts the multilingual model M 1In other words, the sentence conversion unit 202 converts each sentence included in the sentence-unit input document pair data (E, F) obtained in step S102 into a sentence vector by using the trained multilingual model parameters. 1 By using the sentence vector matrix H e and converts the document F included in the sentence-unit input document pair data into the sentence vector matrix H f Convert to.

[0057] Next, the sentence alignment prediction unit 203 uses the trained sentence alignment model parameters to generate a sentence alignment model M 2 Therefore, the sentence vector matrix H e and H f The sentence alignment score ^A is predicted from the sigma (step S104). Note that the details of the process of this step will be described later.

[0058] Next, the sentence alignment generation unit 204 generates sentence alignment data using the sentence alignment score predicted in the above step S104 (step S105). For example, when the sentence alignment score ^A is predicted by the sentence alignment prediction unit 203 in the first embodiment in the above step S104, the sentence alignment generation unit 204 generates sentence alignment data by using the element ^a of the sentence alignment score ^A. ij is compared with a predetermined threshold value, and an element ^a that has a value equal to or greater than the threshold value is ij The corresponding sentence e i and f j On the other hand, when the sentence alignment score ^A is predicted by the sentence alignment prediction unit 203 in the second embodiment in step S104, the sentence alignment generation unit 204 performs matching by DP matching or ILP to match e 1 ,···,e |E| ,e 1:2 ,···,e |E|-N+1:|E| and f 1 , ,f |F| ,f 1:2 ,f |F|-N+1:|F| and

[0059] In this way, when the sentence alignment score ^A is predicted by the sentence alignment prediction unit 203 in the first embodiment, since there may be a plurality of pairs that are aligned in each row and each column of the sentence alignment score ^A when predicting the alignment relationship with consecutive sentences, global optimization cannot be applied and sentence alignment is determined by threshold processing. In contrast, when the sentence alignment score ^A is predicted by the sentence alignment prediction unit 203 in the second embodiment, the alignment relationship with consecutive sentences can be predicted in a form in which each row and each column of the sentence alignment score ^A contains at most one element with a value of 1. For this reason, by predicting the sentence alignment score ^A by the sentence alignment prediction unit 203 in the second embodiment, it becomes possible to apply an alignment algorithm based on global optimization, such as DP matching or ILP matching, to alignment with consecutive sentences.

[0060] Following step S105, the sentence correspondence generating unit 204 outputs the sentence correspondence data generated in step S105 to a predetermined output destination (step S106). Note that the predetermined output destination may be, for example, the display device 102, the auxiliary storage device 107, or another device connected via a communication network.

[0061] <Sentence Alignment Score Prediction Process> The process of predicting the sentence alignment score ^A in step S104 above will be described in detail below.

[0062] <Prediction process of sentence alignment score in the first embodiment> The process of predicting the sentence alignment score ^A in the first embodiment will be described with reference to FIG.

[0063] First, the context vector calculation unit 211 calculates the sentence vector matrix H e and H f Using (C e ,C s ,C f )=g([H e ;s;H f ]) to obtain the context vector matrix C e and C fCalculate (step S201).

[0064] Then, the score calculation unit 212 calculates the context vector matrix C e and C f Using this, the sentence alignment score ^A is calculated according to the above formula (1) (step S202).

[0065] <Prediction process of sentence alignment score in the second embodiment> The process of predicting the sentence alignment score ^A in the second embodiment will be described with reference to FIG.

[0066] First, the context vector calculation unit 211 calculates the sentence vector matrix H e and H f Using (C e ,C s ,C f )=g([H e ;s;H f ]) to obtain the context vector matrix C e and C f Calculate (step S301).

[0067] Next, the multi-sentence context vector calculation unit 213 calculates the context vector matrix C e and C f Using this, we create a multi-sentence context vector matrix C 1:N e and C 1:N f Calculate (step S302).

[0068] Then, the score calculation unit 212 calculates the multi-sentence context vector matrix C 1:N e and C 1:N f Using C e Instead of C 1:N e , C f Instead of C 1:N f The sentence alignment score ^A is calculated using equation (1) (step S303).

[0069] [Study time] Next, the multilingual language model M 1 and the sentence alignment model M 2 The case where the parameters of the multilingual language model M are not yet trained will be described. 1 When learning the parameters of the sentence alignment model M, learning data for the multilingual language model is provided to the sentence alignment device 10 during learning. 2 When learning the parameters, one or more pieces of learning document pair data are provided to sentence alignment device 10 during learning.

[0070] The training data for the multilingual language model is the multilingual language model M 1 The training data for the multilingual language model includes one or more monolingual document data in each of a plurality of languages ​​including at least the language to be matched with the sentences (e.g., when the languages ​​to be matched with the sentences are English and Japanese, English document data and Japanese document data, etc.). The training data for the multilingual language model may further include one or more bilingual data between at least the two languages ​​to be matched with the sentences (or between different dialects of the same language) (e.g., when the languages ​​to be matched with the sentences are English and Japanese, English and Japanese bilingual data, etc.).

[0071] The learning document pair data is a sentence alignment model M 2 This refers to document pair data for creating training data for a sentence alignment model used in parameter learning of the above. The training document pair data is data on document pairs that have some correspondence (for example, a bilingual relationship) between the two languages ​​(or different dialects of the same language) that are the subject of sentence alignment.

[0072] <Example of Hardware Configuration of Sentence Alignment Device 10 During Learning> The hardware configuration may be the same as that of the sentence alignment device 10 at the time of prediction, and therefore a description thereof will be omitted.

[0073] <Example of Functional Configuration of Sentence Alignment Device 10 During Learning> An example of a functional configuration of the sentence alignment device 10 during learning is shown in Fig. 8. As shown in Fig. 8, the sentence alignment device 10 during learning has, in addition to the sentence conversion unit 202 and the sentence alignment prediction unit 203, a multilingual language model learning unit 301, a pseudo-sentence alignment data creation unit 302, a sentence alignment question answer generation unit 303, and a sentence alignment model learning unit 304. Each of these units is realized, for example, by a process in which one or more programs installed in the sentence alignment device 10 are executed by the processor 108 or the like. Furthermore, the sentence alignment device 10 during learning has a multilingual language model parameter storage unit 205 and a sentence alignment model parameter storage unit 206. Each of these storage units can be realized, for example, by the auxiliary storage device 107 or the like.

[0074] The multilingual language model learning unit 301 uses given learning data for the multilingual language model to learn the multilingual language model parameters stored in the multilingual language model parameter storage unit 205 by an existing learning method for the multilingual language model.

[0075] The pseudo-sentence alignment data creation unit 302 uses the given training document pair data to find sentence alignments by an existing sentence alignment method, and then creates pseudo-sentence alignment data by assigning the sentence alignments to the training document pair data as pseudo-correct answer data. For example, when K pieces of training document pair data are given, K pieces of pseudo-sentence alignment data are obtained. However, for example, these pseudo-sentence alignment data may be created manually or the like and provided to the sentence alignment device 10 during learning.

[0076] The sentence matching problem answer generation unit 303 converts the learning document pair data included in the pseudo sentence matching data into a format that can be input to a sentence matching problem, and also converts the pseudo-correct answer data included in the pseudo sentence matching data into a format similar to the sentence matching score ^A. That is, the sentence matching problem answer generation unit 303 creates data in which each document included in the document pair represented by the learning document pair data is divided into sentence units, and converts the pseudo-correct answer data into a matrix in a matrix format similar to the sentence matching score ^A (hereinafter referred to as correct sentence matching score, represented by A).

[0077] In the following, as in the case of prediction, the first document in the learning document pair data is divided into sentences and the document E = {e 1 ,e 2 ,···,e |E|}, the second document is divided into sentences and the document F={f 1 ,f 2 ,f |F|}). As a result, the pseudo-sentence alignment data is converted into the format of (E,F,A). Hereinafter, the pseudo-sentence alignment data converted into this format will be referred to as learning data for a sentence alignment model (E,F,A). Note that when K pieces of learning document pair data are given, K pieces of pseudo-sentence alignment data are created, and therefore K pieces of learning data for a sentence alignment model are obtained.

[0078] Sentence alignment model learning unit 304 uses the sentence alignment model learning data (E, F, A) to learn the sentence alignment model parameters stored in sentence alignment model parameter storage unit 206. Here, sentence alignment model learning unit 304 may learn the sentence alignment model parameters by a known supervised learning method.

[0079] At this time, when the sentence alignment prediction unit 203 in the first or second embodiment is used, for example, the following BCE (Binary Cross Entropy) loss can be used as the loss function. On the other hand, when the sentence alignment prediction unit 203 in the second embodiment is used, for example, the following SCE (Softmax Cross Entropy) loss can be used as the loss function. Note that the sentence alignment model parameters are learned (updated) by using an existing optimization method such as a gradient method so as to minimize the value of this loss function.

[0080] BCE loss The sentence alignment of the context vector or sentence n-gram vector is learned as a binary classification task. In this case, a sigmoid function is used as the activation function of the output layer of the mlp shown in equation (1). However, an identity function is used as the activation function of the output layer of the mlp shown in equation (1), and each element ^a of the sentence alignment score ^A is ij A sigmoid function may be applied to

[0081] loss L bce is defined as the binary cross entropy between the sentence alignment score ^A predicted by sentence alignment prediction unit 203 and the correct sentence alignment score A by the following formula (2).

[0082]

number

[0083] Loss L defined by the above formula (2) bceThis allows the sentence alignment model to directly learn many-to-many sentence alignments.

[0084] When the sentence alignment prediction unit 203 in the first embodiment is used, N=1 is set in the above formula (2).

[0085] ·SCE loss We train the sentence correspondence of sentence n-gram vectors as a multi-class classification task. In this case, we use a softmax function as the activation function of the output layer of the MLP shown in equation (1).

[0086] loss L sce is the E→F direction matching loss L E→F and the matching loss L in the F→E direction F→E That is, the loss L sce is defined by the following equations (3) to (5).

[0087]

number

[0088] In contrast to the BCE loss, which learns to predict absolute sentence alignment scores, the SCE loss learns to predict relative sentence alignment scores, which has the advantage that it is easier to train compared to the BCE loss.

[0089] <Learning process for multilingual language models> Hereinafter, the learning process of the multilingual language model according to this embodiment will be described with reference to FIG.

[0090] First, the multilingual language model training unit 301 receives training data for the given multilingual language model (step S401).

[0091] Then, the multilingual language model training unit 301 uses the multilingual language model training data input in step S401 above to train multilingual language model parameters by an existing training method (step S402). For example, the multilingual language model training unit 301 trains the multilingual language model parameters by a word fill-in task using document data in each monolingual. Also, for example, when bilingual data is included in the multilingual language model training data, the multilingual language model training unit 301 trains the multilingual language model parameters by contrastive training using the bilingual data. As a specific example, when the multilingual language model M 1 When LaBSE is used as the embedding language, the multilingual language model training unit 301 trains multilingual language model parameters from monolingual document data by a method called MLM (Masked Language Modeling), and trains multilingual language model parameters from bilingual data by a method called TLM (Translation Language Modeling). This makes it possible to train multilingual language model parameters for obtaining multilingual embedded representations of sentences.

[0092] <Creating learning data for sentence alignment model> Hereinafter, the process of creating learning data for a sentence alignment model according to this embodiment will be described with reference to Fig. 10. Note that in order to create multiple pieces of learning data for sentence alignment models, the following steps S501 to S503 can be repeatedly executed.

[0093] First, the pseudo-sentence association data generating unit 302 receives the learning document pair data (step S501).

[0094] Next, the pseudo-sentence matching data creation unit 302 uses the training document pair data input in step S501 above to find sentence matching as pseudo-superficial answer data by any existing sentence matching method, and then assigns this pseudo-superficial answer data to the training document pair data to create pseudo-sentence matching data (step S502).

[0095] Then, the sentence matching problem answer generating unit 303 uses the pseudo sentence matching data generated in step S502 to generate learning data for a sentence matching model (step S503). That is, the sentence matching problem answer generating unit 303 generates learning data for a sentence matching model (E, F, A) including data obtained by dividing each document included in the document pair represented by the learning document pair data included in the pseudo sentence matching data into sentence units, and data obtained by converting the pseudo correct answer data included in the pseudo sentence matching data into a matrix of the same format as the sentence matching score ^A. Note that, if the learning document pair data is in a format that can be input to a sentence matching problem, the sentence matching problem answer generating unit 303 may include this learning document pair data as it is in the learning data for the sentence matching model. Similarly, if the pseudo correct answer data is a matrix of the same format as the sentence matching score ^A, the sentence matching problem answer generating unit 303 may include this pseudo correct answer data as it is in the learning data for the sentence matching model as the correct sentence matching score A.

[0096] <Learning process for sentence alignment model> The learning process of the sentence alignment model according to this embodiment will be described below with reference to FIG.

[0097] First, sentence alignment model learning unit 304 receives learning data for sentence alignment model (E, F, A) (step S601).

[0098] Then, the sentence alignment model training unit 304 uses the sentence alignment model training data (E, F, A) input in step S601 to train the sentence alignment model parameters stored in the sentence alignment model parameter storage unit 206 (step S602). That is, the sentence alignment model training unit 304 inputs each sentence included in the documents E and F included in the sentence alignment model training data to the sentence conversion unit 202, and uses the trained multilingual model parameters to train the multilingual language model M in the same way as in prediction. 1 Therefore, the sentence vector matrix H e and H fNext, the sentence alignment model training unit 304 obtains the sentence vector matrix H e and H f is input to the sentence alignment prediction unit 203, and a sentence alignment model M 2 Then, sentence alignment score ^A is predicted by the above. Sentence alignment model learning unit 304 uses this sentence alignment score ^A and the correct sentence alignment score A included in the sentence alignment model learning data to learn (update) sentence alignment model parameters using an existing optimization method so as to minimize the above BCE loss or SCE loss. In this way, the sentence alignment model parameters are learned.

[0099] <Evaluation experiment> In order to confirm the effectiveness of the sentence alignment device 10 according to this embodiment (hereinafter also referred to as the proposed method), an experiment was conducted to evaluate the accuracy and speed of sentence alignment using bilingual data of actual newspaper articles in Japanese and English. This experiment confirmed that the proposed method can achieve faster sentence alignment than existing methods while maintaining a certain level of accuracy.

[0100] <Experimental Settings> As the baseline, we used Vecalign (Non-Patent Document 1), which is one of the de facto standard methods for creating parallel corpora and requires a small amount of calculation, and SpanAlign (Reference 4), which has achieved the world's highest accuracy in Japanese-English sentence alignment. As the evaluation measure, we adopted the F1 score on a sentence alignment basis, which is commonly used as an evaluation measure for sentence alignment.

[0101] <Dataset> The training, development, and evaluation data used were a Japanese newspaper article and its English translation. For the training data, 2,989 bilingual documents were automatically extracted using the method described in Reference 6, and the sentence alignments within the documents were used as pseudo-ground-truth data. These data were extracted from 317,491 Japanese articles and 3,878 English articles published in 2012. For the development and evaluation data, 15 articles each were manually aligned from articles published in 2013. The average number of sentences for each data set is shown in Table 1 below.

[0102] [Table 1] <Model> In the proposed method, a multilingual language model M 1 We used the pre-trained LaBSE as the model and fixed its parameters. 2 In this example, the Transformer Encoder for g(·) that calculates the context vector is configured with one encoder layer, the number of heads for multi-head attention is 8, the dimension of the hidden layer is 768, and the dimension of the feedforward layer is 2048. Furthermore, when using the sentence alignment prediction unit 203 in the second embodiment, the maximum number of sentences N of the sentence n-gram is set to 2. ILP is applied as the alignment algorithm executed by the sentence alignment generation unit 204, and IBM ILOG CPLEX 12.8.0.0 is used as the ILP solver.

[0103] For sentence alignment in Vecalign, we used the implementation by the authors in Non-Patent Document 1. The maximum number of sentences included in the alignment was set to 8, and the maximum number of sentences to be combined when creating a sentence embedding vector was set to 10. In addition, LASER (Reference 2) was used for multilingual sentence embedding. For sentence alignment in SpanAlign, we also used the implementation by the authors in Reference 4. Furthermore, various settings conformed to those in the paper.

[0104] <Experimental Results> The accuracy of English-Japanese text alignment for each method and the execution time required to infer the evaluation data are shown in Table 2 below.

[0105] [Table 2] Among the proposed methods, the method using SCE loss achieved a higher F1 score than the method using BCE loss, suggesting that the learning difficulty due to sparsity is mitigated by learning the relative sentence alignment score.

[0106] In addition, compared to Vecalign, the proposed method's sentence n-gram + BCE loss showed an improvement in F1 score of 0.32 points. It is believed that the use of context information when calculating context vectors and the extraction of non-monotonic sentence correspondences by ILP contributed to the improvement in accuracy.

[0107] On the other hand, in comparison with SpanAlign, the sentence n-gram + BCE loss of the proposed method was 0.48 points lower. While SpanAlign considers contextual information at the token level, the proposed method uses contextual information compressed to the sentence level. It is believed that this difference in the granularity of the contextual information led to the difference in accuracy. The execution time required for inference on the evaluation data for the proposed method was about 1 / 4 that of SpanAlign.

[0108] From the above, we can conclude that the proposed method can perform sentence alignment faster than existing methods while maintaining a practical level of accuracy.

[0109] Next, to verify the effectiveness of context information, we created a model (w / o context) that excluded g(·), which calculates the context vector, when making predictions using sentence n-gram vectors. The alignment accuracy in this case is shown in Table 3 below.

[0110] [Table 3] We can see that the accuracy dropped significantly because the context information was not used by removing g(·). Therefore, it can be said that the context information in both languages ​​of each document in the document pair is effective in improving the accuracy.

[0111] <Summary> As described above, in the sentence alignment device 10 according to this embodiment, when a document pair consisting of a first document belonging to a first domain and a second document belonging to a second domain is given, each sentence contained in the first document and the second document is converted into an embedding representation (sentence vector) in the same embedding space, and then these sentence vectors are used to calculate a context vector that takes into account, as context information, information on sentences other than the sentence represented by the sentence vector in the document to which the sentence vector belongs (extra-sentence context information within the same document) and information on the other document to which the sentence vector does not belong (information on other domain documents). This makes it possible to improve the accuracy of sentence alignment between the first document and the second document.

[0112] Furthermore, in the sentence alignment device 10 according to this embodiment, when calculating a sentence alignment score from a context vector, the score between a sentence alignment candidate (sentence or sentence set) included in a first document and a sentence alignment candidate (sentence or sentence set) included in a second document can be calculated at once. This makes it possible to realize high-speed prediction since it is possible to calculate the sentence alignment score at once in addition to downsampling to feature amounts (sentence vectors) on a sentence-by-sentence basis.

[0113] <Modification> A modification of this embodiment will now be described.

[0114] Variation 1 The sentence alignment device 10 during learning may have a functional configuration example shown in FIG. 12, for example. The functional configuration example of the sentence alignment device 10 shown in FIG. 12 includes a sentence conversion unit 202 and a sentence alignment prediction unit 203 realized by one machine learning model. Since the sentence alignment model is realized by a context vector calculation model and a score calculation model, in the example shown in FIG. 12, the context vector calculation model and the score calculation model are respectively written as a "first model" and a "second model". Furthermore, since the model realizing the sentence conversion unit 202 is not limited to a multilingual language model, in the example shown in FIG. 12, an arbitrary sentence embedding model is written as a "third model".

[0115] Moreover, sentence conversion unit 202 and sentence alignment prediction unit 203 are realized by one model M, and the first model to third model are included in model M. The first model parameters and the second model parameters are stored in first and second model parameter storage unit 206A, the third model parameters are stored in third model parameter storage unit 205A, and first and second model parameter storage unit 206A and third model parameter storage unit 205A are included in model parameter storage unit 207.

[0116] Note that when learning the third model parameters, learning may be performed using parameters of a pre-trained multilingual language model as initial values ​​of the third model parameters.

[0117] Variation 2 The sentence alignment device 10 at the time of prediction may have, for example, the functional configuration shown in Fig. 13. In the functional configuration example of the sentence alignment device 10 shown in Fig. 13, similarly to Fig. 12, the context vector calculation model and the score calculation model are denoted as the "first model" and the "second model", respectively, and the model that realizes the sentence conversion unit 202 is denoted as the "third model". In addition, the sentence conversion unit 202 and the sentence alignment prediction unit 203 are realized by one model M, and the first model to the third model are included in the model M, and the first and second model parameter storage units 206A and the third model parameter storage unit 205A are included in the model parameter storage unit 207.

[0118] Note that the sentence alignment device 10 according to the above embodiment provides a specific improvement to the problem with the conventional methods that accuracy may decrease depending on the domain of the documents to be aligned, and represents an improvement in accuracy in the technical field related to sentence alignment.

[0119] The following supplementary notes are further disclosed regarding the above-described embodiment.

[0120] (Additional note 1) Memory, at least one processor coupled to the memory; Including, The processor, using a sentence vector representing a feature of a sentence included in a given document pair, a context vector is calculated by a first machine learning model having a first trained parameter set, the context vector taking into consideration information about other sentences in a document including a sentence corresponding to the sentence vector and information about a document not including a sentence corresponding to the sentence vector as context information; calculating a score for matching sentences or sets of sentences between the documents included in the document pair using the context vector and a second machine learning model having a trained second parameter set therein; Sentence matching device. (Additional note 2) Memory, at least one processor coupled to the memory; Including, The processor, using a sentence vector representing a feature of a sentence included in a given document pair, a first machine learning model having first parameters is used to calculate a context vector taking into consideration, as context information, information about other sentences in a document including a sentence corresponding to the sentence vector and information about a document not including a sentence corresponding to the sentence vector; calculating a score for matching sentences or sets of sentences between the documents included in the document pair using the context vector and a second machine learning model having second parameters; learning the first parameter and the second parameter so as to minimize an error between the score and a correct answer score representing a correct answer to the score; Learning device. (Additional note 3) The processor, converting a sentence included in a given document pair into a sentence vector representing a feature of the sentence using a third machine learning model having a third parameter set, the sentence being input; learning the first parameter, the second parameter, and the third parameter so as to minimize the error; 3. A learning device as described in appendix 2. (Additional note 4) The processor, using the context vectors to calculate a multi-sentence context vector representing the context vectors of one or more consecutive sentences; Calculating the score using the multi-sentence context vector with a second machine learning model having trained second parameters set thereto. 2. A sentence alignment device according to claim 1. (Additional note 5) The processor, using the context vectors to calculate a multi-sentence context vector representing the context vectors of one or more consecutive sentences; calculating the score using the multi-sentence context vector with a second machine learning model having the second parameters set; learning the first parameter and the second parameter using a binary cross entropy between the score and the correct score as the error, or learning the first parameter and the second parameter using a sum of a sentence alignment loss by multi-class classification from a first document to a second document included in the document pair and a sentence alignment loss by multi-class classification from the second document to the first document as the error; 3. The learning device according to claim 2. (Additional note 6) A non-transitory storage medium storing a program executable by a computer to execute a sentence alignment process, The sentence matching process includes: using a sentence vector representing a feature of a sentence included in a given document pair, a context vector is calculated by a first machine learning model having a first trained parameter set, the context vector taking into consideration information about other sentences in a document including a sentence corresponding to the sentence vector and information about a document not including a sentence corresponding to the sentence vector as context information; calculating a score for matching sentences or sets of sentences between the documents included in the document pair using the context vector and a second machine learning model having a trained second parameter set therein; Non-transitory storage medium. (Additional note 7) A non-transitory storage medium storing a program executable by a computer to execute a learning process, The learning process includes: using a sentence vector representing a feature of a sentence included in a given document pair, a first machine learning model having first parameters is used to calculate a context vector taking into consideration, as context information, information about other sentences in a document including a sentence corresponding to the sentence vector and information about a document not including a sentence corresponding to the sentence vector; calculating a score for matching sentences or sets of sentences between the documents included in the document pair using the context vector and a second machine learning model having second parameters; learning the first parameter and the second parameter so as to minimize an error between the score and a correct answer score representing a correct answer to the score; Non-transitory storage medium.

[0121] The present invention is not limited to the above-described embodiments specifically disclosed, and various modifications, changes, combinations with known technologies, etc. are possible without departing from the scope of the claims.

[0122] [References] Reference 1: Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Naveen Arivazhagan, and Wei Wang. Language-agnostic BERT sentence embedding. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 878-891, Dublin, Ireland, May 2022. Association for Computational Linguistics. Reference 2: Mikel Artetxe and Holger Schwenk. Margin-based parallel corpus mining with multilingual sentence embeddings. In Proceedings of the ACL-2019, pp. 3197-3203, 2019. Reference 3: Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the NIPS 2017, pp. 5998-6008, 2017. Reference 4: Katsuki Chousa, Masaaki Nagata, and Masaaki Nishino. SpanAlign: Sentence alignment method based on cross-language span prediction and ILP. In Proceedings of the 28th International Conference on Computational Linguistics, pp. 4750-4761, Barcelona, ​​Spain (Online), December 2020. International Committee on Computational Linguistics. Reference 5: Yinfei Yang, Gustavo Hernandez Abrego, Steve Yuan, Mandy Guo, Qinlan Shen, Daniel Cer, Yun-Hsuan Sung, Brian Strope, and Ray Kurzweil. Improving multilingual sentence embedding using bi-directional dual encoder with additive margin softmax. arXiv preprint arXiv:1902.08564, 2019. Reference 6: Masao Utiyama and Hitoshi Isahara. Reliable measures for aligning japanese-english news articles and sentences. In Proceedings of the ACL-2003, pp. 72-79, 2003. [Explanation of symbols]

[0123] 10 Sentence Aligner 101 Input Device 102 Display device 103 External I / F 103a Recording media 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage 108 processors 109 Bus 201 Sentence matching problem generation unit 202 Sentence conversion section 203 Sentence Alignment Prediction Unit 204 Sentence Matching Generation Unit 205 Multilingual Language Model Parameter Storage Unit 206 Sentence Alignment Model Parameter Storage Unit 207 Model parameter storage unit 211 Context Vector Calculation Unit 212 Score Calculation Department 213 Multi-Sentence Context Vector Calculation Unit 216 Context Vector Calculation Model Parameter Storage Unit 226 Score calculation model parameter storage unit 301 Multilingual Language Model Learning Department 302 Pseudo-sentence matching data creation unit 303 Sentence Matching Problem Answer Generation Unit 304 Sentence Alignment Model Training Unit

Claims

1. a context vector calculation unit that calculates a context vector by using a sentence vector representing a feature of a sentence included in a given document pair, by a first machine learning model to which a trained first parameter is set, the context vector taking into consideration information on other sentences in a document including a sentence corresponding to the sentence vector and information on a document not including a sentence corresponding to the sentence vector as context information; a score calculation unit that calculates a score for matching a sentence or a set of sentences between documents included in the document pair by using the context vector and a second machine learning model in which a trained second parameter is set; and A sentence alignment device having the following:

2. a context vector calculation unit that calculates a context vector by using a sentence vector representing a feature of a sentence included in a given document pair, by a first machine learning model to which a first parameter is set, taking into consideration, as context information, information on other sentences in a document including a sentence corresponding to the sentence vector and information on a document not including a sentence corresponding to the sentence vector; a score calculation unit that calculates a score for matching a sentence or a set of sentences between documents included in the document pair by a second machine learning model in which a second parameter is set, using the context vector; and a learning unit that learns the first parameter and the second parameter so as to minimize an error between the score and a correct answer score that indicates a correct answer to the score; A learning device having the above configuration.

3. a sentence vector calculation unit that converts a sentence included in a given document pair into a sentence vector representing a feature of the sentence by a third machine learning model having a third parameter set, The learning unit is The learning device according to claim 2 , wherein the first parameter, the second parameter, and the third parameter are learned so as to minimize the error.

4. a multi-sentence context vector calculation unit that calculates a multi-sentence context vector representing a context vector of one or more consecutive sentences using the context vector; The score calculation unit is The sentence alignment apparatus according to claim 1 , wherein the score is calculated by a second machine learning model in which the learned second parameters are set, using the multi-sentence context vector.

5. a multi-sentence context vector calculation unit that calculates a multi-sentence context vector representing a context vector of one or more consecutive sentences using the context vector; The score calculation unit is calculating the score using the multi-sentence context vector with a second machine learning model having the second parameters set; The learning unit is 3. The learning device according to claim 2, wherein the first parameter and the second parameter are learned using a binary cross entropy between the score and the correct score as the error, or the first parameter and the second parameter are learned using a sum of a sentence alignment loss by multi-class classification from a first document to a second document included in the document pair and a sentence alignment loss by multi-class classification from the second document to the first document as the error.

6. a context vector calculation step of calculating a context vector by using a sentence vector representing a feature of a sentence included in a given document pair, the context vector taking into consideration information about other sentences in a document including a sentence corresponding to the sentence vector and information about a document not including a sentence corresponding to the sentence vector as context information, using a first machine learning model to which a trained first parameter is set; a score calculation step of calculating a score for matching a sentence or a set of sentences between documents included in the document pair by a second machine learning model having a second trained parameter set using the context vector; A sentence matching method implemented by a computer.

7. a context vector calculation step of calculating a context vector by using a sentence vector representing a feature of a sentence included in a given document pair, the context vector taking into consideration information about other sentences in a document including a sentence corresponding to the sentence vector and information about a document not including a sentence corresponding to the sentence vector as context information, using a first machine learning model to which a first parameter is set; a score calculation step of calculating a score for matching sentences or sets of sentences between documents included in the document pair by a second machine learning model having second parameters set using the context vector; a learning step of learning the first parameter and the second parameter so as to minimize an error between the score and a correct answer score representing a correct answer to the score; The computer executes the learning method.

8. A program for causing a computer to function as the sentence alignment device according to claim 1 or the learning device according to claim 2.

Citation Information

Patent Citations

  • Alignment device and program

    JP2022114144A