CN113254576A - Method and device for predicting and tracing human behaviors and emotions - Google Patents

Method and device for predicting and tracing human behaviors and emotions Download PDF

Info

Publication number
CN113254576A
CN113254576A CN202110453104.8A CN202110453104A CN113254576A CN 113254576 A CN113254576 A CN 113254576A CN 202110453104 A CN202110453104 A CN 202110453104A CN 113254576 A CN113254576 A CN 113254576A
Authority
CN
China
Prior art keywords
emotion
behavior
label
individual
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110453104.8A
Other languages
Chinese (zh)
Other versions
CN113254576B (en
Inventor
胡玥
谢玉强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Information Engineering of CAS
Original Assignee
Institute of Information Engineering of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Information Engineering of CAS filed Critical Institute of Information Engineering of CAS
Priority to CN202110453104.8A priority Critical patent/CN113254576B/en
Publication of CN113254576A publication Critical patent/CN113254576A/en
Application granted granted Critical
Publication of CN113254576B publication Critical patent/CN113254576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for predicting and tracing human behaviors and emotions, which are used for uniformly modeling the incidence relation among emotions, demands and behaviors, can simulate individual activities through the relation among the emotions, the demands and the behaviors from the cognitive angle and realize four tasks of emotion prediction, emotion tracing, behavior prediction and behavior tracing. The method can perform preliminary and effective emotion prediction and tracing and behavior prediction and tracing on the text content, better reveal the essential relation among the demand, the emotion and the behavior, help researchers to trace the origin of the emotional response and the behavior, and provide more reasonable explanation for analysis.

Description

Method and device for predicting and tracing human behaviors and emotions
Technical Field
The invention belongs to the field of natural language processing, and particularly relates to a method and a device for predicting and tracing human behaviors and emotions.
Background
All social activities of a human individual are the process of the individual interacting with the external environment (physical world outside the individual, abstract events, etc.) driven by the individual's heart, and are embodied as follows: the individual, through its behavior, affects the external environment, which affects the individual by producing an emotional response in the individual's mind. The whole interaction process is completed and realized through the cooperative work of the mental demand, the emotion and the behavior of the individual. Therefore, the generation and change rules of the emotion, demand and behavior factors in the individual activities are comprehensively analyzed, the incidence relation among the emotion, demand and behavior factors is modeled, the root cause of the human activities can be deeply analyzed from the cognitive level, and the analysis result is reasonably explained. The technology has profound influence on multiple fields such as intelligent conversation, story generation, recommendation system and public opinion analysis, and has wide application prospect.
Traditional emotion analysis techniques have mainly focused on emotion detection and have been widely used (Socher et al, 2013;
hamilton et al, 2016). Although the most advanced emotion analysis systems today can detect the polarity of the text (Zhang et al, 2018) or consider fine-grained classes (aka aspects) that may cause emotion (Pontiki et al, 2016), the interpretation of the analysis of predictions and their causes is still very limited.
In recent years, there have been a number of large-scale data sources (Ding and Riloff, 2018; Rahimotoghi et al, 2017) exploring human needs, actions or emotions. Rashkin et al (2018a) propose a Story common sense to explain the reason for the change in the psychological state of a person in a Story. Sap et al, 2019b introduced SOCIAL IQA for exploring mood and SOCIAL intelligence in a daily setting. Then, Event2mind (Rashkin et al, 2018b), ATOMIC (Sap et al, 2019a) and COMET-ATOMIC2020(Hwang et al, 2020) collected different "what-if" psychological relationships.
In addition, some work (Gaonkar et al, 2020; Yuan et al, 2020) considered the introduction of various mental states into NLP tasks, such as mood analysis. Li and Hovy, 2017 explored the importance of human emotion analysis requirements. Otani and Hovy, 2019 consider human motivation as the driving force for human emotion, improving the ability of the system to perform emotional analysis. In addition, a great deal of work (Du et al, 2019; Paul and Frank, 2019; Bosselt and Choi, 2019) converts mental state knowledge into pre-trained models and applies it to conditional story generation tasks. Based on the pre-trained gpt (come) on a common sense corpus, many work has taken the mental state generated by come as a condition for story generation (Xu et al, 2020; Brahman and Chaturvedi, 2020; amanabolu et al, 2020; Yuan et al (2020).
However, the prior art has the following problems:
1. existing data resources focus on analyzing the binary relationship between human behavior and mental state (demand or emotion).
2. The prior art focuses on the analysis of the relationship between "needs and actions" or "emotions and actions" without the unified consideration of human needs, actions and emotions.
Disclosure of Invention
The invention provides a method and a device for predicting and tracing human behaviors and emotions.
The technical scheme of the invention comprises the following steps:
a method for predicting and tracing human behaviors and emotions comprises the following steps:
1) selecting element combinations to be input into a baseline system according to task types, wherein the task types comprise: the emotion prediction task comprises an emotion prediction task, an emotion traceability task, a behavior prediction task or a behavior traceability task, wherein the element combination of the emotion prediction task comprises the following components: the method comprises the following steps of an individual X, a requirement label N and a text behavior A, wherein the element combination of the emotion tracing task or the behavior tracing task comprises the following steps: individual X, emotion label E and text behavior A, wherein the element combination of the behavior prediction task comprises: individual X, requirement tag N and emotion tag E;
2) the baseline system selects a processing path according to the element combination, and processes the processing path through the following strategies to obtain an emotion prediction task result, an emotion traceability task result, a behavior prediction task result or a behavior traceability task result:
2.1) when the element combination comprises an individual X, a requirement label N and a text behavior A, processing by:
2.1.1) inputting a first natural language text sequence generated by the individual X and the requirement label N into an encoder to obtain a code hs1And according to the code hs1Acquiring a first probability distribution of each emotion category label;
2.1.2) inputting the text behavior A into an emotion concept knowledge base to obtain the importance degree of each general knowledge in the text behavior A under each emotion category label, and obtaining first distribution of emotion general knowledge by combining with a set lookup table;
2.1.3) voting according to the first probability distribution of each emotion category label and the first distribution of emotion general knowledge, and selecting the optimal emotion category label to obtain an emotion prediction task result;
2.2) when the element combination comprises an individual X, an emotion tag E and a text behavior A, processing by:
2.1.1) inputting the second natural language text sequence generated by the individual X and the emotion label E into the encoder to obtain a code hs2And according to the code hs2Acquiring second probability distribution of each emotion category label or probability distribution of each action category label;
2.1.2) inputting the text behavior A into a requirement concept knowledge base to obtain the importance degree of each common sense in the text behavior A under each emotion category label or each action category label, and obtaining second distribution of emotion common sense knowledge or behavior common sense knowledge distribution by combining with a set lookup table;
2.1.3) voting according to the second probability distribution of each emotion category label and the second distribution of emotion common sense knowledge, or the probability distribution of each action category label and the second distribution of behavior common sense knowledge, and selecting the optimal emotion category label or behavior category label to obtain an emotion traceability task result or a behavior traceability task result;
and 2.3) when the element combination comprises an individual X, a demand label N and an emotion label E, inputting the individual X, the demand label N and the emotion label E into the language model to obtain a behavior prediction task result.
Further, in the step 1), the baseline system preprocesses the input demand label N and the emotion label E; the pretreatment comprises the following steps: and expanding the semantic information of the demand label N or the emotion label E through a set prompt template.
Further, the encoder includes: a GRU model, a BERT model, or a RoBERTa model.
Further, preprocessing the text behavior A before the text behavior A is input into an emotion concept knowledge base; the pretreatment comprises the following steps: stop words and high frequency words are deleted.
Further, constructing an emotion concept knowledge base through the following steps:
1) collecting an emotion common sense concept;
2) calculating the number of occurrences of each common sense concept in each emotion category to form a matrix
Figure BDA0003039581150000031
Wherein d iscDimension of common sense concept, dnIs a dimension in the sentiment category;
3) calculating the importance degree of each common sense concept in each emotion category
Figure BDA0003039581150000032
Wherein
Figure BDA0003039581150000033
The jth common sense concept of the ith label, s is the current label, Ct is the frequency of the common sense concept, V is the size of the corresponding vocabulary of the common sense concept, and N is the total number of the common sense concepts.
Further, the voting method comprises the following steps: using a pooling mechanism; the pooling mechanism includes: average pooling, maximum pooling, or sum pooling.
Further, the language model includes: BERT model or GPT-2 model.
Further, obtaining an emotion prediction task result through the following steps:
1) setting a slot filling template of an emotion prediction task;
2) and filling the prediction result corresponding to the optimal emotion category label into a slot filling template by using a slot filling method so as to obtain an emotion prediction task result interpreted by the natural language.
A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the above-mentioned method when executed.
An electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer to perform the method as described above.
Compared with the prior art, the invention has the following beneficial effects:
1. a cognitive framework, CogFrHA, is proposed for analyzing human needs, behavior and emotion, which can model individual activities from a cognitive perspective through relationships between emotion, need and action.
2. A data set HAIL is established and four new tasks are introduced: the system can realize emotion prediction, emotion traceability, behavior prediction and behavior traceability according to requirements, behaviors and text input of the emotion.
3. Simulating individual activities according to the relationship among emotion, demand and action from the cognitive angle, and uniformly considering the relationship among the emotion, the demand and the action; experiments show that compared with the existing method, the framework can better reveal the essential relationship among the requirements, the emotion and the behaviors. This will help researchers to track the origin of emotional responses and behaviors and provide a more reasonable explanation for the analysis.
4. The method can perform preliminary and effective emotion prediction and tracing on the text content, and behavior prediction and tracing.
Drawings
FIG. 1 is a composition diagram of the CogFrHA framework.
Figure 2 schematic diagram of the basic elements of the CogFrHA framework.
Fig. 3 is a schematic diagram of a direct active mode and an indirect active mode.
FIG. 4 is a schematic diagram of demand versus behavior versus demand versus emotional response.
Fig. 5 is a schematic diagram of the data distribution of the HAIL data set.
FIG. 6 is a general model architecture diagram of four new task types of the present invention.
FIG. 7 is a diagram of an example distribution of the emotional concept knowledge base.
FIG. 8 is a schematic diagram of an example distribution of the requirement concept knowledge base.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a new Human individual activity cognitive Framework CogFrHA (cognitive Framework of Human activities) for uniformly modeling the association relation of emotion, demand and behavior, which comprises the following specific contents: in particular, we define the components and primitives of human activities. Meanwhile, we propose the concept of the start and end points of human activity and classify individual activities into direct activity patterns and indirect activity patterns. Furthermore, we consider that the essential factor is that in order to achieve emotional reactions and produce actions, the human needs are the origin of emotional reactions and actions. Then, we define two basic causal relationships to model the relationship between demand, action and emotion. These relationships will help researchers to track the origin of emotional responses and behaviors and provide a more reasonable explanation for analysis.
One, CogFrHA framework
By utilizing the causal relationship between the demand and the behavior, deep behavior prediction analysis and behavior tracing analysis can be performed on the individual behavior; by utilizing the causal relationship between the demand and the emotional response, emotion prediction analysis and emotion traceability analysis which are deeper than the previous work can be carried out on the individual emotion, and a reasonable explanation is provided for the analysis result.
We consider the activity of a human individual (manufactured's individual) as a process by which the individual interacts with the external environment, driven by his heart. We model the framework from the point of interaction of the two and analyze each part in the framework, and the main contents include:
1) defining the composition of the framework;
2) defining basic elements of the framework;
3) defining the action and the mutual relation of each element in the individual activity;
4) the definition of the relationship between "demand and behavior" and the definition of the relationship between "demand and emotion" are proposed.
1.1 composition of the CogFrHA framework
CogFrHA is composed of two parts, as shown in fig. 1, including a human individual and an external environment, where the individual is represented by needs, behaviors, and emotions, including emotional response and emotional desire; external environment is defined herein as both factual events and individual behavioral events and results that can have an effect on the individual's mind, collectively referred to herein as "external environment". E _ rac is the emotional response and E _ exp is the emotional expectation.
1.2 basic elements of the CogFrHA framework
In CogFrHA, the basic elements of individual activities are as in fig. 2, including: mental needs, emotional response, emotional desires, and behavior, where traditional "motivations" are interpreted in our framework as being formed by an individual's mental needs in combination with their emotional desires. It is not an essential element in the framework, since its role can be replaced by the mental needs and emotional expectations:
(1) internal requirement: is the inherent physiological and psychological needs of human beings and is the root of the generation of human activities. Different psychological theories have different classification systems for human needs. The requirement is divided into five levels of physiological requirement, safety requirement, love and attribution, self-respect requirement and mental requirement by adopting a Maslow requirement level model.
(2) Emotional reaction: the emotional response is the psychological response of the individual internal demand to the satisfaction degree of the external environment, which is formed by the internal demand (internal cause) and the external environment (external cause) together, when the external environment meets the internal demand, the emotional response generates positive direction, otherwise, when the external environment can not meet the internal demand, the emotional response generates negative direction, according to the difference of the satisfaction degree, the emotional response can be divided into different grades, and when the internal demand is unrelated with the external environment, the emotional response does not generate. We use Plutchik base emotion to classify emotions into eight categories: joy, trust, sadness, surprise, fear, disgust, anger, expectation.
(3) Emotional expectation: is the emotion corresponding to a certain demand desired for the demand, which is expected to be a part of the participation behavior of the emotion, wherein the emotion expectation in the present invention is obtained by the statistical result on the HAIL data set.
(4) Behavior: the action in the invention is performed under the psychological condition that a person has certain needs and hopes to meet the needs, and is the language which is generated under the psychological condition that the individual has certain internal needs and hopes to meet the needs and affects the external environment. Here we define behaviors in the form of < actor, predicate, victim > triplets.
1.3 the roles and interrelationships of the elements in the individual activities
Human individual activity is the process by which an individual interacts with the external environment, driven by his or her mind. We define an activity of an individual as: the individual generates a certain internal demand as a starting point, information communication with the external environment is carried out, and the individual obtains a certain emotional reaction as an end point, so that one individual activity is completed.
There are two ways to move about, as shown in FIG. 3:
1) the individual directly obtains information from the outside, and generates emotional response without behavior, which is called as a direct activity mode;
2) the individual emits a behavior that affects the external environment, which affects the outcome of the individual's emotional response. We call "indirect activity mode".
Direct active mode: individuals respond emotionally to the external environment driven by some internal demand: (1) generating positive emotions when the external environment meets the internal requirement of the individual, and generating positive emotions of different levels according to different satisfaction degrees, (2) generating negative emotions when the external environment cannot meet the internal requirement of the individual, and generating negative emotions of different levels according to dissatisfaction degrees. The activity process only comprises an information acquisition link.
Indirect active mode: the individual is motivated by the mental demand and the emotional expectation together, and the behavior is driven to generate, and the result of the behavior has influence on the individual, namely, (1) positive emotion is generated when the result meets the mental demand of the individual, and different levels of positive emotion are generated according to different satisfaction degrees, (2) negative emotion is generated when the external environment cannot meet the mental demand of the individual, and different levels of negative emotion are generated according to the dissatisfaction degrees. The activity link comprises two links of behavior generation and information acquisition.
By analyzing, we can see that the analysis of individual activities can be classified into two basic links of 'information acquisition' and 'behavior generation'. Wherein, the 'information acquisition link' analyzes how the individual emotional response is generated and what the root cause of the generation is; the 'behavior generation link' analyzes how behaviors are generated and what is the root cause of the generation. Since the internal demand is the internal source of individual behaviors and emotional reactions, the generation and the generation reason of the behaviors can be deeply analyzed by analyzing and modeling the relationship between the demand and the behaviors, and the generation reason of the emotions can be deeply analyzed by analyzing and modeling the relationship between the demand and the emotions.
1.4 "demand vs. behavior relationship" and "demand vs. emotional response relationship" definitions
"demand-to-behavior relationship": the relationship between the demand and the behavior is a cause and effect under the action of emotional expectation, wherein the action of the emotional expectation is determinative of the way and the degree of the behavior. (see A in FIG. 4)
Example (c): if the demand is 'food demand', the demand can be happy and satisfied corresponding to the emotion expectation, and the like, and the positive emotions are basically met; if the emotional desire is happy, the individual's behavior may be "go to a premium restaurant for a meal", and if the emotional desire is substantially satisfied, the individual's behavior may be "go to a dining room for a meal".
Based on the relationship, deep behavior prediction and behavior tracing analysis can be performed on the individual behaviors, and reasonable explanation is provided for the analysis result.
Behavior prediction (demand → behavior)
The behavior that an individual will produce can be predicted, knowing the individual's needs and its corresponding emotional expectations.
Behavior tracing (behavior → demand)
From the individual behaviour, the intrinsic source (intrinsic demand) that produces this behaviour can be analysed.
"demand-to-emotional response relationship": the emotional response of an individual is formed by the internal demand and the external environment together, but the emotional response can be generated only when the individual has the internal demand, namely the internal demand is the internal source of the emotional response, the external environment is the external condition for determining what emotional response is generated, and the relationship of the three is defined as: the relationship between demand and emotional response is a causal relationship in the presence of an external environment, where demand is the cause and emotional response is the effect, and the role of the external environment is to determine what effect will be produced under known conditions of internal demand. (see B in FIG. 4)
Based on the relationship, the emotion prediction and emotion traceability analysis can be carried out deeper than before on the individual emotional response, and reasonable explanation is given to the analysis result.
Emotion response prediction (demand → emotional response)
Given the individual's needs and external circumstances, the emotional response that the individual will produce can be predicted.
Tracing emotional response (emotional response → demand)
According to the external environment and the emotional response of the individual, the intrinsic cardiac needs for producing the emotional response can be analyzed.
Second, implementation mode of predicting and tracing behaviors and emotions
2.1 task definition and data Collection
To validate the effectiveness of our cognitive framework, we constructed a data set hail (human Activities In life) and proposed two deep emotion analysis tasks: an emotion prediction task and an emotion traceability task are provided, and two deep behavior analysis tasks are also provided: and the behavior prediction task and the behavior tracing task respectively provide corresponding baseline systems for the four tasks.
2.2 task definition
1) Behavior prediction task: and predicting/reasoning the behavior of the individual according to the requirements and the corresponding emotion expectation (if the emotion expectation value is not specified, selecting the maximum forward emotion as the emotion expectation value according to common sense).
2) Behavior tracing task: the internal demand for generating the behavior is analyzed according to the individual behavior.
3) And (3) emotion prediction task: and predicting/deducing the emotional response of the individual according to the internal demand and the external environment.
4) And (3) emotion tracing task: and analyzing the internal demand for generating the emotional response according to the emotional response and the external environment.
2.3 data Collection
We have created a new data set HAIL collected from the existing resource Story common (Rashkin et al, 2018a) using NLP tools and manual annotations. We make statistics on the HAIL dataset. As can be seen from FIG. 5, the label distribution of the data is relatively uniform, which is beneficial to the learning of the model.
2.4 Baseline System
The general system architecture for these four tasks is shown in fig. 6. We describe each system input below. In the emotion prediction task, an individual X, a label of a demand N and a text behavior A are input into the system. In the emotion tracing and behavior tracing tasks, the input to the system is emotion tags E, X and A. Behavior prediction tasks X, N, and E are assigned to the generators. In addition, we design simple hinting templates to extend the semantic information of the requirements and emotion tags and to indicate individuals who possess the requirements and emotions. For example, in the emotion prediction task, the template includes words (audios, has, needs) and locations to be filled in by the tags.
2.5 encoder
We describe the encoder below:
1) GRU (Chung et al, 2014) is a single-layer dual GRU for butt-transfusionThe input text is encoded and the final time step hidden state is concatenated from both directions to produce a sentence representation hs
2) BERT (Devrin et al, 2019): we use BERT for the classification of text sequences according to the author's settings for the classification task.
3) RoBERTa (Liu et al, 2019) is an improved more robust BERT that shows the most advanced performance in many NLP tasks. Furthermore, we add an extra tag to each sentence. We use<s>Is represented as a sentence hs
2.6 knowledge base
We introduce a method to compute the distribution of common sense to all classes (needs/emotions) in the external environment (corpus). In this context, common sense knowledge refers to common sense concepts (words) that appear in an external environment (corpus) with a particular meaning.
Requirement concept knowledge base
We build the knowledge base of the concept of the demand in three steps. First, we extract a representative common sense concept. Then, we calculate the number of occurrences of each common sense concept in the requirement category, i.e., the number of occurrences of each common sense concept on each label, to form a matrix
Figure BDA0003039581150000081
Wherein d iscAnd dnRespectively, the dimensions of the concept and the requirements. The last step is to calculate the importance degree of each word (common sense) under each category label according to the matrix
Figure BDA0003039581150000082
Wherein
Figure BDA0003039581150000083
J-th concept (s represents the current label) of the ith label, Ct is the number of times the concept appears, V is the size of the vocabulary (obtained by counting the number of independent words), and n is the total number of the concept appears.
Emotional concept knowledge base
Also, we get it throughThe emotion concept knowledge base is set through the method. The difference is in the classification and dimension of the Matrix. In the emotional concept knowledge base, the matrix
Figure BDA0003039581150000091
Wherein d iscAnd deThe dimensions of the concept and the number of emotions, respectively.
In this way, the distribution of each concept under each label can be calculated. Based on our proposed training set of H AIL datasets, we automatically build a knowledge base of needs and emotions. Examples of which are shown in fig. 7 and 8, respectively. These two knowledge bases can be used to make predictions or to assist in the decision-making of deep models. In addition, they can be used to evaluate or interpret the prediction.
2.7 classifier
Neural distribution of an encoder
Once the code h is extractedsBy MLP, we classify tokens by MLP
Figure BDA0003039581150000095
Computing an emotion tag or demand tag PzProbability distribution of (2):
Pz=W2 tanh(W1hs+b1)
where H is the dimension of the hidden layer, weight
Figure BDA0003039581150000092
Offset amount
Figure BDA0003039581150000093
Weight of
Figure BDA0003039581150000094
H is the dimension of the hidden layer and N is the number of labels. The predicted answer to the model corresponds to the most probable demand (/ emotion) label.
Prior distribution of knowledge base
The knowledge base constructed in 2.6 can give requirements based on common sense concepts in operationA priori distributions of classes and emotion classes, which correspond to the a priori distributions in fig. 7 and 8. We first delete stop words and high frequency words using tools such as NLTK (http:// www, NLTK. org /) and space (https:// space, io /) to extract representative common sense concepts corresponding to the current action, and use each common sense concept to search the corresponding distribution in the knowledge base, get the importance of each word (common sense) under each category label, and use the importance to search in the lookup table, get the distribution { P ] of all common sense knowledge in the current demand (or emotion) categoryc1,Pc2,...,Pcn}。
2.8 voting Module
As shown in FIG. 6, we construct a voting gate module to vote and integrate the tags PzProbability distribution of (2) and distribution of common sense knowledge { P }c1,Pc2,...,Pcn}. The specific voting method is as follows:
Pf=f_v(Pz,[Pc1,Pc2,...,Pcn])
where n is the number of related concepts and f _ v represents the integration of votes by a pooling mechanism (e.g., AVER, MAX or SUM pooling). Finally, the label with the highest probability of selection is used as the final prediction result through voting.
2.9 interpretation generators
After the final prediction is obtained, the system will generate a natural language interpretation of the psychological state according to the current task, which helps researchers better understand the relationship between needs, actions and emotions. The prediction result is filled into a preset slot by using a slot filling method. A slot filling template is set for emotion prediction, emotion tracing and behavior tracing tasks.
2.10 behavior generators
Since these works (Forbes et al, 2020; Rudinger et al, 2020; Sakaguchi et al, 2020) performed well in the relevant natural Language generation task, our main interest was in evaluating pre-trained Language models (Languge models). We have adopted an encoder-decoder architecture BART (Lewis et al, 2019) or a "standard" language model GPT-2(Radford et al, 2019).
Third, Experimental part
Experiments show that deeper emotion and behavior analysis and interpretation tasks can be performed than those of the existing method under the cognitive framework.
3.1 Experimental setup
Model training: in the emotion prediction, emotion tracing and behavior tracing tasks, we use a cross-entropy loss fine-tuning encoder and an MLP classifier. For the behavior prediction task, the goal of the behavior survivor is to generate reasonable behavior of the individual given the individual, demand, and emotional expectations. Therefore, we use the conditional log-likelihood loss to train the rows to be memories:
Figure BDA0003039581150000101
system implementation details: we train the model on the 7k HAIL training example, then select the hyper-parameters from the model that performs best on the development set (2k), and then report the results on the test set (2 k). We refine the hyper-parameter settings by grid search (choose learning rate in {1e-5, 2e-5}, batch size in {8, 16, 32}, and number of trim wheels in {3, 5, 10 }), and report the highest effect. The hidden layer size of GPT-2Large (1.5B parameter) is H1024, and the hidden size of BERT/RoBERTa Large (340M parameter) is H1024. We trained using Huggingface PyTorch (Paszke et al, 2019) to achieve all results.
Evaluation indexes are as follows: we report the micro-average precision (P), recall (R) and F1 score (https:// githu. com/scinit-leern) for emotion prediction, emotion tracing and behavior tracing tasks. For the behavior prediction task, we take two automatic measures to evaluate the results of the generated text actions in terms of content quality and rationality. To evaluate the content quality, we used the following evaluation criteria: (1) BLEU scores (Papineni et al, 2002), where n is 1, 2, 4. (2) Rouge (Li et al, 2016) score, where n is 1, 2, L. We also evaluate the generated appearance of the action manually. As with Song et al, (2019), we ask the staff to evaluate a pair of stories (3 very good) at a scale of 0-3 from two different angles: (1) the content quality is as follows: indicating whether the resulting behavior is smooth; (2) the content rationality is as follows: it is evaluated whether it complies with a reasonable and consistent given demand and emotion.
3.2 results of the experiment
Classification task
We show the results on the test set of table 1, with the last three rows being ablation experiments.
Figure BDA0003039581150000113
Indicating that the experimental setup in the corresponding paper was followed. Our method uses a prompt template, a constructed knowledge base, RoBERTa and a voting module, scoring highest among all models. Interestingly, emotion prediction and traceability are difficult for pre-trained linguistic models. In behavior tracing, the results of all models approach human performance. This further supports our hypothesis that the desired mood is important for the traceability behavior.
Figure BDA0003039581150000111
TABLE 1 results of emotion prediction, emotion tracing and behavior tracing
Generating tasks
In table 2, training data (train data) refers to a given input at the time of model training. N represents demand. E represents emotion.
Figure BDA0003039581150000114
Indicating that GPT-2 is pre-trained with the corresponding corpus, targeting a language model, ROC is ROC Stories (Mostafazadeh et al, 2016), and HAIL is the training set of our proposed data set. The last two columns are the results of the manual evaluation. We can conclude that the GPT-2 model has the highest BLEU-1 score, and the lowest BLEU-2, 4 scores. For Rouge scores, the BART model showed good performance. One of the reasons is that BART has been pre-qualified by the summary taskAnd (5) training. Human evaluation shows that the model with the hinting template and training penalty we designed is superior to the pre-trained model on the story corpus based on the language model objectives. Interestingly, the content of the generated behavior is fluent and grammatical, indicating that GPT-2 and BART are as good at organizing sentences as humans.
In summary, our approach shows better performance compared to other recent models. Results of all tasks demonstrate the feasibility and importance of CogFrHA.
Figure BDA0003039581150000112
Table 2 GPT-2 and BART behavior prediction results.
3.3 analytical experiments
Ablation experiment
The method carries out ablation experiments on methods of emotion prediction, emotion tracing and behavior tracing. As shown in the last 3 rows of Table 1, (1) indicates the importance of the hinting template designed for RoBERTA. (2, 3) shows that RoBERTa and KB score similarly in emotion prediction and emotion traceability. However, RoBERTa is better for behavioral traceability tasks. One interpretable guess is that behavior tracing may require more natural language understanding.
Case analysis
We will introduce interesting behavioral text generated by generators that we have trained well based on GPT-2 and BART methods. From the sample of Table 3, where X is personal, N is demand, and E is emotional expectation, we find all elements important for behavioral prediction. In particular, the individual needs are more important. GPT-2 based generators tend to produce transient but reasonable behavior. But the behavior produced by BART-based generators is typically long but can recur. From the labeled samples, we can see that motion prediction is difficult to make only for demand or emotion. Interestingly, a generator trained on a story corpus may learn the personality or other characteristics of a particular individual.
Figure BDA0003039581150000121
TABLE 3 case analysis
Visual analysis
We perform a visual analysis of the relationship between demand, action and emotion. Table 4 shows the final prediction probability matrix for demand and emotion. The matrix ties together the needs, actions, and emotions and indicates that the needs (mental growth) have the expected emotional expectations (i.e., expectations (0.19)). Using this matrix, we can predict sentiment from given needs and infer needs from sentiment. Therefore, we can explain the relationship between demand, action and emotion more deeply based on visualization.
Figure BDA0003039581150000131
TABLE 4 visualization of the final distribution of the model
The above embodiments are only intended to illustrate the technical solution of the present invention and not to limit the same, and a person skilled in the art can modify the technical solution of the present invention or substitute the same without departing from the spirit and scope of the present invention, and the scope of the present invention should be determined by the claims.

Claims (10)

1. A method for predicting and tracing human behaviors and emotions comprises the following steps:
1) selecting element combinations to be input into a baseline system according to task types, wherein the task types comprise: the emotion prediction task comprises an emotion prediction task, an emotion traceability task, a behavior prediction task or a behavior traceability task, wherein the element combination of the emotion prediction task comprises the following components: the method comprises the following steps of an individual X, a requirement label N and a text behavior A, wherein the element combination of the emotion tracing task or the behavior tracing task comprises the following steps: individual X, emotion label E and text behavior A, wherein the element combination of the behavior prediction task comprises: individual X, requirement tag N and emotion tag E;
2) the baseline system selects a processing path according to the element combination, and processes the processing path through the following strategies to obtain an emotion prediction task result, an emotion traceability task result, a behavior prediction task result or a behavior traceability task result:
2.1) when the element combination comprises an individual X, a requirement label N and a text behavior A, processing by:
2.1.1) inputting a first natural language text sequence generated by the individual X and the requirement label N into an encoder to obtain a code hs1And according to the code hs1Acquiring a first probability distribution of each emotion category label;
2.1.2) inputting the text behavior A into an emotion concept knowledge base to obtain the importance degree of each general knowledge in the text behavior A under each emotion category label, and obtaining first distribution of emotion general knowledge by combining with a set lookup table;
2.1.3) voting according to the first probability distribution of each emotion category label and the first distribution of emotion general knowledge, and selecting the optimal emotion category label to obtain an emotion prediction task result;
2.2) when the element combination comprises an individual X, an emotion tag E and a text behavior A, processing by:
2.1.1) inputting the second natural language text sequence generated by the individual X and the emotion label E into the encoder to obtain a code hs2And according to the code hs2Acquiring second probability distribution of each emotion category label or probability distribution of each action category label;
2.1.2) inputting the text behavior A into a requirement concept knowledge base to obtain the importance degree of each common sense in the text behavior A under each emotion category label or each action category label, and obtaining second distribution of emotion common sense knowledge or behavior common sense knowledge distribution by combining with a set lookup table;
2.1.3) voting according to the second probability distribution of each emotion category label and the second distribution of emotion common sense knowledge, or the probability distribution of each action category label and the second distribution of behavior common sense knowledge, and selecting the optimal emotion category label or behavior category label to obtain an emotion traceability task result or a behavior traceability task result;
and 2.3) when the element combination comprises an individual X, a demand label N and an emotion label E, inputting the individual X, the demand label N and the emotion label E into the language model to obtain a behavior prediction task result.
2. The method of claim 1, wherein in step 1), the baseline system preprocesses the input demand tag N and emotion tag E; the pretreatment comprises the following steps: and expanding the semantic information of the demand label N or the emotion label E through a set prompt template.
3. The method of claim 1, wherein the encoder comprises: a GRU model, a BERT model, or a RoBERTa model.
4. The method of claim 1, wherein text behavior a is preprocessed before entering an emotional concept knowledge base; the pretreatment comprises the following steps: stop words and high frequency words are deleted.
5. The method of claim 1, wherein the sentiment concept knowledge base is constructed by:
1) collecting an emotion common sense concept;
2) calculating the number of occurrences of each common sense concept in each emotion category to form a matrix
Figure FDA0003039581140000021
Wherein d iscDimension of common sense concept, dnIs a dimension in the sentiment category;
3) calculating the importance degree of each common sense concept in each emotion category
Figure FDA0003039581140000022
Wherein
Figure FDA0003039581140000023
Is the jth common sense concept of the ith label, s is the current label, Ct is the frequency of occurrence of the common sense concept, and V is the constantThe size of the corresponding vocabulary of the concept is identified, and N is the total number of the common sense concepts.
6. The method of claim 1, wherein voting comprises: using a pooling mechanism; the pooling mechanism includes: average pooling, maximum pooling, or sum pooling.
7. The method of claim 1, wherein the language model comprises: BERT model or GPT-2 model.
8. The method of claim 1, wherein emotion prediction task results are obtained by:
1) setting a slot filling template of an emotion prediction task;
2) and filling the prediction result corresponding to the optimal emotion category label into a slot filling template by using a slot filling method so as to obtain an emotion prediction task result interpreted by the natural language.
9. A storage medium having a computer program stored thereon, wherein the computer program is arranged to, when run, perform the method of any of claims 1-8.
10. An electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the method according to any of claims 1-8.
CN202110453104.8A 2021-04-26 2021-04-26 Method and device for predicting and tracing human behaviors and emotions Active CN113254576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110453104.8A CN113254576B (en) 2021-04-26 2021-04-26 Method and device for predicting and tracing human behaviors and emotions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110453104.8A CN113254576B (en) 2021-04-26 2021-04-26 Method and device for predicting and tracing human behaviors and emotions

