Decision boundary enhancement method and device for speech intention recognition model
By calculating principal component differences and adjusting the loss function with a weight coefficient, the speech intent recognition model's decision boundary is clarified, enhancing its ability to accurately differentiate between intents and improving robustness.
Patent Information
- Application Number
- CN202411185799.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-27
AI Technical Summary
Existing speech intent recognition models have unclear decision boundaries, leading to intent recognition errors in complex and changeable application environments, due to conventional training methods focusing on data fitting rather than sensitivity to category differences.
A method and device for enhancing the decision boundary of speech intent recognition models by calculating principal component differences between speech and manual recognition texts, determining a difference weight coefficient, and adjusting the loss function using hyperparameters to control the influence of these differences, thereby improving model sensitivity and accuracy.
The approach enhances the decision boundary, improving the model's ability to distinguish between intent categories, increasing accuracy and robustness in handling diverse application scenarios.
Smart Images

Figure CN118711574B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method and device for enhancing the decision boundary of a speech intention recognition model. Background Art
[0002] In the field of speech recognition and natural language processing, speech intent recognition models are widely used in scenarios such as intelligent voice assistants, automatic customer service, and voice search. However, when faced with complex and changeable actual application environments, existing speech intent recognition models have unclear decision boundaries, which can easily lead to intent recognition errors, thus affecting user experience and system reliability.
[0003] The performance of speech intent recognition models depends largely on the decision boundary of the model, that is, how clearly the model can distinguish between different intent categories. Currently, conventional training methods usually focus on maximizing the model's ability to fit the training data, while ignoring the model's sensitivity to differences between different categories, which leads to a decrease in the model's recognition performance when there is a difference between the training data and the real application data.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for enhancing the decision boundary of a speech intent recognition model, so as to at least solve the technical problem that the decision boundary of the speech intent recognition model is unclear.
[0006] According to one aspect of an embodiment of the present invention, a decision boundary enhancement method for a speech intention recognition model is provided, comprising: calculating the principal component differences between speech recognition text and artificial recognition text in training data used to train the speech intention recognition model, and determining a difference weight coefficient based on the principal component differences; adjusting the loss function of the speech intention recognition model based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model; wherein determining the difference weight coefficient based on the principal component differences comprises: determining a hyperparameter, wherein the hyperparameter is used to control the degree of influence of the principal component differences on the weight of the loss function; and determining the difference weight coefficient based on the hyperparameter and the principal component differences.
[0007] According to another aspect of an embodiment of the present invention, a decision boundary enhancement device for a speech intention recognition model is also provided, comprising: a calculation module, configured to calculate the principal component differences between speech recognition text and manual recognition text in training data for training the speech intention recognition model, and determine a difference weight coefficient based on the principal component differences; an enhancement module, configured to adjust the loss function of the speech intention recognition model based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model; wherein determining the difference weight coefficient based on the principal component difference comprises: determining a hyperparameter, wherein the hyperparameter is used to control the degree of influence of the principal component difference on the weight of the loss function; and determining the difference weight coefficient based on the hyperparameter and the principal component difference.
[0008] In an embodiment of the present invention, the principal component differences between the speech recognition text and the manual recognition text in the training data used to train the speech intention recognition model are calculated, and the difference weight coefficient is determined based on the principal component differences; the loss function of the speech intention recognition model is adjusted based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model, thereby solving the technical problem of unclear decision boundary of the speech intention recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0010] Figure 1 is a flow chart of a decision boundary enhancement method of a speech intent recognition model according to an embodiment of the present invention;
[0011] Figure 2 is a flow chart of a method for determining a difference weight coefficient according to an embodiment of the present invention;
[0012] Figure 3 is a flowchart of another decision boundary enhancement method of a speech intent recognition model according to an embodiment of the present invention;
[0013] Figure 4 is a flow chart of a method for enhancing the decision boundary of a model based on principal component differences according to an embodiment of the present invention;
[0014] Figure 5 is a structural schematic diagram of a decision boundary enhancement device for a speech intent recognition model according to an embodiment of the present invention;
[0015] Figure 6 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0018] According to an embodiment of the present invention, a method embodiment of a decision boundary enhancement method for a speech intent recognition model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0019] Figure 1 is a decision boundary enhancement method for a speech intent recognition model according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0020] Step S102, calculating the principal component difference between the speech recognition text and the manual recognition text in the training data for training the speech intention recognition model, and determining the difference weight coefficient based on the principal component difference;
[0021] like Figure 2 As shown, the method for determining the difference weight coefficient may include the following steps:
[0022] Step S1022, calculating the principal component difference.
[0023] For example, extract the first sentence vector of the speech recognition text and the second sentence vector of the manual recognition text respectively, and perform tensor conversion on the first sentence vector and the second sentence vector to obtain the first sentence tensor and the second sentence tensor respectively; perform tensor decomposition on the first sentence tensor and the second sentence tensor respectively, and calculate the principal component difference between the decomposed first sentence tensor and the decomposed second sentence tensor. By calculating the principal component difference, the embodiment of the present application can more accurately capture the key differences between the speech recognition text and the manual recognition text; by extracting sentence vectors and performing tensor conversion and decomposition, it ensures the comprehensive representation of text features in high-dimensional space, so that the calculated principal component difference can reflect the subtle differences in the intended expression of the two texts.
[0024] Step S1024, determine the hyperparameters.
[0025] Hyperparameters are hyperparameters used to control the degree of influence of the principal component differences on the weight of the loss function. Randomly select a set of initial sampling points in the hyperparameter space as hyperparameter sampling points; loop the following until a preset number of iterations is reached: determine the probabilistic approximation of the relationship between the hyperparameter sampling points and the speech intent recognition model, and select the next set of sampling points in the hyperparameter space as the hyperparameter sampling points based on the probabilistic approximation; after the loop ends, select the best sampling point from the hyperparameter sampling points, and use the configuration parameters of the selected sampling points as the hyperparameters. This application significantly enhances the adaptability and generalization ability of the model by optimizing the hyperparameters, so that the influence of the principal component differences on the loss function can be accurately controlled, thereby forming a clearer decision boundary between different intent categories, and significantly improving the accuracy and robustness of speech intent recognition.
[0026] In some embodiments, the following method can be used to determine the probability approximation: based on the objective function of the hyperparameter space, the objective function value of each sampling point in the hyperparameter sampling point is calculated, and the probability distribution of the objective function value of each sampling point is calculated using a probability model; based on the probability distribution, the probability approximation of the relationship between the hyperparameter sampling point and the speech intent recognition model is determined. By adopting the method of probability approximation, the embodiment of the present application can effectively capture the complex relationship between the hyperparameter sampling point and the speech intent recognition model. By calculating the probability distribution of the objective function value, the selection of hyperparameters is made more scientific and accurate, ensuring that the model can more stably optimize the loss function during the training process.
[0027] In some embodiments, the following method can be used to select the next set of sampling points: based on the probability approximation, calculate the predicted mean and predicted uncertainty of the objective function at the candidate sampling points in the hyperparameter space; based on the predicted mean and the predicted uncertainty, calculate the expected value of the candidate sampling points using a preset sampling strategy; based on the expected value of the candidate sampling points, select candidate sampling points with an upper limit of the confidence interval from the candidate sampling points as the next set of hyperparameter sampling points. The embodiment of the present application can more effectively explore the hyperparameter space and accurately identify the optimal hyperparameter configuration by selecting the next set of sampling points based on the predicted mean and uncertainty. Using a preset sampling strategy to calculate the expected value of the candidate sampling points and select sampling points with an upper limit of the confidence interval can maximize the training efficiency and effect of the model.
[0028] Step S1026, determining the difference weight coefficient.
[0029] The difference weight coefficient is determined based on the hyperparameter and the principal component difference.
[0030] Step S104, adjusting the loss function of the speech intention recognition model based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model.
[0031] For example, based on the difference weight coefficient, the loss function is directly adjusted; or, based on the difference weight coefficient, the loss function is adjusted by adjusting the training samples of the speech intention recognition model.
[0032] Figure 3 is another decision boundary enhancement method of the speech intent recognition model according to an embodiment of the present invention, such as Figure 3 As shown, the method comprises the following steps:
[0033] Step S302: extract sentence vectors from training samples.
[0034] First, a speech signal is received. The speech signal is converted into corresponding speech recognition text by a speech recognition module. The artificial recognition text can be a text that is manually annotated and matches the semantic content of the speech signal. The training sample includes the speech recognition text corresponding to the speech signal and the artificial recognition text.
[0035] Next, the speech intention recognition model (hereinafter referred to as the model) will perform feature extraction on the speech recognition text and the manual recognition text respectively. The speech intention recognition model can adopt a neural network model based on the Transformer architecture, such as a BERT or GPT model. The input layer of the model receives text data and converts it into a word embedding vector, which represents the semantic information of each word.
[0036] Specifically, first, the speech intent recognition model inputs the speech recognition text into the embedding layer to generate a word embedding matrix representing the text. Each row in the matrix corresponds to the embedding vector of a word. Then, after being processed by multiple self-attention layers, the model can capture the long-distance dependencies between words in the text and generate the first sentence vector. The first sentence vector is obtained by performing a pooling operation on the embedding matrix output by the self-attention layer. The operation can be average pooling or maximum pooling, thereby compressing the embedding matrix into a vector of fixed dimension.
[0037] The same process is also applied to the human-recognized text. After the human-recognized text is processed by the embedding layer and the self-attention layer, the second sentence vector is generated.
[0038] The generation process of the first sentence vector and the second sentence vector ensures that the model can capture the semantic information between the speech recognition text and the manual recognition text in a high-dimensional space. Specifically, the generated sentence vector is a semantic feature representation of the text, and each dimension of the vector corresponds to a specific semantic feature. These features can include grammatical structure, lexical relations, context associations, and other information. By learning these features, the model can better understand the semantics of the text.
[0039] Step S304, converting the sentence vector into a sentence tensor.
[0040] After the sentence vectors are extracted, the generated first sentence vector (from speech recognition text) and second sentence vector (from manual recognition text) need to be further converted into tensor representations suitable for subsequent processing.
[0041] Specifically, first, the first sentence vector and the second sentence vector are respectively input into the tensor conversion module. The tensor conversion module performs dimension expansion on each sentence vector according to a preset expansion dimension. The expanded vector represents the multi-dimensional features of the sentence in a high-dimensional space, thereby enhancing the semantic expression capability.
[0042] Next, the expanded sentence vector is subjected to feature fusion operation. Feature fusion can be achieved through convolution operation, where each dimension in the expanded dimension is used as a feature channel, and the features of each dimension are extracted and combined through the convolution kernel to obtain the fused first sentence vector and the second sentence vector.
[0043] Finally, the fused sentence vector is activated to introduce nonlinear features. The activation function can be ReLU, which can enhance the expressiveness of the model and enable the tensor to better capture complex semantic relationships. After the activation operation, the generated sentence tensor will contain richer semantic information, laying the foundation for subsequent decision boundary enhancement.
[0044] Step S306, performing decision boundary enhancement based on the sentence tensor.
[0045] After the sentence tensors are generated, the sentence tensors are further processed to enhance the decision boundary of the model. This embodiment enhances the distinguishing ability of the model in the speech intent recognition task by decomposing and comparing the features of the sentence tensors.
[0046] First, the first sentence tensor and the second sentence tensor are subjected to tensor decomposition operations respectively. Tensor decomposition can be achieved by singular value decomposition and principal component analysis methods. The decomposition process decomposes the sentence tensor into multiple factor matrices and core vectors, thereby extracting the most representative features.
[0047] Next, the principal component differences between the first sentence tensor and the second sentence tensor after decomposition are calculated. The principal component differences are calculated by comparing the similarity of the core vectors and the differences between the factor matrices. These differences reflect the subtle differences in semantics between the speech recognition text and the manual recognition text, which helps the model to accurately divide the decision boundary. Specifically, by calculating the cosine similarity of the decomposed core vectors, the similarity of the two sentence tensors on their main feature vectors is evaluated. The cosine similarity reflects the angle between the two vectors, and the closer the value is to 1, the more similar the two vectors are. Through the above steps, the proximity of the two sentence tensors in the semantic space can be identified. After that, the differences in the structural features of the two sentence tensors are quantified by comparing the elements of the factor matrix after decomposition. For example, the difference in the element of the factor matrix or the difference in the matrix norm can be calculated to evaluate the semantic differences between the two tensors in different dimensions. Finally, the core vector similarity and the factor matrix difference are combined to form the principal component difference.
[0048] Finally, based on the calculated principal component differences, the decision boundary of the model is enhanced. Specifically, Figure 4 As shown, the following steps are included:
[0049] Step S3062, generating a difference weight coefficient.
[0050] Based on the above principal component differences, a difference weight coefficient is generated to adjust the weight of the loss function. The difference weight coefficient α can be defined in the following way:
[0051]
[0052] Among them, β is a hyperparameter used to control the influence of the principal component difference on the weight of the loss function; cosine_similarity represents the difference of the i-th principal component, P is the core vector similarity, Q iis the difference of the i-th factor matrix, and n is the number of factor matrices. When the similarity between the principal component vectors of the two sentence tensors is low (i.e., the difference is large), the value of α will increase, thereby increasing the loss function weight of the corresponding sample.
[0053] In some embodiments, the difference weight coefficient can also be obtained by:
[0054]
[0055] Among them, γ is the initial weight coefficient, which sets the baseline value of the weight; λ is the adjustment coefficient, which controls the influence of the principal component difference on the exponential function; δ is the difference amplification factor, which is used to increase or decrease the influence of the principal component difference.
[0056] In some embodiments, the hyperparameters may be obtained using the following method.
[0057] First, a set of initial sampling points are randomly selected in the hyperparameter space as hyperparameter sampling points.
[0058] Then, the following two steps are executed repeatedly until the preset number of iterations is reached:
[0059] 1) Determine the probability approximation.
[0060] First, based on the objective function in the hyperparameter space, the objective function value of each sampling point in the hyperparameter sampling point is calculated. The objective function is used to quantify the performance of the speech intent recognition model under different hyperparameter configurations. By selecting a set of sampling points in the hyperparameter space and calculating the objective function values corresponding to these sampling points in turn, the performance data of the model at these sampling points is obtained.
[0061] Next, based on the objective function value, the probability distribution of the objective function value of each sampling point is calculated using a probability model. Preferably, the probability model can use Gaussian Process Regression (GPR) or other suitable probability modeling methods. By performing probability modeling on the calculated objective function value, the distribution characteristics of the objective function value of each sampling point in the hyperparameter space are determined. The probability distribution reflects the degree of influence of different hyperparameter configurations on the objective function and can quantify the prediction uncertainty of the model performance.
[0062] Finally, based on the probability distribution, the probability approximation of the relationship between the hyperparameter sampling points and the speech intent recognition model is further determined. Specifically, by applying the probability distribution of the objective function value, the hyperparameters of each sampling point are probabilistically approximated, thereby quantifying the potential impact of these sampling points on the model performance. This probabilistic approximation helps to select the hyperparameter configuration that can improve the model performance in the subsequent steps, ensuring that the optimization direction in the model training process is clearer and more effective.
[0063] 2) Select the next set of sampling points.
[0064] First, based on the determined probability approximation, the predicted mean and predicted uncertainty of the objective function at the candidate sampling points in the hyperparameter space are calculated. Multiple candidate sampling points are defined in the hyperparameter space, and the position of each candidate sampling point is evaluated based on the model structure and parameter configuration. For example, methods such as Bayesian optimization can be used to predict the possible performance of the objective function at each candidate sampling point, and then calculate its predicted mean and predicted uncertainty. In the embodiment of the present application, the predicted value not only includes the predicted mean of the objective function value, but also takes into account the predicted uncertainty, that is, the range of fluctuations that may occur in the objective function at the sampling point. By comprehensively considering the predicted mean and uncertainty, the potential value of the candidate sampling point in the optimization process can be more accurately evaluated.
[0065] Next, based on the predicted mean and uncertainty, a preset sampling strategy is used to calculate the expected value of the candidate sampling points. The preset sampling strategy may include upper confidence limit sampling, expected improvement and other methods, through which the relationship between exploration and utilization can be effectively balanced. The upper confidence limit sampling strategy tends to select sampling points that have both a high mean and a large uncertainty in the current prediction, so as to expand the exploration range as much as possible and increase the probability of finding the global optimal solution.
[0066] Finally, based on the expected value of the candidate sampling points, candidate sampling points with the upper limit of the confidence interval are selected from the candidate sampling points as the next set of hyperparameter sampling points. This application ensures that during the iterative optimization process, the model can always move towards the global optimal direction. At the same time, by continuously selecting sampling points with the upper limit of the confidence interval, it is possible to effectively avoid falling into the local optimal solution, thereby improving the optimization efficiency and performance of the overall model.
[0067] After the iteration is completed, an optimal sampling point is selected from the selected hyperparameter sampling points, and the configuration parameters of the selected sampling point are used as the hyperparameter.
[0068] This embodiment effectively enhances the sensitivity of the model to the differences in principal components between samples by introducing a difference weight coefficient. When the similarity of two sentence tensors is low, the value of α is dynamically increased to increase the weight of these samples in the loss function. In addition, the initial weight coefficient ensures that the model has a baseline weight at the beginning of training to avoid neglecting difference samples; the adjustment coefficient controls the intensity of the influence of the principal component difference on the exponential function, so that the model can fine-tune the sensitivity to difference samples; the difference amplification factor is used to enhance or reduce the influence of the principal component difference, allowing the model to choose to pay more attention to high-difference samples or maintain balanced processing of samples based on task requirements. In summary, the above method can make the model pay more attention to processing samples with significant differences, which helps to optimize the decision boundary of the model, thereby improving the accuracy and robustness of the overall model.
[0069] Step S3064, adjust the loss function.
[0070] 1) Directly adjust the loss function
[0071] The difference weight coefficient α is introduced into the loss function to adjust the loss function. Assuming the loss function is L(θ), the adjusted loss function L′(θ) can be expressed as:
[0072]
[0073] Here, θ represents the model parameters. Under this adjustment, the weight of the loss function for samples with large differences will increase, prompting the model to learn more deeply on these samples, thereby improving the model's ability to distinguish on the decision boundary.
[0074] 2) Adjust the loss function by adjusting the training data
[0075] Based on the size of the difference weight coefficient, the training samples are reselected. For samples with large principal component differences, their weights are retained first and increased during the training process to ensure that the importance of these samples in the training is strengthened. For example, based on a pre-set threshold, when the principal component difference of a sample exceeds the threshold, the sample will be marked as a key sample.
[0076] For the training data marked as key samples, more variants are generated through data augmentation techniques (such as adding noise, random cropping, rotation, etc.), thereby increasing the proportion of these samples in the training set. This not only increases the diversity of samples, but also further amplifies the effect of the difference weight coefficient, so that the loss function can better adapt to different intent categories.
[0077] For samples with small principal component differences, they do not have a significant impact on intent recognition, so the weight of these samples can be reduced during training, or even removed from the training set. Through this sample screening mechanism, redundant information in the training data can be reduced, so that the model training process can focus more on samples that have an important impact on the decision boundary.
[0078] This application is achieved by adjusting the loss function of the model so that the model can better handle boundary samples, thereby improving the accuracy and robustness of speech intent recognition.
[0079] The present application also provides a decision boundary enhancement device for a speech intent recognition model, such as Figure 5 As shown, it includes: a calculation module 52, which is configured to calculate the principal component differences between the speech recognition text and the manual recognition text in the training data for training the speech intention recognition model, and determine the difference weight coefficient based on the principal component differences; an enhancement module 54, which is configured to adjust the loss function of the speech intention recognition model based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model; wherein, determining the difference weight coefficient based on the principal component difference includes: determining a hyperparameter, wherein the hyperparameter is used to control the degree of influence of the principal component difference on the weight of the loss function; determining the difference weight coefficient based on the hyperparameter and the principal component difference.
[0080] It should be noted that the decision boundary enhancement device for the speech intention recognition model provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the decision boundary enhancement device for the speech intention recognition model provided in the above embodiment and the decision boundary enhancement method embodiment of the speech intention recognition model belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0081] Figure 6 FIG. 1 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. It should be noted that: Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0082] like Figure 6As shown, the electronic device includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0083] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0084] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, various functions defined in the method and apparatus of the present application are executed. In some embodiments, the electronic device may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0085] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0086] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the 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 boxes represented in succession 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 or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0087] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0088] As another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device.
[0089] The computer-readable medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments. For example, the electronic device can implement each step of the method embodiment.
[0090] As another aspect, the present application further provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program executable by the at least one processor, and the computer program is used to enable the electronic device to perform the method of the embodiment of the present application when executed by the at least one processor.
[0091] As another aspect, the present application further provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.
[0092] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0093] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0097] If the integrated unit is implemented in the form of a software functional unit 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, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0098] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A decision boundary enhancement method for a speech intent recognition model, characterized in that: include: Calculating the principal component difference between the speech recognition text and the manual recognition text in the training data for training the speech intention recognition model, and determining the difference weight coefficient based on the principal component difference; Adjusting the loss function of the speech intention recognition model based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model; Wherein, determining the difference weight coefficient based on the principal component difference comprises: determining a hyperparameter, wherein the hyperparameter is used to control the influence of the principal component difference on the weight of the loss function; determining the difference weight coefficient based on the hyperparameter and the principal component difference; Wherein, determining the hyperparameters comprises: randomly selecting a group of initial sampling points in the hyperparameter space as the hyperparameter sampling points; looping and executing the following until a preset number of iterations is reached: determining the probability approximation of the relationship between the hyperparameter sampling points and the speech intention recognition model, and selecting the next group of sampling points in the hyperparameter space as the hyperparameter sampling points based on the probability approximation; selecting the best sampling point from the hyperparameter sampling points, and using the configuration parameters of the selected sampling point as the hyperparameter; Wherein, determining the probability approximation of the relationship between the hyperparameter sampling point and the speech intention recognition model includes: calculating the objective function value of each sampling point in the hyperparameter sampling point based on the objective function of the hyperparameter space, and calculating the probability distribution of the objective function value of each sampling point using a probability model; determining the probability approximation of the relationship between the hyperparameter sampling point and the speech intention recognition model based on the probability distribution; Wherein, selecting the next group of sampling points in the hyperparameter space as the hyperparameter sampling points based on the probability approximation includes: calculating the predicted mean and predicted uncertainty of the objective function at the candidate sampling points in the hyperparameter space based on the probability approximation; calculating the expected value of the candidate sampling points using a preset sampling strategy based on the predicted mean and the predicted uncertainty; and selecting candidate sampling points with upper limits of confidence intervals from the candidate sampling points as the next group of hyperparameter sampling points based on the expected values of the candidate sampling points; Wherein, adjusting the loss function of the speech intention recognition model based on the difference weight coefficient includes: directly adjusting the loss function based on the difference weight coefficient; or adjusting the loss function by adjusting the training samples of the speech intention recognition model based on the difference weight coefficient; Among them, calculating the principal component difference between the speech recognition text and the artificial recognition text in the training data used to train the speech intention recognition model includes: respectively extracting the first sentence vector of the speech recognition text and the second sentence vector of the artificial recognition text, and respectively performing tensor conversion on the first sentence vector and the second sentence vector to obtain a first sentence tensor and a second sentence tensor; respectively performing tensor decomposition on the first sentence tensor and the second sentence tensor, and calculating the principal component difference between the decomposed first sentence tensor and the decomposed second sentence tensor.
2. A decision boundary enhancement device for a speech intention recognition model, characterized in that: include: A calculation module configured to calculate the principal component difference between the speech recognition text and the manual recognition text in the training data for training the speech intention recognition model, and determine the difference weight coefficient based on the principal component difference; An enhancement module, configured to adjust the loss function of the speech intention recognition model based on the difference weight coefficient to enhance the decision boundary of the speech intention recognition model; Wherein, determining the difference weight coefficient based on the principal component difference comprises: determining a hyperparameter, wherein the hyperparameter is used to control the influence of the principal component difference on the weight of the loss function; determining the difference weight coefficient based on the hyperparameter and the principal component difference; Wherein, the device is used to implement the method described in claim 1.
3. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to claim 1.
4. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is configured to execute a computer program stored in the memory, and the computer program enables the processor to execute the method according to claim 1 when running.
5. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Patent Citations
XLNet-based intelligent voice conversation intention recognition method
CN110689878A
Intention recognition model training method, intention recognition method, and related apparatus
CN111161740A
