# Encoding Text Information with Graph Convolutional Networks for Personality Recognition
## 4 Personality Graph Convolutional Networks
### GCN Layer  
Embedding layer: The initial input vector of the personality GCN is that the users, words, and documents are all represented by one-hot encoding, and we used the one-hot embedded form to embed all the information for all nodes. Construct graph: We represent the relevant relationships as an information graph, as shown in Figure 2. The personality information graph \(G=(V,E)\), which is composed of several different types of vertices and edges, is defined as follows:  
* Let \(U\in V\) denote a collection of textual users. Each user has their own personality labels. In the myPersonality dataset, each user completed a questionnaire and was assigned one or more personality traits based on the answers. In the essays dataset, these are authors with personality labels, which are self-assessments, derived from z-scores calculated by [PERSON] et al. [26], converted from the scores to nominal categories by [PERSON] et al. [22], and split by the median. * Let \(D\in V\) denote a collection of each piece of text information. The text was produced by users who participated in the Big Five personality assessment. Since it is two different datasets, the text includes two types of user state information and a user's stream of consciousness text information. Each text information represents a document. * Let \(W\in V\) denote the set of words in the corpus. The graph vertices are connected via a set of edges described hierarchically as follows:  
* \(E_{UD}\in E\): All text authors have a connection with the text they have written. Note that text authors are only associated with their own written text. * \(E_{DW}\in E\): All text is related to the words contained in the text. That is, the relationship between different texts can be established by the same word appearing in the text. * \(E_{WW}\in E\): There is a certain correlation between all words, and we used pointwise mutual information (PMI) to compute the weight between two words. The weight between them is the edge between them. Figure 1: The architecture of personality GCN. Global information transfer: This paper constructs a large and heterogeneous personality information graph, which contains user nodes, document nodes, and word nodes. It can not only explicitly model the co-occurrence of global words, but also easily adapt to graph convolution, as shown in Figure 2. We built edges between user nodes (user-document edges), documents (document-word edges), and words (word-word edges) in the entire corpus. The edge weight between the user node and the document node is whether the document is written by the user. The term frequency inverse document frequency (TF-IDF) of the word in the document is used to calculate the edge weights between document nodes and word nodes. The term frequency (TF) is the number of times a word appears in the document, and the inverse document frequency (IDF) is the number of documents containing the word log inverse scale. The paper [37] found that using TF-IDF weights was better than using only the term frequency (TF). To take advantage of global word co-occurrence information, we used a fixed-size sliding window on all documents in the corpus to collect co-occurrence statistics. We used pointwise mutual information (PMI) to calculate the weight between two word nodes. This is a popular measure of word association. Generally, the edge weight between node \(i\) and node \(j\) is defined as:  
\[f(i,j)= \begin{cases}1&\{i,j:i=j\}\cup\{i,j:i\in U,j\in D,E_{UD}\in E\}\\ TF-IDF_{(ij)}&\{i,j:i\in D,j\in W,E_{DW}\in E\}\\ PMI(i,j)&\{i,j:i\in W,j\in W,PMI(i,j)>0,E_{WW}\in E\}\\ 0&\text{otherwise}\end{cases}  \tag{6}\]  
where \(U\) is the set of users, \(D\) is the set of documents, \(W\) is the set of words.