Multilingual common attention theme detection method based on mT5 and word frequency information entropy

By introducing word frequency information entropy and mT5's multilingual detection method into the topic model, the problem of common topic extraction in multilingual texts is solved, synonym redundancy is reduced, the quality and detection capabilities of subject words are improved, and cross-language culture is achieved theme identification.

CN118779443AActive Publication Date: 2024-10-15BEIJING INST OF TECH

Patent Information

Application Number
CN202410159540.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-04
Publication Date
2024-10-15
Estimated Expiration
2044-02-04

AI Technical Summary

Technical Problem

Existing topic models cannot effectively handle multilingual texts, making it difficult to extract topics of common concern across multiple languages. There are also synonym redundancies and cultural biases, making it difficult to improve the quality of topic words.

Method used

A multilingual common attention topic detection method based on mT5 and word frequency information entropy is adopted. By counting word frequency information entropy in different languages, mBERT is used for synonym aggregation to build a low-redundant common attention topic word extraction model, and mT5 is fine-tuned to improve topic words. Extract capabilities and evaluate the limitations of multilingual corpora through the OCTIS framework.

Benefits of technology

It realizes the extraction and sorting of subject words of common concern in different languages ​​and cultures, reduces the redundancy of output vocabulary, improves the quality and detection ability of subject words, and reduces the impact of cultural bias.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779443A_ABST
    Figure CN118779443A_ABST
Patent Text Reader

Abstract

The invention discloses a multilingual common attention theme detection method based on mT5 and word frequency information entropy, and belongs to the technical field of social media information mining. According to the method, a multi-language word frequency information entropy statistical method is adopted, the characteristic that topics concerned together are distributed more uniformly in multiple languages is fully considered, and extraction of subject terms concerned together by different cultures is realized; synonym aggregation is carried out by using mBERT, recognition of redundant vocabularies is realized in a vocabulary list construction process, and the redundancy degree of output vocabularies is reduced; a subject term extraction algorithm in BERTopic is improved, fine-tuned mT5 is used for extracting subject terms from a single document, traditional single-language subject detection is improved into a multi-language mode, and the problem of missing of potential value subject terms is avoided to a certain extent. The method is suitable for the technical field of social media information mining, improves the detection and recognition capability of the common attention subject, and improves the output quality of the subject term.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a statistical method based on a large language model and word frequency information entropy, and in particular to a multilingual common attention topic detection method based on mT5 (multilingual-t5) and word frequency information entropy, belonging to the technical field of social media information mining. Background Art

[0002] Different languages ​​and cultures show unique biases in paying attention to daily hot news. In a specific period, there are unique topic preferences around the world. It is found that identifying topics of common concern and topics of individual concern can reduce the impact of cognitive biases from different cultures, and then identify differences between different cultures, which has great potential value.

[0003] However, existing topic models cannot effectively highlight topics of common interest. For example, LDA (Latent Dirichlet Allocation), as a probabilistic generative model, can detect topic structure from text using Dirichlet distribution. HDP (Hierarchical Dirichlet process) introduces an infinite probability process to automatically infer topic structure. The BERTopic model uses SBERT (Sentence Bert) to create sentence embeddings and uses the c-tf-idf algorithm to extract topic words from clustered text. These models cannot effectively process multilingual text (BERTopic can support multiple languages, but multilingual input will increase the degree of output redundancy) and cannot fully emphasize common topics of interest across multiple languages. In addition, many keywords with similar meanings often appear in the output at the same time because they have similar frequencies or distributions in the corpus, which in turn causes serious redundancy.

[0004] Topic models all have a method to rank the quality of output topic words, but popular keywords often occupy a large proportion of the space in the front of the sequence, resulting in potentially valuable topic words being ranked in a more chaotic manner at the end of the output sequence. These factors not only continue the misleading of cultural attention bias on the output of topic models, but also lead to low-quality output.

