{'fraction_non_alphanumeric': 0.039769603976960395, 'fraction_numerical': 0.011185201118520113, 'mean_word_length': 4.465256008359456, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
EmoDNN: Understanding emotions from short texts through a deep neural network ensemble

The latent knowledge in the emotions and the opinions of the individuals that are manifested via social networks are crucial to numerous applications including social management, dynamical processes, and public security. Affective computing, as an interdisciplinary research field, linking artificial intelligence to cognitive inference, is capable to exploit emotion-oriented knowledge from brief contents. The textual contents convey hidden information such as personality and cognition about corresponding authors that can determine both correlations and variations between users. Emotion recognition from brief contents should embrace the contrast between authors where the differences in personality and cognition can be traced within emotional expressions. To tackle this challenge, we devise a framework that, on the one hand, infers latent individual aspects, from brief contents and, on the other hand, presents a novel ensemble classifier equipped with dynamic dropout convnets to extract emotions from textual context. To categorize short text contents, our proposed method conjointly leverages cognitive factors and exploits hidden information. We utilize the outcome vectors in a novel embedding model to foster emotion-pertinent features that are collectively assembled by lexicon inductions. Experimental results show that compared to other competitors, our proposed model can achieve a higher performance in recognizing emotion from noisy contents.


INTRODUCTION
U NDERSTANDING emotional information from short text content finds important applications in numerous domains: (i) In conversation transcripts in user contents [1]. (ii) In the political context, to foster the prediction of the ballet results [2]. (iii) In health, to better recognize the people affected by extreme depressions [3] [4] (iv) In sales and finance, to enhance the product development [5] and predict the market fluctuations [6]. Nowadays, with the spread of social networks, people share their brief contents conveying latent cues such as personality that can identify the contrast between authors. Given a single short-text s i with corresponding cognitive cues p j , we aim to identify the emotions explaining s i . Compared to comprehensive formal documents, individuals usually tend more to reveal their instant emotions through composing informal social media posts. Accordingly, we can utilize such rich content to exploit real-world emotion-related social communities. However, challenges abound:

Challenge 1 (Ignoring Author Latent Information)
Numerous prior works [7][8] [9][10] identify the emotions from textual contents disregarding the individual differences between authors, while such contrast including personality can affect the way people express their emotions [11]. As Holtgraves et al. [12] report, the personality-based correlations are more likely manifested in the emotionpertinent expressions. Table 1   To investigate how human personality can affect the emotion manifest in expressions, we consume the SemEval dataset [13] to set up an observation based on the distribution probabilities of the words. We select the expressions with various emotional intensities that are further pertinent to diverse cognitive factors. As Fig. 1 demonstrates, the distribution probabilities for each emotional word differ in various cognitive factors. Users with high NEU (Neuroticism) have low emotional stability and frequently use distressing words, like terrible. So their short text contents include more emotional words compared to the user of the low NEU weights. Interestingly, users with low EXT (Extraversion) are reluctant to interact with others and tend to express negative emotions such as fear, depression, and  anger more frequently than other users with high EXT load. Individuals with a high rate of CON (Conscientiousness) use a greater number of positive emotional words, such as happy, joy, and smile in their contents. From another perspective, people with high AGR (Agreeableness) weights rarely utilize emotional-related words. Therefore, the proposed consensus results reveal how cognitive factors can influence emotional expressions in short-text contents. Since individuals with identical cognitive factors exhibit similar emotions, we leverage the latent aspects of personalities to enhance our ability to detect emotions. Challenge 2 (Noisy Short Text) Short texts include important information but they are brief and error-prone. Hence, it is a tedious task to associate emotion cues with cognitive features.

Challenge 3 (The Scarceness of Annotated Dataset)
All prevailing datasets have either emotional labels [14] [13] or cognitive labels [15]. So, due to the scarceness of the dataset which contains both emotion and cognitive annotations, one of our challenges is to create datasets that are annotated by emotion and cognitive cues. Contributions. While our prior works [16][17] handle short text contents to detect attributed segments [18] and identify concepts, removing the perturbation caused by external knowledge bases, this paper recognizes the emotions through leveraging the cognitive factors from similar brief context. To this end, we utilize cognitive factors of individuals to categorize short texts to feed our novel ensemble classifier. Furthermore, in our proposed framework, we detect the emotion embedding of short texts with the help of an external knowledge-base which is associated with emotion lexicons. Accordingly, we extract multi-channel features in short texts to enrich the short-text inference models. Our contributions are fourfold: • We develop a framework on emotion recognition through ensemble learning which leverages the cognitive cues to distinguish between short-text authors.
• We propose a regression approach for inferring latent cues about short-text authors.

•
We design a multi-channel feature extraction algorithm based on emotion lexicons and attention mechanisms that fuse various embedding models to retrieve preferable vectors. • We devise a cognitive aware aggregation function to combine the results of different base classifiers in the ensemble model. The rest of our paper is as follows: in Sec. 2, we study the literature; in Sec 3, we provide the problem and our framework; in Sec. 4 and 5, we respectively explain our model and experiments. The paper is concluded in Sec. 6.

RELATED WORK
As briefed in Table 2, the related work comprises personality prediction and emotion recognition.

Personality Prediction
Personality is a psychological construct and it aims to understand various human behaviors with stable and measurable individual characteristics [19]. Various studies predict and identify personality traits [15] from social networks. The methods for cognitive prediction are of two categories: 1) Machine learning methods; 2) Deep learning models. General machine learning algorithms [20] leverage various features [21] including linguistic stats such as word count [22] and social network attributes like the number of friends to estimate personality traits [23]. Deep Neural network approaches [24][25] [19][26] surpass traditional methods. Sun et al. [25] combine bidirectional LSTMs (Long Short Term Memory networks) with CNNs (Convolutional Neural Network) to infer structures of texts. Similarly, [19] devise AttRCNN structure to understand the semantic features that are amended by the statistical linguistic features. However, [26] utilizes essential statistics including Mairesse features, the number of words, and an average length of sentences that are combined within convnets in a hybrid manner. We initially exploit latent personal characteristics by a modified Support Vector Regression (SVR) model and subsequently adopt CNN convents to extract feeling sentiments.