Publications (2)

Publication Number Publication Date
CN113254576A true CN113254576A (en) 2021-08-13
CN113254576B CN113254576B (en) 2022-07-26

Family

ID=77221712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110453104.8A Active CN113254576B (en) 2021-04-26 2021-04-26 Method and device for predicting and tracing human behaviors and emotions

Country Status (1)

Country Link
CN (1) CN113254576B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114676259A (en) * 2022-04-11 2022-06-28 哈尔滨工业大学 Conversation emotion recognition method based on causal perception interactive network
CN115221301A (en) * 2022-07-19 2022-10-21 重庆理工大学 Conversation emotion classification and conversation behavior identification method for joint multi-task learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052080A1 (en) * 2005-11-30 2008-02-28 University Of Southern California Emotion Recognition System
CN102831184A (en) * 2012-08-01 2012-12-19 中国科学院自动化研究所 Method and system for predicating social emotions in accordance with word description on social event
US8346391B1 (en) * 2006-12-28 2013-01-01 Science Applications International Corporation Methods and systems for an autonomous robotic platform
US20170052946A1 (en) * 2014-06-06 2017-02-23 Siyu Gu Semantic understanding based emoji input method and device
CN112183064A (en) * 2020-10-22 2021-01-05 福州大学 Text emotion reason recognition system based on multi-task joint learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052080A1 (en) * 2005-11-30 2008-02-28 University Of Southern California Emotion Recognition System
US8346391B1 (en) * 2006-12-28 2013-01-01 Science Applications International Corporation Methods and systems for an autonomous robotic platform
CN102831184A (en) * 2012-08-01 2012-12-19 中国科学院自动化研究所 Method and system for predicating social emotions in accordance with word description on social event
US20170052946A1 (en) * 2014-06-06 2017-02-23 Siyu Gu Semantic understanding based emoji input method and device
CN112183064A (en) * 2020-10-22 2021-01-05 福州大学 Text emotion reason recognition system based on multi-task joint learning

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114676259A (en) * 2022-04-11 2022-06-28 哈尔滨工业大学 Conversation emotion recognition method based on causal perception interactive network
CN114676259B (en) * 2022-04-11 2022-09-23 哈尔滨工业大学 Conversation emotion recognition method based on causal perception interactive network
CN115221301A (en) * 2022-07-19 2022-10-21 重庆理工大学 Conversation emotion classification and conversation behavior identification method for joint multi-task learning
CN115221301B (en) * 2022-07-19 2024-01-23 重庆理工大学 Dialogue emotion classification and dialogue behavior recognition method combining multitask learning