[0005] Based on the above-mentioned defects of the prior art, this method proposes an improved method based on word frequency information entropy and mT5, which avoids synonym redundancy to a certain extent. Under the premise of supporting multilingual topic detection, it can extract topic words of common concern in different languages ​​and cultures. Summary of the invention

[0006] In view of the problem that the quality of subject words is difficult to improve due to ignoring the redundancy of multilingual synonyms and the attention bias of different cultures in the existing topic detection technology, the main purpose of the present invention is to disclose a multilingual common attention topic detection method based on mT5 and word frequency information entropy. This method aims at the word frequency distribution characteristics caused by the attention bias of different languages ​​and cultures, counts the frequency of words with specific meanings in different languages ​​and calculates the information entropy, and realizes the automatic sorting of multilingual common attention words in the output; constructs a low-redundancy common attention topic extraction model by reusing the BERTopic text clustering architecture, fine-tuning the mT5 single-document subject word extraction and mBERT (multilingual Bert) clustering synonyms; uses the OCTIS framework to evaluate the classic topic model and evaluate the limitations of the multilingual corpus. Improve the detection ability of common attention topics and improve the output quality of subject words.

[0007] The present invention discloses a multilingual common attention topic detection method based on mT5 and word frequency information entropy, comprising the following steps:

[0008] A multilingual common attention topic detection method based on mT5 and word frequency information entropy includes the following steps:

[0009] Step 1: Build a "document-topic word" dataset based on the BERTopic model;

[0010] Specifically, the steps include:

[0011] Step 1.1: Build a topic word extraction model based on BERTopic;

[0012] Take BERTopic as the baseline model, and use c-tf-idf and maximum marginal relevance algorithms to optimize the quality of topic words. Use the self-supervised HDBSCAN algorithm or the supervised KMeans algorithm to replace the BERTopic model vector clustering algorithm, and set relevant hyperparameters. Replace the text embedding model with a language model related to the task, and replace multilingual input with a multilingual model to obtain a topic word extraction model.

[0013] Fine-tuning mT5 through the dataset obtained from the subject word extraction model can stimulate mT5's potential and more efficient subject word extraction capabilities.

[0014] Step 1.2: Data collection, building a "document-keyword" dataset;

[0015] In the "Document-Keyword" dataset, documents include a collection of documents in five languages: "English", "Arabic", "Chinese", "Korean", and "Japanese", which are denoted as {Text en},{Text ar},{Text zh},{Text ko},{Text ja}.

[0016] For the keyword extraction model obtained in step 1.1, input the document set {Text i}, set a specific input batch size, and obtain single documents in five languages, as shown in formula (1):

[0017] SingleText i =HDBSCAN(UMAP(SBERT({Text i})))i∈{en,ar,zh,ja,ko} (1)

[0018] Embed the document collection {Text i}Get the embedding vector; reduce the dimension through the UMAP algorithm; then cluster through the HDBSCAN algorithm to obtain the aggregated document set SingleText.

[0019] For the documents in the aggregated document set SingleText, the c-tf-idf algorithm is used to obtain the subject words, and the results are tuned by the maximum marginal relevance algorithm to obtain the "document-subject word" data set, as shown in formula (2):

[0020] TopicWords i =MMR(c-tf-idf(SingleText i ))i∈{en,ar,zh,ja,ko} (2)

[0021] Among them, TopicWords indicates the topic words corresponding to the documents in five languages ​​finally obtained through BERTopic. Since the c-tf-idf algorithm needs to count the word frequency and inverse document frequency values ​​of multiple documents, a single document cannot be input to obtain the data set.

[0022] Step 2: Fine-tune mT5 based on FineTune or PrefixTune to train mT5's ability to extract subject words;

[0023] Step 2.1: Fine-tune mT5;

[0024] mT5 is an encoder-decoder language model parameterized as Where x represents a single text; y represents the generated keyword sequence; z is the concatenation of x and y (Concat(x, y); h <i represents the activation function of the previous i time steps; Y idxrepresents the index sequence corresponding to y; Φ is the initialization parameter of the pre-trained model mT5_multilingual_XLSum on the large language model integration website Huggingface. Then, the gradient of the target shown is updated using formula (3):

[0025]

[0026] Step 2.2: PrefixTune to fine-tune mT5;

[0027] Use the peft library to implement PrefixTuning, or prefix fine-tuning. PrefixTuning is one of the most widely used parameter-efficient tuning methods. Here, continuous word embeddings are used to optimize prompts instead of discrete tags. Initialize the trainable matrix P θ To store the prefix parameters. To prevent unstable optimization and mitigate the slight performance degradation, the matrix is ​​reparameterized and given by formula (4):

[0028] P θ [i,:]=MLP θ (P' θ [i,:]) (4)

[0029] Among them, P' θ It consists of a large feedforward neural network (MLP). It is necessary to set hyperparameters such as the number of model layers according to the model size. i represents the i-th time step. Here, only the prefix parameter θ needs to be trained. P θ [i,:] refers to all parameters of the fine-tuned model.

[0030] The final model fine-tuning method is selected based on the size of the "document-topic word" dataset and the model fine-tuning effect. The model fine-tuning effect refers to the proportion of topic words predicted by the fine-tuned model to the corresponding topic words in the test set. If the model effect after PrefixTune is close to or higher than the model effect after FineTune, select PrefixTune, which takes less time, to fine-tune subsequent datasets of similar specifications. Otherwise, use FineTune for fine-tuning.

[0031] Step 3: Based on word frequency information entropy and mBERT, construct a topic word list of the dataset;

[0032] Step 3.1: Synonym aggregation based on mBERT;

[0033] First, the input news text dataset is preprocessed, including deleting special characters, punctuation marks, stop words, and performing word segmentation to ensure that the format of the dataset is unified and consistent. Then mBERT encoding is performed: the preprocessed dataset is encoded using the pre-trained mBERT model. Each synonym in each language is converted into a BERT vector representation, as shown in formula (5):

[0034]

[0035] in Represents word i Vectorized representation by mBERT, for the synonym Word extracted by mT5 i , by calculating its BERT representation space and other vocabulary words in the text j The cosine similarity of is, as shown in formula (6), to determine the most similar synonyms.

[0036]

[0037] Similarity(Word i , Word j ) indicates the word Word i , Word j Embedded word vector The cosine similarity between them is used to aggregate all synonyms according to the cosine similarity, and the synonyms with high similarity are classified into one category. The synonyms are grouped using a clustering algorithm or a tree structure. For the grouped and aggregated synonyms, one of them is taken as a representative word and translated into the language form we need for display.

[0038] Step 3.2: Based on information entropy, perform word frequency statistics of the subject words;

[0039] Using the Shannon entropy of word frequency in different languages, that is, frequency entropy, we construct a common attention word list and sort the items. n ={w n1 ,w n2 ,…w nj}. In the process of constructing the word list for translation and synonym merging, each word w ni is mapped to its synonymous representative word W ni The synonymous representative word exists in the set S n = {W n1 ,W n2 ,…W nq}. For the set S n The representative word W after synonymous merger is W.ni Every synonym of w n The frequency of occurrence is counted and recorded as F lw The probability of a synonym of W appearing in language l is shown in formula (7):

[0040]

[0041] Among them, P lw represents the probability of a synonym of W appearing in a specific language l, where L is the total number of languages, and F iw represents the frequency of synonyms of W in language i. Then the frequency entropy E of synonymous representative word W in each language is W , as shown in formula (8):

[0042]

[0043] By the frequency entropy E W Sort and construct a common topic word sorting table T co-concerned .

[0044] Step 4: Based on the fine-tuned mT5 and thesaurus, output the predicted multilingual common attention topics;

[0045] For the constructed BERTopic model, the UMAP algorithm and HDBSCAN algorithm in BERTopic are reused to cluster documents.

[0046] For the clustered document clusters, the c-tf-idf algorithm used by the original BERTopic to process the clustered document clusters is replaced with the mT5 fine-tuned in step 2 to extract multilingual single-document topic words. The number of output words is customized when fine-tuning mT5. This realizes the multi-document multilingual topic clustering detection function based on the combination of BERTopic document clustering and single-document topic word extraction mT5 model. For the single-document topic word set output by the softmax function of the last layer of the mT5 model, use T co-concerned The keyword ranking table is sorted and filtered to obtain the final output, realizing the detection of multilingual, low-redundancy, and commonly concerned keywords. It improves the detection ability of commonly concerned topics and improves the output quality of keywords.

[0047] Beneficial Effects

[0048] Compared with the prior art, the method of the present invention has the following advantages:

[0049] 1. The present invention discloses a multilingual common topic detection method based on mT5 and word frequency information entropy, which adopts the statistical method of multilingual word frequency information entropy, fully considers the characteristic that common topics are distributed relatively evenly in multiple languages, and realizes the extraction of common topics of different cultures.

[0050] 2. The present invention discloses a multilingual common topic detection method based on mT5 and word frequency information entropy, which uses mBERT for synonym aggregation, realizes the recognition of redundant vocabulary in the process of constructing the vocabulary list, and reduces the redundancy of output vocabulary.

[0051] 3. The present invention discloses a multilingual common topic detection method based on mT5 and word frequency information entropy, improves the topic extraction algorithm in BERTopic, uses the fine-tuned mT5 to extract topic words from a single document, and improves the traditional single-language topic detection to a multilingual mode, thereby avoiding the problem of missing potential valuable topic words to a certain extent, improving the detection and recognition capabilities of common topics, and enhancing the output quality of topic words. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 Schematic diagram of the architecture of a multilingual common attention topic detection method based on mT5 and word frequency information entropy disclosed in this embodiment.

[0053] Figure 2 The present invention discloses a flow chart of a multilingual common attention topic detection method based on mT5 and word frequency information entropy. DETAILED DESCRIPTION

[0054] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. The technical problems solved by the technical solution of the present invention and the beneficial effects are also described. It should be noted that the described embodiments are only intended to facilitate the understanding of the present invention and do not have any limiting effect on it.

[0055] This embodiment discloses a multilingual common attention topic detection method based on mT5 and word frequency information entropy, such as Figure 1 As shown in the figure, it contains 3 parts. First, the adjusted BERTopic text clustering architecture is used to realize the model's ability to cluster the text first and then extract the topic words in sequence. Secondly, the fine-tuned mT5 already has the ability to extract topic words on multilingual single texts. Here, the topic word extraction of the clustered text is used. Finally, the proposed topic word table based on word frequency information entropy is used to detect and filter multilingual common topic words. This process is still convenient for the expansion of other functions, and can perform synonym deduplication and conversion output of specific languages.

[0056] Take the news dataset in five languages ​​obtained from news websites such as Al Jazeera, China News, and BBC as an example. It contains three major themes: sports, technology, and economy. The corresponding common events are: "2022 World Cup Final", "Chatgpt4.0 Release", and "IMF Releases World Economic Outlook". On average, there are one thousand documents in each language, and the number of words in each document ranges from 600 to 2000 characters. Figure 2 As shown, the following steps are included:

[0057] Step 1: Build a "document-topic word" dataset based on the BERTopic model;

[0058] Step 1.1: Build a topic word extraction model based on BERTopic.

[0059] BERTopic is used as a benchmark model, and c-tf-idf and MMR (Maximal Marginal Relevance) algorithms are used to optimize the quality of topic words. The dataset obtained by the BERTopic model is used to fine-tune mT5 to stimulate mT5's potential and more efficient topic word extraction capabilities. The text embedding model is replaced with a multilingual Bert model.

[0060] In the "Document-Keyword" dataset, documents include a collection of documents in five languages: "English", "Arabic", "Chinese", "Korean", and "Japanese", corresponding to {Text en},{Text ar},{Text zh},{Text ko},{Text ja}.

[0061] Secondly, modify the model vector clustering algorithm and set related hyperparameters. After the document is vectorized by SBERT, the vector set {V text}, the original BERTopic model uses the HDBSCAN algorithm to implement unsupervised clustering, which needs to be replaced by the KMeans algorithm to specify the number of clusters.

[0062] Step 1.2: Data collection.

[0063] For the constructed model BERTopic, input document collection {Text i}, set a specific input BatchSize, and obtain single documents in five languages, as shown in formula (1):

[0064] SingleText i =HDBSCAN(UMAP(SBERT(Text i)))i∈{en,ar,zh,ja,ko} (1)

[0065] As shown in formula (2), the topic words are obtained through the c-tf-idf algorithm, and the results are tuned through the MMR (Maximal Marginal Relevance) algorithm to obtain the "document-topic word" data set:

[0066] TopicWords i =MMR(c-tf-idf(SingleText i ))i∈{en,ar,zh,ja,ko} (2)

[0067] Since the c-tf-idf algorithm needs to calculate the tf and idf values ​​of multiple documents, a single document cannot be input to obtain the data set. Here, the BatchSize value is set to 30 according to the data set size to improve the effect of the c-tf-idf algorithm.

[0068] Step 2: Fine-tune mT5 based on FineTune or PrefixTune to train mT5's keyword extraction capabilities.

[0069] Step 2.1: Fine-tune using FineTune.

[0070] mT5 is an encoder-decoder language model parameterized as Where x represents a single text Text, and y represents the generated topic word sequence TopicWords. Assume that z is the concatenation of x and y Concat(x, y), h <i Y represents the activation function of the previous i time steps. idx Represents the index sequence corresponding to y. The initialization of Φ comes from the parameters of the pre-trained model mT5_multilingual_XLSum on the large language model website Huggingface. In order to handle the parts that are less than the maximum input and output length, the mask is padded with 0 and the label is padded with -100 to ensure that the attention and cross entropy losses ignore these parts. Subsequently, the gradient update is performed on the target shown in the following formula (3):

[0071]

[0072] Step 2.2: Fine-tune using PrefixTune.

[0073] PrefixTuning is one of the most widely used parameter-efficient tuning methods, where continuous word embeddings are used to optimize hints instead of discrete tags. Initialize the trainable matrix P θTo store the prefix parameters. To prevent unstable optimization and mitigate the slight performance degradation, the matrix is ​​reparameterized and given by formula (4):

[0074] P θ [i:]=MLP θ (P′ θ [i,:]) (4)

[0075] Among them, P' θ It is composed of a large feedforward neural network (MLP). It is necessary to set appropriate hyperparameters such as the number of model layers (depending on the model size. Here, a 5-layer fully connected neural network is used). i represents the i-th time step. Here, only the prefix parameter θ needs to be trained. P θ [i,:] refers to all parameters of the fine-tuned model.

[0076] From the perspective of data set size, the data set specification of this embodiment is relatively small. In addition, the final model fine-tuning method should be selected according to the model fine-tuning effect. The model fine-tuning effect refers to the proportion of the subject words predicted by the fine-tuned model to the corresponding subject words in the test set. If the model effect after PrefixTune is close to or higher than the model effect after FineTune, PrefixTune with less time expenditure is selected to fine-tune the subsequent data sets of similar specifications, otherwise FineTune is used for fine-tuning.

[0077] Step 3: Construct a topic vocabulary based on word frequency information entropy and mBERT.

[0078] Step 3.1: Synonym aggregation based on mBERT.

[0079] First, the test corpus is preprocessed, including deleting special characters, punctuation marks, stop words, etc., and performing word segmentation. Ensure that the format of the dataset is unified and consistent. Then mBERT encoding is performed: the preprocessed synonym dataset is encoded using the pre-trained mBERT model. For each synonym in each language, it is converted into a BERT vector representation, as shown in formula (5):

[0080]

[0081] in Represents word i Vectorized representation by mBERT, for the synonym Word extracted by mT5 i , by calculating its BERT representation space and other vocabulary words in the text j The cosine similarity of (as shown in formula (6)) is used to find other synonyms that are most similar to it.

[0082]

[0083] Similarity(Word i , Word j ) indicates the word Word i , Word j Embedded word vector The cosine similarity between them is used to aggregate all synonyms according to the cosine similarity, and the synonyms with high similarity are classified into one category. Use clustering algorithms (such as k-means) or tree structures to group synonyms. For the grouped and aggregated synonyms, take one of them as a representative word and translate it into the language form we need for display.

[0084] Step 3.2: Frequency statistics of topic words based on information entropy.

[0085] The Shannon entropy of word frequency in different languages ​​(hereinafter referred to as frequency entropy) is used to construct a common attention word list and sort the items. n ={w n1 ,w n2 ,…w nj}. In the process of constructing the word list for translation and synonym merging, each word w ni is mapped to its synonymous representative word W ni The synonymous representative word exists in the set S n = {W n1 ,W n2 ,…W nq}. For the set S n The elements in (representative words after synonymous merging) W, the language l W ni Every synonym of w n The frequency of occurrence is counted and recorded as F lw Therefore, the probability of a synonym of W appearing in language l is as shown in formula (7):

[0086]

[0087] Among them, P lw represents the probability of a synonym of W appearing in a specific language l, where L is the total number of languages, and F iw represents the frequency of synonyms of W in language i. Then the frequency entropy E of synonymous representative word W in each language is W Given by formula (8):

[0088]

[0089] By calculating the information entropy E WWe can construct a common topic word ranking table T co-concerned .

[0090] Step 4: Multilingual common attention topic prediction output based on mT5 and word frequency information entropy.

[0091] Step 4.1: Document clustering based on BERTopic and mT5 topic word output.

[0092] First, the documents are clustered using the UMAP (Uniform, Manifold, Approximation, Projection) algorithm and the HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise) algorithm implemented in BERTopic.

[0093] For the clustered document clusters, the c-tf-idf algorithm used by the original BERTopic to process the clustered document clusters is replaced with the mT5 model fine-tuned in step 2 to extract multilingual single-document topic words. The number of output words can be customized when fine-tuning mT5. Here, it is defined as 10 according to the number of documents and topic words. This realizes the multi-document multilingual topic cluster detection function based on the combination of BERTopic document clustering and single-document topic word extraction mT5 model.

[0094] Step 4.2: Vocabulary filtering output.

[0095] The output topic words of the softmax function in the last layer of the model need to be obtained from T co-concerned The table is filtered and sorted, and the final output obtained is as follows:

[0096] Topic1:Qatar,World Cup,football,Argentina,France,Lussel……

[0097] Topic2:Chatgpt,openai,Intelligence,chat,models,technology,Revolution……

[0098] Topic3:IMF,world,economy,recovery,decline,slowdown,global,US……

[0099] It can be found that the topic words with high frequency information entropy are ranked at the top of the output, which is highly consistent with the content of the common attention event. co-concernedThe aggregation of synonyms has been realized. In the process of improving the traditional monolingual topic detection to multilingual mode, the redundancy of output synonyms has been greatly reduced, the detection and discrimination capabilities of topics of common concern and topics of individual concern in different languages ​​and cultures have been improved, and the output quality of topic words has been improved.

[0100] The specific description above further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A multilingual common attention topic detection method based on mT5 and word frequency information entropy, characterized in that: The following steps are involved: Step 1: Build a "document-topic word" dataset based on the BERTopic model; Step 2: Fine-tune mT5 based on FineTune or PrefixTune to train mT5's ability to extract subject words; Step 3: Based on word frequency information entropy and mBERT, construct a topic word list of the dataset; Step 4: Based on the fine-tuned mT5 and thesaurus, output the predicted multilingual common attention topics.

2. The method for detecting multilingual common topics of interest based on mT5 and word frequency information entropy as claimed in claim 1, characterized in that: The implementation method of step one is: Step 1.1: Build a topic word extraction model based on BERTopic; Take BERTopic as the benchmark model, and use c-tf-idf and maximum marginal relevance algorithms to optimize the quality of topic words. Use the self-supervised HDBSCAN algorithm or the supervised KMeans algorithm to replace the BERTopic model vector clustering algorithm, and set related hyperparameters. Replace the text embedding model with a language model related to the task, and replace multilingual input with a multilingual model to obtain a topic word extraction model. Step 1.2: Data collection, building a "document-keyword" dataset; In the "Document-Keyword" dataset, documents include "English", "Arabic", "Chinese", "Korean", and "Japanese" document collections, which are denoted as {Text en },{Text ar },{Text zh },{Text ko },{Text ja }; For the keyword extraction model obtained in step 1.1, input the document set {Text i }, set a specific input batch size, and obtain single documents in five languages, as shown in formula (1): <h2 style=";text-align:left;direction:ltr">SingleText<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> =HDBSCAN(UMAP(SBERT({Text<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr">}))) i∈{en,ar,zh,ja,ko} (1) Embed the document collection {Text i }Get the embedding vector; reduce the dimension by using the UMAP algorithm; then perform clustering by using the HDBSCAN algorithm to obtain the aggregated document set SingleText; For the documents in the aggregated document set SingleText, the c-tf-idf algorithm is used to obtain the subject words, and the results are tuned by the maximum marginal relevance algorithm to obtain the "document-subject word" data set, as shown in formula (2): <h2 style=";text-align:left;direction:ltr">TopicWords<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> =MMR(c-tf-idf(SingleText<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> )) i∈{en,ar,zh,ja,ko} (2) Among them, TopicWords indicates the topic words corresponding to the documents in five languages ​​finally obtained through BERTopic. Since the c-tf-idf algorithm needs to count the word frequency and inverse document frequency values ​​of multiple documents, a single document cannot be input to obtain the data set.

3. The method for detecting multilingual common topics of interest based on mT5 and word frequency information entropy as claimed in claim 2, characterized in that: The implementation method of step 2 is: Step 2.1: Fine-tune mT5; mT5 is an encoder-decoder language model parameterized as Where x represents a single text; y represents the generated keyword sequence; z is the concatenation of x and y (Concat(x, y); h<i represents the activation function of the first i time steps; Y idx represents the index sequence corresponding to y; Φ is the initialization parameter of the pre-trained model mT5_multilingual_XLSum on the large language model integration website Huggingface; then the gradient of the target shown is updated using formula (3): Step 2.2: PrefixTune to fine-tune mT5; Use the peft library to implement PrefixTuning, or prefix fine-tuning; PrefixTuning is one of the most widely used parameter-efficient tuning methods. Here, continuous word embeddings are used to optimize prompts instead of discrete tags; initialize the trainable matrix P θ to store the prefix parameters; to prevent unstable optimization and mitigate the slight performance degradation, the matrix is ​​reparameterized and given by formula (4): P θ [i,:]=MLP θ (P′ θ [i,:]) (4) Among them, P′ θ It consists of a large feedforward neural network (MLP). It is necessary to set hyperparameters such as the number of model layers according to the model size. i represents the i-th time step. Here, only the prefix parameter θ needs to be trained. P θ [i,:] refers to all parameters of the fine-tuned model; The final model fine-tuning method is selected based on the size of the "Document-Keyword" dataset and the model fine-tuning effect. The model fine-tuning effect refers to the ratio of the key words predicted by the fine-tuned model to the corresponding key words in the test set. If the model effect after PrefixTune is close to or higher than the model effect after FineTune, PrefixTune, which takes less time, is selected to fine-tune subsequent datasets of similar specifications. Otherwise, FineTune is used for fine-tuning.

4. The method for detecting multilingual common topics of interest based on mT5 and word frequency information entropy as claimed in claim 3, characterized in that: The implementation method of step three is: Step 3.1: Synonym aggregation based on mBERT; First, the input news text dataset is preprocessed, including deleting special characters, punctuation marks, stop words, and performing word segmentation to ensure that the format of the dataset is unified and consistent; then mBERT encoding is performed: the preprocessed dataset is encoded using the pre-trained mBERT model; each synonym in each language is converted into a BERT vector representation, as shown in formula (5): in Represents word i Vectorized representation by mBERT, for the synonym Word extracted by mT5 i , by calculating its BERT representation space and other vocabulary words in the text j The cosine similarity of is shown in formula (6), and the other synonyms that are most similar to it are determined; Similarity(Word i , Word j ) indicates the word Word i , Word j Embedded word vector The cosine similarity between them is used to aggregate all synonyms according to the cosine similarity, and the synonyms with high similarity are classified into one category; the synonyms are grouped using a clustering algorithm or a tree structure; for the grouped and aggregated synonyms, one of them is taken as a representative word and translated into the language form we need for display; Step 3.2: Based on information entropy, perform word frequency statistics of the subject words; Using the Shannon entropy of word frequency in different languages, that is, frequency entropy, we construct a common attention word list and sort the items; the words contained in the nth topic are Topic n ={w n1 , w n2 , ...w nj }; In the process of constructing the word list for translation and synonym merging, each word w ni is mapped to its synonymous representative word W ni The synonymous representative word exists in the set S n = {W n1 , W n2 , ...W nq }; for the set S n The representative word W after synonymous merger is W. ni Every synonym of w n The frequency of occurrence is counted and recorded as F lw ; The probability of a synonym of W appearing in language l is shown in formula (7): Among them, P lw represents the probability of a synonym of W appearing in a specific language l, where L is the total number of languages, and F iw represents the frequency of synonyms of W in language i; then the frequency entropy E of synonymous representative word W in each language W , as shown in formula (8): By the frequency entropy E W Sort and construct a common topic word sorting table T co-concer .

5. The method for detecting multilingual common topics of interest based on mT5 and word frequency information entropy as claimed in claim 4, characterized in that: The implementation method of step 4 is: For the constructed BERTopic model, the UMAP algorithm and HDBSCAN algorithm in BERTopic are reused to cluster the documents; For the clustered document clusters, the c-tf-idf algorithm used by the original BERTopic to process the clustered document clusters is replaced with the mT5 fine-tuned in step 2 to extract multilingual single-document topic words. The number of output words is customized when fine-tuning mT5. This realizes the multi-document multilingual topic clustering detection function based on the combination of BERTopic document clustering and single-document topic word extraction mT5 model. For the single-document topic word set output by the softmax function of the last layer of the mT5 model, use T co-concerne The keyword sorting table is sorted and filtered to obtain the final output, realizing the detection of multilingual, low-redundancy, and commonly concerned keywords; improving the detection ability of commonly concerned topics and improving the output quality of keywords.

Citation Information

Patent Citations

  • Patent literature similarity measurement method based on ontology

    CN107247780A

  • Topic model optimization method based on information entropy

    CN108090231A

  • Topic feature text keyword extraction method

    CN108763213A

  • Natural language feature extraction method based on keyword-enhanced GRU and Kronecker

    CN113536804A

  • Text labeling method and device, electronic equipment and computer readable storage medium

    CN115640376A

Cited By

  • Method of cross-linguistic semantic information search in arrays of text documents

    RU2870581C1