# Personality Trait Analysis in Social Networks Based on Weakly Supervised Learning of Shared Images
## 3 Methodology
\begin{table}
\begin{tabular}{p{85.4 pt} p{34.1 pt} p{34.1 pt}} \hline \hline
**Trait** & **Correlation** & **Related Words** \\ \hline \multirow{4}{*}{Openness} & High & culture, films, folk, humans, literature, moon, narrative, novel, poet, poetry, sky \\ \cline{2-3}  & Low & anniversary, detest, diaper, hate, hatred, hubby, implore, loves, prayers, thankful, thanks \\ \hline \multirow{4}{*}{Conscientiousness} & High & achieved, adventure, challenging, determined, discipline, persistence, recovery, routine, snack, vegetables, visit \\ \cline{2-3}  & Low & bang, bloody, boring, deny, drunk, fool, protest, soldier, stupid, swear, vain \\ \hline \multirow{4}{*}{Extraversion} & High & bar, concert, crowd, dancing, drinking, friends, girls, grandfather, party, pool, restaurant \\ \cline{2-3}  & Low & blankets, books, cats, computer, enough, interest, knitting, lazy, minor, pages, winter \\ \hline \multirow{4}{*}{Agreeableness} & High & afternoon, beautiful, feelings, gifts, hug, joy, spring, summer, together, walked, wonderful \\ \cline{2-3}  & Low & assu*le, bin, cost, drugs, excuse, harm, idiot, p*m, sexual, stupid, violence \\ \hline \multirow{4}{*}{Neuroticism} & High & annoying, ashamed, awful, horrible, lazy, sick, stress, stressful, terrible, upset, worse \\ \cline{2-3}  & Low & completed, county, ground, later, mountain, oldest, poem, road, southern, sunset, thirty \\ \hline \hline \end{tabular}
\end{table} 
Table 1: List of words highly related to each personality trait, randomly selected from those reported in Yarkoni [11]. Building the Personality Model  
Once the procedure had been defined to determine which set of images \(S\) was most related to each personality trait, we modelled this relationship between images and personality. In other words, we next built a model which was able to predict the personality trait corresponding to an image, given the training set described in the previous section. In this work, we have used a CNN model that maps an input image to a desired output by learning a set of parameters that produce a good representation of the input. This model is hierarchical; it consists of several layers of feature detectors that build a hierarchical representation of the input, from local edge features to abstract concepts. The final layer consists of a linear classifier, which projects the last layer features into the label space. Let \(x\) be an input image and \(f(x;\theta)\) a parametric function that maps this input to an output, where \(\theta\) are the parameters. The neural network model is a hierarchical combination of computation layers:  
\[f(x;\theta)=f^{N}(f^{N-1}(...f^{2}(f^{1}(x;\theta_{1});\theta_{2});\theta_{N-1 });\theta_{N}) \tag{1}\]  
where \(N\) is the number of layers in the model, and each computation layer corresponds to a non-linear function \(f^{n}\)[31] with its own parameters \(\theta_{n}\). We find \(\theta\) by empirical risk minimization:  
\[\theta=\arg\min_{\theta}\mathcal{L}(y,\hat{y}), \tag{2}\]  
Figure 1: Image samples. Each column contains 10 images selected by matching their hashtags with the list of words listed in Table 1. From left to right: High openness, Low openness; High conscientiousness, Low conscientiousness; High extraversion, Low extraversion; High agreeableness, Low agreeableness ; High neuroticism, Low neuroticism. where \(\mathcal{L}\) is the cross-entropy loss function, \(y\) is the output of the model defined as \(y=f(x;\theta)\), and \(\hat{y}\) is the correct output for input \(x\). This function is minimized iteratively by means of Stochastic Gradient Descent (SGD), and the process of minimizing the loss function over a set of images \(S\) is referred as _training_ the model. In this work, we used a CNN model [5,32], since CNNs are especially suited for 2D data. After training, the output of the CNN for an image is a vector of scores for each of the personality traits.