French translation quality automatic evaluation method, system and equipment and storage medium
Through a French translation quality assessment method based on a large language model, using the BGE M3-Embedding model and deep DNN network, combined with LoRA fine-tuning technology, the problems of automated assessment and interpretive assessment in the existing technology are solved, and the automation of French translation quality is achieved. , quantifiable and interpretable evaluation, improving translation efficiency and accuracy.
Patent Information
- Application Number
- CN202411207282.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-08-30
AI Technical Summary
Existing translation quality assessment methods lack automated and quantifiable evaluation indicators, are difficult to apply in scenarios where there is no reference translation, and cannot explain the reasons for scoring, making it difficult to provide effective improvement suggestions for French learners and practitioners.
Using an automated French translation quality assessment method based on a large language model, the representation vectors of Chinese and French texts are obtained through the BGE M3-Embedding model, the vector distance is calculated as the initial assessment score, and a deep DNN network and LoRA fine-tuning method are used to generate a quantifiable assessment. Scores and explainable rationale for evaluation.
It achieves automated, quantifiable assessment and interpretability assessment of French translation quality, improves translation efficiency and assessment accuracy, reduces fine-tuning costs, and provides reasonable reasons for interpretability assessment.
Smart Images

Figure CN118734865A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of translation quality assessment, and relates to a French translation quality assessment method, and in particular to a French translation quality automatic assessment method, system, device and storage medium based on a large language model. Background Art
[0002] Translation quality assessment (TQA) is an important research direction in the field of translation. Translation experts at home and abroad have successively proposed far-reaching translation quality assessment models, defining the evaluation standards of translation quality from different dimensions, different levels, different cultural factors and other perspectives. However, this translation quality assessment model has two defects: first, for the translated text, experts in the field of translation assessment need to manually review the translation quality. There is no automated method, and the efficiency is low. For ordinary French learners and practitioners, it is difficult to apply in practice; second, there is no comprehensive and quantifiable translation quality assessment indicator, and it is difficult to intuitively measure the quality of the translation.
[0003] Existing automated translation quality assessment methods, such as BLEU, COMET, and HLEPOR, are based on the difference between reference translations and machine translations. They are used to evaluate the level of machine translation and are difficult to apply to scenarios where there are no reference translations. Moreover, most of these methods can only give translation quality scores, but cannot explain the reasons for the scores, making it difficult to provide French learners and practitioners with effective ideas for improving translation.
[0004] With the rapid development of large language models such as ChatGPT, the model's language understanding ability has been greatly improved. The decoder-only model based on the Transform network structure has made a breakthrough in text generation. They are pre-trained on large-scale unsupervised text data and then fine-tuned for specific tasks. Although these models are only trained to predict the next word, the models have shown strong emergence capabilities. The pre-trained models can perform multiple tasks such as text classification, question answering, and translation well, and can complete new tasks through contextual learning without updating model parameters. The ability of this model provides a new possibility for building an automated evaluation method for French translation quality. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention proposes a French translation quality automatic evaluation method, system, device and storage medium based on a large language model, which can automatically complete the evaluation of the French translation quality, and the evaluation includes quantifiable comprehensive evaluation indicators of the translation quality and explainable reasons for the translation evaluation.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is as follows: A method for automatically evaluating the quality of French translations based on a large language model, comprising: Obtain the representation vectors A and B of the Chinese source sentence and the French translation to be evaluated in the BGE M3-Emebdding model; Calculating the distance d between the representation vector A of the Chinese source sentence and the representation vector B of the French translation as an initial translation evaluation score; The representation vector A, the representation vector B and the distance d are input into a trained deep DNN network model, wherein the representation vector A and the representation vector B are used as the input of the first layer of the network, and the distance d is used as the supplementary input feature of the last layer of the deep DNN network; the output of the model is a quantifiable translation evaluation score.
[0007] In the above technical solution, further, the structure of the deep DNN network model includes an input layer, 5 intermediate layers, and an output layer, wherein the dimensions of the 5 intermediate layers are 512, 256, 128, 64, and 31+1, respectively. The representation vectors of the Chinese source sentence and the corresponding French translation are used as the bottom-level cross-feature input of the DNN network model, and the initial translation evaluation score is used as the supplementary input feature of the last intermediate layer in the network model to participate in the training. After the sigmoid function, the output of the output layer obtains a quantifiable translation evaluation score.
[0008] Furthermore, the training of the deep DNN network model includes the following steps: Construct translation samples of Chinese source sentences and corresponding French translations. The data comes from the United Nations Chinese-French Parallel Corpus as positive samples; negative samples include two parts: one is random samples generated by negative sampling within a batch, and the other is difficult negative samples constructed using French translations from Google Translate; for positive and negative samples, the representation vectors of the BGE M3-embedding model of the Chinese source sentences and the corresponding French translations are obtained for training.
[0009] Furthermore, the proportion of difficult negative samples in negative samples should not be too high. The ratio of randomly generated negative samples to difficult negative samples is 127:1. At the same time, the dropout method is used to randomly discard 10% of the vector representations of the French translation of Google Translate.
[0010] Furthermore, after obtaining a quantifiable translation evaluation score, the Chinese source sentence, the French translation to be evaluated and the corresponding quantifiable translation evaluation score are filled into a pre-designed Prompt template, and the fine-tuned large model of French translation quality evaluation is accessed to obtain an explainable translation evaluation reason.
[0011] Furthermore, the fine-tuning large model for French translation quality assessment is obtained based on the LlaMA3 model, using a high-quality SFT (Supervised Fine-Tuning) data set and the LoRA fine-tuning method.
[0012] Furthermore, the method for constructing the high-quality SFT data set is as follows: N pieces of data that have not participated in the training of the deep DNN network model are selected from the United Nations Chinese-French Parallel Corpus, where N should usually be no less than 1000 pieces. The Chinese source sentences and the corresponding French translations of Google Translate are obtained to obtain 2N Chinese-French sentence pairs. The trained deep DNN network model is used to obtain quantifiable translation evaluation scores of the Chinese-French sentence pairs, and according to the Translation Quality Assessment Model, the translation quality assessment reasons are manually generated to obtain a high-quality SFT data set.
[0013] A French translation quality automatic evaluation system based on a large language model, used to implement the method described in any one of the above items.
[0014] An electronic device, comprising: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described above.
[0015] A computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement Now the method as described in any one of the above.
[0016] The advantages of the present invention are: (1) An automated French translation quality assessment method that combines quantification and interpretability is proposed, which can effectively improve translation efficiency; (2) The BGE M3-embedding model is used to represent the accuracy of Chinese and French languages and the comparability of vectors to construct a deep neural network structure for French translation quality assessment, and the initial score of the vector distance is used as the feature input of the last layer of the neural network to ensure the accuracy of the French translation quality score; (3) Combining the translation evaluation model of human translation evaluation experts and the natural language understanding ability of machines, the emergence ability of large language models is utilized, and the LoRA fine-tuning method is adopted to greatly reduce the fine-tuning cost while ensuring the model effect, thereby generating reasonable and interpretable reasons for translation quality assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the overall architecture of a specific example of the present invention.
[0018] Figure 2 It is a Prompt template design and LLM (Large Language Model) fine-tuning data and structure diagram of a specific example of the present invention. DETAILED DESCRIPTION
[0019] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0020] The present invention is mainly based on BGE M3-embedding and LlaMA3 large language model, and proposes an automated evaluation method for the translation quality of Chinese translation. The evaluation results can include both quantifiable translation quality scores and explainable reasons for translation quality evaluation.
[0021] According to a specific example of the present invention, a French translation quality automatic evaluation method based on a large language model is provided. Figure 1 As shown, the following steps are included: 1) Obtain the vector representation of the BGE M3-Emebdding model of the Chinese source sentence and the corresponding French translation, and calculate the distance score of the two vectors as the initial translation evaluation score; 2) Combine the vector representations of the Chinese source sentence and the French translation as input features of a fully connected deep neural network, and use the initial translation evaluation score as the supplementary input of the last layer of the deep neural network to obtain the final quantifiable translation evaluation score; According to a specific example of the present invention, the automated evaluation method may further include: 3) Select data from the Chinese-French parallel corpus and manually construct an SFT training dataset for French translation according to the translation quality assessment model. The data includes quantifiable translation evaluation scores and multiple reasons for the scores; 4) Based on the SFT dataset, the LlaMA3 model is fine-tuned by LoRA to make it more suitable for the French translation evaluation field, and a fine-tuned large model for French translation quality evaluation is obtained; 5) Based on the translation evaluation model theory, a Prompt template for the French translation evaluation task is constructed. Combined with the translation evaluation score, the CoT (Chain of Thought) thought guidance model is used to produce explainable translation quality evaluation reasons.
[0022] The above steps mainly include two parts: a quantifiable translation evaluation score and an explainable reason for the translation quality evaluation.
[0023] For the quantifiable translation evaluation score part, the BGE M3-Emebdding model is used as the basic representation of the sentence. BGE is a new embedding model released and open-sourced by the Beijing Academy of Artificial Intelligence. It is superior to other embedding models in terms of representation capabilities for Chinese and English. BGE M3-Embedding is a further upgraded version of BGE, which supports more than 100 languages including Chinese, English, and French. It has multilingual and cross-lingual representation capabilities, and different languages share the same vector space, with the feature that the Chinese and French vectors are comparable. Vector representations of the BGE M3-Embedding model for the Chinese source sentence and the corresponding French translation are generated respectively, and the vector distance between the two is used as the initial translation evaluation score; although the BGE M3-Embedding model has good language representation ability, it is designed to be used as a general embedding model and cannot directly achieve the optimal effect in specific translation evaluation tasks. Therefore, it is necessary to build a multi-layer deep neural network to further strengthen the learning of the correspondence between the Chinese source sentence and the French translation. The BGE M3-Emebdding representations of the Chinese source sentence and the corresponding French translation are used as the input cross-features of the neural network, and the Chinese-French parallel corpus is used as a sample to strengthen the training of the DNN model in the Chinese-French translation scenario; in addition, in order to prevent the loss of the original embedding information in the deep neural network, the initial translation evaluation score is used as the supplementary input feature of the last layer of the deep neural network to participate in the training to improve the accuracy of the translation quality assessment.
[0024] For the interpretable reasons for translation quality assessment, the large language model uses the open source LlaMA3 8B model from Meta as the base model. LlaMA3 is a standard decoder-only Transformer architecture. Its huge training data scale and GQA (Group Query Attention) attention mechanism enable it to demonstrate strong language understanding and generation capabilities. However, in order to better adapt to the translation quality assessment scenario of French translations, LlaMA3 needs to be fine-tuned to make it understand the translation assessment model of human translation experts, so as to give accurate and interpretable reasons for translation quality assessment. Data from the Sino-French parallel corpus is selected, and a quantifiable translation assessment scoring method is used to generate the French translation quality score of the corresponding sentence. Then, according to the translation quality assessment model, the scoring reasons are manually given to construct a fine-tuned SFT training data set for French translation quality assessment, and the LoRA (Low-Rank Adaptation) fine-tuning method is used to obtain a fine-tuned large model for French translation quality assessment. Based on the translation evaluation model, a Prompt template for the French translation evaluation task is constructed. Combined with the translation evaluation score, the CoT idea is used to guide the model to produce explainable translation quality evaluation reasons.
[0025] Example 1
[0026] A method for automatically evaluating the quality of French translations based on a large language model, comprising: 1. Construct translation samples of Chinese source sentences and corresponding French translations. The data comes from the United Nations Parallel Corpus, which collects parallel texts of various United Nations documents and document types, and can ensure the accuracy of the translation. The BGE M3-embedding model selects the large version with better representation ability. The dimension of the embedding vector is 1024. The representation vectors of the BGE M3-embedding model of the Chinese source sentence and the corresponding French translation are obtained respectively, and the Cosine distance of the corresponding vector is used as the initial translation evaluation score.
[0027] 2. Build a deep DNN network model, use the representation vectors of the Chinese source sentence and the corresponding French translation obtained in 1 as the underlying cross-feature input of the DNN network model, the training goal is to further strengthen the correspondence between the Chinese source sentence and the French translation, and in order to prevent the loss of the original embedding information in the deep neural network, the initial translation evaluation score is used as the supplementary input feature of the last layer of the deep neural network to participate in the training. This method can effectively improve the accuracy of the prediction score (AUC on the test set increased by 0.67%, from 93.10% to 93.77%). The DNN is designed with 5 intermediate layers, with dimensions of 512, 256, 128, 64, 31 + initial translation evaluation score, and the dimension of the output layer is 1, which is used as the training prediction score of the model after sigmod.
[0028] 3. In the sample construction of the DNN network model in 2, the positive sample is a one-to-one translation text in the parallel corpus, and the negative sample consists of two parts: one is a random sample generated by negative sampling in the batch, and the other is a difficult negative sample constructed using the French translation of Google Translate, using softmax cross entropy as the loss function for training. The proportion of difficult negative samples should not be too high, so the batch is set to 128, and the ratio of the two parts of negative samples is 127:1. At the same time, in order to prevent the positive samples from being mistakenly set as negative samples due to the accuracy of Google Translate, 10% of the vector representations of the French translation of Google Translate are randomly discarded using dropout to ensure the accuracy of the training results.
[0029] Example 2
[0030] A French translation quality automatic evaluation method based on a large language model, based on embodiment 1, further includes: 4. For the Chinese-French parallel corpus in 1, select 1000 pieces of data that did not participate in the training in 2, and obtain their corresponding French translations in Google Translate, so as to obtain 2000 Chinese-French sentence pairs. Use the model trained in 2 to obtain quantifiable translation evaluation scores for the sentence pairs. Then, according to the translation quality evaluation model, from the aspects of language / text, register and genre, combined with the translation evaluation scores, manually generate translation quality evaluation reasons, and construct a high-quality SFT data set.
[0031] Among them, the following steps can be used to manually generate translation quality assessment reasons: 1) Analyze the register, subject matter, and textual function of the Chinese source sentences; 2) Analyze the register, subject matter and textual function of the French translation and compare it with the source text to identify errors and mismatched translations; 3) To find out whether the French translation is an explicit translation (with more emphasis on equivalence in language / text, register and genre) or an implicit translation (with more emphasis on equivalence in textual function); 4) Conduct a comprehensive assessment of translation quality.
[0032] 5. The base large language model uses the LlaMA3 model released and open-sourced by Meta, which has surpassed similar models in the industry in multiple key benchmark tests. In order to coordinate the efficiency of fine-tuning and the cost of prediction, the LlaMA3 8B (8 billion parameters) version is selected in this example. The SFT data set obtained in 4 is used, and the LoRA fine-tuning method is adopted (the rank r of the matrix is set to 2) to obtain a fine-tuned large model for French translation quality assessment.
[0033] 6. Adopting the idea of CoT, design the Prompt template. For the Chinese source sentence and the French translation to be evaluated, first obtain a quantifiable translation evaluation score based on the model obtained in 2, then fill the sentence and score into the Prompt template, access the fine-tuned large model of French translation quality evaluation in 5, and obtain an explainable translation evaluation reason. The Prompt template is as follows: Figure 2 As shown, it can be designed as follows: 1) Scenario and function preset: "You are an expert in the field of Chinese-French translation evaluation. You can combine the knowledge in the field of translation evaluation and give detailed evaluation reasons based on the given Chinese source sentence, the corresponding French translation sentence and the estimated translation evaluation score." 2) Data input: "The following are the details: Chinese source sentence {X}; French translation sentence {Y}; estimated translation evaluation score {Z}" 3) Result requirements: "Based on the above information, please give the detailed reasons and thinking process for the French translation quality evaluation, requiring no less than 3 reasons, and each reason is at least 15 words."
[0034] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0035] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0036] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0037] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0038] The specific implementation methods described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific implementation methods described or replace them with similar methods, but they will not deviate from the spirit of the present invention or exceed the scope defined by the attached claims.
Claims
1. A method for automatically evaluating the quality of French translations, characterized in that: include: Obtain the representation vectors A and B of the Chinese source sentence and the French translation to be evaluated in the BGE M3-Emebdding model; Calculating the distance d between the representation vector A of the Chinese source sentence and the representation vector B of the French translation as an initial translation evaluation score; The representation vector A, the representation vector B and the distance d are input into a trained deep DNN network model, wherein the representation vector A and the representation vector B are used as the input of the first layer of the network, and the distance d is used as the supplementary input feature of the last layer of the deep DNN network; the output of the model is a quantifiable translation evaluation score.
2. The French translation quality automatic evaluation method according to claim 1 is characterized in that: The structure of the deep DNN network model includes an input layer, 5 intermediate layers, and an output layer, wherein the dimensions of the 5 intermediate layers are 512, 256, 128, 64, and 31+1, respectively. The representation vectors of the Chinese source sentence and the corresponding French translation are used as the bottom-level cross-feature input of the DNN network model, and the initial translation evaluation score is used as the supplementary input feature of the last intermediate layer in the network model to participate in the training. After the sigmoid function, the output of the output layer obtains a quantifiable translation evaluation score.
3. The French translation quality automated evaluation method according to claim 1, characterized in that: The training of the deep DNN network model and the construction of its samples include: Construct translation samples of Chinese source sentences and corresponding French translations. The data comes from the United Nations Chinese-French Parallel Corpus as positive samples; negative samples include two parts: one is random samples generated by negative sampling within a batch, and the other is difficult negative samples constructed using French translations from Google Translate; for positive and negative samples, the representation vectors of the BGE M3-embedding model of the Chinese source sentences and the corresponding French translations are obtained for training, and softmax cross entropy is used as the loss function for training.
4. The French translation quality automatic evaluation method according to claim 3 is characterized in that: The ratio of difficult negative samples in negative samples should not be too high. The ratio of randomly generated negative samples to difficult negative samples is 127:
1. At the same time, the dropout method is used to randomly discard 10% of the vector representations of the French translation of Google Translate.
5. The French translation quality automatic evaluation method according to claim 1 is characterized in that: After obtaining a quantifiable translation evaluation score, fill the Chinese source sentence, the French translation to be evaluated and the corresponding quantifiable translation evaluation score into the pre-designed Prompt template, access the fine-tuned large model of French translation quality evaluation, and obtain an explainable translation evaluation reason.
6. The French translation quality automatic evaluation method according to claim 5, characterized in that: The fine-tuned large model for French translation quality assessment is obtained based on the LlaMA3 model, using a high-quality SFT data set and the LoRA fine-tuning method.
7. The French translation quality automatic evaluation method according to claim 6, characterized in that: The method for constructing the high-quality SFT data set is as follows: N pieces of data that were not involved in the training of the deep DNN network model were selected from the United Nations Sino-French Parallel Corpus, and the Chinese source sentences and the corresponding French translations of Google Translate were obtained to obtain 2N Chinese-French sentence pairs. The trained deep DNN network model was used to obtain quantifiable translation evaluation scores for the Chinese-French sentence pairs, and according to the translation quality evaluation model, the translation quality evaluation reasons were manually generated to obtain a high-quality SFT data set.
8. A French translation quality automated evaluation system, characterized in that: Used to implement the method according to any one of claims 1 to 7.
9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions, which when executed are used to implement The method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Translation text integrity evaluation method based on bilingual text structure information
CN104915337A
Using meta-information in neural machine translation
CN109074242A
Method and device for evaluating translation quality
CN111027331A
Machine translation quality evaluation method, device, equipment and medium
CN112347795A
Translation evaluation method, device and system and computer storage medium
CN112446221A