Emotion Recognition
Affective Computing [41] as an emerged field of research has attracted significant attention. Because it results in systems that can automatically recognize human emotions and eminently influence decision-making procedures. Emotions can be detected by heuristic, machine learning, and deep learning approaches [42]. The lexicon-based heuristic approaches [27][28] find keywords in textual contents and assign emotion labels based on lexicon tags, referenced from knowledge-base tools such as NRC-EIL [27] and De-pecheMood [28]. Machine learning models [8][33] not only consider lexicons but also extract effective textual features from input corpus, concluded by decision rules to recognize emotions based on the trained explicit labels. The ML models include Naïve Bayes (NB) [8], Random Forest (RF) [34], Support Vector Machine (SVM) [33][8] [29][34], Logistic Regression (LR) [32], and some trending deep learning methods [10] [39]. The Naïve Bayes classifiers [8] efficiently utilize various word classes to perform prediction but result in lower accuracies. Random forests [34] fuse a combination of treebased predictors where each tree depends on the values of a random vector, sampled independently and with the same distribution from the trees in the forest. Random forest approaches are more efficient than the SVM methods [8] [29] but empirically gain less accuracy. Both Esmin [7] and Xu [9] et al. use hierarchical classification techniques to perceive emotion cues. Such techniques integrate three levels: neutrality versus emotionality, sentiment analysis, and emotion recognition. Utilizing domain-specific emotion lexicons, a combination of n-grams, and part of speech (pos) tagging features can foster the classification performance of the SVM modules [30]. On the contrary, the intelligible rulebased methods share the goal of finding regularities in data, expressing the form of If-Else rules [31]. In emotion detection, the rule-based models infer emotion-related events that undertake the cause [31].  [42], we devise a novel ensemble classifier equipped with dynamic dropout convnets that further leverages individual latent aspects, known as cognitive cues. Moreover, we propose a nontrivial method to extract features from emotion and semantic contents to feed the convnets in ensembles.

PROBLEM STATEMENT
In this section, we elucidate preliminary concepts, problem statement for author linking, and our proposed framework.

Preliminary Concepts
Definition 1. (short-text message) s i ∈ S refers to a short-text that is composed by an author. Accordingly, S is our corpus which includes all short-texts. Definition 2. (cognitive factors) p i ∈ P (P = {p i |i ∈ [1, ..., q]}) refers to a cognitive factor (e.g., neuroticism). Each factor reveals one latent perception for the given message. denotes the cognitive factor scores for the short text s i ∈ S where f i,j is a cognitive score for j th factor p j ∈ P . F si represents short text s i in cognitive space with q dimension according to P .

