Key phrase extraction method and system based on candidate expansion and hybrid expert ranking
By constructing a candidate set using a large language model and ranking it using a hybrid expert model with linguistic priors, the problems of insufficient candidate phrase coverage and limited semantic modeling capabilities are solved, achieving efficient and accurate key phrase extraction, which is suitable for large-scale document semantic indexing and information retrieval.
Patent Information
- Application Number
- CN202611387688.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-27
AI Technical Summary
Existing keyword extraction technologies suffer from insufficient candidate phrase coverage and limited semantic modeling capabilities, resulting in inadequate extraction accuracy and stability. Furthermore, directly calling large language models online is costly and has high latency, making them unsuitable for large-scale deployment.
A high-recall candidate set is constructed using a large language model, and ranked using a hybrid expert model with linguistic priors. A multi-task loss function is employed for optimization, and dual-path feature extraction and gating fusion mechanisms are utilized to reduce online inference costs and improve the accuracy and stability of key phrase extraction.
It improves candidate coverage while reducing online inference costs, enhances the accuracy and stability of key phrase extraction, and is suitable for application scenarios such as large-scale document semantic indexing, information retrieval, and retrieval enhancement generation.
Smart Images

Figure CN123180136A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing, specifically to a key phrase extraction method and system based on candidate expansion and hybrid expert ranking. It is an automatic key phrase extraction technology for document semantic indexing, used to extract representative key phrases from unstructured text through candidate phrase expansion, linguistic structure modeling and neural ranking. Background Technology
[0002] Keyword extraction, also known as key phrase extraction, is a fundamental task in natural language processing and information extraction. Its goal is to automatically identify words or phrases from a given text that summarize the text's theme, semantic content, or core information. Keywords often serve as a compact semantic index for documents and are widely used in information retrieval, content recommendation, and retrieval enhancement. With the continuous growth in the scale of digital documents and online content, how to efficiently and accurately extract representative keywords from large-scale unstructured text has become a crucial issue in intelligent text processing systems.
[0003] Existing keyword extraction methods mainly include statistical methods, graph model methods, and neural network methods. Statistical methods typically use surface features such as word frequency, inverse document frequency, and word position for ranking; graph model methods typically construct a graph structure based on word co-occurrence relationships and obtain keywords by calculating node importance; neural network methods typically employ sequence labeling, generative modeling, or candidate phrase ranking to perform semantic modeling of text and candidate phrases using pre-trained language models.
[0004] However, existing technologies still have certain limitations. While statistical and graphical methods are computationally efficient, they primarily rely on surface statistics or local co-occurrence relationships, making it difficult to fully understand the contextual semantics. Neural network methods based on candidate ranking can improve semantic modeling capabilities, but their performance is usually limited by the coverage of the candidate phrase set. Furthermore, candidate phrase sets often contain noisy candidates that are too short, too long, have incomplete boundaries, or have unstable syntactic structures. Existing ranking models do not adequately utilize linguistic structural information such as part-of-speech and phrase length, thus affecting the accuracy and stability of keyword extraction.
[0005] In recent years, Large Language Models (LLMs) have been used for keyword generation or candidate phrase expansion. They can generate more diverse candidate keywords based on text semantics, thereby improving candidate set coverage. However, directly calling LLMs online for keyword extraction usually suffers from high computational costs and long response latency, hindering large-scale deployment. Meanwhile, Hybrid Expert Models (HEMs) can select different expert networks for processing based on input features, offering advantages in conditional computation and expert division of labor. If the candidate expansion capability of LLMs can be combined with the efficient ranking capability of HEMs, and linguistic priors such as part-of-speech tagging and phrase length can be introduced during expert routing, it is expected that online inference costs can be reduced while improving candidate coverage, and the structure-awareness and overall accuracy of keyword extraction can be enhanced. Summary of the Invention
[0006] The technical problem this invention aims to solve is how to address the issues of insufficient candidate phrase coverage and limited semantic modeling capabilities in existing keyword extraction technologies. It provides a key phrase extraction method based on candidate expansion and hybrid expert ranking. This method constructs a high-recall candidate set through a large language model and utilizes a hybrid expert model with linguistic priors for ranking. This improves the accuracy and stability of key phrase extraction while reducing online inference costs and response latency, meeting the needs of applications such as large-scale document semantic indexing, information retrieval, and retrieval enhancement generation.
[0007] The present invention solves the above-mentioned technical problems through the following technical solution, and the present invention includes the following steps:
[0008] S1: Candidate Set Expansion and Linguistic Feature Engineering
[0009] A teacher model pool is formed by multiple heterogeneous large language models. Under a unified prompt template, a preliminary set of candidate key phrases for the input document is generated. After standardization, a global candidate phrase set is obtained. Linguistic prior features are extracted from each candidate phrase in the global candidate phrase set to obtain a linguistic prior representation vector. At the same time, the input document is paired with each candidate phrase and input into a pre-trained bidirectional deep semantic encoder to obtain a hidden layer sequence state representation matrix. The corresponding local semantic representation vector and document-level global semantic representation vector are obtained through dual-path feature extraction.
[0010] S2: Linguistic Information-Driven Hybrid Expert Network Ranking
[0011] The local semantic representation vector is concatenated with the linguistic prior representation vector to generate the routing input feature vector. This vector is then input into the router to calculate the routing probability distribution vector of each candidate phrase across all expert networks. Based on the routing probability distribution vector, a predetermined number of activated expert networks are selected to form an activated expert network set. Each activated expert network uses a KAN architecture to perform a high-order nonlinear mapping on the local semantic representation vector, followed by gated filtering and linear projection to obtain the expert network output vector. Finally, the output vectors of each activated expert network are weighted and summed using the routing probability distribution vector to obtain the hybrid expert network representation vector.
[0012] S3: Feature Fusion
[0013] Through a global-local gate control fusion mechanism, gate weights are calculated based on the hybrid expert network representation vector and the document-level global semantic representation vector. The gate weights are then used to fuse the hybrid expert network representation vector and the local semantic representation vector to obtain a comprehensive judgment representation vector. The prediction confidence of the phrases judged as true key phrases is then calculated based on the comprehensive judgment representation vector.
[0014] S4: Multi-tasking optimized output
[0015] A multi-task loss function is used to optimize all learnable parameters of the student candidate ranking model corresponding to the processing steps S1 to S3. During the inference stage, all candidate phrases are sorted in descending order according to the prediction confidence, and a preset number of candidate phrases at the top of the ranking are extracted as the final key phrases.
[0016] Furthermore, in step S1, the construction process of the global candidate phrase set is as follows:
[0017] S11: Assume that... Heterogeneous large language model Teacher model pool , No. A model Regarding the first Input documents The generated preliminary candidate key phrase set is ; By standardizing the processing function After performing lowercase conversion, punctuation removal, deduplication, and illegal format filtering on each preliminary candidate phrase set, the union of the results is taken to obtain the global candidate phrase set. , .
[0018] Furthermore, in step S1, the extraction process of the linguistic prior representation vector is as follows:
[0019] S121: Regarding The first in candidate phrases Candidate phrases are segmented and labeled with parts of speech (PTS). The PTS tag of the last word is selected as the PTS feature of the candidate phrase. Based on a pre-defined PTS tag dictionary, the PTS tags are converted into corresponding PTS category numbers, and the learnable PTS embedding matrix is queried using the PTS category numbers. , thus obtaining part-of-speech embedding vectors ;
[0020] S122: Simultaneously, count candidate phrases. Number of words contained The word count is mapped to a length category number based on a preset length range. And query the learnable length embedding matrix by length category number. , thus obtaining the length embedding vector ;
[0021] S123: Embed part-of-speech tags into vectors With length embedding vector By concatenating the vectors, we obtain the linguistic prior representation vector: , This indicates a splicing operation.
[0022] Furthermore, in step S1, a document group sampling mechanism is used to aggregate all candidate phrases originating from the same document into document-level phrase groups for batch processing; the specific process of dual-path feature extraction is as follows:
[0023] S13: The first Input documents and its candidate phrases Pairing, forming input pairs It is then input into a pre-trained bidirectional deep semantic encoder, which outputs the corresponding hidden layer sequence state representation matrix. ;
[0024] S14: First Path Extraction sequence start marker corresponding feature vector , as a local semantic representation vector ;
[0025] S15: Extracting the input document via the second path The set of hidden state sequences at each position within the set of position indices of all corresponding text chunks, after being processed by the mean pooling function. The document-level global semantic representation vector is calculated. ,in, For index variables, For the first The state vector at each position For input documents The set of position indices for all corresponding text blocks.
[0026] Furthermore, in step S2, the specific process for obtaining the active expert network set is as follows:
[0027] S21: Transform the local semantic representation vector with linguistic prior representation vectors Concatenate to generate the routing input feature vector Introducing the learnable weight matrix of the router With bias vector And through the normalized exponential function Calculate the routing probability distribution vector of the candidate phrase across all expert networks. ;
[0028] S22: Set the number of expert networks activated per session. According to the distribution vector Select the one with the highest probability The indices corresponding to each expert network form the set of activated expert networks. .
[0029] Furthermore, in step S2, the specific process for obtaining the filtered output vector is as follows:
[0030] S23: Let For input variables, For the input dimension index, For output dimension indices, the learnable edge activation function of the KAN architecture is defined as follows: ,in, For activation function, These are the corresponding base activation weights; Let be the highest order of the Chebyshev polynomial. For order variables, Indicates the first Chebyshev polynomials These are the learnable weights corresponding to the polynomial;
[0031] S24: Convert the local semantic representation vector Input the first KAN architecture The activation expert network is mapped to the first... The high-order nonlinear feature vectors corresponding to each activation expert network , introducing the first The two learnable gating weight matrices of the activation expert network are: and And the activation function is By performing element-wise multiplication Gated filtering is performed to obtain the gated feature vector. The gated feature vector is input into the linear projection layer and mapped back to the preset feature dimension to obtain the first... The output vector of the activation expert network .
[0032] Furthermore, in step S2, the process of obtaining the hybrid expert network representation vector is as follows:
[0033] S25: Extraction The corresponding number in the middle A probability scalar for activating an expert network For sets The output vectors of all activated expert networks are weighted and summed to obtain the final hybrid expert network representation vector. .
[0034] Furthermore, in step S3, the specific processing procedure is as follows:
[0035] S31: Introduce a learnable global-local control weight matrix and bias vector and the Sigmoid activation function ;
[0036] S32: Will and After concatenation, a linear transformation and sigmoid activation are performed to obtain a multidimensional gated weight vector. ;
[0037] S33: Utilize Adaptive weighted fusion is performed to obtain a comprehensive decision representation vector. ,in This is the result of subtracting 1 from each element of the vector;
[0038] S34: Introducing a learnable mapping matrix for the classification layer and bias scalar Calculate the first The prediction confidence level of each candidate phrase being identified as a true key phrase .
[0039] Furthermore, in step S4, the multi-task loss function The definition is as follows:
[0040] ;
[0041] in, For weight balancing hyperparameters, This represents the binary cross-entropy loss used for classification. This represents the candidate pair sorting loss used to optimize the order. This represents the global consistency loss used to ensure that the candidate phrases selected by the model are consistent with the topic of the input document. This refers to expert load balancing to prevent losses caused by routing collapse.
[0042] This invention also provides a key phrase extraction system based on candidate expansion and hybrid expert ranking, applied to the above-mentioned method, including:
[0043] The candidate set expansion and linguistic feature engineering module is used to generate a preliminary candidate key phrase set for the input document by forming a teacher model pool from multiple heterogeneous large language models under a unified prompt template. After standardization, a global candidate phrase set is obtained. Linguistic prior features are extracted from each candidate phrase in the global candidate phrase set to obtain a linguistic prior representation vector. At the same time, the input document is paired with each candidate phrase and input into a pre-trained bidirectional deep semantic encoder to obtain a hidden layer sequence state representation matrix. The corresponding local semantic representation vector and document-level global semantic representation vector are obtained through dual-path feature extraction.
[0044] The hybrid expert network ranking module concatenates the local semantic representation vector with the linguistic prior representation vector to generate a routing input feature vector. This vector is then input into the router to calculate the routing probability distribution vector of each candidate phrase across all expert networks. Based on this routing probability distribution vector, a predetermined number of activated expert networks are selected to form an activated expert network set. Each activated expert network uses a KAN architecture to perform a high-order nonlinear mapping on the local semantic representation vector, followed by gated filtering and linear projection to obtain the expert network output vector. Finally, the output vectors of each activated expert network are weighted and summed using the routing probability distribution vector to obtain the hybrid expert network representation vector.
[0045] The fusion module is used to calculate the gating weights based on the hybrid expert network representation vector and the document-level global semantic representation vector through a global-local gate control fusion mechanism, and then use the gating weights to fuse the hybrid expert network representation vector and the local semantic representation vector to obtain a comprehensive judgment representation vector. Based on the comprehensive judgment representation vector, the prediction confidence of the phrases judged as true key phrases is calculated.
[0046] The multi-task optimization output module is used to optimize all learnable parameters of the student candidate ranking model corresponding to the processing steps S1 to S3 end-to-end using a multi-task loss function. During the inference stage, all candidate phrases are sorted in descending order according to the prediction confidence, and a preset number of candidate phrases at the top of the ranking are extracted as the final key phrases.
[0047] Compared with existing technologies, this invention has the following advantages: This key phrase extraction method based on candidate expansion and hybrid expert ranking generates a candidate space and extracts lightweight linguistic prior features through an offline large language model pool. Then, it uses dual-path encoding features combined with linguistic structural priors to drive a hybrid expert network for refined ranking. Finally, it combines a gating fusion mechanism of global and local contexts and uses multi-task joint loss to optimize the model parameters end-to-end. This can improve the candidate coverage while reducing the online inference cost, avoiding the high latency and high cost problems caused by directly calling large language models online. Furthermore, it can utilize linguistic structural information to enhance the discrimination ability of different candidate phrases and has achieved good keyword extraction results on multiple public key phrase extraction datasets. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the model architecture of the key phrase extraction method based on candidate expansion and hybrid expert ranking in an embodiment of the present invention, wherein SwiGLU corresponds to the gated filtering part located after the ChebyKAN higher-order nonlinear mapping in step S24. Detailed Implementation
[0049] The embodiments of the present invention are described in detail below. These embodiments are implemented based on the technical solution of the present invention, and provide detailed implementation methods and specific operation processes. However, the scope of protection of the present invention is not limited to the following embodiments.
[0050] Example 1
[0051] like Figure 1 As shown, this embodiment provides a technical solution: a key phrase extraction method based on candidate expansion and hybrid expert ranking. First, a candidate space is generated using an offline large language model pool, and lightweight linguistic prior features are extracted. Then, a hybrid expert network is driven by dual-path encoding features combined with linguistic structural priors for refined ranking. Finally, a gating fusion mechanism combining global and local contexts is used, and multi-task joint loss is employed to optimize the model parameters end-to-end. This invention significantly improves the efficiency and accuracy of key phrase extraction while ensuring candidate coverage.
[0052] The specific processing procedure is as follows:
[0053] (1) Candidate set expansion and linguistic feature engineering
[0054] Depend on Heterogeneous large language model Teacher model pool Under the unified prompt template, for the first Input documents Extract. For the... A model In other words, It indicates that it is aimed at the first Input documents A preliminary set of candidate keyword phrases is generated. This is then processed using a normalization function. (Including lowercase conversion, removal of boundary punctuation, deduplication, and illegal format filtering), a high-coverage global candidate phrase set is constructed by taking the union of the sets. (Taking the union means summarizing the candidate phrases generated by different teacher models; all valid candidates generated by any teacher model are included in the global candidate set.) .
[0055] against The first in candidate phrases First, candidate phrases are segmented and labeled with parts of speech (PTS). The PTS tag of the last word is selected as the PTS feature of the candidate phrase. Based on a pre-defined PTS tag dictionary, the PTS tags are converted into corresponding PTS category numbers, and the learnable PTS embedding matrix is queried using the PTS category numbers. This yields the part-of-speech embedding vector:
[0056]
[0057] in, Candidate phrases The part-of-speech category number of the suffix.
[0058] At the same time, statistical candidate phrases Number of words contained The word count is mapped to a length category number based on a preset length range. And query the learnable length embedding matrix by length category number. This yields the length embedding vector:
[0059]
[0060] Part-of-speech embedding matrix and length embedding matrix All of these parameters are used as learnable parameters of the model and are updated through backpropagation during model training.
[0061] Finally, the two are joined together. Physical concatenation yields an explicitly structured linguistic prior representation vector: .
[0062] To fully preserve the document-specific tag distribution, this invention employs a document group sampling mechanism, aggregating all candidate phrases originating from the same document into document-level phrase groups for batch processing. In the dual-path semantic encoding stage, this invention will... Input documents and its candidate phrases Pairing, forming input pairs And input into a pre-trained bidirectional deep semantic encoder ( Figure 1 In DeBERTa-V3, the output is the corresponding hidden layer sequence state representation matrix. Based on this, the present invention designs a dual-path feature extraction: the first path extraction... Sequence start marker corresponding feature vector This is taken as the individual micro-semantic of the candidate phrase and defined as a local semantic representation vector. Second path definition For input documents The set of position indices of all corresponding text tokens, and the set of hidden state sequences at these positions are extracted. ,in For index variables, For the first The state vector at each position. Using the mean pooling function. The calculation yields a document-level global semantic representation vector. .
[0063] More specifically, in this embodiment, the first Input documents and its candidate phrases Pairing refers to matching input documents With candidate phrases Concatenate them into the same input sequence according to a preset order, for example:
[0064]
[0065] in, As the start marker of the sequence, Used as a separator between documents and candidate phrases.
[0066] The input sequence is then segmented and encoded to obtain the input identifier sequence and attention mask, which are then input into a bidirectional deep semantic encoder.
[0067] For example:
[0068] When the input document is "The model extracts keyphrases from scientific documents" and the candidate phrase is "keyphrase extraction", the constructed input sequence is:
[0069] [CLS]The model extracts keyphrases from scientific documents[SEP]keyphrase extraction[SEP]
[0070] More specifically, in the first path:
[0071] The bidirectional deep semantic encoder outputs a hidden layer sequence state representation matrix. Afterwards, according to Extract the matrix from the first position of the input sequence. The first hidden state vector And use it as a local semantic representation vector:
[0072]
[0073] This vector is used to represent the semantic association between the input document and the current candidate phrase.
[0074] In the second path:
[0075] Determine the index set based on the start and end positions of the document portion in the input sequence. The index set does not include , The positions of candidate phrases and filler markers; from Extract the hidden state vector corresponding to the index position and perform mean pooling to obtain the document-level global semantic representation vector:
[0076]
[0077] This vector is used to represent the overall topic semantics of the input document.
[0078] (2) Linguistic information-driven hybrid expert network ranking
[0079] Define the total number of elements contained in the system as follows: The expert network. The router first converts the local semantic representation vector... with linguistic a priori representation Concatenate to generate the routing input feature vector ,Right now Introducing the learnable weight matrix of the router. With bias vector And through the normalized exponential function Calculate the routing probability distribution vector of this phrase across all expert networks. The number of expert networks activated at one time is set to [number]. According to the distribution vector Select the one with the highest probability The indices corresponding to each expert network form the set of activated expert networks. .gather The activation expert network in the model adopts the KAN-SwiGLU architecture. Let... For input variables, For the input dimension index, For output dimension indexing, the learnable edge activation function of this architecture is defined as .in, For activation function, These are the corresponding base activation weights; Let be the highest order of the Chebyshev polynomial. For order variables, Indicates the first Chebyshev polynomials These are the learnable weights corresponding to the polynomial. The local semantic representation vector... Enter the first The ChebyKAN module (KAN architecture) that activates the expert network, after normalization and Chebyshev polynomial mapping, yields the _th The high-order nonlinear eigenvectors corresponding to each expert network Then the first... Two learnable gated weight matrices for an expert network and as well as Activation functions are achieved through element-wise multiplication. Gated filtering is performed to obtain the gated feature vector. The gated feature vector is input into the linear projection layer and mapped back to the preset feature dimension to obtain the output vector of the expert network. ,extract The corresponding number in the middle The probability scalar of an expert network For sets The output vectors of all expert networks are weighted and summed to obtain the final hybrid expert network representation vector. .
[0080] (3) Feature fusion and multi-task optimized output
[0081] This invention introduces a learnable global-local control weight matrix. and bias vector and the Sigmoid activation function .Will and After concatenation, linear transformation and activation are performed to calculate the multidimensional gating weight vector. ,use Adaptive weighted fusion is performed to obtain a comprehensive decision representation vector. ,in This is the result of subtracting 1 from each element of the vector. Finally, the learnable mapping matrix for the classification layer is introduced. and bias scalar Calculate the first The prediction confidence scalar of each candidate phrase being identified as a true key phrase. .
[0082] During model training, a joint multi-task loss target value is defined. .set up For weight balancing hyperparameters, This represents the binary cross-entropy loss used for classification. This represents the candidate pair sorting loss used to optimize the order. This represents the global consistency loss used to ensure that the candidate phrases selected by the model are consistent with the topic of the input document. This represents the expert load balancing loss to prevent route collapse. The final loss function is defined as: The system optimizes the parameters of the student candidate ranking model (including a bidirectional deep semantic encoder, router, expert network, global-local departmental control fusion module, and classification layer, but excluding the teacher's large language model) end-to-end based on the aforementioned loss function. All candidate phrases are sorted in descending order according to prediction confidence, and the top M candidate phrases are extracted as the final key phrases.
[0083] More specifically, the meaning and calculation method of each sub-loss are as follows:
[0084] 1. Candidate Pair Ranking Loss
[0085] For the same input document, real key phrases are used as positive candidate phrases. Non-key phrases are used as negative candidate phrases. This constitutes a set of positive and negative candidate pairs. .
[0086] The candidate pair ranking loss is defined as:
[0087]
[0088] in, and represents the prediction confidence of the positive candidate phrase and the negative candidate phrase, respectively. This represents the preset minimum confidence interval. This indicates the number of positive and negative candidate pairs.
[0089] 2. Semantic coverage loss ( )
[0090] To ensure that the keyword set predicted by the final model fully represents the document topic, we introduce a coverage constraint. We force the weighted aggregation vector of the predicted keywords to semantically align with the global topic of the document. Maintain consistency:
[0091]
[0092] in, Represents the cosine similarity function. This represents the set of indexes of all candidate words in the current document. Local semantic representation of candidate words (i.e., local semantic representation vector) ), Here, it serves as an importance weight. This objective function encourages the model to assign higher confidence to candidate words that can be combined to express the core theme of the document.
[0093] 3. Load balancing losses ( ).
[0094] To prevent expert polarization in the MoE architecture, we introduce an auxiliary load balancing loss:
[0095]
[0096] in, The total number of experts, It is a batch that is distributed to the first The actual proportion of tokens in each expert network. It is the router for the first The average prediction probability of an expert network. Minimizing this term can promote a more uniform route distribution.
[0097] 4. Binary cross-entropy loss ( )
[0098] Binary cross-entropy loss is used to give true key phrases higher prediction confidence and non-key phrases lower prediction confidence, thereby enabling the model to have basic key phrase discrimination ability.
[0099] The loss function is as follows: for candidate phrases Let its true label be The prediction confidence level is When the candidate phrase is a true key phrase, ;otherwise, .
[0100] The cross-entropy loss for binary classification is defined as:
[0101]
[0102] in, This represents the set of candidate phrase samples in the current batch. This indicates the number of candidate phrase samples in the current batch.
[0103] Example 2
[0104] This invention compares the performance of existing keyword extraction methods—including those based on statistical features (TF-IDF, YAKE, KPMiner), graph ranking (TextRank, SingleRank, TopicRank), semantic representation and prompt learning (EmbedRank, SIFRank, PromptRank, Attention-Seeker), supervised learning (CopyRNN, TNT-KID, Diff-KPE, SEKE), and methods that directly generate keywords based on large language models (GPT-4o-mini, DeepSeek-V3, Claude-3, Gemini-2.5)—with the proposed key phrase extraction method, which combines large language model candidate expansion with linguistic prior expert ranking, on multiple keyword extraction datasets. The datasets used include Inspec, SemEval2017, DUC2001, NUS, and KP20k, covering different text types such as scientific abstracts, news texts, and long documents. The evaluation metrics used are F1@5 and F1@10, which are commonly used in keyword extraction tasks. F1@5 represents the matching effect between the model's output of the first 5 candidate keywords and the standard keywords, and F1@10 represents the matching effect between the model's output of the first 10 candidate keywords and the standard keywords. Both are used to evaluate the accuracy and recall of the keyword extraction results of the model compared with the manually labeled standard answers.
[0105] More specifically, the data used in this embodiment are the publicly available datasets Inspec, SemEval2017, DUC2001, NUS, and KP20k from the key phrase extraction task. These datasets cover different types of text, including scientific abstracts, news texts, and long documents. The results, compared with TF-IDF, TextRank, PromptRank, TNT-KID, and SEKE methods, are shown in Table 1.
[0106] (1) TF-IDF: The statistical method based on word frequency and inverse document frequency is used to rank candidate keywords according to the frequency of occurrence and discriminative ability of words in documents.
[0107] (2) TextRank: The method of graph ranking is used to construct graph nodes from words or candidate phrases in the text, and calculate the importance of nodes based on co-occurrence relationships to obtain keywords.
[0108] (3) PromptRank: The keyword ranking method based on prompt learning is adopted. It uses a pre-trained language model to model the semantic relevance between documents and candidate phrases and ranks them accordingly.
[0109] (4) TNT-KID: It adopts a supervised keyword recognition method based on Transformer, models keyword extraction as a sequence labeling or keyword recognition task, and obtains keyword prediction ability through supervised training.
[0110] (5) SEKE: A keyword extraction method based on specialized experts is adopted. Different expert modules are used to model keyword candidates in order to improve the keyword extraction effect.
[0111] Table 1. Results of Key Phrase Extraction Experiment (Percentage)
[0112]
[0113] As shown in Table 1, the proposed method (Ours) achieved good overall key phrase extraction performance on five public datasets. Particularly on the SemEval2017 dataset, the proposed method achieved F1@5 and F1@10 scores of 43.20 and 52.26 respectively, significantly outperforming other existing methods. Therefore, the proposed method can effectively improve the overall performance of key phrase extraction tasks on different types of text.
[0114] In summary, the key phrase extraction method based on candidate expansion and hybrid expert ranking described above can improve candidate coverage while reducing online inference costs, avoiding the high latency and high cost problems caused by directly calling large language models online, and can enhance the model's ability to distinguish different candidate phrases by utilizing linguistic structural information. Experimental results show that the present invention achieves good keyword extraction performance on five public key phrase extraction datasets: Inspec, SemEval2017, DUC2001, NUS, and KP20k, with an average fixed-length F1 score of 41.67, which is an average improvement of 5.83 points compared to strongly supervised baseline methods. Specifically, on the SemEval2017 dataset, the present invention achieves F1@5 and F1@10 scores of 43.20 and 52.26, respectively, which are superior to existing methods and are suitable for application scenarios such as document semantic indexing, information retrieval, and retrieval enhancement generation.
[0115] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A key phrase extraction method based on candidate expansion and hybrid expert ranking, characterized in that, Includes the following steps: S1: Candidate Set Expansion and Linguistic Feature Engineering A teacher model pool is formed by multiple heterogeneous large language models. Under a unified prompt template, a preliminary set of candidate key phrases for the input document is generated. After standardization, a global set of candidate phrases is obtained. Linguistic prior features are extracted from each candidate phrase in the global candidate phrase set to obtain linguistic prior representation vectors. At the same time, the input document is paired with each candidate phrase and input into a pre-trained bidirectional deep semantic encoder to obtain the hidden layer sequence state representation matrix. The corresponding local semantic representation vector and document-level global semantic representation vector are obtained through dual-path feature extraction. S2: Linguistic Information-Driven Hybrid Expert Network Ranking The local semantic representation vector is concatenated with the linguistic prior representation vector to generate the routing input feature vector. This vector is then input into the router to calculate the routing probability distribution vector of each candidate phrase across all expert networks. Based on the routing probability distribution vector, a predetermined number of activated expert networks are selected to form an activated expert network set. Each activated expert network uses a KAN architecture to perform a high-order nonlinear mapping on the local semantic representation vector, followed by gated filtering and linear projection to obtain the expert network output vector. Finally, the output vectors of each activated expert network are weighted and summed using the routing probability distribution vector to obtain the hybrid expert network representation vector. S3: Feature Fusion Through a global-local gate control fusion mechanism, gate weights are calculated based on the hybrid expert network representation vector and the document-level global semantic representation vector. The gate weights are then used to fuse the hybrid expert network representation vector and the local semantic representation vector to obtain a comprehensive judgment representation vector. The prediction confidence of the phrases judged as true key phrases is then calculated based on the comprehensive judgment representation vector. S4: Multi-tasking optimized output A multi-task loss function is used to optimize all learnable parameters of the student candidate ranking model corresponding to the processing steps S1 to S3. During the inference stage, all candidate phrases are sorted in descending order according to the prediction confidence, and a preset number of candidate phrases at the top of the ranking are extracted as the final key phrases.
2. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 1, characterized in that, In step S1, the construction process of the global candidate phrase set is as follows: S11: Assume that... Heterogeneous large language model Teacher model pool , No. A model Regarding the first Input documents The generated preliminary candidate key phrase set is ; By standardizing the processing function After performing lowercase conversion, punctuation removal, deduplication, and illegal format filtering on each preliminary candidate phrase set, the union of the results is taken to obtain the global candidate phrase set. , .
3. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 2, characterized in that, In step S1, the extraction process of the linguistic prior representation vector is as follows: S121: Regarding The first in candidate phrases Candidate phrases are segmented and labeled with parts of speech (PTS). The PTS tag of the last word is selected as the PTS feature of the candidate phrase. Based on a pre-defined PTS tag dictionary, the PTS tags are converted into corresponding PTS category numbers, and the learnable PTS embedding matrix is queried using the PTS category numbers. , thus obtaining part-of-speech embedding vectors ; S122: Simultaneously, count candidate phrases. Number of words contained The word count is mapped to a length category number based on a preset length range. And query the learnable length embedding matrix by length category number. , thus obtaining the length embedding vector ; S123: Embed part-of-speech tags into vectors With length embedding vector By concatenating the vectors, we obtain the linguistic prior representation vector: , This indicates a splicing operation.
4. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 3, characterized in that, In step S1, a document group sampling mechanism is used to aggregate all candidate phrases from the same document into document-level phrase groups for batch processing; the specific process of dual-path feature extraction is as follows: S13: The first Input documents and its candidate phrases Pairing, forming input pairs It is then input into a pre-trained bidirectional deep semantic encoder, which outputs the corresponding hidden layer sequence state representation matrix. ; S14: First Path Extraction sequence start marker corresponding feature vector , as a local semantic representation vector ; S15: Extracting the input document via the second path The set of hidden state sequences at each position within the set of position indices of all corresponding text chunks, after being processed by the mean pooling function. The document-level global semantic representation vector is calculated. ,in, For index variables, For the first The state vector at each position For input documents The set of position indices for all corresponding text blocks.
5. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 4, characterized in that, In step S2, the specific process of obtaining the active expert network set is as follows: S21: Convert the local semantic representation vector with linguistic prior representation vectors Concatenate to generate the routing input feature vector Introducing the learnable weight matrix of the router With bias vector And through the normalized exponential function Calculate the routing probability distribution vector of the candidate phrase across all expert networks. ; S22: Set the number of expert networks activated per session. According to the distribution vector Select the one with the highest probability The indices corresponding to each expert network form the set of activated expert networks. .
6. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 5, characterized in that, In step S2, the specific process of obtaining the filtered output vector is as follows: S23: Let For input variables, For the input dimension index, For output dimension indices, the learnable edge activation function of the KAN architecture is defined as follows: ,in, For activation function, These are the corresponding base activation weights; Let be the highest order of the Chebyshev polynomial. For order variables, Indicates the first Chebyshev polynomials These are the learnable weights corresponding to the polynomial; S24: Convert the local semantic representation vector Input the first KAN architecture The activation expert network is mapped to the first... The high-order nonlinear feature vectors corresponding to each activation expert network , introducing the first The two learnable gating weight matrices of the activation expert network are: and And the activation function is By performing element-wise multiplication Gated filtering is performed to obtain the gated feature vector. The gated feature vector is input into the linear projection layer and mapped back to the preset feature dimension to obtain the first... The output vector of the activation expert network .
7. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 6, characterized in that, In step S2, the process of obtaining the hybrid expert network representation vector is as follows: S25: Extraction The corresponding number in the middle A probability scalar for activating an expert network For sets The output vectors of all activated expert networks are weighted and summed to obtain the final hybrid expert network representation vector. .
8. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 7, characterized in that, In step S3, the specific processing procedure is as follows: S31: Introduce a learnable global-local control weight matrix and bias vector and the Sigmoid activation function ; S32: Will and After concatenation, a linear transformation and sigmoid activation are performed to obtain a multidimensional gated weight vector. ; S33: Utilization Adaptive weighted fusion is performed to obtain a comprehensive decision representation vector. ,in This is the result of subtracting 1 from each element of the vector; S34: Introducing a learnable mapping matrix for the classification layer and bias scalar Calculate the first The prediction confidence level of each candidate phrase being identified as a true key phrase .
9. The key phrase extraction method based on candidate expansion and hybrid expert ranking according to claim 1, characterized in that, In step S4, the multi-task loss function The definition is as follows: ; in, For weight balancing hyperparameters, This represents the binary cross-entropy loss used for classification. This represents the candidate pair sorting loss used to optimize the order. This represents the global consistency loss used to ensure that the candidate phrases selected by the model are consistent with the topic of the input document. This refers to expert load balancing to prevent losses caused by routing collapse.
10. A key phrase extraction system based on candidate expansion and hybrid expert ranking, characterized in that, The method applied to any one of claims 1 to 9 includes: The candidate set expansion and linguistic feature engineering module is used to generate a preliminary candidate key phrase set for the input document by forming a teacher model pool from multiple heterogeneous large language models under a unified prompt template. After standardization, a global candidate phrase set is obtained. Linguistic prior features are extracted from each candidate phrase in the global candidate phrase set to obtain a linguistic prior representation vector. At the same time, the input document is paired with each candidate phrase and input into a pre-trained bidirectional deep semantic encoder to obtain a hidden layer sequence state representation matrix. The corresponding local semantic representation vector and document-level global semantic representation vector are obtained through dual-path feature extraction. The hybrid expert network ranking module concatenates the local semantic representation vector with the linguistic prior representation vector to generate a routing input feature vector. This vector is then input into the router to calculate the routing probability distribution vector of each candidate phrase across all expert networks. Based on this routing probability distribution vector, a predetermined number of activated expert networks are selected to form an activated expert network set. Each activated expert network uses a KAN architecture to perform a high-order nonlinear mapping on the local semantic representation vector, followed by gated filtering and linear projection to obtain the expert network output vector. Finally, the output vectors of each activated expert network are weighted and summed using the routing probability distribution vector to obtain the hybrid expert network representation vector. The fusion module is used to calculate the gating weights based on the hybrid expert network representation vector and the document-level global semantic representation vector through a global-local gate control fusion mechanism, and then use the gating weights to fuse the hybrid expert network representation vector and the local semantic representation vector to obtain a comprehensive judgment representation vector. Based on the comprehensive judgment representation vector, the prediction confidence of the phrases judged as true key phrases is calculated. The multi-task optimization output module is used to optimize all learnable parameters of the student candidate ranking model corresponding to the processing steps S1 to S3 end-to-end using a multi-task loss function. During the inference stage, all candidate phrases are sorted in descending order according to the prediction confidence, and a preset number of candidate phrases at the top of the ranking are extracted as the final key phrases.
