Contrastive Graph Transformer Network for Personality Detection

Yangfu Zhu, Linmei Hu, Xinkai Ge, Wanrong Peng, Bin WuIJCAI 2022 · DOI

TL;DR

This paper introduces a novel Contrastive Graph Transformer Network (CGTN) to tackle the challenge of personality detection from social media text, particularly addressing the scarcity of labeled data. By leveraging self-supervised learning on user-generated posts structured as graphs, CGTN effectively learns robust user representations and captures inter-trait correlations, leading to state-of-the-art performance on benchmark datasets.

What Problem Does This Paper Address?

Personality detection, the task of inferring an individual's personality traits from their online text, has numerous applications, from personalized recommendations to more engaging dialogue systems. However, a significant hurdle in this field is the "data-hungry" nature of supervised learning models. Obtaining ground-truth personality traits typically requires time-consuming and resource-intensive professional questionnaires, making large, labeled datasets scarce. This scarcity leads to models that may overfit training data and perform poorly on unseen examples. Furthermore, existing methods often overlook the inherent correlations between different personality traits, which are crucial psychological cues that can collectively inform trait identification.

Methods

The proposed CGTN model addresses these challenges through a two-pronged approach: a contrastive post graph encoder and a trait sequence decoder.

  • Contrastive Post Graph Encoder: This component is designed to learn rich post representations without relying on labeled data.
  • Graph Construction: For each user, posts are modeled as nodes in a fully-connected graph.
  • Graph Augmentations: Two types of graph augmentations are introduced to incorporate prior knowledge:
  • Psycholinguistic View (Go): Edges are formed based on psycholinguistic categories from the LIWC dictionary, connecting posts that share words from the same categories.
  • Semantic View (GB): Edges are created between posts if their semantic similarity (computed via cosine similarity on BERT embeddings) exceeds a given threshold.
  • Self-Supervised Contrastive Learning: The encoder uses a Graph Neural Network (GNN) to capture structural information within the graphs. It then employs a contrastive learning objective to maximize agreement between augmented graph representations from the same user (positive pairs) while minimizing agreement with graphs from different users (negative pairs). This process distills potential labels from both labeled and unlabeled data.
  • Trait Sequence Decoder: This component leverages the learned post representations to predict personality traits.
  • Transformer-based Architecture: A Transformer decoder is employed to model correlations among traits, treating personality detection as a sequence generation problem.
  • Post-to-Trait Attention: A novel attention mechanism is introduced to allow the decoder to select crucial posts from the augmented graph views for trait generation. This involves cross-view self-attention to weigh contributions from different graph views.
  • Trait Generation: The final output layer predicts trait probabilities, and a beam search strategy is used to find the optimal trait sequence.

Datasets

The paper evaluates CGTN on two standard datasets:

  • Kaggle: This dataset, collected from PersonalityCafe, uses the MBTI taxonomy and contains approximately 8675 users with 45-50 posts each.
  • Essays: This dataset comprises stream-of-consciousness texts from 2468 anonymous users, each with about 50 sentences, tagged with the Big Five taxonomy.

The datasets were split into 6:2:2 for training, validation, and testing.

Key Insights and Ideas

  • Leveraging Unlabeled Data: The core idea of using contrastive self-supervised learning on graph-augmented user posts is a powerful way to overcome the data scarcity problem in personality detection.
  • Graph Augmentations as Priors: Incorporating psycholinguistic (LIWC) and semantic similarity as graph construction priors effectively injects domain knowledge into the representation learning process.
  • Trait Correlations Matter: Modeling personality detection as a sequence generation task with a Transformer decoder allows for the explicit capture of inter-trait dependencies, which are shown to be important psychological cues.
  • Post Importance Varies: The post-to-trait attention mechanism acknowledges that not all posts contribute equally to personality inference, allowing the model to focus on more informative content.

Key Results

  • State-of-the-Art Performance: CGTN (specifically the jointly trained version, CGTNjoint) significantly outperforms existing state-of-the-art methods on both the Kaggle (MBTI) and Essays (Big Five) datasets. For instance, it achieves a 2.75% improvement on Kaggle and a 4.98% improvement on Essays compared to TrigNet.
  • Reduced Overfitting: The contrastive self-supervised pre-training strategy (CGTNpretrain) and joint training (CGTNjoint) demonstrate a smaller train-test difference, indicating better generalization and reduced overfitting, especially on the Essays dataset.
  • Faster Convergence: The inclusion of contrastive learning speeds up the training process, with CGTNjoint converging much faster than its counterpart without contrastive learning (CGTNw/o CL).
  • Effectiveness of Components: Ablation studies confirm the effectiveness of both the trait correlation modeling (CGTNw/o TC) and the contrastive learning component (CGTNw/o CL).

Limitations and Future Work

  • Data Scarcity: While the paper effectively mitigates data scarcity, the performance is still influenced by the amount of available labeled data, as shown in the "Impact of Number of Training Samples" section. Future work could explore more advanced semi-supervised or few-shot learning techniques.
  • Trade-off Parameter: The performance is sensitive to the trade-off parameter ($\lambda$) between the detection loss and contrastive loss, suggesting that optimal tuning is crucial.
  • Future Directions: The authors suggest that the contrastive learning task can speed up detection progress and help learn better models. Further exploration into more sophisticated graph augmentation strategies and attention mechanisms could yield additional improvements. The paper also highlights the importance of post structure information for personality understanding.

Summary updated

BibTeX
@inproceedings{zhu2022contrastive,
  author = {Yangfu Zhu and Linmei Hu and Xinkai Ge and Wanrong Peng and Bin Wu},
  title = {{Contrastive Graph Transformer Network for Personality Detection}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/633},
}
Figure