Problem Definition
Problem 1. (identifying cognitive factors) Given a message s i our goal is to retrieve the cognitive vector F si for s i . Problem 2. (extracting multi-channel features) Given the set of short texts pertinent to a cognitive category c i , our goal is to extract the set of features through tracking the emotional cues. Problem 3. (recognizing emotion through cognitive factors) Given the message s i and its associated cognitive vector F si , our goal is to construct the emotion vector V si .

Framework Overview
The problem of emotion recognition through cognitive cues in brief contents includes two steps: (1) to extract the categories of short text messages via inclusive cognitive cues. (2) to learn an effective ensemble classifier to identify emotions by leveraging the extracted categories. Fig. 2 illustrates our proposed framework.
In the offline part, since a dataset enclosed with both emotion and cognitive annotations is scarce, as a prerequisite to emotion recognition, we initially augment the cognitive annotations within the dataset. To this end, we adopt the SVR to retrieve the cognitive vectors. Considering the impact of each cognitive factor on emotion-related expressions, we then apply categorization on textual contents. As a result, each category can include highly-correlated short texts aligned with the associated cognitive vector. Consequently, we extract the set of features by tracking the emotional cues in the short texts of each cognitive category. We then apply the emotion lexicons together with word vectors to learn each of the corresponding base classifiers(e.g., extraversion). To continue, given the short text contents enclosed with emotion annotations, we induce the ensemble classifier to convey emotion recognition. We can aggregate the base classifiers into an ensemble to convey helpful information according to the cognitive similarities. In the online part, we aim to predict emotion labels for the input short text.
To accomplish the task, we firstly extract cognitive vectors from the input. We then select a set of relevant classifiers based on the input cognitive features. Finally, we aggregate various outputs from classifiers to make the final prediction.

Inferring cognitive factors
For investigating the influence of cognitive factors on emotion recognition, we need a dataset that includes both emotional and cognitive annotations. We assume that our dataset includes emotion annotations, as ground truth. Hence, we aim to compensate the cognitive annotations.
To this end, we can leverage another source dataset with cognitive features to annotate our target dataset. We use a cognitive annotation dataset D P = {s i , F si }(i = 1, . . . , n) to infer cognitive vectors of short texts in emotional annotation dataset D E = {s i , V si }(i = 1, . . . , m) where P and E denote the source and target datasets. Here m and n denote the number of short texts in source and target datasets. To identify cognitive scores, we train a diverse model for each cognitive factor q on D P to infer the proportionate cognitive space of D E . In each model, we adopt the effective Support Vector estimation tool [43] to designate a decision surface to maximize the distance between different classes. In the source dataset, there are a set of points (s i , f si,j ) where x i is the feature vector extracted from s i and f si,j ∈ F si is the target value for each model j ∈ [1, ..., q]. Eq. 1 demonstrates the objective function.
Where w is the slope of the line, and b is the intercept. Our aim is to use SVR to find a surface that minimizes the prediction error in optimization function, Eq. 2. In regression, a soft-margin ( ) approach is employed similar to SVM. We add slack variables ξ i + ξ * i to guard against outliers.
Here ξ and ξ * are the distance of data points that lie outside the margin.
Our optimization goal is to achieve the conditions in Eq. 3 that we solve with finding the Lagrangian in Eq. 4.
The Lagrange multipliers, denoted by λ, λ * , α, α * , are nonnegative real numbers. The minimum of Eq. 4 is found by taking its partial derivatives with respect to the variables and then equating to zero. We also obtain the values of w and b through Eq. 5 and Eq. 6.

