Method, equipment and medium for text classification in multiple unknown fields based on knowledge fusion
By constructing and sampling multiple teacher model combinations and updating observation information based on classification accuracy, it solves the complex problems of manual annotation and model selection in text classification in multiple unknown fields, and achieves efficient text classification.
Patent Information
- Application Number
- CN202410977333.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-22
AI Technical Summary
In text classification in multiple unknown fields, traditional methods require manual annotation and selection of teacher models, resulting in high cost and low efficiency, and the unlabeled domain information of the samples complicates model selection.
By constructing multiple teacher model combinations, sampling and training student models, and updating observation information based on classification accuracy data, select appropriate teacher model combinations for iterative training, and generate student models with excellent performance.
It realizes text classification in multiple unknown fields without manual annotation and selection of teacher models, reduces costs, improves efficiency, and solves the complexity of model selection.
Smart Images

Figure CN118503435B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a method, device and medium for classifying texts in multiple unknown fields based on knowledge fusion. Background Art
[0002] Multi-unknown domain text classification is a challenging task in natural language processing. Given a text dataset with no domain information and labels for training samples and some trained text classification models in related fields, the purpose of multi-unknown domain text classification is to select some models from these trained models that can train new classification models with excellent performance on the given data.
[0003] Traditional methods generally label the dataset by human experts, and then use the labeled data to train a new model, but this approach is costly and inefficient. Recently, many studies have been exploring the use of unlabeled data to train a new model by reusing the trained model without manual labeling. Among them, the representative knowledge fusion method integrates multiple domain-specific "teacher models" to train a unified "student model", which can comprehensively process new multi-domain datasets. However, the effectiveness of the knowledge fusion process depends largely on the selection of a suitable teacher model, and the lack of domain information on the samples makes model selection quite complicated. Traditional knowledge fusion methods require manual selection of teacher models, or even exhaustive enumeration of all combinations. These practices are not only labor-intensive in actual situations, but may also be impossible to implement. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method, device and medium for classifying texts in multiple unknown fields based on knowledge fusion.
[0005] In a first aspect, an embodiment of the present invention provides a method for text classification in multiple unknown fields based on knowledge fusion, the method comprising:
[0006] Determine the text samples and the n pre-trained teacher models;
[0007] Build 2 based on n pre-trained teacher models n -1 teacher model combination; each teacher model combination contains at least one teacher model;
[0008] Performing a first sampling on each teacher model combination that only includes one teacher model; including: inputting text samples into the teacher model and the student model in the teacher model combination respectively, training the student model based on knowledge fusion, obtaining the classification accuracy corresponding to the trained student model, and adding the teacher model combination-classification accuracy data pair to the observation information;
[0009] A teacher model combination is selected based on the current observation information; if the selected teacher model combination is a sampled teacher model combination, the trained student model corresponding to the maximum classification accuracy in the observation information is used as the text classification model; if the selected teacher model combination is not sampled and contains two or more teacher models, the teacher model combination is subjected to a second sampling, including: inputting the text samples into the teacher model and the student model in the teacher model combination respectively, taking the class with the largest mean median of the predicted classification vector output by the teacher model as a pseudo hard label, concatenating all predicted classification vectors as soft labels, training the student model based on knowledge fusion according to the pseudo hard labels and soft labels, obtaining the classification accuracy corresponding to the trained student model, and adding the teacher model combination-classification accuracy data pair to the observation information, thereby updating the observation information;
[0010] The text to be classified is input into a text classification model to determine the classification result of the text to be classified.
[0011] In a second aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned multi-unknown domain text classification method based on knowledge fusion.
[0012] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned multi-unknown domain text classification method based on knowledge fusion.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned multi-unknown domain text classification method based on knowledge fusion.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] The present invention provides a multi-unknown domain text classification method based on knowledge fusion, which samples each teacher model combination to train a corresponding student model, and simultaneously obtains the classification accuracy of the student model on the text sample, and uses the teacher model combination-classification accuracy data pair as observation information; at the same time, the present invention can select the teacher model combination according to the current observation information to perform cyclic iteration, and finally output a student model that performs well on the text sample, thereby solving the multi-unknown domain text classification problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 A flowchart of a method for text classification in multiple unknown fields based on knowledge fusion provided by an embodiment of the present invention;
[0018] Figure 2 A schematic diagram of a first sampling process provided by an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of a process for selecting a teacher model combination provided by an embodiment of the present invention;
[0020] Figure 4 A schematic diagram of a second sampling process provided by an embodiment of the present invention;
[0021] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] It should be noted that, in the absence of conflict, the features in the following embodiments and implementations may be combined with each other.
[0024] like Figure 1 As shown, the embodiment of the present invention provides a multi-unknown domain text classification method based on knowledge fusion, and the method specifically includes the following steps:
[0025] Step S1, determining text samples and determining several pre-trained teacher models.
[0026] Furthermore, the text samples are unlabeled multi-domain text datasets; illustratively, when the downstream task is a text classification task, to classify text in the medical field, it is necessary to obtain text datasets from medical sub-fields such as cardiology, internal medicine, and surgery.
[0027] Furthermore, the structures of the several teacher models are composed of a semantic feature encoder and a classification layer connected end to end; the semantic feature encoder can adopt a pre-trained GPT model, a pre-trained Bert model (Bidirectional Enoceder Representations from Transformers), a pre-trained T5 model, etc., and the classification layer is composed of a layer of fully connected neural network.
[0028] Step S2, construct 2 based on the pre-trained n teacher models n -1 teacher model combination, where each teacher model combination contains at least one teacher model.
[0029] Specifically, the pre-trained n teacher models are recorded as ; Where n is the total number of all teacher models and i is the serial number of the teacher model.
[0030] The teacher model ensemble is denoted as ; Where j represents the teacher model combination index, and n is the dimension corresponding to the vector used to represent the teacher model combination, that is, the total number of all teacher models.
[0031] For example, based on the first teacher model t 1 , the second teacher model 2 ,…,Kth teacher model t k Constructing the teacher model combination {t 1 ,t 2 ,…,t k}, denoted as vector u j =[x,x,…,x]; where j represents the teacher model combination index, x represents the first teacher model t in the first, second,…, and kth dimensions of the vector 1 , the second teacher model 2 ,…,Kth teacher model t k The proportion of contributing labels that are the same during the sampling process is summed to 1; the remaining dimensions of the vector are set to zero.
[0032] For example, see Table 1:
[0033] Table 1: Teacher model combination and its index and vector representation table
[0034]
[0035] Step S3, traverses the teacher model combinations that only contain one teacher model, and performs a first sampling on each teacher model combination that only contains one teacher model; including: inputting text samples into the teacher model and the student model in the teacher model combination respectively; constructing a loss function based on the label output by the teacher model and the predicted classification result output by the student model, and training the student model based on the loss function; obtaining the classification accuracy corresponding to the trained student model, and using the teacher model combination-classification accuracy data pair as the initial observation information.
[0036] Specifically, Figure 2 As shown, the step S3 specifically includes:
[0037] Step S301: Input the text sample into the teacher model in the teacher model combination , the predicted classification results output by the teacher model As a pseudo hard label, the predicted classification vector output by the teacher model As a soft label; input the text sample into the student model to obtain the predicted classification result output by the student model .
[0038] Step S302: Pseudo hard labels based on the output of the teacher model And the predicted classification results output by the student model Construct cross entropy loss function; soft labels based on teacher model output And the predicted classification results output by the student model Construct a divergence loss function; take the sum of the cross entropy loss function and the divergence loss function as the first loss function. The expression is as follows:
[0039]
[0040] In the formula, represents the first loss function, CE(.) represents the cross entropy loss function, and KL(.) represents the divergence loss function (Kullback-Leibler).
[0041] Step S303, based on the first loss function, adopt stochastic gradient descent training to optimize the student model.
[0042] Step S304: Input the text sample into the trained student model to obtain the classification accuracy ; Combine the teacher model and classification accuracy data As initial observation information .
[0043] Step S4, select a teacher model combination based on the current observation information; if the selected teacher model combination is a sampled teacher model combination, the trained student model corresponding to the maximum classification accuracy in the observation information is used as the text classification model; if the selected teacher model combination is not sampled and contains two or more teacher models, the teacher model combination is subjected to a second sampling, including: inputting the text samples into the teacher model and the student model in the teacher model combination respectively, taking the class with the largest mean median of the predicted classification vector output by the teacher model as a pseudo hard label, concatenating all predicted classification vectors as soft labels, constructing a loss function based on the pseudo hard labels, soft labels and the predicted classification vectors output by the student model, and training the student model based on the loss function; obtaining the classification accuracy corresponding to the trained student model, adding the teacher model combination-classification accuracy data pair to the observation information, thereby updating the observation information.
[0044] Specifically, Figure 3 As shown in Figure 2, the process of selecting a teacher model combination based on the current observation information includes:
[0045] Step S401, converting the process of sampling the teacher model combination to obtain the trained student model into a black box function, the black box function takes the teacher model combination as input and takes the classification accuracy of the trained student model on the text sample as output;
[0046] The prior distribution of the black box function is obtained according to the Gaussian process, and the expression is as follows:
[0047] f(u)~GP(μ(u),k(u,u'))
[0048]
[0049] In the formula, u and u' both represent the teacher model combination, f(u) represents the classification accuracy of the trained student model on the text sample, GP(.) represents the prior distribution, μ(u) represents the mean function which is usually set to 0, and k(u,u') represents the covariance function composed of the RBF kernel function; and are the variance hyperparameter and length hyperparameter respectively.
[0050] Step S402, combining a teacher model combination in the current observation information with an output value of a black box function to reconstruct the observation information; the expression is as follows:
[0051]
[0052] in, , .
[0053] Step S403, based on the reconstructed observation information, the mean function and covariance function in the prior distribution of the black box function, and according to the multivariate normal distribution property of the Gaussian process, the updated mean and covariance in the posterior distribution of the black box function are obtained. The expression is as follows:
[0054] ,
[0055] ,
[0056] ,
[0057] in, and are the updated mean and covariance respectively.
[0058] Step S404, calculating the utility value of each teacher model combination based on the updated mean and covariance, and taking the teacher model combination with the largest utility value as the selected teacher model combination.
[0059] In this example, the EI function (expected improvement) is used to calculate the utility value, and the expression is as follows:
[0060]
[0061]
[0062] in, is a hyperparameter, and They refer to the probability density function and cumulative distribution function of the standard normal distribution, respectively. refer to The maximum value in .
[0063] Among them, Figure 4 As shown, if the selected teacher model combination is not sampled and contains two or more teacher models, the process of performing a second sampling on the teacher model combination includes:
[0064] Step S100: Assume that the selected teacher model combination contains m teacher models, and the number of categories of text samples is c; input the text sample into the teacher model combination The teacher model in the classifier, average the predicted classification vectors output by each teacher model, compare the values of each class in the predicted classification vector mean, and take the class with the largest value as the As pseudo hard labels, all predicted classification vectors output by the teacher model are Splice as soft label; input the text sample into the student model to obtain the predicted classification vector output by the student model .
[0065] Furthermore, the text sample is input into the student model, and each sub-classification head of the student model outputs a sub-prediction classification vector , 0≤m' <m。
[0066] Among them, the classification layer of the student model contains m sub-classification heads with c categories;
[0067] For example, assume that the selected teacher model combination contains 2 teacher models, input the text sample into the teacher model combination, output the predicted classification vectors [1,2,3], [4,5,6], take the average of the predicted classification vectors to obtain [2.5,3.5,4.5], and set the pseudo hard label of the class with the largest median value of the predicted classification vector mean, that is, the pseudo hard label [0,0,1].
[0068] Step S200, construct a cross entropy loss function based on the pseudo hard label output by the teacher model and the mean of the sub-prediction classification vector output by each sub-classification head of the student model; construct a divergence loss function based on the soft label output by the teacher model and the prediction classification vector output by the student model; and use the sum of the cross entropy loss function and the divergence loss function as the second loss function. The expression is as follows:
[0069]
[0070]
[0071]
[0072] In the formula, represents the second loss function, CE(.) represents the cross entropy loss function, and KL(.) represents the divergence loss function (Kullback-Leibler).
[0073] Step S300, based on the second loss function, adopt stochastic gradient descent training to optimize the student model.
[0074] Step S400: Input the text sample into the trained student model to obtain the classification accuracy ; Combine the teacher model and classification accuracy data Add to the observation information, thereby updating the observation information .
[0075] Step S5, inputting the text to be classified into a text classification model to determine the classification result of the text to be classified.
[0076] Example 1
[0077] The following illustrates the multi-unknown domain text classification method based on knowledge fusion of the present invention by training a new text classification model on the PUBMEDQA dataset without annotations and domain information.
[0078] Step S1, obtaining the PUBMEDQA dataset, and determining 10 pre-trained teacher models related to the PUBMEDQA dataset.
[0079] Step S2, constructing 1023 teacher model combinations based on the 10 pre-trained teacher models; wherein each teacher model combination includes at least one teacher model;
[0080] Step S3, traverse the teacher model combinations containing only one teacher model, a total of 10; perform the first sampling on each teacher model combination containing only one teacher model; including: inputting the PUBMEDQA dataset into the teacher model and the student model in the teacher model combination respectively; constructing a loss function based on the label output by the teacher model and the predicted classification result output by the student model, and training the student model based on the loss function; obtaining the classification accuracy corresponding to the trained student model, and taking the teacher model combination-classification accuracy data pair as the initial observation information;
[0081] Step S4, selecting a teacher model combination based on the current observation information; if the selected teacher model combination is a sampled teacher model combination, the trained student model corresponding to the maximum classification accuracy in the observation information is used as the text classification model; if the selected teacher model combination is not sampled and contains two or more teacher models, the teacher model combination is subjected to a second sampling, including: inputting the PUBMEDQA data set into the teacher model and the student model in the teacher model combination respectively, taking the class with the largest mean median of the predicted classification vector output by the teacher model as a pseudo hard label, concatenating all predicted classification vectors as soft labels, constructing a loss function based on the pseudo hard label, the soft label and the predicted classification vector output by the student model, and training the student model based on the loss function; obtaining the classification accuracy corresponding to the trained student model, adding the teacher model combination-classification accuracy data pair to the observation information, thereby updating the observation information;
[0082] Step S5, input the PUBMEDQA dataset into the text classification model to determine the classification result of the text to be classified.
[0083] like Figure 5 As shown, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs and a processor 102. When the one or more programs are executed by the processor 102, any method in the first aspect described above is implemented.
[0084] The memory 101, the processor 102 and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0085] Among them, the memory 101 can be, but is not limited to, a random access memory 101 (Random Access Memory, RAM), a read only memory 101 (Read Only Memory, ROM), a programmable read-only memory 101 (Programmable Read-Only Memory, PROM), an erasable programmable read-only memory 101 (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable read-only memory 101 (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0086] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor 102, including a central processing unit 102 (CPU), a network processor 102 (NP), etc.; it may also be a digital signal processor 102 (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0087] In the embodiments provided in the present application, it should be understood that the disclosed method and system can also be implemented in other ways. The method and system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the method and system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0088] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0089] On the other hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 102, the method as described in any one of the first aspects above is implemented. If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory 101 (ROM, Read-Only Memory), random access memory 101 (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.
[0090] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.
Claims
1. A multi-unknown domain text classification method based on knowledge fusion, characterized in that: The method comprises: Determine the text samples and the n pre-trained teacher models; Build 2 based on n pre-trained teacher models n -1 teacher model combination; each teacher model combination contains at least one teacher model; Performing a first sampling on each teacher model combination that only includes one teacher model; including: inputting text samples into the teacher model and the student model in the teacher model combination respectively, training the student model based on knowledge fusion, obtaining the classification accuracy corresponding to the trained student model, and adding the teacher model combination-classification accuracy data pair to the observation information; A teacher model combination is selected based on the current observation information; if the selected teacher model combination is a sampled teacher model combination, the trained student model corresponding to the maximum classification accuracy in the observation information is used as the text classification model; if the selected teacher model combination is not sampled and contains two or more teacher models, the teacher model combination is subjected to a second sampling, including: inputting the text samples into the teacher model and the student model in the teacher model combination respectively, taking the class with the largest mean median of the predicted classification vector output by the teacher model as a pseudo hard label, concatenating all predicted classification vectors as soft labels, training the student model based on knowledge fusion according to the pseudo hard labels and soft labels, obtaining the classification accuracy corresponding to the trained student model, and adding the teacher model combination-classification accuracy data pair to the observation information, thereby updating the observation information; The text to be classified is input into a text classification model to determine the classification result of the text to be classified.
2. According to the method of multi-unknown domain text classification based on knowledge fusion according to claim 1, it is characterized in that: Build 2 based on n pre-trained teacher models n -1 Teacher Model Package includes: Based on the first teacher model t1, the second teacher model t2, ..., the Kth teacher model t k Construct a teacher model combination {t1,t2,…,t k }, denoted as vector u j =[x,x,…,x]; where j represents the teacher model combination index, x represents the first teacher model t1, the second teacher model t2,…, the Kth teacher model t in the first dimension, the second dimension,…, the kth dimension of the vector k The proportion of contributing labels that are the same during the sampling process is summed to 1; the remaining dimensions of the vector are set to zero.
3. According to the method of multi-unknown domain text classification based on knowledge fusion according to claim 1, it is characterized in that: The process of first sampling each teacher model combination containing only one teacher model includes: Input the text sample into the teacher model in the teacher model combination, use the predicted classification result output by the teacher model as the pseudo hard label, and use the predicted classification vector output by the teacher model as the soft label; Input the text sample into the student model and obtain the predicted classification result output by the student model; A cross entropy loss function is constructed based on the pseudo hard labels output by the teacher model and the predicted classification results output by the student model; a divergence loss function is constructed based on the soft labels output by the teacher model and the predicted classification results output by the student model; and the sum of the cross entropy loss function and the divergence loss function is used as the first loss function; Train the student model based on the first loss function; Input the text sample into the trained student model to obtain the classification accuracy; use the teacher model combination-classification accuracy data pair as the initial observation information.
4. The method for multi-unknown domain text classification based on knowledge fusion according to claim 1 is characterized in that: The process of selecting a teacher model combination based on the current observation information includes: The process of sampling the teacher model combination to obtain the trained student model is converted into a black box function, which takes the teacher model combination as input and the classification accuracy of the trained student model on the text sample as output; The prior distribution of the black box function is obtained according to the Gaussian process, and the expression is as follows: f(u)~GP(μ(u),k(u,u')) Where u and u' both represent the teacher model combination, f(u) represents the classification accuracy of the trained student model on the text sample, GP(.) represents the prior distribution, μ(u) represents the mean function, and k(u,u') represents the covariance function; Combining a teacher model combination in the current observation information with the output value of a black box function to reconstruct the observation information; Based on the reconstructed observation information, the mean function and covariance function in the prior distribution of the black-box function, and the multivariate normal distribution properties of the Gaussian process, the updated mean and covariance in the posterior distribution of the black-box function are obtained; The utility value of each teacher model combination is calculated based on the updated mean and covariance, and the teacher model combination with the largest utility value is selected as the teacher model combination.
5. The method for multi-unknown domain text classification based on knowledge fusion according to claim 4 is characterized in that: The process of calculating the utility value of each teacher model combination based on the updated mean and covariance includes: The expected improvement function is used to calculate the utility value of each teacher model combination based on the updated mean and covariance.
6. The method for multi-unknown domain text classification based on knowledge fusion according to claim 1 is characterized in that: If the selected teacher model combination has not been sampled and contains two or more teacher models, the process of performing the second sampling on the teacher model combination includes: Input the text sample into the teacher model in the teacher model combination, average the predicted classification vectors output by each teacher model, compare the values of each class in the predicted classification vector mean, take the class with the largest value as the pseudo hard label, and concatenate all the predicted classification vectors output by the teacher model as the soft label; Input the text sample into the student model to obtain the predicted classification vector output by the student model; A cross entropy loss function is constructed based on the pseudo hard labels output by the teacher model and the mean of the sub-prediction classification vectors output by each sub-classification head of the student model; a divergence loss function is constructed based on the soft labels output by the teacher model and the prediction classification vectors output by the student model; the sum of the cross entropy loss function and the divergence loss function is used as the second loss function; Train the student model based on the second loss function; Input the text sample into the trained student model to obtain the classification accuracy; add the teacher model combination-classification accuracy data pair to the observation information to update the observation information.
7. The method for multi-unknown domain text classification based on knowledge fusion according to claim 6 is characterized in that: If the selected teacher model combination has not been sampled and contains two or more teacher models, the process of performing the second sampling on the teacher model combination also includes: Assume that the selected teacher model combination contains m teacher models; the number of categories of text samples is c; The classification layer of the student model contains m sub-classification heads with c categories. The text sample is input into the student model, and each sub-classification head of the student model outputs a sub-prediction classification vector.
8. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the multi-unknown domain text classification method based on knowledge fusion as described in any one of claims 1-7 above.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the multi-unknown domain text classification method based on knowledge fusion as described in any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the multi-unknown domain text classification method based on knowledge fusion described in any one of claims 1-7 is implemented.
