Generative multi-agent multi-stage collaborative multi-language machine translation completion method
A multi-stage collaborative method using generative multi-agents enhances translation quality by integrating traditional and new paradigms, improving translation performance and quality, particularly in low-resource scenarios.
Patent Information
- Application Number
- CN202411242879.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Large language models (LLMs) in machine translation face challenges with poor output stability, lack of interpretability, and inherent defects such as hallucinations and lack of interpretability, and the need for improved translation quality, especially in low-resource scenarios.
A multi-stage collaborative method involving generative multi-agent systems, integrating traditional multilingual machine translation models and LLMs, utilizing the deployment of multiple agents to collaborate in multiple stages to enhance translation quality, including the use of mRASP2 and Llama3.1-8B-Instruct models, with review and refinement experts to summarize and refine the preliminary translations.
The method effectively addresses the bridging of the old and new paradigings in the field of multilingual machine translation, improving translation performance and quality, especially in low-resource scenarios, with significant gains in translation accuracy and semantic proximity.
Smart Images

Figure CN119227698A_ABST
Abstract
Description
[0001] Technical Language
[0002] The present invention relates to a method for achieving multi-language machine translation through multi-stage collaboration of generative multi-agents, and belongs to the technical field of natural language processing. Background Art
[0003] In recent years, large language models (LLMs), such as the GPT series, LLaMA series, and GLM series, have made significant progress in the field of natural language processing (NLP) and have become a hot topic of research. These models have demonstrated amazing language understanding and generation capabilities through self-supervised learning of massive text data, and have also shown great potential to promote innovation in machine translation technology. Compared with traditional neural machine translation, the results of the general machine translation task in WMT23 show that the LLM-based machine translation system has achieved a leading position in most translation subtasks. These results show that LLM-based machine translation has become a new paradigm in the field of machine translation. However, it is worth noting that although the best performing translation model in WMT23 is the GPT-4-based translation model, the simple LLM-based direct translation system still has many problems. Compared with traditional neural machine translation, the LLM-based translation system relies heavily on the model's own one-time output capability, so its output stability is poor in machine translation tasks involving low resources. At the same time, it also naturally has some inherent defects of the large model itself, lack of interpretability and reproducibility, and the existence of hallucinations and other problems. Therefore, how to combine the advantages of the two to generate a high-quality translation has become a noteworthy issue.
[0004] The present invention proposes a method for multi-stage collaborative multi-language machine translation of a generative multi-agent, which utilizes the deployment of multiple generative agents to collaborate with each other in multiple stages to jointly complete the multi-language machine translation task. At the same time, it fully considers and maximizes the use of the model and results of traditional machine translation, effectively constrains the new translation paradigm of the LLM-based machine translation system, and provides translation information gain. In addition, through the multi-agent structure, the framework expands this influence, connects the traditional paradigm and the new paradigm in machine translation, and provides a balance between the two. And on the basis of these two, facing the multi-language machine translation task, the model performance has reached a new height. Summary of the invention
[0005] The present invention proposes a generative multi-agent multi-stage collaborative multilingual machine translation method to solve the problems of low-resource translation quality in traditional multilingual machine translation and the potential of large language models in translation tasks that has not been fully explored. The present invention has achieved good experimental results on relevant data sets.
[0006] The technical solution of the present invention is: a method for multi-language machine translation by multi-stage collaboration of generative multi-agents, the specific steps of the method are as follows:
[0007] Step 1. Select the traditional multilingual machine translation model mRASP2 as one of the basic model architectures. This model is suitable for the needs of multilingual machine translation tasks. After selection, the mRASP2 model is tested for effect and beam decoding is generated.
[0008] Step 2. Select a suitable large model, such as Llama3.1-8B-Instruct or GPT-4omini, as one of the basic model architectures. The model needs to be suitable for the needs of multilingual machine translation tasks. After selection, start the GMATranslate multi-agent expert based on the large model.
[0009] Step 3. Use multilingual translation experts under the GMATranslate framework to complete the first preliminary translation for the target to be translated;
[0010] Step 4: Use the information expert under the GMATranslate framework to summarize the information of the mRASP2 beam decoding results and obtain the second preliminary translation;
[0011] Step 5. Use the review experts and refinement experts under the GMATranslate framework to review and refine the preliminary translation 1 and preliminary translation 2;
[0012] Step 6. Use the selection experts under the GMATranslate framework to select the final translation that best matches the content, sentiment and meaning of the source text.
[0013] As a further solution of the present invention, the specific steps of Step 1 are as follows:
[0014] Step 1.1. Obtain the open-source and pre-trained multi-language translation model mRASP2, which has a twelve-layer encoder-decoder framework.
[0015] Step 1.2: For the text S to be translated, first perform tokenization and then binarization;
[0016] Step 1.3: Use the processed binary data as the input of mRASP2 and generate the N-best translation hypothesis list about S through beam decoding
[0017] As a further solution of the present invention, the specific steps of Step 2 are as follows:
[0018] Step 2.1. Obtain the open source Llama3.1-8B-Instruct as the base model for starting the multi-agent framework.
[0019] Step 2.2, through the vllm framework, start Llama3.1-8B-Instruct locally and connect it to each agent in the GMATranslate framework.
[0020] As a further solution of the present invention, the specific steps of Step 3 are as follows:
[0021] Step 3.1, the multilingual translation expert in the GMATranslate framework receives the information of the text to be translated S and the target language code as input and completes the first preliminary translation T1.
[0022] Step 3.2: The first preliminary translation T1 is passed as output information to the review expert.
[0023] As a further solution of the present invention, the specific steps of Step 4 are as follows:
[0024] Step 4.1. Generate the mRASP2 The information expert takes the text S to be translated as the input, and analyzes the content, emotion, style and other multi-dimensional factors of S. The provided translation hypotheses are matched and summarized in multiple dimensions to obtain the second preliminary translation T2;
[0025] Step 4.2: Pass the second preliminary translation T2 of the output information to the review expert as input.
[0026] As a further solution of the present invention, the specific steps of Step 5 are as follows:
[0027] Step 5.1, the review expert receives the first preliminary translation T1 and the second preliminary translation T2 and the text to be translated S as input, and then performs a multi-dimensional MQM review on T1 and T2, and obtains the review results R1 and R2 as output;
[0028] Step 5.2, the refining expert accepts two sets of information (T1, R1) and (T2, R2) as input, modifies T1 and T2 according to the situations of R1 and R2, and obtains two refined results Ref1 and Ref2 as output.
[0029] As a further solution of the present invention, the specific steps of Step 6 are as follows:
[0030] Step 6.1. Select an expert to accept Ref1, Ref2 and S as input, and then compare the closeness of Ref1, Ref2 and S through secondary multi-dimensional comparison, and select the most suitable result Tsec as output.
[0031] The beneficial effects of the present invention are:
[0032] 1. The present invention realizes the bridging of the old and new paradigms in the field of multilingual machine translation, fully utilizing the advantages of both paradigms and improving translation performance;
[0033] 2. The present invention has conducted a large number of tests on high-resource and low-resource corpora in multiple languages, greatly improving the low-quality translation of the basic model;
[0034] 3. The present invention has been tested on different base models and different languages, proving its effectiveness and universality;
[0035] 4. In a wide range of multilingual tests, the translation accuracy and semantic proximity of the method proposed in the present invention are greatly improved compared with the original model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the capabilities of each model of the present invention;
[0037] Figure 2 The translation performance score diagram of each model of the present invention;
[0038] Figure 3 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0039] Example 1: Figure 1-Figure 3 As shown, a method for multi-language machine translation is completed by multi-stage collaboration of generative multi-agents, and the specific steps of the method are as follows:
[0040] Step 1: Select the traditional multilingual machine translation model mRASP2 as the basic model architecture, test the effect of the mRASP2 model and generate beam decoding List of translation assumptions.
[0041] Step1.1, download the mRASP2 model, as well as its preprocessing file package mRASP-dataprocess, and then set the mRASP2 model parameters. The embedding size and FFN dimension are set to 1024, dropout = 0.1, the learning rate is 3e-4, the polynomial decay schedule and the warm-up step of 10000. For optimization, the Adam optimizer is used with β1 = 1e-6 and β2 = 0.98. For multilingual vocabulary, the shared BPE vocabulary is followed, which includes 59 languages. The vocabulary contains 64808 tokens. After adding 59 language tokens, the total size of the vocabulary is 64867.
[0042] Step 1.2. Download the TED2020 dataset from the OPUS database, which covers all six languages tested: English (EN), French (FR), German (DE), Chinese (ZH), Vietnamese (VI), and Malay (MS).
[0043] Step 1.3: Tokenize and binarize the test data.
[0044] Step 1.4, use fairseq-generate to generate beam decoding for the binary data, and then clean the decoding results to obtain List of translation assumptions.
[0045] Step 2. Download Llama3.1-8B-Instruct to your local computer, download vllm to your local computer, use vllm to start Llama3.1-8B-Instruct, and start the GMATranslate framework.
[0046] Step2.1. Download Llama3.1-8B-Instruct from Huggingface to your local computer and download the OPENAI package.
[0047] Step 2.2, download vllm to the local computer, and then start Llama3.1-8B-Instruct through the vllm framework, and map the port to localhost:8080;
[0048] Step 2.3. Download Dify to your local computer and start the pre-constructed GMATranslate framework in Dify. Configure the Openai API to load the multi-agent in GMATranslate as Llama3.1-8B-Instruct.
[0049] Step 3. Use multilingual translation experts under the GMATranslate framework to complete the first preliminary translation for the target to be translated;
[0050] Step 3.1, take the original text S, the self-information I of the multilingual expert and the target language code Ti as the input of the multilingual expert;
[0051] Step 3.2, pass S, I, Ti to the multilingual review expert, and then the multilingual expert outputs the first preliminary translation T 1 , the specific formula is as follows:
[0052] T 1 =DirectTranslate(S,T i ,I 1 ) (1)
[0053] Step 4: Use the information expert under the GMATranslate framework to summarize the results of mRASP2 beam decoding. Get the second preliminary translation T 2 .
[0054] Step 4.1. Generate the mRASP2 and the text to be translated S and the expert’s self-information I 2 As input from information experts.
[0055] Step 4.2, information experts, based on S's content, emotion, style and other multi-dimensional factors, The provided translation hypothesis is matched and summarized in multiple dimensions to obtain the preliminary translation T 2 , the specific formula is as follows:
[0056]
[0057] Step 5. T 1 and T 2 Validate and refine.
[0058] Step 5.1. T 1 、T 2 , S, I 3 As the input of the review experts, two triples are formed (T 1 , S, I 3 ) and (T 2 , S, I 3 ). Each triple is reviewed once, and the specific formula is as follows:
[0059] R 1 =Revision(T 1 ,S,I3 ) (3)
[0060] R 2 =Revision(T 2 ,S,I 3 ) (4)
[0061] R = Concat(R 1 ,R 2 ) (5)
[0062] Step 5.2, T 1 ,T 2 ,R,I 4 As the input of the refinement expert, a four-tuple (T 1 ,T 2 ,R,I 4 ). The quaternary group is refined, and the specific formula is as follows:
[0063] Ref=Refine(T 1 ,T 2 ,R,I 4 ) (6)
[0064] Step 6. Select an expert to accept Ref1, Ref2 and S as input, and then compare the closeness of Ref1, Ref2 and S through secondary multi-dimensional comparison, and select the most suitable result Tsec as output. The specific formula is as follows:
[0065] Tsec=Select(Ref,S,I 5 ) (7)
[0066] In order to illustrate the effect of the present invention, COMET, COMETKiwi and BLUERT are selected as the three evaluation indicators. By testing six languages (English, French, German, Chinese, Malay and Vietnamese), English is used as the pivot language, and ten translation directions are generated, including: English to Chinese (EN-ZH), English to French (EN-FR), English to German (EN-DE), English to Vietnamese (EN-VI), English to Malay (EN-MS), Chinese to English (ZH-EN), French to English (FR-EN), German to English (DE-EN), Vietnamese to English (VI-EN) and Malay to English (MS-EN). Among these ten directions, four belong to low-resource translation directions, while the remaining six belong to high-resource translation directions. This setting helps to comprehensively evaluate the performance of the present invention under different resource conditions, especially for the translation performance of low-resource languages such as Vietnamese and Malay. The final experimental results are shown in Table 1 below.
[0067] Table 1 Comparison of translation performance of other methods and the method of the present invention in various languages
[0068]
[0069]
[0070] It can be clearly observed that in the ten translation directions, the GMATranslate framework of the present invention has achieved significant growth in both high-resource and low-resource language pairs compared with the traditional strong baseline model mRASP2 or the new translation paradigm based on the large language model, especially in the five translation directions with English as the source language, achieving an average increase of 2.09 points under the COMETKiwi evaluation index.
[0071] At the same time, in order to more intuitively understand the capabilities of each model, Figure 1 The results of each model in ten translation directions are visualized.
[0072] In order to verify the universality of the present invention, the present invention was tested in ten directions for different base models, and the self-gain of the present invention in different base models was demonstrated. It is worth noting that the α version of the present invention is based on the Llama3.1-8b-Instruct model, while the β version is based on the GPT-4omini model. The results are shown in Table 2:
[0073] Table 2 Self-gains in ten directions of GMATranslateα and GMATranslateβ
[0074]
[0075]
[0076] In order to verify the effectiveness of each method module of the present invention, relevant ablation experiments were conducted. Since the review experts do not directly output the translation answer, but work together with the refinement experts to optimize the translation results, the two are considered in the same module. The selection experts are only responsible for the selection process and do not directly affect the translation results, so they are used as the basic module. The results are shown in Table 3.
[0077] Table 3 Ablation experiment of the module designed by the present invention
[0078]
[0079] The experimental data clearly show that each expert has made a contribution, especially the review experts and refinement experts have played a significant role in improving translation quality.
[0080] In order to prove the point that the present invention has significant advantages in the translation direction of low-resource language pairs, Figure 2 The scores of one hundred test sentences in the EN-MS translation pair are visualized in two dimensions to more intuitively understand the specific changes in the translation and model performance improvement caused by the five models in the EN-MS translation process, as well as the most intuitive contribution made by the present invention.
[0081] like Figure 2 As shown in the figure, as a traditional multilingual strong baseline model, there are more light-colored blocks in the translation score graph of mRASP2, which means that it has more low-quality translations. In contrast, although the Llama3.1-8B-Instruct model also has more low-quality translations compared to the more powerful GPT-4omini, its overall performance is still better than the mRASP2 model. Under the GMATranslate framework of the present invention, the number of such light-colored blocks has been significantly improved, whether it is GMATranslateα or GMATranslateβ. This further proves the versatility and effectiveness of the GMA-Translate framework for improving low-quality translations.
[0082] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A generative multi-agent multi-stage collaborative multi-language machine translation method, characterized by: The specific steps of the method are as follows: Step 1: Select the traditional multilingual machine translation model mRASP2 as one of the basic model architectures. After selection, perform effect testing and beam decoding generation on the mRASP2 model. Step 2, select the large model, and after selection, start the GMATranslate multi-agent expert based on the large model; Step 3. Use multilingual translation experts under the GMATranslate framework to complete the first preliminary translation for the target to be translated; Step 4: Use the information expert under the GMATranslate framework to summarize the information of the mRASP2 beam decoding results and obtain the second preliminary translation; Step 5. Use the review experts and refinement experts under the GMATranslate framework to review and refine the first preliminary translation and the second preliminary translation; Step 6. Use the selection experts under the GMATranslate framework to select the final translation that best matches the content, sentiment and meaning of the source text.
2. The method for multi-language machine translation using a generative multi-agent multi-stage collaborative approach according to claim 1, characterized in that: The specific steps of Step 1 are as follows: Step 1.
1. Obtain the open-source and pre-trained multi-language translation model mRASP2, which has a twelve-layer encoder-decoder framework. Step 1.2: For the text S to be translated, first perform tokenization and then binarization; Step 1.3: Use the processed binary data as the input of mRASP2 and generate the N-best translation hypothesis list about S through beam decoding 3. The generative multi-agent multi-stage collaborative multi-language machine translation method according to claim 1, characterized in that: The large models selected in Step 2 are Llama3.1-8B-Instruct and GPT-4omini.
4. The method for multi-language machine translation using a generative multi-agent multi-stage collaboration according to claim 1, characterized in that: The specific steps of Step 2 include the following: Step 2.
1. Obtain the open source Llama3.1-8B-Instruct as the base model for starting the multi-agent framework; Step 2.2, through the vllm framework, start Llama3.1-8B-Instruct locally and connect it to each agent in the GMATranslate framework.
5. The method for multi-language machine translation using a generative multi-agent multi-stage collaboration according to claim 1, characterized in that: The specific steps of Step 3 include the following: Step 3.1, the multilingual translation expert in the GMATranslate framework receives the information of the text to be translated S and the target language code as input and completes the first preliminary translation T1; Step 3.2: The first preliminary translation T1 is passed as output information to the review expert.
6. The generative multi-agent multi-stage collaborative multi-language machine translation method according to claim 1, characterized in that: The specific steps of Step 4 include the following: Step 4.
1. Generate the mRASP2 The information expert takes the text S to be translated as the input, and analyzes the content, emotion, and style of S. The provided translation hypotheses are matched and summarized in multiple dimensions to obtain the second preliminary translation T2; Step 4.2: Pass the second preliminary translation T2 of the output information to the review expert as input.
7. The generative multi-agent multi-stage collaborative multi-language machine translation method according to claim 1, characterized in that: The specific steps of Step 5 include the following: Step 5.1, the review expert receives the first preliminary translation T1 and the second preliminary translation T2 and the text to be translated S as input, and then performs a multi-dimensional MQM review on T1 and T2, and obtains the review results R1 and R2 as output; Step 5.2, the refining expert accepts two sets of information (T1, R1) and (T2, R2) as input, modifies T1 and T2 according to the situations of R1 and R2, and obtains two refined results Ref1 and Ref2 as output.
8. The generative multi-agent multi-stage collaborative multi-language machine translation method according to claim 7, characterized in that: The specific steps of Step 6 are as follows: Step 6.
1. Select an expert to accept Ref1, Ref2 and S as input, and then compare the closeness of Ref1, Ref2 and S through secondary multi-dimensional comparison, and select the most suitable result Tsec as output.
Citation Information
Patent Citations
Conference auxiliary system and method based on intelligent voice AI real-time translation
CN117371459A
AI translation model selection method based on large language model
CN117521677A
Large model machine translation strengthening method, system and equipment based on thinking chain and medium
CN118114686A
Differentiation adapter-based multi-language neural machine translation method for Chinese, old and Tai
CN118395998A
System and method for training multilingual machine translation evaluation models
US20220067307A1