Cognitive categorization
Given emotion annotated dataset D E , we aim to acquire a set of cognitive categories, denoted by C. As elucidated in Section 1, authors with different cognitive cues express their emotions using various vocabs in emotion. Given such an intuition and based on the cognitive vector F si of the set P , we can map each short text s i ∈ D E to q dimensions. Subsequently, we can obtain the set C of cognitive categories from the emotion annotation dataset D E by splitting the space into two subspaces. Where we can define the lower and upper subspaces for each cognitive factor p j ∈ P . Accordingly, the short texts with lower and higher levels of a cognitive factor, p j , will be respectively appended to the pertinent categories of c 2j−1 , c 2j . Hence, clustering [44] and border classifiers, like SVM [8], cannot cohesively distinguish the categories. To this end, we diversely adopt an entropy-based categorizing method to acquire partitioning value in each cognitive factor to obtain lower and higher bounds. To get the partitioning threshold vector a = {α j |j ∈ [1, ..., q]}, we presumed that the source dataset incorporates the cognitive factor classes. So we employed the entropy approach to attain the partition value of α j for each cognitive factor p j that minimized the impurity in the resultant categories. For each given cognitive factor p j , we considered a set of partitioning points in a similar range as p j in D P and evaluated them based on entropy to find the best partitioning point, α j . In this regard, based on each partitioning point T , we splitted the D P into two subsets of d 1 and d 2 and computed the entropy of resulting subsets accordingly to input cognitive class of p j . We determined two classes k = {k 1 , k 2 } for each cognitive factor p j ∈ P where entropy of d i (i = {1, 2}) was defined as Eq. 7.
Here P (k m , d i ) is the probability of short texts in d i pertaining class k m . Given input dataset D P , cognitive factor p j , and partitioning point T , Eq. 8 computes the class information entropy E(p j , T, D P ) for the splits made by T .
Here α j is the partitioning criterion in Eq. 9.
We then used α j in Eq. 10 to obtain cognitive categories.
Consequently, the pair of sets (c 2j−1 ,c 2j ) formed by α j on each parameter p j can constitute the short texts with a low and high order of cognitive factor. We now elucidate various properties for each set of cognitive categories (C = (c 1 , ..., c n )): Lemma 1. a cognitive category c i can not be empty (∀i ∈ [1, ..., 2q] : c i = ∅).
Proof. Since the max. and min. values for each cognitive factor i do not equate (min(D E i ) = max(D E i )) and the splitter parameter α i is between min. and max. values so we can justify that c i can not be empty (Eq. 11): The aggregated data for all cognitive categories forms Proof. Suppose we have two categories of c 2j ⊆ D E and c 2j−1 ⊆ D E where we assign the short text s k ∈ D E to either c 2j or c 2j−1 . So we can justify the rules in Eq. 12 for the cognitive factor j in s k : Lemma 3. The intersection of two cognitive categories for the same parameter (e.g. c 2j and c 2j−1 ) partitioned by the specified threshold α j will result in null. As stated in Eq. 13, the intersection of the same pair (c 2j ,c 2j−1 ) with other cognitive categories c i can be non-empty.
Proof. Given cognitive factor j, each short text can be associated either with low c 2j−1 or high c 2j status, resulting in c 2j−1 ∩ c 2j = ∅. However, given all q cognitive factors for each short text with q cognitive categories every pair c 2j−1 and c i can share common textual contents. Proof. Suppose ∀m ∈ [1, ..., 2q] and ∀i, j ∈ [1, ..., |c m |], we can use contradiction logic to prove s i , s j ∈ c m stated by > α m . According to Eq. 10: Therefore, the assumption s j / ∈ c m with condition f j, m+1 2 > α m contradicts with our initial hypothesis. Therefore, if f i, m+1 2 > α m and f j, m+1 2 > α m , s i ∈ c m , s j will be in the same cognitive category(c m ). In this way, ≤ α m can also be proved.

