Chinese and cross-language query expansion method based on retrieval enhancement and knowledge distillation
By using retrieval enhancement and knowledge distillation technology in the Chinese-Vietnamese cross-language query expansion task, the thinking chain generation ability of the large language model is injected into the multi-language pre-training model, which solves the computing resource consumption of large-scale language models in low-resource language environments. and insufficient generation capabilities, significantly improving the retrieval effect.
Patent Information
- Application Number
- CN202410807331.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Large-scale language models have a large number of parameters, high computing resource consumption in cross-language query expansion tasks, and poor reasoning and generation capabilities in low-resource language environments, resulting in unsatisfactory retrieval results.
Using methods based on retrieval enhancement and knowledge distillation, the thinking chain generation ability and external knowledge of the large language model are injected into the multi-language pre-training model with fewer parameters. Through the thinking chain generation module, retrieval enhancement module and cross-language query expansion module, Improve the retrieval performance of the model in Chinese-Vietnamese cross-language query expansion tasks.
It effectively improves the retrieval effect of Chinese-Vietnamese cross-language query expansion tasks, improves the reasoning and generation capabilities of multi-language pre-training models in low-resource language scenarios, and significantly improves retrieval performance.
Smart Images

Figure CN118673095A
Abstract
Description
Technical Field
[0001] The invention relates to a Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation, and belongs to the technical field of natural language processing. Background Art
[0002] Chinese-Vietnamese cross-language query expansion aims to add terms and concepts with the same semantics as Chinese query statements, and convert the expanded Chinese query statements into Vietnamese query statements. Chinese-Vietnamese cross-language query expansion is one of the core technologies to solve problems such as query topic drift and word mismatch. At the same time, effective Chinese-Vietnamese cross-language query expansion provides a solid foundation for downstream tasks such as Chinese-Vietnamese cross-language question answering and Chinese-Vietnamese cross-language information retrieval.
[0003] The present invention relates to a specific cross-language query expansion technology, namely, Chinese-Vietnamese cross-language query expansion. In recent years, significant research progress has been made in this technical field, and the mainstream methods include technology based on machine translation, method based on multilingual pre-trained language model, and method using large language model generation. In the method based on machine translation, the original query statement is converted into the target language through neural machine translation technology, and then query expansion is implemented according to the translated content. However, the performance of this method is deeply affected by the accuracy of machine translation. For resource-rich languages, the effect is relatively ideal due to the relatively small translation error; but for low-resource languages such as Vietnamese, the retrieval effect after expansion may be affected by inaccurate translation. In order to solve the above problems, some researchers have proposed a method based on multilingual pre-trained language model. The core concept of this method is that after expanding the original query in the source language, these expanded queries are mapped to a unified semantic space using multilingual pre-trained language models such as mBERT and mT5, thereby realizing cross-language query expansion. However, in a low-resource cross-language environment, existing multilingual pre-trained language models may encounter problems such as multilingual curse and language bias. With the rise and application of large language models such as ChatGPT, these models have shown significant results in query expansion tasks. At present, methods based on large language models mainly cover strategies such as generating relevant query variants, generating pseudo documents and keywords using preset templates, and performing thought chain reasoning to improve the quality of query results. Although large language models perform well in understanding and generating text contexts, they still face multiple challenges in cross-language query expansion tasks. First, large language models may produce hallucinations or fail to update in a timely manner, resulting in the generation of text containing irrelevant or misleading information. Secondly, due to the large number of parameters in large language models, the demand for computing resources is huge, which increases the difficulty of direct application in cross-language query expansion tasks. In addition, when dealing with low-resource languages, the reasoning and text generation capabilities of multilingual pre-trained models often fail to achieve the expected results. The present invention proposes a Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation. Through knowledge distillation and retrieval enhancement, the thought chain generation capability of the large language model and the retrieved external knowledge are injected into the multilingual pre-trained model with fewer parameters, thereby improving its thought chain generation capability. Experimental results on a self-built Chinese-Vietnamese query expansion dataset and two public datasets show that the proposed method effectively improves the retrieval effect of the cross-language query expansion task. Summary of the invention
[0004] The present invention provides a Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation, so as to solve the problems that large-scale language models have a huge number of parameters and high consumption of computing resources, and are difficult to be directly applied to cross-language query expansion tasks; and the reasoning and generation capabilities of multilingual pre-trained models are poor in low-resource language scenarios.
[0005] The technical solution of the present invention is: a Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation. The specific steps of the Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation are as follows:
[0006] Step 1, collect query document data from Chinese-Vietnamese Wikipedia and Vietnam News Network, and collect Chinese-Vietnamese cross-language question-answering public datasets, and then pre-process the data to form the experimental dataset of the present invention;
[0007] Step 2: Based on Step 1, through knowledge distillation and retrieval enhancement, the thought chain generation capability of the large-scale language model and the retrieved external knowledge are injected into the multilingual pre-training model with fewer parameters, thereby improving its thought chain generation capability;
[0008] Step 3. Based on Step 2, the multilingual pre-trained model is fine-tuned on the Chinese-Vietnamese retrieval dataset to improve the performance of the model in Chinese-Vietnamese cross-language retrieval and improve the retrieval effect of the Chinese-Vietnamese cross-language query expansion task.
[0009] Furthermore, the specific steps of Step 1 are:
[0010] Step 1.1, the present invention collects corresponding data from Wikipedia and Vietnam News Network, and collects Chinese-Vietnamese cross-language question-answering public datasets. In order to complete the Chinese-Vietnamese cross-language query expansion, 106,266 aligned Chinese-Vietnamese cross-language query document pairs are finally constructed;
[0011] Step 1.2, for Wikipedia and News Network data, the present invention extracts document data Dc and Dv from Chinese and Vietnamese Wikipedia pages. The present invention obtains Chinese query Qc(i) through Chinese data document Dc, and uses cosine similarity to calculate the similarity between the query statement and the document by cross-language word embedding between Chinese query Qc(i) and Vietnamese document Dv(j). If the embedding result is greater than a preset threshold β, the Chinese query and Vietnamese document are regarded as similar language pairs. This method realizes the alignment of the relevant languages of Chinese query and Vietnamese document;
[0012] Step 1.3. For the Chinese-Vietnamese cross-language question-answering public dataset, the present invention extracts Chinese to Vietnamese (zh-vi) and Vietnamese to Chinese (vi-zh) data from the Chinese-Vietnamese cross-language question-answering dataset, obtains the Chinese and Vietnamese queries Qc(i), Qv(i) and the related Vietnamese and Chinese texts Dv(j), Dc(j), and uses this method to construct a Chinese-Vietnamese query expansion dataset.
[0013] Furthermore, the Step 2 includes three new query expansion task modules: a thought chain generation module, a retrieval enhancement module and a cross-language query expansion module; the specific steps are:
[0014] Step 2.1. A Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation, including three new query expansion task modules: thought chain generation module, retrieval enhancement module and cross-language query expansion module. The thought chain generation module constructs a zero-shot prompt template of the original Chinese query and inputs it into a large language model to generate a zero-shot thought chain. The large language model is used as a teacher model to distill its knowledge into the student model.
[0015] Step 2.2: The retrieval enhancement module obtains the most relevant k Vietnamese documents through the cross-language retrieval model. After that, the Chinese query statement and the relevant Vietnamese documents are input into the mT5 model for training through the retrieval enhancement prompt template. The goal of the training is to generate a zero-sample thinking chain, and to improve the reasoning and retrieval performance of the model through continuous iteration to correct and improve the chain thinking after retrieval enhancement.
[0016] Step 2.3: Use the query-thinking chain data pairs constructed in Step 2.1 and Step 2.2 and integrate them into the top k Vietnamese-related documents retrieved through the original query statement, concatenate the original Chinese query with the retrieval-enhanced thinking chain, and retrieve the most relevant Vietnamese documents by vectorizing the query and documents.
[0017] Furthermore, the specific steps of Step 2.1 are:
[0018] Step 2.1.1. Input Q for the Chinese-Vietnamese cross-language query expansion task C The present invention uses the method of generating corresponding thought chains according to query statements and constructing data pairs of query and thought chains accordingly. A prompt template named PromptCoT is specially designed, which can effectively guide large language models to generate the required thought chains.
[0019] CoT V =M(PromptCoT(Q C ))
[0020] Step 2.1.2, we constructed query-thinking chain data pairs on our own dataset and two public Chinese-Vietnamese datasets. We selected the Chinese query sentence Q from the dataset. C , and embed it into the PromptCoT prompt template to construct a complete prompt input. The prompt input is passed to the large language model M to generate the Vietnamese thought chain CoT corresponding to the Chinese query VThe generated Vietnamese thought chains are matched with the original Chinese query sentences to form the query-thought chain data pairs required for training and testing.
[0021] Furthermore, the specific steps of Step 2.2 are:
[0022] Step 2.2.1. Based on Step 2.1, for the query constructed - Thinking Chain Data CoT V , into the first k Vietnamese-related documents D retrieved by the original query V1 , D V2 …D Vk , and train the student model for cross-language query expansion. The retrieved Vietnamese documents are combined with the original Chinese query, and the present invention designs a prompt template PromptRAG for retrieval enhancement.
[0023]
[0024]
[0025] As a retrieval enhancement hint template designed for generation, it works by prioritizing and incorporating relevant segments selected from a set of retrieved Vietnamese documents. i Represents the encoding of the retrieval enhancement prompt corresponding to the i-th document among the first k retrieved documents. i Concatenated sequentially to form the overall context input to the decoder of the cross-language model.
[0026]
[0027] Step 2.2.2, during the training process, the present invention uses the retrieved relevant context document set T to enhance the model's capabilities. Through these documents, the cross-language model is trained to generate pseudo target reasoning CoT V .
[0028] Loss = -logmT5_Dec prop (CoT V |[PAD],T)
[0029] Where mT5_Dec prop (x|y) represents the probability of generating x under condition y. The thinking chain generation ability of the large language model is injected into the model through knowledge distillation, thereby optimizing its performance during the reasoning process. The cross-language model combines T and [PAD] to generate the output CoT QE .
[0030] CoT QE=mT5_Dec([PAD],T)
[0031] Output CoT QE Append to the original query Q C In this way, the query can be expanded.
[0032]
[0033] Furthermore, the specific steps of Step 2.3 are:
[0034] Step 2.3.1. For the original Chinese query Q C , the query reflects the user's initial information needs. In order to more comprehensively enrich the context of the query, the present invention adopts the retrieval enhanced thinking chain CoT QE Then, the original query and the retrieval enhanced CoT QE The content is spliced and vectorized to convert the content into a high-dimensional vector, which is convenient for comparison from the perspective of semantic similarity. The present invention uses a cosine similarity method to calculate semantic similarity.
[0035]
[0036] Furthermore, the specific steps of Step 3 are:
[0037] Step 3.1: Use the Chinese question part in the self-built dataset as the query part in the cross-language retrieval task, and use the Vietnamese documents corresponding to the query as the relevant documents in the retrieval task. Secondly, use the question part in the Chinese-Vietnamese cross-language question-answering dataset as the Chinese query, and use the Vietnamese correct answer content and related text segments as the relevant documents in the retrieval. Finally, we get an evaluation dataset of cross-language queries and related documents.
[0038] Step 3.2: Based on Step 3.1, the normalized discounted cumulative gain (NDCG), average precision (MAP), mean reciprocal rank (MRR) and recall are used as evaluation indicators for the cross-language query expansion task.
[0039]
[0040]
[0041]
[0042]
[0043] Step 3.3, based on Step 3.1, the present invention optimizes the Chinese-Vietnamese cross-language query expansion task. In the fine-tuning process, the Dropout size is 0.1, the Batch size is 4, the maximum input length is 1024, the maximum output length is 256, and the model is trained for 10 epochs. When the model obtains the best retrieval score on the validation set, the program evaluates it on the test set and records the corresponding score, and finally selects the best score as the result to save.
[0044] The beneficial effects of the present invention are:
[0045] 1. Aiming at the cross-language query expansion task of low-resource languages of Chinese and Vietnamese, a Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation is proposed, aiming to improve the retrieval performance of multilingual pre-trained models in the Chinese-Vietnamese cross-language query expansion task;
[0046] 2. The model was trained and tested based on a self-built Chinese-Vietnamese cross-language query expansion dataset, and further verified on two public cross-language question answering datasets, MLQA and XQuAD. The experimental results show that the proposed method can effectively improve the retrieval effect of the Chinese-Vietnamese cross-language query expansion task. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is the overall flow chart of the model in the present invention;
[0048] Figure 2 As an example of the present invention;
[0049] Figure 3 This is a model diagram of the present invention. DETAILED DESCRIPTION
[0050] Example 1: Figure 1-3 As shown, the Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation described in the invention has the following specific steps:
[0051] Step 1, collect query document data from Chinese-Vietnamese Wikipedia and Vietnam News Network, and collect Chinese-Vietnamese cross-language question-answering public datasets, and then pre-process the data to form the experimental dataset of the present invention;
[0052] As a preferred embodiment of the present invention, the specific steps of Step 1 are:
[0053] Step 1.1, the present invention collects corresponding data from Wikipedia and Vietnam News Network, and collects Chinese-Vietnamese cross-language question-answering public datasets. In order to complete the Chinese-Vietnamese cross-language query expansion, 106,266 aligned Chinese-Vietnamese cross-language query document pairs are finally constructed;
[0054] Step 1.2, for Wikipedia and News Network data, the present invention extracts document data Dc and Dv from Chinese and Vietnamese Wikipedia pages. The present invention obtains Chinese query Qc(i) through Chinese data document Dc, and uses cosine similarity to calculate the similarity between the query statement and the document by cross-language word embedding between Chinese query Qc(i) and Vietnamese document Dv(j). If the embedding result is greater than a preset threshold β, the Chinese query and Vietnamese document are regarded as similar language pairs. This method realizes the alignment of the relevant languages of Chinese query and Vietnamese document;
[0055] Step 1.3, for the Chinese-Vietnamese cross-language question-answering public dataset, the present invention extracts the data from Chinese to Vietnamese (zh-vi) and Vietnamese to Chinese (vi-zh) from the Chinese-Vietnamese cross-language question-answering dataset, obtains the Chinese and Vietnamese queries Qc(i), Qv(i) and the related Vietnamese and Chinese texts Dv(j), Dc(j), and constructs the Chinese-Vietnamese query expansion dataset through this method. The final dataset statistics are shown in Table 1.
[0056] Table 1. Retrieval training and evaluation dataset settings
[0057]
[0058] Step 2: Based on Step 1, through knowledge distillation and retrieval enhancement, the thought chain generation ability of the large-scale language model and the retrieved external knowledge are injected into the multilingual pre-training model with fewer parameters, thereby improving its thought chain generation ability.
[0059] As a preferred solution of the present invention, Step 2 includes three new query expansion task modules: a thought chain generation module, a retrieval enhancement module and a cross-language query expansion module; the specific steps of Step 2 are:
[0060] Step 2.1: The thought chain generation module constructs a zero-shot prompt template of the original Chinese query and inputs it into a large language model to generate a zero-shot thought chain. The large language model is used as a teacher model to distill its knowledge into the student model.
[0061] Step 2.2: The retrieval enhancement module obtains the most relevant k Vietnamese documents through the cross-language retrieval model. After that, the Chinese query statement and the relevant Vietnamese documents are input into the mT5 model for training through the retrieval enhancement prompt template. The goal of the training is to generate a zero-sample thinking chain, and to improve the reasoning and retrieval performance of the model through continuous iteration to correct and improve the chain thinking after retrieval enhancement.
[0062] Step 2.3: Use the query-thinking chain data pairs constructed in Step 2.1 and Step 2.2 and integrate them into the top k Vietnamese-related documents retrieved through the original query statement, concatenate the original Chinese query with the retrieval-enhanced thinking chain, and retrieve the most relevant Vietnamese documents by vectorizing the query and documents.
[0063] As a preferred embodiment of the present invention, the specific steps of Step 2.1 are:
[0064] Step 2.1.1. Input Q for the Chinese-Vietnamese cross-language query expansion task C The present invention uses the method of generating corresponding thought chains according to query statements and constructing data pairs of query and thought chains accordingly. A prompt template named PromptCoT is specially designed, which can effectively guide large language models to generate the required thought chains.
[0065] COT V =M(PromptCoT(Q C ))
[0066] Step 2.1.2, we constructed query-thinking chain data pairs on our own dataset and two public Chinese-Vietnamese datasets. We selected the Chinese query sentence Q from the dataset. C , and embed it into the PromptCoT prompt template to construct a complete prompt input. The prompt input is passed to the large language model M to generate the Vietnamese thought chain CoT corresponding to the Chinese query V The generated Vietnamese thought chains are matched with the original Chinese query sentences to form the query-thought chain data pairs required for training and testing.
[0067] As a preferred embodiment of the present invention, the specific steps of Step 2.2 are:
[0068] Step 2.2.1. Based on Step 2.1, for the query constructed - Thinking Chain Data CoT V , into the first k Vietnamese-related documents D retrieved by the original query V1 , D V2 …D Vk , and train the student model for cross-language query expansion. The retrieved Vietnamese documents are combined with the original Chinese query, and the present invention designs a prompt template PromptRAG for retrieval enhancement.
[0069]
[0070]
[0071] As a retrieval enhancement hint template designed for generation, it works by prioritizing and incorporating relevant segments selected from a set of retrieved Vietnamese documents. i Represents the encoding of the retrieval enhancement prompt corresponding to the i-th document among the first k retrieved documents. i Concatenated sequentially to form the overall context input to the decoder of the cross-language model.
[0072]
[0073] Step 2.2.2, during the training process, the present invention uses the retrieved relevant context document set T to enhance the model's capabilities. Through these documents, the cross-language model is trained to generate pseudo target reasoning CoT V .
[0074] Loss = -logmT5_Dec prop (CoT V |[PAD],T)
[0075] Where mT5_Dec prop (x|y) represents the probability of generating x under condition y. The thinking chain generation ability of the large language model is injected into the model through knowledge distillation, thereby optimizing its performance during the reasoning process. The cross-language model combines T and [PAD] to generate the output CoT QE .
[0076] CoT QE =mT5_Dec([PAD],T)
[0077] Output CoT QE Append to the original query Q C In this way, the query can be expanded.
[0078]
[0079] As a preferred embodiment of the present invention, the specific steps of Step 2.3 are:
[0080] Step 2.3.1. For the original Chinese query Q C , the query reflects the user's initial information needs. In order to more comprehensively enrich the context of the query, the present invention adopts the retrieval enhanced thinking chain CoT QE Then, the original query and the retrieval enhanced CoT QE The content is spliced and vectorized to convert the content into a high-dimensional vector, which is convenient for comparison from the perspective of semantic similarity. The present invention uses a cosine similarity method to calculate semantic similarity.
[0081]
[0082] Step 3. Based on Step 2, fine-tune the model on the Chinese-Vietnamese retrieval dataset to improve the performance of the model in Chinese-Vietnamese cross-language retrieval and improve the retrieval effect of the Chinese-Vietnamese cross-language query expansion task.
[0083] As a preferred embodiment of the present invention, the specific steps of Step 3 are:
[0084] Step 3.1: Use the Chinese question part in the self-built dataset as the query part in the cross-language retrieval task, and use the Vietnamese documents corresponding to the query as the relevant documents in the retrieval task. Secondly, use the question part in the Chinese-Vietnamese cross-language question-answering dataset as the Chinese query, and use the Vietnamese correct answer content and related text segments as the relevant documents in the retrieval. Finally, we get an evaluation dataset of cross-language queries and related documents.
[0085] Step 3.2: Based on Step 3.1, the normalized discounted cumulative gain (NDCG), average precision (MAP), mean reciprocal rank (MRR) and recall are used as evaluation indicators for the cross-language query expansion task.
[0086]
[0087]
[0088]
[0089]
[0090] Step 3.3, based on Step 3.1, the present invention optimizes the Chinese-Vietnamese cross-language query expansion task. In the fine-tuning process, the Dropout size is 0.1, the Batch size is 4, the maximum input length is 1024, the maximum output length is 256, and the model is trained for 10 epochs. When the model obtains the best retrieval score on the validation set, the program evaluates it on the test set and records the corresponding score, and finally selects the best score as the result to save.
[0091] In order to illustrate the detection effect of the present invention, a baseline method is used to compare the results of the present invention, specifically, a comparison is made with the following core query expansion method.
[0092] As a multilingual pre-training model, mBERT is unique in that it can learn and extract common language representations using rich multilingual corpora.
[0093] Q2D is a query expansion method based on large-scale language models. It enhances the query by leveraging large language models, thereby improving the performance of information retrieval.
[0094] CoT is a method to optimize search queries by generating chains of thoughts. In the alternating process of searching and extracting information, a precise answer is finally obtained.
[0095] CLCoT: This method is developed based on xCoT. It applies the thought chain generation technology to the cross-language environment and provides strong support for cross-language information retrieval tasks.
[0096] The experimental results of the Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation are shown in Table 2:
[0097] Table 2 Experimental results of Chinese-Vietnamese cross-language query expansion
[0098]
[0099] In addition, the present invention also verifies the effectiveness of the cross-language query expansion method under different multilingual models, specifically by comparing it with the following multilingual model baseline and adding the query expansion method of the present invention.
[0100] XLM-R is a multilingual pre-trained model based on the RoBERTa architecture. It effectively learns the semantic associations and commonalities between various languages through self-supervised learning on large-scale cross-lingual datasets, enabling it to perform understanding and generation tasks in a multilingual environment.
[0101] SBERT is a sentence embedding model based on the BERT architecture. Through supervised training on sentence pairs, it can efficiently generate semantically similar sentence embeddings for various natural language processing tasks such as similarity calculation, clustering, and retrieval.
[0102] MPNet is an improved pre-trained model that can better capture local and global contextual information by combining a masked language model and a sequence reordering strategy, thus performing well in downstream tasks.
[0103] MiniLM is a lightweight pre-trained model that aims to provide performance close to that of large models such as BERT while maintaining a small model size, suitable for scenarios with limited resources.
[0104] The experimental results of the effect analysis of adding cross-language query expansion methods under different multilingual models are shown in Table 3:
[0105] Table 3 Experimental results of Chinese-Vietnamese cross-language query expansion under different multilingual models
[0106]
[0107] Tables 2 and 3 show the performance of the method of the present invention on the Test2000 test set. Table 2 compares the effect of the method of the present invention with other query expansion methods based on the same cross-language model, and Table 3 shows the experimental results under different cross-language pre-training models. The method of the present invention has a certain improvement over other query expansion methods under the same multilingual model, and also shows different degrees of improvement under different models.
[0108] (1) Comparison of different query expansion methods under the same multilingual model: From the experimental results of Chinese-Vietnamese cross-language query expansion in Table 2, it can be seen that the method of the present invention has improved performance compared with the query expansion method of the baseline model. For cross-language query expansion, the monolingual query expansion method has a weak understanding of the target language, which makes the Q2D and CoT methods perform poorly on the Chinese-Vietnamese cross-language query expansion dataset. Although the cross-language method CLCoT can improve performance to a certain extent, its effect is still unsatisfactory due to the difficulty in capturing contextual relationships. Through knowledge distillation and retrieval enhancement, the method of the present invention injects the thinking chain generation ability of the large-scale language model and the retrieved external knowledge into a multilingual pre-trained model with fewer parameters, which not only improves the model's understanding of the target language, but also effectively utilizes the contextual relationships, making it perform better in the Chinese-Vietnamese cross-language query expansion task.
[0109] (2) Analysis of the effect of adding the cross-language query expansion method under different multilingual models: From the experimental results of Chinese-Vietnamese cross-language query expansion under different multilingual models 4-6 in Table 3, it can be seen that the method of the present invention shows significant performance improvement on each multilingual model. When using different baseline models, after adding the Chinese-Vietnamese cross-language query expansion method proposed in the present invention, the performance is improved to varying degrees. This shows that the method of the present invention has good adaptability and wide applicability, and can effectively improve the performance of Chinese-Vietnamese cross-language query expansion under a variety of multilingual models.
[0110] In order to verify the effectiveness of the proposed method, this experiment designed an ablation experiment and introduced different query expansion methods for comparative analysis. Among them, w / CLCoT means using cross-language thinking chain on the baseline model, and w / Ours means using the proposed method. The specific experimental results are shown in Table 4.
[0111] Table 4. Experimental results of Chinese-Vietnamese cross-language query expansion ablation
[0112]
[0113] From the analysis of the experimental results in Table 4, we can see that, first of all, after introducing the cross-language thought chain as the query expansion content, there is a significant improvement compared with the baseline model. This shows that in the Chinese-Vietnamese cross-language query expansion task, using the additional reasoning information generated by the large language model for the original query can significantly improve the accuracy of the retrieval results.
[0114] Secondly, when the method of the present invention is introduced, the experimental results are significantly better than the cross-language thought chain method. This shows that by injecting the thought chain generation ability of the large language model and the retrieved external knowledge into the multilingual pre-trained model with fewer parameters through knowledge distillation and retrieval enhancement, it is helpful to improve the performance of the Chinese-Vietnamese cross-language query expansion task. In summary, by comparing and analyzing the results of the ablation experiment, this experiment verifies the effectiveness of different modules in the model.
[0115] Performance evaluation on public datasets
[0116] In order to further verify the effectiveness and scalability of the proposed method, this experiment conducted a performance evaluation on the cross-language question answering tasks from Chinese to Vietnamese (Zh-Vi) and Vietnamese to Chinese (Vi-Zh) on the MLQA and XQuAD datasets. Tables 5 and 6 show the experimental results of the baseline model, cross-language thinking chain, and the proposed method on the MLQA and XQuAD datasets, respectively.
[0117] It can be seen from the experimental results in Table 5 and Table 6 that the method proposed in the present invention has improved performance compared with the baseline model and the cross-language thinking chain method. In particular, on the MLQA dataset, the NDCG and MRR from Vietnamese to Chinese increased by an average of 11.7% and 11.4%, and on the XQuAD dataset, the NDCG and MRR from Vietnamese to Chinese increased by an average of 7.4% and 8.3%. This shows that the method of the present invention not only has an improvement effect on the Chinese-Vietnamese cross-language query expansion task, but also shows a certain scalability in the Vietnamese-Chinese task. This fully proves that when dealing with a variety of cross-language query expansion tasks, the method of the present invention can more efficiently find cross-language answers and related documents.
[0118] Table 5 NDCG and MRR experimental results on the MLQA public dataset
[0119]
[0120] Table 6 NDCG and MRR experimental results on the XQuAD public dataset
[0121]
[0122] In addition, as shown in Tables 7 and 8, the proposed method has significant improvements in the MAP and Recall indicators from Vietnamese to Chinese on the MLQA and XQ-uAD datasets under all K values, indicating that it is more accurate in cross-language answer and related document retrieval.
[0123] Table 7 MAP and Recall experimental results on the MLQA public dataset
[0124]
[0125] Table 8 NDCG and MRR experimental results on the XQuAD public dataset
[0126]
[0127] 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 Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation, characterized by: The specific steps of the Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation are as follows: Step 1: Collect query document data and a Chinese-Vietnamese cross-language question-answering public dataset, then preprocess the data to form an experimental dataset; Step 2: Based on Step 1, through knowledge distillation and retrieval enhancement, the thought chain generation capability of the large-scale language model and the retrieved external knowledge are injected into the multi-language pre-training model with fewer parameters, thereby improving its thought chain generation capability; Step 3. Based on Step 2, the multilingual pre-trained model is fine-tuned on the Chinese-Vietnamese retrieval dataset to improve the performance of the model in Chinese-Vietnamese cross-language retrieval and improve the retrieval effect of the Chinese-Vietnamese cross-language query expansion task.
2. The Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation according to claim 1 is characterized by: The specific steps of Step 1 are: Step 1.1, collect relevant data from Wikipedia and Vietnam News Network, and collect Chinese-Vietnamese cross-language question-answering public datasets. In order to complete the Chinese-Vietnamese cross-language query expansion, several aligned Chinese-Vietnamese cross-language query document pairs are finally constructed; Step 1.2: For Wikipedia and News.com data, extract document data Dc and Dv from Chinese and Vietnamese Wikipedia pages; obtain Chinese query Qc(i) through Chinese data document Dc, and use cosine similarity to calculate the similarity between query statement and document by cross-language word embedding between Chinese query Qc(i) and Vietnamese document Dv(j). If the embedding result is greater than the preset threshold β, the Chinese query and Vietnamese document are regarded as similar language pairs. This method realizes the alignment of related languages of Chinese query and Vietnamese document; Step 1.
3. For the Chinese-Vietnamese cross-language question answering public dataset, extract the Chinese to Vietnamese (zh-vi) and Vietnamese to Chinese (vi-zh) data from the Chinese-Vietnamese cross-language question answering dataset, obtain the Chinese and Vietnamese queries Qc(i), Qv(i) and the related Vietnamese and Chinese texts Dv(j), Dc(j), and use this method to construct the Chinese-Vietnamese query expansion dataset.
3. The Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation according to claim 2 is characterized by: The Step 2 includes three new query expansion task modules: a thought chain generation module, a retrieval enhancement module, and a cross-language query expansion module; the specific steps are: Step 2.1, the thought chain generation module constructs a zero-shot prompt template of the original Chinese query and inputs it into the large language model to generate a zero-shot thought chain; the large language model is used as a teacher model to distill its knowledge into the student model; Step 2.2, the retrieval enhancement module obtains the most relevant k Vietnamese documents through the cross-language retrieval model; then, through the retrieval enhancement prompt template, the Chinese query statement and the relevant Vietnamese documents are input into the mT5 model for training; The goal of training is to generate zero-shot thought chains and improve the reasoning and retrieval performance of the model by continuously iteratively correcting and perfecting the chained thinking after retrieval enhancement; Step 2.3: Use the query-thinking chain data pairs constructed in Step 2.1 and Step 2.2 and integrate them into the top k Vietnamese-related documents retrieved through the original query statement, concatenate the original Chinese query with the retrieval-enhanced thinking chain, and retrieve the most relevant Vietnamese documents by vectorizing the query and documents.
4. The Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation according to claim 3 is characterized by: The specific steps of Step 2.1 are: Step 2.1.
1. Input Q for the Chinese-Vietnamese cross-language query expansion task C , used the method of generating corresponding thought chains according to query statements, and constructed data pairs of queries and thought chains accordingly; designed a prompt template named PromptCoT, which can effectively guide large language models to generate the required thought chains; CoT V =M(PromptCoT(Q C )) Step 2.1.2, we constructed query-thinking chain data pairs on our own dataset and two public Chinese-Vietnamese datasets; we selected Chinese query statements Q from the datasets. C , and embed it into the PromptCoT prompt template to construct a complete prompt input; the prompt input is passed to the large language model M to generate the Vietnamese thought chain CoT corresponding to the Chinese query V ; Match the generated Vietnamese thought chain with the original Chinese query sentence to form the query-thought chain data pairs required for training and testing.
5. The Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation according to claim 3 is characterized by: The specific steps of Step 2.2 are: Step 2.2.
1. Based on Step 2.1, for the query constructed - Thinking Chain Data CoT V , into the first k Vietnamese-related documents D retrieved by the original query V1 , D V2 …D Vk , in order to train the student model for cross-language query expansion; the retrieved Vietnamese documents are combined with the original Chinese query to design the retrieval enhancement prompt template PromptRAG; As a retrieval enhancement hint template designed for generation, its working mechanism is to preferentially read and incorporate relevant segments screened from a set of retrieved Vietnamese documents; T i Represents the code of the search enhancement prompt corresponding to the i-th document among the first k retrieved documents; All encoded retrieval enhancement cues T i Concatenate them sequentially to form the overall context input of the cross-language model decoder; Step 2.2.2: During the training process, the retrieved relevant context document set T is used to enhance the model’s capabilities. Through these documents, the cross-language model is trained to generate pseudo-target reasoning CoT. V ; Loss=-logmT5_Dec prop (CoT V |[PAD],T) Where mT5_Dec prop (x|y) represents the generation probability of x under condition y. The thought chain generation ability of the large language model is injected into the model through knowledge distillation, thereby optimizing its performance during the reasoning process. The cross-lingual model combines T and [PAD] to generate the output CoT QE ; CoT QE =mT5_Dec([PAD],T) Output CoT QE Append to the original query Q C On, thereby achieving the expansion of the query; 6. The Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation according to claim 3 is characterized by: The specific steps of Step 2.3 are: Step 2.3.
1. For the original Chinese query Q C , the query reflects the user's initial information needs; in order to more comprehensively enrich the context of the query, the retrieval-enhanced thinking chain CoT is adopted QE To expand the query content; Then, the original query and the retrieved enhanced CoT are QE The content is concatenated and vectorized to convert the content into a high-dimensional vector, which is convenient for comparison from the perspective of semantic similarity; the cosine similarity method is used to calculate the semantic similarity.
7. The Chinese-Vietnamese cross-language query expansion method based on retrieval enhancement and knowledge distillation according to claim 1 is characterized by: The specific steps of Step 3 are: Step 3.
1. Use the Chinese question part in the self-built dataset as the query part in the cross-language retrieval task, and use the Vietnamese documents corresponding to the query as the relevant documents in the retrieval task; secondly, use the question part in the Chinese-Vietnamese cross-language question-answering dataset as the Chinese query, and use the Vietnamese correct answer content and related text segments as the relevant documents in the retrieval; finally, obtain the evaluation dataset of cross-language queries and related documents; Step 3.2: Based on Step 3.1, the normalized discounted cumulative gain (NDCG), mean average precision (MAP), mean reciprocal rank (MRR) and recall are used as evaluation indicators for the cross-language query expansion task. Step 3.
3. Based on Step 3.1, the Chinese-Vietnamese cross-language query expansion task is optimized. During the fine-tuning process, the Dropout size is 0.1, the Batch size is 4, the maximum input length is 1024, the maximum output length is 256, and the model is trained for 10 epochs in total. When the model obtains the best retrieval score on the validation set, the program evaluates it on the test set and records the corresponding score, and finally selects the best score to save as the result.
Citation Information
Patent Citations
Method for calculating similarity of Chinese-Vietnamese text by fusing keywords and semantic features
CN112257453A
Event knowledge integrated Chinese-cross cross-language event retrieval method
CN117009458A
Multi-modal thinking chain reasoning method and device based on knowledge distillation
CN118014077A
Determining representative facts for a target entity
WO2023075890A1
Cited By
Power field SQL intelligent agent construction method based on KMDI chain
CN119166662A
Mode linking method and system in large-scale database scene
CN119377455A
Ancient Chinese understanding method based on large model
CN119378561A
Neural symbol collaborative distillation method for improving complex reasoning of small language model
CN119443166A
Large model knowledge distillation method based on anti-fact data enhancement and multi-view thinking chain
CN119721182A
