P sy A ttention: Psychological Attention Model for Personality Detection (2023)

Abstract: Work on personality detection has tended to incorporate psychological features from different personality models, such as BigFive and MBTI. There are more than 900 psychological features, each of which is helpful for personality detection. However, when used in combination, the application of different calculation standards among these features may result in interference between features calculated using distinct systems, thereby introducing noise and reducing performance. This paper adapts different psychological models in the proposed PsyAttention for personality detection, which can effectively encode psychological features, reducing their number by 85%. In experiments on the BigFive and MBTI models, PysAttention achieved average accuracy of 65.66% and 86.30%, respectively, outperforming state-of-the-art methods, indicating that it is effective at encoding psychological features.

## introduction personality detection helps people to manage themselves and understand themselves, and has been involved in job screening, personal assistants, recommendation systems, specialized health care, counseling psychotherapy, and political forecasting @xcite . personality measures originated from psychology @xcite , and psychologists judge their patients' personality features through a series of tests. the content that users post on social media can give valuable insights into their personalities @xcite . personality detection can identify personality features from this, and often requires a combination of psychology, linguistics, and computer science. there are many psychological models of individual personality, the most famous being the big-five @xcite ; mccrae and * *corresponding author @xcite and mbti @xcite @xcite . the big-five model divides personality features into five factors @xcite : openness (opn), conscientiousness (con), extraversion (ext), agreeableness (agr), and neuroticism (neu). these are usually assessed through questionnaires in which people reflect on their typical patterns of thinking and behavior. the mbti model describes personality by 16 types that result from the combination of binary categories in four dimensions foot_0 : (1) extraversion (e) vs introversion (i); ( 2 ) thinking (t) vs feeling (f); (3) sensing (s) vs intuition (n); and (4) judging (j) vs perceiving (p). previous work saw a person's use of language as a distillation of underlying drives, emotions, and thought patterns @xcite . there are many theories and tools for extracting psychological features from texts, such as arte (automatic readability tool for english) @xcite , which has 55 psychological features); seance (sentiment analysis and cognition engine) @xcite , with 271 features; taaco (tool for the automatic analysis of cohesion) @xcite , with 168 features; and taales (tool for the automatic analysis of lexical sophistication @xcite , with 491 features. these tools use multiple theories to obtain psychological features from text. for example, seance uses eight theories, taaco use fifteen theories. however, the application of different calculation standards among these features may result in interference between features calculated using distinct systems, thereby introducing noise and reducing performance. for example, when analyzing sentiment or emotion features, seance uses more than 10 lexicons. a word's meaning may vary according to the lexicon, which leads to inconsistencies between features, and thus increases noise. in the field of natural language processing (nlp), personality detection aims to identify the personality features of individuals from their use of language. work can be divided into two categories. one uses psychological features obtained by some statistical methods and uses machine learning tools such as support vector machine (svm) and k-nearest neighbor (knn) for classification. others take it as a text classification task, and directly input text to a neural network for classification. work seldom combines psychological features with text embedding by treating them as sequences. however, because psychology and computer science are very different fields, psychologists often design features without considering how they will be introduced into a neural network model. nlp researchers ignore relations between those features, and focus on how to extract and encode more features, ignoring that this will introduce noise to the model, resulting in poor performance. in this paper, we propose psyattention for personality detection, which can effectively encode psychological features and reduce their number by 85%. the main contributions of this paper are as follows. ## related work research on individual personality detection focuses on how to extract more appropriate psychological features from texts and devise classification models. we introduce some methods below. methods to obtain personality features from text data generally use text analysis tools such as liwc @xcite and nrc @xcite to extract appropriate features, which are fed into standard machine learning classifiers such as svm and naïve bayes (nb) @xcite for classification. abidin et al. (2020) used logistic regression (lr), knn, and random forest, and found that random forest has the best performance. with the deeper study of psychology, language use has been linked to a wide range of psychological correlates @xcite . @xcite proposed that writing style (e.g., frequency of word use) has correlations with personality. @xcite thought the social behavior of the user and grammatical information have a relation to the user's personality. it was found that combining common-sense knowledge with psycho-linguistic features resulted in a remarkable improvement in accuracy @xcite . @xcite al. (2011 ) proposed 74 psychological features; nisha et al. (2022) extracted features like age, education level, nationality, first language, country, and religion, and found that xgboost performed better than svm and naïve bayes. methods based on deep-learning mainly regard personality detection as a classification task. @xcite proposed to use cnn and word2vec embeddings for personality detection from text; since a document is too long, they proposed dividing the data into two parts and extracting the text features separately using two identical cnn models separately. @xcite experimented with n-grams (extracted with a cnn) and bidirectional rnns (forward and backward grus). instead of using the pretrained word2vec model, they trained the word embedding matrix using the skip-gram method to incorporate internet slang, emoticons, and acronyms. @xcite used bidirectional lstms (bilstms), concatenated with a cnn, and combined abstract features with posts to detect a user's personality. @xcite proposed an rcnn model with three cnn layers and one bilstm layer. @xcite proposed an rcnn text encoder with an attention mechanism, inputting the text to a gru and performing an attention calculation to make full use of the text features, then using gru encodings to input the text in normal and reverse order. similar to @xcite , sun et al. (2018) used an rnn and cnn, divided the text into segments, input them separately to lstm, and input the merged re-2 sults to the cnn to extract features. some work has combined psychological features with deep learning models. wiechmann et al. (2022) combined human reading behavior features with pretrained models. kerz et al. (2022) used bilstm to encode 437 proposed features. neuman et al. (2023) proposed an data augmentation methods for modeling human personality. however, as the number of psychological features designed by psychologists increases, the models used to encode them are not improving, and remain a dense layer and bilstm. no research has focused on the effective use of psychological features. all models take them as a sequence, ignoring that they are obtained by a statistical approach. to better use psychological features, we propose pysattention, along with a feature optimization method that can reduce the noise introduced by too many features. ## model we introduce psyattention, whose model is shown in figure 1 , to effectively integrate text and psychological features. an attention-based encoder encodes numerical psychological features, and bert is fine-tuned with psychological features obtained by tools to extract more personality information. @xcite proposed the most psychological features in the task of personality detection, and got them by automated text analysis systems such as cocogen @xcite . to detect sentiment, emotion, and/or effect, they designed: (1) features of morpho-syntactic complexity; (2) features of lexical richness, diversity, and sophistication; (3) readability features; and (4) lexicon features. these groups of features can be divided into those of expressiveness and emotions contained in the text. to obtain more features, we choose three tools to analyze input texts: (1) seance @xcite can obtain the features of sentiment, emotion, and/or effect; (2) @xcite can obtain features of cohesion; and (3) taales @xcite can obtain features of expressive ability. table1 shows the numbers of features used for each tool. ## conclusion we proposed pysattention for personality detection, which can effectively encode psychological features, and reduce their number by 85%. we categorized the psychological features contained in the text as either expressiveness or emotions, and extracted the relative features using three text analysis tools. we demonstrated that the pre-trained model contained only a small amount of psychological information, and proposed a method of psychological feature selection. unlike models that simply encode a long series of numerical psychological features through bilstm, we efficiently encode psychological features with a transformer-like encoder. we also investigate the impact of different psychological features on the results and employe an attention mechanism to identify the more significant features. in experiments on two classical psychological assessment datasets, the proposed model outperformed state-of-the-art algorithms in terms of accuracy, demonstrating the effectiveness of pysattention.