Multi-channel features
The embedding models can capture syntactic and semantic regularities within the corpus to represent each word with a real-valued vector. GloVe [17][45] [16] uses word pair co-occurrences, and CBOW [46] predicts a word given its context. However, the resultant word vectors fail to acknowledge emotion cues in short text contents. Let τ be the corpus containing the set of words associated with textual contents of an emotion annotated dataset, D E . We can then tokenize each short text s i into a set of words (s i = {o 1 , o 2 , ..., o |si| }) where o j ∈ τ (j ∈ {1, . . . , |s i |}) is the j th word in short text s i . We can represent the contextwise word vector corresponding to the j th by utilizing the embedding function Ω : τ → R d in Eq. 15.
Here, O context j is the context-wise vector for the given word j. Let L = {l ι |ι ∈ [1, ..., t]} be the set and t as the number of emotion lexicons where DepecheMood [28] and NRC-EIL [27] infer the lexical vectors to designate each word with continuous scores for emotional or polarized orientations. Consequently, we can propose a hybrid vectorization process to include emotional aspects of the words. To this end, we assume that O emotion As Eq. 16 formalizes, the function Ψ : τ → R k receives the input word o j and retrieves the emotion scores through the lexicon knowledge-base l ι where t denotes the number of emotion lexicons and gives the concatenation of resultant vectors. We can support | O emotion j | = t ι=1 Φ(l ι ) where Φ specifies the number of emotions leveraged in l ι . Moreover, we adopt NLP processes such as POS tagging to take advantage of structural elements and syntactic patterns. Accordingly, as Eq. 17 elucidates, we can designate each short text with an alternative representation, POS tagbased feature vectors.
Here, : τ → R µ is the function that receives a word o j as input and returns the vector of the size µ with POS tags. In a nutshell, the attention-based mechanisms [47] aim to signify the words with higher impacts to foster classification procedures. As Fig. 3 As verbalized in Eq. 19, α j,y (α j,y 0) is the attention weight subjected to y α j,y = 1 where "." denotes the element-wise multiplication.
The score(., .) function quantifies the degree of relevance between the j th and y th words, and ϕ is the similarity function that determines the correlation ratio between the word pairs according to the pertinent emotion-wise vectors. Eq. 20 explains how the score(., .) computes the relevance between the given pair of o j and o y .
We randomly initialize the weights W a and W z and jointly learn them during the training process. The higher sentiment relevance between the given words in emotion classification, the larger inner-weights will be. To this end, we employ the simple but effective cosine similarity to calculate the weights between vectors, ϕ( O emotion j , O emotion y ).
To attain the multichannel features, we utilize both lexicon resources and POS tags. To collectively form the multichannel features, on the one hand, we concatenate the emotionwise and context-wise word vectors, and on the other hand, we combine the context-wise and POS-wise vector. Eq. 21 formulates how one can merge various vectors, including emotion-wise, context-wise, and attention vectors.
Where the ⊗ is the vector concatenation operator, we can utilize Eq. 22 to obtain M emo si ∈ R |si|×(2d+ t ι=1 Φ(lι)) as the matrix of vectors for s i where |s i | is the number of words.
We combine three vectors of POS, context, and attention in Eq. 23 to further improve the accuracy.
Given s i ∈ S comprising various number of vocabs, pertinent vectors of M pos si and M emo si will follow |s i |. Hence, we adopt the zero padding and use Γ = max ∀i=1,...,m (|s i |) as the fixed length for M si to unify short-text matrices.

Cognitive ensemble
Given the dataset D E = {(s i , V si )|i = [1, ..., m]} with m short texts, V si ∈ {0, 1} k can represent a binary emotion vector for s i . Here, k denotes the number of emotion class labels. Moreover, where the j th label of emotion is not null in V Si , we assign v i,j with 1 or zero otherwise. Since s i can be concurrently involved with diverse emotions, neither singlelabel classification models [48] nor regression algorithms [43] can model such multiplexity [35]. Hence, we employ multi-label classification by appointing each emotion label with a single task and adopting a parallel multi-task learner. An ensemble of convnet classifiers [48] can better learn the emotion features where we designate each cognitive category c i to a distinctive multi-task classifier h ci . Finally, we aggregate the output of trained classifiers in H (Fig. 3). Given the feature learning component, we appoint the width of the filters by the dimension of word vectors, denoted by 2d + t ι=1 Φ(l ι ). We further alter the height to acquire various sets for the encoded feature vectors. To this end, we obtain the encoded set of feature vectors Q emo = {Q 1 , Q 2 , ..., Q ϕ } for the embedding matrix M emo si , by ϕ various window sizes, each denoted by δ r ∈ N. Here Q r = [q r,j |q r,j ∈ R and j ∈ [1, ..., |s i | + δ r − 1]] represents the feature vectors for the r th window, Eq. 25.
W r ∈ R δr×(2d+ t ι=1 Φ(lι)) is the filter matrix, b ∈ R δr * 1 is a bias vector, and M emo si{j:j+δr−1} is the horizontal fragment for M emo si of the size δ r . The max layer consumes output feature vectors Q emo to exploit the final encoded vectorQ emo (Eq. 26).
Successively, the emotion learning component consumesQ, where we collectively utilize the inter-connected layers to address the perceptual multi-label classification problem and segregate tasks in the output layer. Let l ∈ {1, .., L} be the layer index of the network in the fully connected component. Given L as the number of hidden layers, the index zero can determine the input for the emotion learning module. Fig. 4 shows the schema of a neuron in the hidden layer l. Where x 0 equates toQ, x l can specify the load for l. Similarly, w l and z l can respectively indicate the weighting matrix and the output of layer l, to be used in the next layer, l + 1. Eq. 28 attains the input of the k th neuron in l.
Here, x l k and b l k can indicate the input and the bias values for the k th neuron in l. Where the output of the i th neuron in l − 1 is z l−1 i , w l−1 ik associates the weights of the i th neuron in l − 1 to the k th neuron in l. Eq. 29 neutralizes the effect of non-essential features to avoid overfitting. As explained in Sec.4.1.5, the function ℘(w l−1 ik ) returns the weights between a pair of neurons. So as shown in Fig. 4, we can pass x l k through activation function f , formalized in Eq. 30, to retrieve the intermediate output z l k .

Fig. 4: Input and output of a neroun at hidden layer l
The output layer constitutes k output units, each dedicated to a single task. The output of the last layer in hidden layers, as the common feature representation learned for the k tasks, can be fed to the output layer. The constraint can be accommodated by Eq. 31, computing the network prediction output for the j th emotion, denoted byv j,i ∈ [0, 1].
To reduce the error rate, we use the back-propagation algorithm. We then employ a modified binary cross-entropy to compute the joint loss function by the predicted labels.
Herev j,i is the output of the prediction network, v j,i denotes the ground-truth for e i ∈ E, associated with the short text with index j. Moreover, k and m respectively count the numbers of emotion labels and short texts. We update the weights and bias by leveraging the loss function (Eq. 33).
Here, w(t) and w(t + 1) are current weights and new weights. To compute ∆w(t), we use Adam optimizer [49] that benefits both from AdaGrad and RMSProp.

5:
if not r in l then 6: l.append(r)

7:
end if 8: end while 9: for p in l do 10:ẃ p/|f |,p%|f | = 0 11: end for 12: returnẃ 4.1.5 Weight regularization As explained in Sec. 4.1.4, overfitting as a deep learning dilemma is caused by a contradiction where optimization aims to adjust the model to foster effectiveness, and generalization solely points toward inferring the unforeseen data. The dropout [50] is the most credible regularization approach to revoke the overfitting issue. However, resolving the tension between bias and variance is not a trivial task. To this end, the dropout approaches like DropConnect [51]

Algorithm 2 None Significant Weight reduction
Input: w, α, β, λ Output: if µ − 2σ < fi < µ + 2σ then 6: if µ − σ < fi < µ + σ then 7:ẃr,c = α × wr,c The DropConnect algorithm (Alg. 1) turns out to be Naïve in the elimination process. Because it arbitrarily zeros out the selected weights. From another perspective, even the fixed dropout rate in DropConnect can reduce the model expressiveness and increase manual tuning requirements. Hence, we must initially infer the statistical cues from the embedding weights and then adjust the dropout rate consciously. To this end, we enhance the flexibility by retrieving the dropout rate based on the weights drawn from a dataspecific uniform distribution.

Fig. 5: Random dropout versus weight regularization
In a tractable approach, we can refer to each weight in the bell curve to initialize the elimination procedure empirically. In other words, as depicted in Fig. 5, we can instantiate a weight matrix to preserve the value of the specified cell, removing or reducing the value in selected cells to adjust the activation process of the neurons. Here we can reduce the value of the given point in the matrix according to trilateral coefficients. As implemented in algorithm 2, we propose an efficient dropout technique to alter imperceptive arbitrary regularization with a distribution-aware model. We multiply the outputs of neurons, highlighted in Eq. 29, by the justified weights based on coefficients to acquireẃ new weights. Given the neuron inner weights, we specify the drop-rate using dataset-oriented parameters, the standard deviation and the mean, denoted by µ and σ. As shown in Fig. 6, the weights are of three categories: least (λ), minor (β), and common (α). Due to the subtle connection between the significance of the neurons and the dropout, we sufficiently reduce the weights for the least and minor sections in the curve. This not only leads to a faster convergence rate but also reduces the activation weights that cause overfitting. Similarly, we relatively increase the significance of weights in the minor and common regions, coefficients of µ and σ.
The changes make our model more mature through subsequent epochs, avoiding the neuron outputs to excessively rely on the least and minor weights. Finally, the model will utilize high-impact weights from the common section.

Online Phase
In the online phase, given the cognitive vector F sq of the input short text s q , the proposed method approximates the emotion vector, comprising two tasks: Detecting the cognitive factors and Estimating the emotions.

Cognitive factors detection
Social media supply our propositional datasets. Hence, our framework needs to diligently handle millions of short text contents in the Online phase. To meet efficacy requirements, we train the model in Sec. 4.1.1 infrequently. Eq. 34 can attain the cognitive vector F sq of the input query s q .

Cognitive aware aggregation method
In this step, given the cognitive vector corresponding to the input short-text query, we firstly select a set of relevant base classifiers to perform inference as parts of the same whole. Algorithm 3 exemplifies how we collectively select the base classifiers and combine them accordingly.
In algorithm 3, we firstly extract multi-channel features out of the input query s q using the method in Sec. 4.1.3. Given cognitive vector F sq , we can select either of the base classifiers, h 2i or h 2i−1 . To this end, we compare each element f sq,i ∈ F sq to the splitter parameter α i that divides the short text messages into various categories of low and high. By designating the whole corpus to the multi-task baseclassifier h q+1 , we can disregard the cognitive factors in learning. We can subsequently predict the emotion vectors corresponding to s q through applying the selected baseclassifiers. This results in the consensus matrix A where each element A i,j represents the predicted class by the base classifier j for an emotion i. Each column j depicts the binary opinion of model j about each of emotions in V sq . Consequently, we combine the base classifiers to compute the binary values from the given emotion classes, resulting in better approximation and improving the overall performance [52]. To continue, we adopt the simple but effective majority voting method [53] to anticipate the outcomes. Given the short text query s q , Eq. 35 formalizes our approach in the prediction of various sentiments.
Eq. 36 shows, A j,t is the prediction of the base classifier t using the indicator function g(y, c).

EXPERIMENT
We conducted extensive experiments on multiple datasets [13][15] to compare our proposed unified framework to other novel approaches in emotion detection. Taking advantage of various Python libraries and interfaces for neural networks, we ran the experiments on a server with a 4.20 GHz Intel Core i7-7700K CPU and 64GB of RAM. The codes are available to download 1 .

Data
We used three datasets to examine our method in detecting personality and emotions from brief contents.
-M yP ersonality [15]: The MyPersonality dataset, denoted by D P , predicts the cognitive labels for our target emotion dataset [13] and comprises the cues for extraversion, agreeableness, conscientiousness, and neuroticism. We eliminate the effect of openness due to minor significance.
-SemEval2018 [13]: This dataset (D E ) is annotated by 11 emotion tags. Like Ekman's standard [54], we include fear, anger, joy, disgust, and sadness. 1. https://sites.google.com/view/EmoDNN -W ASSA − 2017 [14]: is the destination dataset, denoted by D E , and includes fear, joy, sadness, and anger emotions. We utilize this emotion annotated dataset to evaluate the performance of our proposed framework in multi-class labeling. We enclose the statistics pertaining MyPersonality and SemEval2018 in Tables 3 and 4, respectively.

Benchmark
Intuitively, we define hypothetic parameters to evaluate the effectiveness of our proposed framework in emotion recognition. The statistical parameters are as follows: True positive is observed when a short text has emotion e i and the model predicts the same. False positive indicates that the short-text doesn't relate to the emotion e i but the model predicts oppositely. Applying similar logic can determine True and False Negatives. We can calculate the metrics of Accuracy, Precision, Recall, and F-measure using TP, FP, TN, and FN. Accordingly, we can distinguish the best performance by F-measure while we apply 10-fold crossvalidation in every evaluation process.

Baselines
We employ the benchmark in Sec. 5.2 to examine the performance of the rival methods in emotion recognition: • U unison: This baseline [10] leverages a variety of deep learning modules, such as word and characterbased RNN and CNN, to improve traditional classifiers including BOW and latent semantic indexing.

•
Senti HC : This model is a hierarchical classification scheme that comprises three levels in the learning process: neutrality(neutrality versus emotionality), polarity, and emotions(five basic emotions) [7].
• SV M − Behavior: Similar to [8], it combines unigrams and emotion lexicons and uses SVM-Behavior to classify text contents according to emotion cues.
• lexiconbased: Instead of word embedding [28], this model is performed by emotion lexicon.

Impact of learning parameters on emotion recognition
Given the importance of the batch size is in the dynamics of deep learning algorithms, we designate this section to measure the accuracy for each given emotion where the batch size varies. Table 5 shows where the batch size varies the accuracy fluctuates up to 5% with minimum and maximum for Disgust and Joy emotions. As a result, we select the best value of 128 tweets for the batch size in our method to maximize the performance. Similarly, we have attained the best batch size for other rivals. Similarly, Table  6 investigates the impact of the number of epochs on the accuracy. Excluding the fear and sadness emotions, where the epoch is set to 50, we gain the best effectiveness. Furthermore, we need to evaluate the embedding module. Hence, Table 7 reports the accuracy for various embedding dimensions where we opt for the value of 200 to get the best overall performance. In retrospect, the lower dimensions can better adjust to fewer data, like for fear and sadness. Because the higher the dimension in low sampling, the bigger the data sparsity will be.     We observe in Fig. 8 that the performance of all the methods is more than 40% which is even better for the neural network models. However, both versions of our proposed approach, including EmoDN N SV M and EmoDN N wd , turn out to be the best classifiers with an improvement of up to 6.6% versus the best performing competitor, Unison. From another perspective, lack of training procedure justifies why the lexicon-based methods attain the lowest accuracy. Even though we integrated our framework with shallow machine learning methods, e.g., SVM, the modified solution was still capable of overcome other baselines, where applying deep learning modules assured better accuracy. To prevent overfitting, we introduced a new improved dropout mechanism to foster the classification task, with further improvement of 1% compared to the arbitrary dropout. We also adopted the values 1.5, 1, and 0, for α,β, and λ coefficients and utilized a modified emotionaware embedding approach instead of a pre-trained vector module, improving the accuracy by up to 1.07%.   Aiming to test out-of-samples in various folds, we study how the accuracy of our proposed method fluctuates in different emotions. We observe (Fig. 9) that fear and disgust  gain the best and the least accuracies. While recognition of fear and joy is convenient, the detection of sadness and disgust is tedious in brief contents. We leverage the intuition in Fig. 10 to compare the effect of the two highest accuracies based on fear and joy where EmoDNN surpasses other rivals and the lexicon-based attains the least accuracy.

Effectiveness of EmoDNN in multi-class dataset
We choose the multi-class WASSA-2017 [14] emotion recognition dataset to evaluate mutual co-existed labels. We compare our method with unison and SVM-behavior methods that address the multi-class challenge.   Where the highest prediction performance is for Fear and Sadness is the least, 68.5% of the correct labels. Evidently, the sadness is mostly misclassified as fear in more than 18% of the cases where the least incorrect labels for Joy is 5.7%. We note that it is almost impossible to predict Fear or Anger by the joy emotion, 0.0%.

Computational complexity analysis
Our proposed framework is useful in many real-time applications. Emotion recognition from social contents can better explain the opinion of a community about a product. Also, the recommendation systems can benefit from emotion weights to improve final suggestions. Many applications need to process millions of brief contents that make the efficiency of the emotion-aware inference systems critical.
Hence, we examine the time requirement of our framework. Our proposed framework comprises offline and online components, where the latter is more complex than the former. In retrospect, we can calculate the complexity for the offline section by aggregating the times of including components. Given m as the number for training samples, the complexity for the SVR-based module to infer the cognitive factors will be O(m 3 ). The complexity pertaining to two other components, cognitive categorization, and multi-channel feature extraction can be respectively computed as O(m) and O(m.Γ), with Γ denoting the number of words in each training samples. Let l and k be the respective index and the number of convolutional layers. In that case, the expected time for our network to run each category will thus yield in O(( k l=1 n l−1 .|w l | 2 .n l .Q 2 l ).m.e) [55]. Where n l and n l−1 will respectively represent the number of filters and input channels for the l th layer, |w l | can signify the filter length, Q l , the output feature spatial size, and e, the number of epochs. Correspondingly, the time complexity for the cognitive ensemble can be aggregated by all cognitive categories, verbalized as O(2q.( k l=1 n l−1 .|w l | 2 .n l .Q 2 l ).m.e). Also, We designate q with 5 as the number of cognitive cues that as a small constant can be dismissed in time function. Where the time complexity applies to both training and testing times, though with a different scale, the weights can differ in the attention feature vector and the canonical layers of the emotion recognition network. Suppose α, γ, and β are constant multipliers. Hence, Eq. 37 can formalize the overall time complexity of our framework. However, we further need to efficiently infer millions of brief messages in the online phase. Depending on the network structure, since the time complexity of the online section is polynomial, our model can satisfy the efficacy requirements for real-time processing. The time complexity of the online section to exploit emotions from a single short text is represented by O( k l=1 n l−1 .|w l | 2 .n l .Q 2 l ).

CONCLUSION
Our proposed unified framework in this paper leverages individual cognitive cues to recognize emotions from short text contents. Most previous efforts on emotion recognition disregard user-specific characteristics. To fill the gap, we firstly categorize short texts according to the cognitive cues. Subsequently, we then utilize the emotion lexicons alongside embedding models to obtain the emotion-aware short text vectors. Consequently, we learn corresponding base classifiers and employ a novel ensemble learning approach to aggregate the classification outputs. The results from extensive experiments on real-world datasets confirm the superiority of our proposed framework over state-of-the-art rivals in emotion recognition. However, we need to integrate transfer learning to make inner ensemble classifiers better collaborate. Moreover, we will have to empirically study the effect of various distributions on the proposed dropout module. We leave these tasks for future work.