Big Five Personality Detection Using Deep Convolutional Neural Networks

Personality is the most critical feature that tells us about an individual. It is the collection of the individual’s thoughts, opinions, emotions and more. Personality detection is an emerging field in research and Deep Learning models have only recently started being developed. There is a need for a larger dataset that is unbiased as the current dataset that is used is in the form of questionnaires that the individuals themselves answer, hence increasing the chance of unconscious bias. We have used the famous stream-of-consciousness essays collated by James Pennbaker and Laura King. We have used the Big Five Model often known as the five-factor model or OCEAN model. Document-level feature extraction has been performed using Google’s word2vec embeddings and Mairesse features. The processed data has been fed into a deep convolutional network and a binary classifier has been used to classify the presence or absence of the personality trait. Holdout method has been used to evaluate the model, and the F1 score has been used as the performance metric. Keywords—Personality Detection, Big Five model, Fivefactor Model, OCEAN, Deep Convolutional Neural Network, Mairesse Features, stream-of-consciousness


I. INTRODUCTION
Personality is defined as nature, characteristics or qualities that form an individual's character. It is the combination of the individual's thought process, opinions, emotions, fears, goals, and aspirations.
The personality of the individual is the factor that determines how an individual is going to be with their family and friends, what kind of career they will opt for, how they will perform at work and exist in the global community. When individuals are well-versed with their personality, they know about their strengths and weaknesses which will help in self-development.
Some widely used theories for classifying personality traits are the Big Five model, Myers-Briggs Type Indicator, Keirsey Temperament Sorter, Three-trait personality model and Eysenck Personality Questionnaire [1] .
In this paper, we are going to classify personalities on the Big Five classification. This classification remains relatively uniform throughout one's lifetime and is the most widely accepted personality classification theory adapted by psychologists and researchers worldwide. The Big Five model classifies personalities under five broad umbrella terms that encompass more labels. The five personality categories are described below: The rest of this paper is organized as: related works, methodology, experimental results, conclusion, future work, acknowledgment and references.

II. RELATED WORKS
The first Personality Test ever conducted is commonly known as Woodworth Psychoneurotic Inventory and was developed during World War I. The U.S. military used it for screening army recruits. The screening was done for Post Traumatic Stress Disorder (PTSD). The Process Communication Model (PCM) was widely used. PCM was built by Taibi Kahler and was used for the selection of astronauts [1] .
The baseline methods of detecting personality are text, audio and visual cues. When using textual data, data preprocessing is a crucial step that directly affects the results. Generally, the textual features are extracted from the raw data and fed as input into Machine Learning models like Support Vector Machines (SVMs), Naïve Bayes Classifier, etc. The word embeddings are represented as vectors (Word2Vec, GloVe, etc.) and later more techniques are applied to yield results. Carles Venture et al. [3] have used Convolutional Neural Networks in combination with Action Unit Recognition Systems and face detection to classify personality as per the Big Five model. They have used the First Impressions dataset that comprises of around 10,000 videos of various individuals.
Gokul K et al. [4] in 2018 have applied Bayes-Net classifier to classify personality as extrovert or introvert. They have used self-recorded audio samples as their dataset. Auditory Nerve Modeling that comprises of Voice Activity Detection in combination with Attribute Selection for dimensionality reduction was applied and they achieved an accuracy of 88.3%.
Bojan Simoski et al. [5] [7] have implemented C4.5 Decision Tree for classification of personality based on the Big Five Model. They have used the Twitter API to obtain the dataset that is roughly around 110 million tweets every day. They were able to obtain an accuracy of 64.30%.
In 2019, Tao Hong et al. [8] conducted a research to classify sentiment and detect personality. They have used the MDSTC dataset (comprises of speech, facial expressions and Galvanic Skin Response) and applied Deep Neural Network to classify personality. They achieved better results on performance metrics as compared to the state-of-the-art models.
Imanuel Buhapoda Drexel [9] has used Gaussian Naïve Bayes classifier to detect personality on the basis of Big Five Model. They have applied Word2Vec embeddings as well as FastText word embedding and used k-fold cross validation (k=5) for cross validation.
Songcheng Gao et al. in 2020 [10] have used a Multi-View Learning Approach that also includes a Multi-Task approach with StudentLife dataset that they obtains by developing a mobile application. They collected data from a group of 183 individuals from two different universities. The data collection is in the form of a questionnaire that one has to fill out on the mobile application. They have used mean absolute error and root mean squared error as the performance measure.
Marwa S. Salem et al. [11] have applied Multinomial Naïve Bayes, K-Nearest Neighbour, Support Vector Machine and Decision Trees on Egyptian Twitter Users Dataset to classify personality. According to their research, K-Nearest Neighbor was the best algorithm for Openness, Extraversion, Agreeableness and Neuroticism whereas Decision Tree performed best for Conscientiousness.
Kamal El -Demerdash et al. [12] have used Universal Language Model Fine-Tuning for personality trait detection on the Big Five model. They have applied this Model on the stream-of-consciousness dataset and they have managed to achieve around 1% better accuracy than most state-of-the-art models.
In 2017, a state-of-the-art research was performed by Navonil Majumder et al. in 2017 [13] where the researchers used a Deep Convolutional Neural Network to classify personality traits basis on the Big Five model. The model is coded in Python 2.7 and uses Google's word2vec embeddings and Mairesse features. This research was improved by Md. Abdur Rahman et al. in 2019 [14] , where the researchers applied different activation functions like Tanh, ReLU and leaky ReLU and observed significant improvement on the results. Even this was coded in Python 2.7.
We have coded the same model in Python 3.8 since Python 3.8 since python 2.7 is no longer supported (as of January 1, 2020). The methodology is explained in detail in the following section.

