Model interpretation method and evaluation method based on principle selection in aspect sentiment classification
Through the neural network interpretation module selected based on reason, the universality and intuitiveness of the existing aspect-level emotion classification model interpretation method is solved, and the decision-making basis is extracted and the rationality of the model is evaluated, which improves the interpretation and evaluation effect of the model.
Patent Information
- Application Number
- CN202510513878.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-22
AI Technical Summary
The existing interpretation methods of aspect-level emotion classification models lack universality and intuitiveness, and it is difficult to extract decision-making basis without disassembling the model structure, and the evaluation methods mainly focus on accuracy and ignore bias issues.
Design a model interpretation method based on reason selection, and build an interpretation module by training a neural network to output the rational selection vector, maximize the simplicity and coherence of the rationality, and classify the consistency with the text emotional polarity polarity, build an optimization objective function, and optimize the interpretation module to extract the decision-making basis.
It realizes that without disassembling the model structure, it can intuitively extract the decision basis of the aspect-level emotion classification model, provide a widely applicable explanatory framework, and evaluate the rationality of the model through the interpretation module to improve the accuracy and universality of the model.
Smart Images

Figure CN120523950A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence model interpretability, and specifically relates to a model interpretation method and evaluation method based on rationale selection in aspect sentiment classification. Background Art
[0002] Aspect Sentiment Classification (ASC) is a detailed task within sentiment analysis. It identifies the sentiment (e.g., positive, negative, or neutral) associated with specific aspects or attributes mentioned in a text. Unlike document-level or sentence-level sentiment analysis, the ASC task focuses on specific features. For example, it might analyze the sentiment associated with "battery life" in a smartphone review or "service quality" in a restaurant review. This approach provides more precise insights into user opinions and enables researchers to understand sentiment at a deeper, more targeted level.
[0003] Most recent research relies on pre-trained models and syntactic dependencies, which have achieved superior accuracy compared to traditional machine learning methods. However, current evaluations of these methods often focus solely on metrics such as accuracy, with little attention paid to whether these models harbor biases, such as gender or historical bias. For example, a movie review might include praise for the director as well as feedback on the plot and visuals. When a model outputs a positive result, it can be difficult to determine whether this is based on the plot itself or admiration for the director. Unfortunately, due to the inherent "black box" nature of deep learning models, the precise mechanisms behind their decision-making process remain elusive. Understanding the model's decision-making process can provide deeper insights into its behavior and help identify any biases. Once these biases are detected, researchers can further optimize the model and improve its performance.
[0004] In natural language processing, model explanation methods can be divided into two major categories: model-intrinsic-based explanation methods and model-outcome-based explanation methods. Model-intrinsic-based explanation methods require access to the model's internal structure and parameters, such as feature importance analysis and attention mechanism visualization. Model-outcome-based explanation methods mainly fall into two categories: counterfactual explanations and selective rationalizations. Counterfactual explanation methods perturb the model input, such as changing word order or reversing certain semantics, and then observe changes in the model output. The core of this method is to infer the logic behind the model's decisions by changing assumptions. Selective rationalization methods select a subset of the input content as evidence to explain the model's decision. The goal of this method is to provide a human-understandable explanation by screening the input features that are most influential on the model's predictions.
[0005] Currently, most aspect-level sentiment model classification methods are based on highly complex deep network structures. Existing methods for model intrinsic interpretability require specialized user skills to understand the internal mechanisms of different models. Furthermore, the interpretation results of these methods are often less than intuitive. Furthermore, these methods are often designed for a single model, limiting their generalizability. Therefore, there is a need for a more general and intuitive approach to model interpretation that does not require disassembling the model structure for observation.
[0006] Existing research on model-based interpretation lacks a universal interpretation framework. Existing methods are designed for specific models. During training, they only optimize the model's self-explanatory capabilities, which has certain limitations. Furthermore, current evaluations of aspect-level sentiment classification methods primarily focus on the accuracy of the model's predictions, with little attention paid to whether the model's decisions are biased or based on reasonable rationale.
[0007] Therefore, the technical problem that the present invention needs to solve is to find a solution that can extract the decision basis of the aspect-level sentiment classification model and display it intuitively. Summary of the Invention
[0008] In view of this, the present invention provides a model interpretation method based on rationale selection in aspect-level sentiment classification, which can extract the decision basis of the aspect-level sentiment classification model without disassembling the model structure for observation.
[0009] In order to solve the above technical problems, the present invention is implemented as follows.
[0010] A model interpretation method based on rationale selection in aspect-level sentiment classification is used to extract decision rationales in aspect-level sentiment classification (ASC) models. The method includes:
[0011] Step 1: The training text is input into the interpretation module constructed by the neural network, and the interpretation module outputs the rationale selection vector R; the rationale selection vector R is used to extract the selected elements from the training text to form the rationale X R , the rationale X R Provides the basis for decision making in the ASC model;
[0012] Step 2: Use the ASC model to test the training text and the rationale X R Perform aspect-level sentiment polarity predictions respectively and obtain text sentiment polarity classification Y I And the motivational sentiment polarity classification Y R ;
[0013] Step 3: By maximizing the motivation X R The simplicity and coherence of the text and the maximization of the sentiment polarity classification Y I Classification of sentiment polarity with motivation Y R Consistency, construct optimization objective function, and optimize training of the explanation module;
[0014] Step 4: Use the trained interpretation module to process the text to be interpreted X′ and the aspect item A′ to obtain the motivation selection vector R′. Use the motivation selection vector T′ to extract the motivation X′ from the text to be interpreted. R , as the rationale for the tested ASC model to make decisions.
[0015] Preferably, the input of the interpretation module comprises sentence-aspect pairs I=(X, A), where X=[x1, x2, ..., x n ] is the sentence to be predicted for sentiment polarity, x i Represents the specific content of position i in X, with a length of n; A is the aspect item in the text;
[0016] The output of the interpretation module is the rationale selection vector R = [r1, r2, ..., r n ], element r in R i {0,1} indicates whether to select;
[0017] Multiply the sentence X with the corresponding element of the motivation selection vector R to obtain the motivation X R .
[0018] Preferably, the maximization criterion X RThe simplicity and consistency of the constraint rationale are achieved by minimizing the number of 1s and the number of 01 / 10 transition data in the constraint rationale selection vector R; the elements in the rationale selection vector R take the values of 1 and 0, indicating selection and non-selection respectively.
[0019] Preferably, in the optimization objective function, the maximization principle X R The first optimization term for simplicity and coherence is expressed as:
[0020]
[0021] Among them, λ1 and λ2 are weighting coefficients, |||R|||1 represents the 1-norm of vector R, n is the length of R; r t The tth element in the vector R is selected as the rationale; s is a predefined sparsity level, and the value of s ranges from (0,1).
[0022] Preferably, the sparsity level s is adjusted according to the proportion of aspect items in the training text. The more aspect items A contained in the sentence X, the smaller s is.
[0023] Preferably, in the optimization objective function, the text sentiment polarity classification Y is maximized I Classification of sentiment polarity with motivation Y R The second optimization term for consistency is constructed as:
[0024] Minimize the text sentiment polarity classification Y I Probability distribution and rationale sentiment polarity classification Y R KL divergence of a probability distribution.
[0025] Preferably, in the optimization objective function, the text sentiment polarity classification Y is maximized I Classification of sentiment polarity with motivation Y R The second optimization for consistency is constructed as follows:
[0026] Use the motivation selection vector R to extract the unselected part X from the training text -R ;
[0027] Use the tested ASC model to analyze the unselected part X -R Perform aspect-level sentiment polarity prediction to obtain the third sentiment polarity classification Y -R ;
[0028] Maximize the text sentiment polarity classification Y I Classification of sentiment polarity with motivation Y R The second optimization term of consistency is constructed as follows: Minimize the text sentiment polarity classification Y I Probability distribution and rationale sentiment polarity classification Y R KL divergence of probability distribution and maximizing text sentiment polarity classification YI Probability distribution and third sentiment polarity classification Y -R KL divergence of a probability distribution.
[0029] Preferably, the interpretation module includes a BERT encoding layer, a GRUs layer, a linear layer and a Gumbel-Softmax sampling layer connected in sequence.
[0030] The present invention also provides an evaluation method for aspect-level sentiment classification models, which can utilize the decision basis extracted by the above scheme to evaluate the aspect-level sentiment classification model from a new perspective of model interpretation, thereby enabling a more comprehensive evaluation of the model.
[0031] The evaluation method of the aspect-level sentiment classification model includes:
[0032] Using the above model interpretation method, an interpretation module is trained for the ASC model to be evaluated; the rationale of the input text is extracted from the trained interpretation module;
[0033] The rationale is compared with the actual description content corresponding to the aspect item of the input text, and the sentiment polarity classification quality of the ASC model is evaluated based on the repetition between the two.
[0034] Preferably, the comparison of the rationale with the descriptive content actually corresponding to the aspect item of the input text and the evaluation of the sentiment polarity classification quality of the ASC model based on the repetition between the two is as follows:
[0035] Evaluation dimensions include precision, recall, and F1 value:
[0036]
[0037] Among them, TP is the number of true positives, which are the selected rationale content and are actually the descriptive content that truly corresponds to the aspect; FP is the number of false positives, which are the selected rationale content and are actually the descriptive content that is irrelevant to the aspect; FN is the number of false negatives, which are not in the selected rationale content but are actually the descriptive content that truly corresponds to the aspect.
[0038] Beneficial effects:
[0039] (1) The interpretation framework of the aspect-level sentiment classification model designed by the present invention can select the key parts that affect the decision-making of the ASC model from the input content and use them as the basis for interpreting the model decision. Moreover, most current sentiment classification model interpretation methods only provide targeted interpretations of a single classification model, which has poor universality. However, the interpretation framework of the present invention can be applied to most aspect-level sentiment classification models, with a wide interpretation range, facilitating interpretation research on multiple models.
[0040] (2) The present invention designs a separate explanation module to interfere with the input of the ASC classification model. It does not require understanding the internal structural framework of the model. It only needs to compare the changes in the model prediction results and train the explanation module to obtain the explanation of the model decision.
[0041] (3) Currently, when evaluating various aspect-level sentiment classification models, people only focus on whether the model classification results are accurate, and few people pay attention to whether the model has bias. However, from the perspective of model interpretation, the present invention judges whether the decision basis is reasonable based on the rationale output by the interpretation module (i.e., decision explanation), and then evaluates the ASC classification quality from a new perspective. Starting from this new perspective, it can help researchers to evaluate the model more comprehensively and further optimize the model. At the same time, it can observe the universality of the model and whether it can be applied to the sentiment classification of more content.
[0042] (4) Based on the above interpretation method and evaluation method, a higher quality model can be provided in the process of aspect-level sentiment classification, thereby improving the accuracy of aspect-level sentiment classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a schematic diagram of the first embodiment of the present invention.
[0044] Figure 2 The network structure diagram of the explanation module. DETAILED DESCRIPTION
[0045] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0046] Example 1
[0047] This embodiment provides a model interpretation method based on rationale selection in aspect sentiment classification, which can extract the rationale on which the ASC model makes decisions.
[0048] This embodiment utilizes the model's black-box structure to perturb the ASC model's inputs and observe changes in the model's predictions. Key inputs influencing the ASC model's decisions are selected to explain the model. Specifically, this invention uses selection rationalization techniques to select appropriate rationales for the ASC model's decisions.
[0049] For the convenience of description, the present invention defines the following concepts:
[0050] In the ASC task, D represents the training set. The input of the ASC model is a sentence-aspect pair I = (X, A), where X = [x1, x2, ..., x n ] is the input sentence, x iRepresents the specific content at position i, where n is the length of the sentence. A = [a1, a2,..., a l is an aspect item and also a subsequence of sentence X, with l < n. The output of the ASC model is judged by the maximum probability to generate a one-hot vector Y ∈ {0, 1}c, where c is the number of categories. Generally, it is divided into three categories: positive, negative, and neutral. The sentences here can be various comment contents, such as evaluations of products in shopping software, evaluations of restaurants and hotels in social software, evaluation conclusions of bloggers on various items, etc.
[0051] The task objective of this invention is to extract a concise and easy-to-understand subset from the input of the ASC model, which should support the prediction of the model, so as to clarify the decision-making process of the sentiment classification model.
[0052] Figure 1 Shows the schematic diagram of the model interpretation method based on rationale selection in the aspect sentiment classification of this invention. As shown in the figure, the object to be explained is the ASC model; the ASC model is an end-to-end module that accepts the comment content and the aspect item I = (X, A) as inputs and outputs the predicted sentiment classification result. The task of this invention is to extract the basis for the ASC model to make classification decisions. And the module used in this invention to achieve interpretation is Figure 1 the interpretation module in, the input of the interpretation module is text information, and the output is interpretation information. The interpretation module is implemented by a neural network and is optimized through training to have the ability to map text to interpretation information.
[0053] The model interpretation method based on rationale selection in the aspect sentiment classification of this invention includes the following steps:
[0054] Step 1: Input the training text I into the interpretation module, and the interpretation module outputs the rationale selection vector R; use the rationale selection vector R to extract the selected elements from the training text to form the rationale X R ,the rationale X R is the decision basis of the ASC model.
[0055] In this step, the input of the interpretation module includes the sentence-aspect pair I = (X, A), and the output of the interpretation module is the rationale selection vector R = [r1, r2,..., r n , and the element r i ∈ {0, 1} in R indicates whether to select. Multiply the sentence X by the corresponding elements of the rationale selection vector R to obtain the rationale X R . X R = X ⊙ R represents the content selected as the decision basis, where ⊙ represents the element-wise selection operation.
[0056] Step 2: Use the ASC model for the training text and the rationale X RPerform corresponding aspect-level sentiment polarity predictions respectively, and obtain text sentiment polarity classification Y I And the motivational sentiment polarity classification Y R .
[0057] In this step, I=(X,A) and I R =(X R ,A) Input ASC model respectively to obtain Y I and Y R .
[0058] Step 3: By maximizing the motivation X R The simplicity and coherence of the text and the maximization of the sentiment polarity classification Y I Classification of sentiment polarity with motivation Y R Consistency, build optimization objective function, and optimize training of the explanation module.
[0059] This step optimizes the interpretation module. The overall goal of the optimization is to obtain the result Y based on the rationale. R and the result Y based on the original content I As close as possible. On this basis, we also need to include some basic requirements for the selection of justifications.
[0060] Based on the above analysis, the optimization objectives of the interpretation module in this embodiment include two key aspects. First, the simplicity and coherence of the rationale, which are fundamental requirements for selection rationality; second, the consistency of the sentiment classification results of the rationale with those of the original text, with the goal of identifying the basis for the model's predictions in the input text.
[0061] (1) Simplicity and coherence: The overall task goal is to select the part that the model pays most attention to, which means that the content needs to be selected as little as possible, so the rationale is required to be simple. At the same time, considering that the main content of the text that humans pay attention to during sentiment classification is not too scattered, but rather some relatively concentrated short sentences, the selected rationale should meet the requirement of coherence. The content of 0 and 1 in the rationale selection vector R is easy to solve the above content. Therefore, in this embodiment, simplicity and coherence are achieved by minimizing the number of 1s in the constraint rationale selection vector R and the number of 01 / 10 jump data.
[0062] In a preferred embodiment, the above-mentioned conciseness and coherence determination principles are expressed using the following constraints:
[0063]
[0064] The first half of the above formula expresses the requirement for concise reasoning, aiming to keep the rationale as short as possible; the second half expresses the constraint on coherence, aiming to minimize the distance between rationale words. Here, λ1 and λ2 are weighting coefficients, ∣∣R∣∣1 represents the 1-norm of vector R, which represents the sum of the absolute values of all elements in the vector, and n is the length of R; r t The tth element in the vector R is selected as the rationale; s is a predefined sparsity level, and the value of s ranges from (0,1).
[0065] Here, the purpose of setting s is to select as little content as possible and find the part that the evaluation model is most concerned about.
[0066] In a preferred embodiment, the sparsity level s is adaptively adjusted according to the proportion of aspect items in the training text. The more aspect items A contained in the sentence X, the smaller s is.
[0067] The optimization terms for simplicity and coherence are:
[0068] minE (I,Y)~D [Ω(R)]
[0069] (2) Consistency of sentiment classification results
[0070] In order to achieve the task goal, it is necessary to identify the specific parts of the input that can change the results of the sentiment classification model. Specifically, the goal of this invention is to find certain content in the input so that when these contents are used as input, the classification results are consistent with the original results. Conversely, when other parts of the original input are processed by the model, the classification results should be opposite to the original results. To achieve this goal, the D-separation principle is introduced. Through this principle, the causal relationship between the input and output of the ASC model is analyzed, and the following conclusions are drawn: Assuming that the rationale for the selection is X R , the corresponding input is I R =(X R ,A),The unselected original evaluation part is X -R , the corresponding input is I -R =(X _R ,A), and the part that affects the model decision is X J .So Equivalent to Y I ⊥X _R |X R Therefore, it is deduced that P(Y R ∣I R )=P(Y I |I). After conversion, the following function is obtained:
[0071] D KL (P(Y I ∣I)∣∣P(Y R∣I R ))=0
[0072] Among them, P(Y I |I) represents the initial text sentiment polarity classification Y I The probability distribution of P(Y R ∣I R ) represents the motivational sentiment polarity classification Y R The probability distribution of D KL (∣∣) represents the KL divergence calculation. In actual calculations, data is usually processed in batches, and each calculation uses the output of the ASC model for the corresponding batch of data.
[0073] Therefore, for the consistency of the results, if only Y is considered I With Y R In order to keep the same situation as much as possible, the result consistency constraint is constructed as minimizing the probability distribution of text sentiment polarity classification Y and the rationale sentiment polarity classification Y R The divergence of the probability distribution. Then the optimization term for the consistency of the results is expressed as:
[0074] min E (I,Y)~D [D KL (P(Y I |I)||P(Y R ∣I R ))]
[0075] In a preferred embodiment, we can further consider the constraint that "when other parts of the original input are processed by the model, the classification result should be opposite to the original result". Then, based on the above constraint, we add the maximum text sentiment polarity classification Y I Probability distribution and sentiment polarity classification Y corresponding to the rationale -R KL divergence of the probability distribution. Y -R For ASC model I _R The processing result.
[0076] So for Figure 1 For example, we need to further add the operation of the dotted box:
[0077] First, the motivation selection vector R is used to extract the unselected part X from the training text. -R ;
[0078] The ASC model is used to select the input I corresponding to the unselected part. -R Perform sentiment polarity prediction to obtain the third sentiment polarity classification Y -R ;
[0079] Maximize the text sentiment polarity classification Y I Classification of sentiment polarity with motivation Y RThe second optimization term of consistency is constructed as follows: Minimize the text sentiment polarity classification Y I Probability distribution and rationale sentiment polarity classification Y R KL divergence of probability distribution and maximizing text sentiment polarity classification Y I Probability distribution and third sentiment polarity classification Y -R The KL divergence of the probability distribution. Then the optimization term for the result consistency is constructed as:
[0080] min E (I,Y)~R [D KL (P(Y I |I)||P(Y R ∣I R ))]+max E (I,Y)~D [D KL (P(Y I |I)||P(Y -R ∣I -R ))]
[0081] Combining the constraints of the first two parts, the following optimization objectives are proposed:
[0082] min E (I,Y)~D [D KL (P(Y I |I)||P(Y R ∣I R ))+Ω(R)]+max E (I,Y)~D [D KL (P(Y I |I)||P(Y -r ∣I -R ))]
[0083] Step 4: Use the trained interpretation module to process the text to be interpreted X′ and the aspect item A′ to obtain the motivation selection vector R′, and use the motivation selection vector R′ to extract the motivation X′ from the text to be interpreted R , as the rationale for the tested ASC model to make decisions.
[0084] Example 2
[0085] This embodiment provides a preferred structural diagram of the interpretation module. Figure 2The model structure diagram shown in the figure. First, the first layer is a pre-trained BERT encoding layer, which is used to extract deep semantic features of the input text. This pre-trained BERT encoding layer can directly adopt existing results. The GRU layer is then stacked to process sequence data and can capture the temporal dependencies between words in the input. Next, a linear layer maps the output of the GRU layer to a lower-dimensional space to prepare for the final classification task. The final output reasoning is sampled using Gumbel-Softmax, which can perform differentiable sampling in a discrete distribution and make discrete selections while maintaining the feasibility of backpropagation. The final output R is used as a mask for dot multiplication with the initial input X to obtain the reasoning that supports the classification model.
[0086] Example 3
[0087] This embodiment provides a solution for evaluating an ASC model using a trained interpretation module.
[0088] This solution adopts the model interpretation solution of the first embodiment, trains an interpretation module for the ASC model to be evaluated, and extracts the rationale of the input text from the trained interpretation module.
[0089] Then, the sentiment polarity classification quality of the ASC model is evaluated based on the repetition of the rationale and the actual description content corresponding to the aspect items in the input text.
[0090] The description content that actually corresponds to the aspect item can be identified manually or by using a large language model.
[0091] When evaluating, the following dimensions are preferred, including precision, recall, and F1 value. The evaluation formula is:
[0092]
[0093] Among them, TP is the number of true positives, which are the selected rationale content and are actually the descriptive content that truly corresponds to the aspect; FP is the number of false positives, which are the selected rationale content and are actually the descriptive content that is irrelevant to the aspect; FN is the number of false negatives, which are not in the selected rationale content but are actually the descriptive content that truly corresponds to the aspect.
[0094] For example, if the text is "The weather is great today, and I'm in a good mood," and the actual description of its aspect item is "I'm in a good mood," then TP = 3, FP = 2, and FN = 2 if the rationale output is "I'm very happy today."
[0095] After obtaining the precision, recall, and F1 value, a threshold-based method can be used for evaluation.
[0096] Example 3
[0097] Based on the above interpretation and evaluation methods, better aspect-level sentiment classification can be performed, including:
[0098] Step A: Determine the ASC model.
[0099] Step B: Train the interpretation module and extract rationale using the method of steps 1 to 4 of Example 1;
[0100] Step C: Based on the evidence, the ASC model is evaluated using the method of Example 3; if the evaluation passes, step D is executed; if the evaluation fails, the ASC model is prompted to be adjusted until the evaluation passes;
[0101] Step D: Use the ASC model that has passed the evaluation to perform aspect-level sentiment classification.
[0102] The above specific embodiments merely illustrate the design principles of the present invention. The shapes and names of the components described herein may vary and are not limiting. Therefore, those skilled in the art may modify or substitute equivalents for the technical solutions described in the above embodiments. Such modifications and substitutions, without departing from the inventive spirit and technical solutions of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A model explanation method based on motivation selection in aspect sentiment classification, characterized by: Used to extract decision-making basis in aspect-level sentiment classification ASC model; the method includes: Step 1: The training text is input into the interpretation module constructed by the neural network, and the interpretation module outputs the rationale selection vector R; the rationale selection vector R is used to extract the selected elements from the training text to form the rationale X R , the rationale X R Provides the basis for decision making in the ASC model; Step 2: Use the ASC model to test the training text and the rationale X R Perform sentiment polarity prediction respectively and obtain text sentiment polarity classification Y I And the motivational sentiment polarity classification Y R ; Step 3: By maximizing the motivation X R The simplicity and coherence of the text and the maximization of the sentiment polarity classification Y I Classification of sentiment polarity with motivation Y R Consistency, construct optimization objective function, and optimize training of the explanation module; Step 4: Use the trained interpretation module to process the text to be interpreted X′ and the aspect item A′ to obtain the motivation selection vector R′, and use the motivation selection vector R′ to extract the motivation X′ from the text to be interpreted R , as the rationale for the tested ASC model to make decisions.
2. The method according to claim 1, wherein The input of the interpretation module includes sentence-aspect pairs I=(X,A), where X=[x1,x2,...,x n ] is the sentence to be predicted for sentiment polarity, x i Represents the specific content of position i in X, with a length of n; A is the aspect item in the text; The output of the interpretation module is the rationale selection vector R = [r1, r2, ..., r n ], element r in R i The value is 0 or 1 to indicate whether it is selected; Multiply the sentence X with the corresponding element of the motivation selection vector R to obtain the motivation X R .
3. The method according to claim 1, wherein The maximization motivation X R The simplicity and consistency of the vector R are achieved by minimizing the number of 1s and the number of 01 / 10 transition data in the constraint rationale selection vector R. The elements in the rationale selection vector R take values of 1 and 0, indicating selection and non-selection respectively.
4. The method according to claim 3, wherein In the optimization objective function, the maximization of the rationale X R The first optimization term for simplicity and coherence is expressed as: Among them, λ1 and λ2 are weighting coefficients, |||R|||1 represents the 1-norm of vector R, n is the length of R; r t The tth element in the vector R is selected as the rationale; s is a predefined sparsity level, and the value of s ranges from (0,1).
5. The method according to claim 4, wherein The sparsity level s is adjusted according to the proportion of aspect items in the training text. The more aspect items A contained in the sentence X, the smaller s is.
6. The method according to claim 1, wherein In the optimization objective function, the text sentiment polarity classification Y is maximized I Classification of sentiment polarity with motivation Y R The second optimization term for consistency is constructed as: Minimize the text sentiment polarity classification Y I Probability distribution and rationale sentiment polarity classification Y R The divergence of a probability distribution.
7. The method according to claim 1, wherein In the optimization objective function, the text sentiment polarity classification Y is maximized I Classification of sentiment polarity with motivation Y R The second optimization for consistency is constructed as follows: Use the motivation selection vector R to extract the unselected part X from the training text -R ; Use the tested ASC model to analyze the unselected part X -R Perform aspect-level sentiment polarity prediction to obtain the third sentiment polarity classification Y -R ; Maximize the text sentiment polarity classification Y I Classification of sentiment polarity with motivation Y R The second optimization term of consistency is constructed as follows: Minimize the text sentiment polarity classification Y I Probability distribution and rationale sentiment polarity classification Y R KL divergence of probability distribution and maximizing text sentiment polarity classification Y I Probability distribution and third sentiment polarity classification Y -R KL divergence of a probability distribution.
8. The method according to claim 1, wherein The interpretation module includes a BERT encoding layer, a GRUs layer, a linear layer and a Gumbel-Softmax sampling layer connected in sequence.
9. A method for evaluating aspect-level sentiment classification models, characterized in that: include: Adopting the model interpretation method according to any one of claims 1 to 8 to train an interpretation module for the ASC model to be evaluated; Extract the rationale of the input text to the trained explanation module; The rationale is compared with the actual description content corresponding to the aspect item of the input text, and the sentiment polarity classification quality of the ASC model is evaluated based on the repetition between the two.
10. The evaluation method of aspect-level sentiment classification model according to claim 9, characterized in that: The reasoning is compared with the description content corresponding to the aspect item of the input text, and the sentiment polarity classification quality of the ASC model is evaluated based on the repetition of the two as follows: Evaluation dimensions include precision, recall, and F1 value: Among them, TP is the number of true positives, which are the selected rationale content and are actually the descriptive content that truly corresponds to the aspect; FP is the number of false positives, which are the selected rationale content and are actually the descriptive content that is irrelevant to the aspect; FN is the number of false negatives, which are not in the selected rationale content but are actually the descriptive content that truly corresponds to the aspect.