Multi-label classification data enhancement method and system based on large language model
By constructing a dual-weighted label relationship network and tail-driven sampling technology, creative label text is generated, and the problem of long-tail distribution of data in multi-label text classification is solved, and the generalization ability and classification accuracy of large language models are improved.
Patent Information
- Application Number
- CN202410936689.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The long-tail distribution problem of data sets in multi-label text classification task makes it difficult for large language models to effectively learn the characteristics of a few labels from a limited sample, reducing the accuracy and generalization ability of classification.
By building a dual-weighted label relationship network, tail-driven sampling is performed, creative labels are generated, and creative label text is generated using a large language model, and the generated text is merged to increase the diversity of multi-label classification datasets.
The number of rare label instances is effectively increased, the long-tail distribution problem is solved, and the generalization ability of large language models is improved, so that the model can perform more stably and accurately in practical applications.
Smart Images

Figure CN119577435A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a multi-label classification data enhancement method and system based on a large language model. Background Art
[0002] In the field of natural language processing, multi-label text classification is a crucial task that requires assigning multiple labels to a single text at the same time. For example, in news classification, an article may be classified into multiple categories such as "politics", "economy" and "international". The challenge of multi-label text classification is to deal with a large and diverse label system, which is of great significance for effectively understanding and organizing large amounts of text data.
[0003] One of the main challenges facing multi-label text classification is the long-tail distribution of the dataset. In this distribution, most labels are only associated with a few texts, resulting in serious data imbalance. This imbalance has a significant impact on the learning effect of large language models, making it difficult for large language models to effectively learn the features of a few labels from limited samples, thereby reducing classification accuracy and generalization ability. Traditional solutions, including text rewriting or over / under sampling, have achieved certain results in some simple text classification tasks, but they are inadequate when dealing with multi-label text classification tasks. These methods often simply copy or slightly modify existing data points, but cannot generate new label combinations or texts, resulting in insufficient data diversity. This limitation makes it impossible for traditional methods to fundamentally solve the problem of long-tail distribution of data, thereby limiting the improvement of model performance. Therefore, how to improve the generalization ability of large language models in practical applications and solve the long-tail distribution problem of datasets in multi-label text classification is an urgent problem to be solved. Summary of the invention
[0004] In view of the shortcomings of existing methods and the needs of practical applications, in order to improve the generalization ability of large language models in practical applications and solve the long-tail distribution problem of data sets in multi-label text classification, on the one hand, the present invention provides a multi-label classification data enhancement method based on a large language model, comprising the following steps: obtaining an original text data set, and obtaining a dual-weighted label relationship network based on the original text data set; performing tail-driven sampling in the dual-weighted label relationship network, and generating creative labels of the original text data set according to the sampling results; using a large language model and the creative labels to generate creative label texts; merging the creative label texts to obtain multi-label classification enhancement data. The present invention uses existing labels to form a label relationship network and then performs tail-driven sampling, considers label matching and style consistency to design innovative label combinations, increases the number of instances of rare labels, effectively copes with the long-tail distribution problem, and can also maintain consistency and relevance with the original data, thereby improving the generalization ability of large language models in practical applications.
[0005] Optionally, the double-weighted label relationship network is obtained according to the original text data set, satisfying the following formula: G = (V, E, W v ,W e ), where G represents a double-weighted label relationship network, V represents the vertices represented by the labels in the original text dataset, E represents the edges connecting the vertex pairs represented by the co-occurrence of the labels in the dataset, and W v represents the weight summary of the vertex, W v ={w v (i)|i∈V},w v (i) represents the frequency of occurrence of label i, W e represents the weight summary of the edge, W e ={w e (i,j)|i,j∈V},w e (i, j) represents the co-occurrence intensity between tag i and tag j. The dual-weighted tag relationship network constructed by the present invention based on the original text dataset provides a comprehensive perspective for the characteristics of each tag and their mutual connection, which is conducive to clearly describing the tag dynamics and thus introducing deep semantic changes, and further helps to capture and express the complex relationship between tags.
[0006] Optionally, the tail-driven sampling in the dual-weighted label relationship network includes the following steps: constructing a tail-driven sampling label transfer probability model, and obtaining the transfer probability of the label in the dual-weighted label relationship network according to the tail-driven sampling label transfer probability model; constructing a tail-driven sampling label important scarce feature model, and obtaining the important scarce feature value of the label in the dual-weighted label relationship network according to the tail-driven sampling label important scarce feature model; combining the transfer probability and the important scarce feature value, evaluating the label transfer acceptance in the dual-weighted label relationship network, and completing the tail-driven sampling according to the evaluation result. The present invention performs tail sampling in a dual-weighted label relationship network, and realizes targeted label sampling by paying attention to the tail label and maintaining the evaluation of the label features, thereby effectively performing data enhancement to mitigate the long-tail effect.
[0007] Optionally, the tail-driven sampling label transfer probability model satisfies the following formula: Among them, q(i→j) represents the transition probability from label i to label j in the double weighted label relationship network, w e (i, j) represents the co-occurrence strength between label i and label j, and neighbors(i) represents the neighbors that can transfer with label i. By calculating the label transfer probability, the present invention can flexibly adjust to the target distribution, further meeting the goal of achieving a balanced sampling strategy in a long-tail distribution.
[0008] Optionally, the tail-driven sampling label important and scarce feature model satisfies the following formula: Where p(i) represents the important scarce feature value of label i, S(i) represents the important scarcity score of label i, neighbors(i) represents the neighbors that can transfer with label i; S(i) = -log(w v (i)), where S(i) represents the importance scarcity score of tag i, and w v (i) represents the frequency of occurrence of label i, and T represents the temperature parameter for adjusting the smoothness of the distribution. The important scarce feature values provided by the present invention can effectively reflect the target distribution of labels, reduce the uncertainty in the sampling process, and improve the effectiveness of sampling.
[0009] Optionally, the combination of the transfer probability and the important scarce feature value to evaluate the label transfer acceptance in the double-weighted label relationship network satisfies the following formula: Among them, α(i→j) represents the acceptance of label transfer in the double-weighted label relationship network, min(·) represents the minimum function, p(·) represents the important scarce feature value of the label, q(i→j) represents the transfer probability of label i to label j in the double-weighted label relationship network, and q(j→i) represents the transfer probability of label j to label i in the double-weighted label relationship network. The present invention guides the sampling results towards the target distribution by evaluating the acceptance of label transfer, which is further conducive to solving the long-tail distribution problem.
[0010] Optionally, the use of the large language model and the creative label to generate a creative label text satisfies the following formula: in, represents the target loss function of the large language model, represents the label matching loss, represents the style consistency loss, and λ represents the large language model hyperparameter. The present invention balances the importance of label matching and style consistency to ensure that the generated text is not only related to the sampled labels but also consistent with the actual text in style, thus achieving a balance between accuracy and authenticity.
[0011] Optionally, the label matching loss satisfies the following formula: in, represents the label matching loss, n represents the number of texts, r φ (X i ) represents the large language model generating text X i The possibility of represents the temperature coefficient of the i-th label generating the i-th text, The temperature coefficient of the i-th label generating the j-th text is represented. The present invention standardizes the label matching loss through a specific formula, ensuring that the generated text not only accurately reflects each label in the sampled label combination, but also maintains consistency and relevance with the original data set.
[0012] Optionally, the style consistency loss satisfies the following formula: in, represents the style consistency loss, t represents the number of text tags, and x t represents a series of tags of text, c(Y) represents a composite text consisting of a multi-label set and prompt words associated with the text, and P φ (x t |c(Y)) represents the token x of the text generated by the large language model t The probability of conforming to the composite text c(Y). The present invention standardizes the style consistency loss through a specific formula, which can help generate text whose style is coordinated with the original data set, controllable and coherent, and further ensure the balance between the accuracy and authenticity of the generated text.
[0013] In the second aspect, in order to be able to efficiently execute the multi-label classification data enhancement method based on a large language model provided by the present invention, the present invention also provides a multi-label classification data enhancement system based on a large language model, including a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the multi-label classification data enhancement method based on a large language model as described in the first aspect of the present invention. The multi-label classification data enhancement system based on a large language model of the present invention has a compact structure and stable performance, and can stably execute the multi-label classification data enhancement method based on a large language model provided by the present invention, further improving the overall applicability and practical application capabilities of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flow chart of a multi-label classification data enhancement method based on a large language model of the present invention;
[0015] Figure 2 This is a framework diagram of a multi-label classification data enhancement system based on a large language model of the present invention;
[0016] Figure 3 A schematic diagram of the structure of a multi-label classification data enhancement device based on a large language model is provided in an embodiment. DETAILED DESCRIPTION
[0017] The specific embodiments of the present invention will be described in detail below. It should be noted that the embodiments described herein are only for illustration and are not intended to limit the present invention. In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present invention. However, it is obvious to those of ordinary skill in the art that these specific details do not need to be adopted to implement the present invention. In other examples, in order to avoid confusing the present invention, known circuits, software or methods are not specifically described.
[0018] Throughout the specification, references to "one embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment or example is included in at least one embodiment of the present invention. Therefore, the phrases "in one embodiment," "in an embodiment," "an example," or "an example" appearing in various places throughout the specification do not necessarily all refer to the same embodiment or example. In addition, particular features, structures, or characteristics may be combined in one or more embodiments or examples in any suitable combination and / or subcombination. In addition, it should be understood by those of ordinary skill in the art that the figures provided herein are for illustrative purposes and that the figures are not necessarily drawn to scale.
[0019] In one embodiment, see Figure 1 , Figure 1 The flowchart of the multi-label classification data enhancement method based on a large language model of the present invention is provided. In order to improve the generalization ability of the large language model in practical applications and solve the long-tail distribution problem of the data set in multi-label text classification, the present invention provides a multi-label classification data enhancement method based on a large language model, such as Figure 1 As shown, the method comprises the following steps:
[0020] S1. Obtain an original text dataset, and obtain a dual-weighted label relationship network based on the original text dataset.
[0021] Specifically, the datasets for multi-label text classification tasks are obtained through public datasets, data competition platforms, web crawlers, or academic research and literature as raw text datasets. Public datasets include Ren-CECps1.0, which is a multi-label Chinese sentiment corpus containing 37,678 sentences from Chinese blogs and 11 sentiment tags, where each sentence is assigned one or more emotions; THUCNews dataset, which is a news classification dataset from which part of the data can be extracted for multi-label text classification. For example, news titles can be selected as text and multiple subject categories of news can be used as labels; other NLP datasets, many NLP-related studies provide open source datasets, which may contain the data required for multi-label text classification tasks. Text and corresponding labels can also be extracted from business data, which requires data processing and annotation according to specific business scenarios; use web crawlers to crawl relevant text data from the Internet and label them according to certain rules or algorithms.
[0022] It should be understood that the goal of multi-label text classification is to assign a set of label subsets to each text instance x Where L = {l 1 ,l 2 ,...,l N} represents all possible label spaces, and the multi-label text classification task can be formalized as learning a mapping function f(x)→2 L , to predict the power set of L.
[0023] Furthermore, according to the original text data set, the double-weighted label relationship network obtained satisfies the following formula: G = (V, E, W v ,W e ), where G represents a double-weighted label relationship network, V represents the vertices represented by the labels in the original text dataset, E represents the edges connecting the vertex pairs represented by the co-occurrence of the labels in the dataset, and W v represents the weight summary of the vertex, W v ={w v (i)|i∈V},w v (i) represents the frequency of occurrence of label i, W e represents the weight summary of the edge, W e ={w e (i,j)|i,j∈V},w e (i,j) represents the co-occurrence strength between label i and label j.
[0024] S2. Perform tail-driven sampling in the dual-weighted label relationship network, and generate creative labels for the original text data set according to the sampling results.
[0025] In an embodiment, performing tail-driven sampling in the dual-weighted label relationship network includes the following steps:
[0026] S21, constructing a tail-driven sampling label transfer probability model, and obtaining the transfer probability of labels in the dual-weighted label relationship network according to the tail-driven sampling label transfer probability model.
[0027] When tail-driven sampling is performed in the dual-weighted label relationship network, the probability of moving from the current label i to another label j is first calculated. Specifically, the transition probability is obtained by the tail-driven sampling label transition probability model. The tail-driven sampling label transition probability model satisfies the following formula: Among them, q(i→j) represents the transition probability from label i to label j in the double weighted label relationship network, w e (i,j) represents the co-occurrence strength between label i and label j, and neighbors(i) represents the neighbors that can transfer with label i.
[0028] S22, constructing a tail-driven sampling label important and scarce feature model, and obtaining important and scarce feature values of labels in the double-weighted label relationship network according to the tail-driven sampling label important and scarce feature model.
[0029] When tail-driven sampling is performed in the dual-weighted label relationship network, it is also necessary to obtain the important scarce feature values of the labels in the dual-weighted label relationship network. Specifically, the important scarce feature values of the labels are calculated by using the tail-driven sampling label important scarce feature model. The tail-driven sampling label important scarce feature model satisfies the following formula: Among them, p(i) represents the important scarce feature value of label i, S(i) represents the important scarcity score of label i, neighbors(i) represents the neighbors that can transfer with label i, and T represents the temperature parameter for adjusting the smoothness of the distribution.
[0030] Furthermore, the importance scarcity score of tag i satisfies the following formula: S(i) = -log(w v (i)), where S(i) represents the importance scarcity score of tag i, and w v (i) represents the frequency of occurrence of label i. It can be understood that according to the principle of information entropy, the target distribution can be defined as reflecting the important scarce feature values of the label.
[0031] S23, combining the transfer probability and the important scarce feature value, evaluating the label transfer acceptance in the double-weighted label relationship network, and completing tail-driven sampling according to the evaluation result.
[0032] In the embodiment, the transfer probability and the important scarce feature value are combined to evaluate the label transfer acceptance in the double-weighted label relationship network, satisfying the following formula: Among them, α(i→j) represents the acceptance of label transfer in the doubly weighted label relationship network, min(·) represents the minimum function, p(·) represents the important scarce feature value of the label, q(i→j) represents the transition probability from label i to label j in the doubly weighted label relationship network, and q(j→i) represents the transition probability from label j to label i in the doubly weighted label relationship network. The label transfer acceptance in the doubly weighted label relationship network is used to evaluate whether to accept the transition from label i to label j, thereby guiding the sampling results to develop towards the target distribution.
[0033] During the entire sampling process, we start with a tail label and then gradually transition to other labels based on the label transfer probability and label transfer acceptance. This process continues until a sufficient number of labels are sampled or the predetermined step limit is reached.
[0034] Furthermore, the creative tags of the original text data set generated according to the sampling results in step S2 may be generated by randomly selecting several tags from the tail tags through random combination to obtain a creative tag, or by selecting tail tags that frequently appear together based on correlation to obtain a creative tag, or by predicting tail tags that may appear together based on a machine learning model or a neural network model and generating a tag combination to obtain a creative tag.
[0035] It should be understood that the obtained creative labels increase the number of rare but important label instances, which is beneficial to solving the long tail effect of data.
[0036] S3. Generate creative label text using the large language model and the creative label.
[0037] A large language model refers to an advanced language model with a large number of parameters, such as a GPT model and an LLMs model. In the embodiment, a large language model and the creative label are used to generate a creative label text that satisfies the following formula: in, represents the target loss function of the large language model, represents the label matching loss, represents the style consistency loss, and λ represents the large language model hyperparameter. The large language model hyperparameter λ balances the importance of label matching and style consistency. By optimizing the objective loss function of the large language model, it ensures that the generated text is not only related to the sampled labels, but also consistent with the actual text in style, achieving a balance between accuracy and authenticity.
[0038] Specifically, the label matching loss satisfies the following formula: in, represents the label matching loss, n represents the number of texts, r φ (X i ) represents the large language model generating text X i The possibility of represents the temperature coefficient of the i-th label generating the i-th text, It represents the temperature coefficient of generating the jth text from the i-th label.
[0039] Furthermore, in order to effectively enhance the input X aug Align with the corresponding label combination Y, using to demonstrate ideal generation and also guide the large language model to distinguish between good and bad generation. 1 ,Y 1 ;X 2 ,Y 2 ;…;X n ,Y n}, each Y iare all unique, and the Jaccard similarity is used to evaluate and rank the similarity degree, starting from Y 1 and Y 2 , to Y 1 and Y n For label Y 1 , whose associated text is X 1 is considered as a positive example, and from X 2 To X n The texts with are regarded as negative examples, showing gradually decreasing similarity.
[0040] For the set {X 1 ,Y 1 ;X 2 ,Y 2 ;…;X n ,Y n}, first compare X 1 With X 2 ,…,X n , then compare X 2 With X 3 ,…,X n , the purpose is to make X generated by the large language model aug Align with label Y.
[0041] Further, Where X contains the label x 1 ,...,x |X| , c(Y 1 ) represents the combination of the label and prompt information of the positive example.
[0042] Furthermore, each comparison involves adjusting the suppression of negative samples by a temperature coefficient and satisfies the following formula: Among them, s(Y i ,Y j ) represents the label set Y i and Y j The Jaccard similarity between them.
[0043] In the embodiment, the style consistency loss satisfies the following formula: in, represents the style consistency loss, t represents the number of text tags, and x t represents a series of tags of text, c(Y) represents a composite text consisting of a multi-label set and prompt words associated with the text, and P φ (x t |c(Y)) represents the token x of the text generated by the large language model t The probability of matching the compound text c(Y).
[0044] Randomly select a subset {X 1,Y 1 ;…;X n ,Y n}, where X = {x 1 ,…,x |X|} represents text, which consists of a series of tags x, Y = {y 1 ,…,y |Y|} represents the multi-label set associated with X. For Y, we concatenate it with the prompt information to create a composite text c(Y), such as "for label Generate text", as input to a large language model.
[0045] S4. Merge the creative label texts to obtain multi-label classification enhanced data.
[0046] In an embodiment, the creative labels obtained by tail-driven adoption are merged with the creative label texts generated by a large language model that optimizes the target loss function and has a style that is coordinated with the original dataset, controllable and coherent, to obtain multi-label classification enhanced data.
[0047] See also Figure 2 In an embodiment, in order to efficiently execute a multi-label classification data enhancement method based on a large language model provided by the present invention, the present invention also provides a multi-label classification data enhancement system based on a large language model, including: an input device, an output device, a processor, and a memory, wherein the input device, the output device, the processor, and the memory are interconnected, and the memory contains program instructions, and the program instructions are used for the steps of the multi-label classification data enhancement method based on a large language model. The multi-label classification data enhancement system based on a large language model of the present invention has a compact structure and stable performance, and can stably execute a multi-label classification data enhancement method based on a large language model of the present invention, further improving the overall applicability and practical application ability of the present invention.
[0048] In an embodiment, the processor may be a central processing unit (CPU), which may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. An input device may be used to obtain data information. An output device may be used to output the results obtained by storing program instructions contained in a computer program in a memory provided by the present invention. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the type of device.
[0049] In yet another alternative embodiment, see Figure 3 In order to efficiently execute the multi-label classification data enhancement method based on a large language model provided by the present invention, this embodiment also provides a multi-label classification data enhancement device based on a large language model, such as Figure 3 As shown, including:
[0050] The memory 10 is used to store computer programs; the processor 20 is used to execute the computer programs to implement the above-mentioned multi-label classification data enhancement method based on a large language model.
[0051] Memory 10 , processor 20 , communication interface 31 and communication bus 32 . Memory 10 , processor 20 , communication interface 31 all communicate with each other via communication bus 32 .
[0052] In an embodiment, the memory 10 is used to store one or more program instructions. The memory 10 may store program instructions for implementing the following functions: obtaining an original text data set, and obtaining a dual-weighted label relationship network based on the original text data set; performing tail-driven sampling in the dual-weighted label relationship network, and generating creative labels for the original text data set based on the sampling results; using a large language model and the creative labels to generate creative label text; merging the creative label text to obtain multi-label classification enhanced data.
[0053] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0054] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0055] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0056] The communication interface 31 may be an interface of a communication module, and is used to connect to other devices or systems.
[0057] Of course, it should be noted that Figure 3 The structure shown does not constitute a limitation on the multi-label classification data enhancement device based on a large language model in this embodiment. In actual applications, the multi-label classification data enhancement device based on a large language model may include Figure 3 More or fewer components than shown, or combinations of certain components.
[0058] An embodiment also provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the multi-label classification data enhancement method based on a large language model are implemented.
[0059] The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0060] In summary, the present invention uses existing labels to build a label relationship network and then performs tail-driven sampling, designs innovative label combinations considering label matching and style consistency, increases the number of instances of rare labels, effectively addresses the long-tail distribution problem while maintaining consistency and relevance with the original data, and improves the generalization ability of large language models in practical applications. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A multi-label classification data enhancement method based on a large language model, characterized in that: The multi-label classification data enhancement method based on a large language model comprises the following steps: Obtaining an original text data set, and obtaining a dual-weighted label relationship network based on the original text data set; Performing tail-driven sampling in the dual-weighted label relationship network, and generating creative labels for the original text data set according to the sampling results; Generate creative label text using the large language model and the creative label; The creative label texts are merged to obtain multi-label classification enhanced data.
2. According to the method for multi-label classification data enhancement based on a large language model in claim 1, it is characterized in that: According to the original text data set, a double-weighted label relationship network is obtained, which satisfies the following formula: G=(V,E,W v ,W e ) Among them, G represents a double-weighted label relationship network, V represents the vertices represented by the labels of the original text dataset, E represents the co-occurrence of the labels in the dataset, and W represents the edges connecting the vertex pairs. v represents the weight summary of the vertex, W v ={w v (i)|i∈V},w v (i) represents the frequency of occurrence of label i, W e represents the weight summary of the edge, W e ={w e (i,j)|i,j∈V},w e (i,j) represents the co-occurrence strength between label i and label j.
3. According to the multi-label classification data enhancement method based on a large language model in claim 1, it is characterized in that: The step of performing tail-driven sampling in the dual-weighted label relationship network comprises the following steps: Constructing a tail-driven sampling label transfer probability model, and obtaining the transfer probability of labels in the dual-weighted label relationship network according to the tail-driven sampling label transfer probability model; Constructing a tail-driven sampling label important and scarce feature model, and obtaining important and scarce feature values of labels in the dual-weighted label relationship network according to the tail-driven sampling label important and scarce feature model; The transfer probability and the important scarce feature value are combined to evaluate the label transfer acceptance in the double-weighted label relationship network, and the tail-driven sampling is completed according to the evaluation result.
4. According to the method for multi-label classification data enhancement based on a large language model in claim 3, it is characterized in that: The tail-driven sampling label transfer probability model satisfies the following formula: Among them, q(i→j) represents the transition probability from label i to label j in the double weighted label relationship network, w e (i,j) represents the co-occurrence strength between label i and label j, and neighbors(i) represents the neighbors that can transfer with label i.
5. According to the method for multi-label classification data enhancement based on a large language model in claim 3, it is characterized in that: The tail-driven sampling label important scarce feature model satisfies the following formula: Among them, p(i) represents the important scarce feature value of label i, S(i) represents the important scarcity score of label i, neighbors(i) represents the neighbors that can transfer with label i, and T represents the temperature parameter for adjusting the smoothness of the distribution; S(i)=-log(w v (i)) Among them, S(i) represents the importance scarcity score of tag i, w v (i) represents the occurrence frequency of label i.
6. The multi-label classification data enhancement method based on a large language model according to claim 3, characterized in that: The combination of the transfer probability and the important scarce feature value to evaluate the label transfer acceptance in the double-weighted label relationship network satisfies the following formula: Among them, α(i→j) represents the label transfer acceptance in the doubly weighted label relationship network, min(·) represents the minimum function, p(·) represents the important scarce feature value of the label, q(i→j) represents the transfer probability from label i to label j in the doubly weighted label relationship network, and q(j→i) represents the transfer probability from label j to label i in the doubly weighted label relationship network.
7. The multi-label classification data enhancement method based on a large language model according to claim 1, characterized in that: The creative label text is generated by using the large language model and the creative label, satisfying the following formula: in, represents the target loss function of the large language model, represents the label matching loss, represents the style consistency loss, and λ represents the large language model hyperparameter.
8. The multi-label classification data enhancement method based on a large language model according to claim 7, characterized in that: The label matching loss satisfies the following formula: in, represents the label matching loss, n represents the number of texts, r φ (X i ) represents the large language model generating text X i The possibility of represents the temperature coefficient of the i-th label generating the i-th text, It represents the temperature coefficient of generating the jth text from the i-th label.
9. The multi-label classification data enhancement method based on a large language model according to claim 7, characterized in that: The style consistency loss satisfies the following formula: in, represents the style consistency loss, t represents the number of text tags, and x t represents a series of tags of text, c(Y) represents a composite text consisting of a multi-label set and prompt words associated with the text, and P φ (x t |c(Y)) represents the token x of the text generated by the large language model t The probability of matching the compound text c(Y).
10. A multi-label classification data enhancement system based on a large language model, characterized in that: The multi-label classification data enhancement system based on a large language model includes: an input device, an output device, a processor, and a memory, wherein the input device, the output device, the processor, and the memory are interconnected, and the memory includes program instructions, and the program instructions are used to execute the multi-label classification data enhancement method based on a large language model according to any one of claims 1 to 9.
Citation Information
Patent Citations
Model training method, text classification method, system, equipment and medium
CN114297385A
Multi-label text classification method and system based on dynamic weight contrast learning
CN114580433A
Long-tail image retrieval method, system and equipment and storage medium
CN117056550A
Short text classification method based on multi-strategy fusion
CN117251524A
Image classification method and system based on dual pseudo tag refinement and sample reweighting
CN117611932A