III. METHODOLOGY
A Deep Convolutional Neural Network (CNN) has been trained to perform Personality Classification. This approach classifies five different personality traits: CON, AGR, EXT, OPN and NEU using the same network architecture. The methodology is described in detail in the following sections:

A. Dataset
The stream-of-consciousness essay dataset has been used. It is an assortment of 2,468 essays that are composed by people in a controlled environment. The writers also marked their personality traits themselves. The dataset was compiled by James Pennebaker and Laura King.

B. Data Preprocessing
Since the dataset contains of noise, we have performed cleaning by expanding abbreviations, removing unnecessary symbols and converting the text to lower-case. After performing cleaning, sentence-splitting was performed. The unique words are complied into a list that we have termed as vocabulary.  [13] The different layers are shown in Figure 1 and described below:

1) First layer-Word vectorization using Word2Vecs:
Word-level feature extraction was performed using Google's Word2Vec Word embeddings library and the unknown words not found in Word2Vec were taken care of using uniform distribution. Equation (1) and Fig. 2 explain the Uniform Distribution Function. 2) Second layer-Convolution: Convolutional filters along with max pooling were applied to the document in order to extract n-gram features from each sentence. The obtained feature vectors were concatenated into a sentence vectors.
3) Third layer-1-max pooling: The sentence vectors from Layer 3 were concatenated into document vectors. The dimension of a sentence vector is the multiple of n-grams. The document is considered only if it belongs to at least one feature.

6) Sixth layer-Classification:
The sixth and last layer is a binary classifier that classifies if the given personality trait is present or not by using softmax activation function (5) which is the same as sigmoid function for binary classifiers.

IV. EXPERIMENTAL RESULTS
The constructed dataset is trained and evaluated using hold-out technique. The performance measure that is used is F1 score. It is the harmonic mean of Precision and Recall. True Positive (TP), False Positive (FP), True Negative (TN), False Negative (FN) are the measures used to calculate Precision and Recall. F1-score is given by (8): The results that we have obtained are described in Fig. 7. We can observe that Tanh function performs best for traits Extraversion, Neuroticism and Agreeableness with F1scores 61.2%, 66.33% and 62.67% respectively. Sigmoid performs best for Openness and Conscientiousness with F1scores of 69.71% and 67.46% respectively. V. COMPARATIVE ANALYSIS Activation functions are used in neural networks as outputs for the nodes in the layers. They are used to add nonlinearity to the network. We have used 3 different activation functions for our model namely: Sigmoid, Tanh, and ReLU.
The state-of-the-art model has been trained for 6 epochs. The model was evaluated using k-fold cross-validation (k=10). Due to GPU and CPU constraints, we have trained our model for 50 epochs and evaluated our model using hold-out cross-validation technique with 9:1 as the train-test ratio. Sigmoid and Tanh are non-linear activation functions whereas ReLU is a linear function. We have trained our model using these three activations and compared our results. The comparison for each of the five traits can be seen in Fig.  8, 9, 10, 11 and 12. We observe that the non-linear functions i.e.; Sigmoid and Tanh performed better than the linear activation ReLU in all cases. We also observe that our model performs better than the state-of-the-art model.

VI. CONCLUSION
We have been able to successfully code this model in Python 3.8 and have been able to optimize the previous code structure as well. We have been able to achieve better performance measures than previous state-of-the-art methods as can be observed in Fig. 5. The proposed model had used k-fold cross-validation technique (k=10) whereas we have used hold-out method because of limited resources and yet have achieved better results. As observed in this paper, personality detection is a vital field that requires more research. Application of personality detection ranges from enhancing voice assistants (Alexa, Siri, Google Assistant, Cortana, etc.) to areas like forensics and health care. It is also used for hiring purposes and psychological studies.
Less biased word embeddings could be explored and the accuracy of the new model could be compared to the current model.
We have also observed the need of larger and more accurate datasets. Most ways of collecting data for this field include handing out questionnaires. Individuals may or may not answer the questions honestly and there must be a way to check the credibility of the responses.