Also Published As

Publication number Publication date
CN113254576B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
Chen et al. Multi-modal dimensional emotion recognition using recurrent neural networks
Mai et al. Analyzing multimodal sentiment via acoustic-and visual-LSTM with channel-aware temporal convolution network
KR20190019962A (en) Architectures and processes for computer learning and understanding
McHaney et al. Using LIWC to choose simulation approaches: A feasibility study
CN113254576B (en) Method and device for predicting and tracing human behaviors and emotions
Katz et al. Natural language processing in the legal domain
Sobol-Shikler et al. Classification of complex information: Inference of co-occurring affective states from their expressions in speech
Hung et al. Towards a method for evaluating naturalness in conversational dialog systems
Dsouza et al. Chat with bots intelligently: A critical review & analysis
Kusal et al. A systematic review of applications of natural language processing and future challenges with special emphasis in text-based emotion detection
Bergmann et al. Modeling the production of coverbal iconic gestures by learning bayesian decision networks
Dhar et al. Understanding the evolution of an emerging technological paradigm and its impact: The case of Digital Twin
Bonenfant et al. Collaboration between social sciences and computer science: toward a cross-disciplinary methodology for studying big social data from online communities
Guo et al. A prompt-based topic-modeling method for depression detection on low-resource data
Li et al. A cognitive analysis-based key concepts derivation approach for product design
Nikhileswar et al. Suicide ideation detection in social media forums
Huang et al. Neural cognition and affective computing on cyber language
Farahani et al. An Introduction to Artificial Psychology
Iovane et al. A computational model for managing emotions and affections in emotional learning platforms and learning experience in emotional computing context
Park et al. Depression Emotion Multi-Label Classification Using Everytime Platform with DSM-5 Diagnostic Criteria
Kindra et al. A fuzzy-based approach for characterization and identification of sentiments
KR20200141863A (en) System for providing personal recording data based ai chatting service
CN115221301B (en) Dialogue emotion classification and dialogue behavior recognition method combining multitask learning
Uvaliyeva et al. The Development of the Staking-Ensemble of Methods for Analyzing Academic Data
Meszaros et al. Evaluating communication modality for improved human/autonomous system teaming

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant