LL4G: Self-Supervised Dynamic Optimization for Graph-Based Personality Detection

Lingzhi Shen, Yunfei Long, Xiaohao Cai, Guanming Chen, Yuhan Wang, Imran Razzak, Shoaib Jameel · DOI

Abstract

Detecting personality traits from social media text requires capturing subtle linguistic nuances and long-term behavioral patterns. Traditional methods often struggle with data sparsity and static graph representations that fail to adapt to evolving user data. We present LL4G (Large Language for Graph), a self-supervised framework that integrates Large Language Models (LLMs) with Graph Neural Networks (GNNs) to dynamically construct and optimize graph structures. By leveraging Llama 3 for semantic extraction and implicit relationship reasoning, LL4G identifies complex connections—such as contradictory stances—that signal specific personality dimensions. Our experiments on the Kaggle and Pandora benchmarks demonstrate that LL4G achieves state-of-the-art performance, outperforming previous models by up to 8.47% in Macro-F1 score.

Introduction

Personality detection is a complex task in natural language processing, distinct from standard sentiment analysis. While sentiment often relies on explicit keywords, personality is reflected in subtle linguistic cues, long-term consistency, and even contradictions across a user's post history. Existing research in this field faces three primary challenges: data sparsity in informal social media posts, the limitations of static graph structures that cannot adapt to new data, and the difficulty of capturing implicit relationships between disparate posts.

To address these hurdles, we introduce LL4G. This framework treats the LLM not merely as a feature extractor but as an active architect for the underlying graph structure, enabling a more nuanced representation of human behavior and trait expression.

Methodology

Semantic Feature Extraction

LL4G utilizes Llama 3 (8B) to generate high-dimensional embeddings for individual social media posts. By leveraging advanced architectural features such as Rotary Position Embeddings (RoPE) and Grouped Query Attention (GQA), the model maintains high contextual precision, ensuring that the semantic nuances of informal text are preserved before they are integrated into the graph.

Dynamic Graph Construction

Unlike traditional models that rely on simple similarity-based edges, LL4G constructs a dynamic graph based on three distinct relationship types:

  1. Explicit Relationships: These are derived from semantic similarity and shared "personalized language" styles across posts.
  2. Implicit Relationships: The LLM performs contextual reasoning to identify deeper, non-obvious links, such as when a user expresses conflicting opinions or shifts in tone that might signal specific traits (e.g., the "Perceiving" vs. "Judging" dimension in the MBTI framework).
  3. The User Node: A central node is introduced to aggregate information from all of a user's posts via an attention mechanism. This node provides a holistic "personality profile" that serves as a global context for individual post nodes.

Self-Supervised Optimization

To ensure the robustness of the graph, the framework employs a Dynamic Graph Convolutional Network (DGCN) trained on three joint self-supervised tasks:

  • Node Reconstruction: This task ensures the GNN retains the rich semantic information provided by the LLM.
  • Edge Prediction: The model learns to predict the likelihood of a relationship existing between two posts, refining the graph structure during training.
  • Contrastive Learning: This objective pushes semantically dissimilar nodes apart in the embedding space while pulling related nodes closer, enhancing the discriminative power of the model.

Experimental Setup and Datasets

We evaluated LL4G on two gold-standard Myers-Briggs Type Indicator (MBTI) datasets:

  • Kaggle (PersonalityCafe): Comprising 8,675 users with an average of 45–50 posts each.
  • Pandora (Reddit): A larger dataset featuring 9,084 users with highly variable post counts and diverse topics ranging from technology to entertainment.

Results and Key Insights

Performance Benchmarks

LL4G established new state-of-the-art (SOTA) results across both datasets. On the Kaggle dataset, the model achieved an average Macro-F1 improvement of 8.47% over the previous leading model (TAE). On the Pandora dataset, it achieved a 4.80% improvement. Notably, the model was highly effective at closing the performance gap in the "Thinking vs. Feeling" (T/F) dimension, which is historically difficult to classify accurately.

The Role of Contradiction and Global Context

Ablation studies highlighted two critical components of the LL4G architecture. First, removing the modeling of "contradictory language" led to a significant performance drop, confirming that how a user changes their stance is a vital signal for personality. Second, the inclusion of the "User Node" significantly improved results by preventing the model from being distracted by individual, uncharacteristic posts, instead focusing on the aggregate identity of the user.

Synergy Between LLMs and GNNs

While standalone DGCNs often underperform compared to Graph Attention Networks (GAT) in standard settings, the LLM-optimized graph provided by LL4G allowed the DGCN to significantly outperform GAT-based variants. This suggests that the quality of the graph architecture, guided by LLM reasoning, is as important as the choice of the neural network itself.

Discussion and Future Work

While LL4G represents a significant advancement, several avenues for future research remain. The current model is text-only; incorporating multimodal data (images, video, or audio) could provide a more comprehensive view of personality. Additionally, the computational intensity of using an 8B-parameter LLM poses challenges for real-time applications. Future iterations will focus on optimizing these models for efficiency and exploring how the dynamic graph scales for users with thousands of historical posts.

Conclusion

LL4G demonstrates that Large Language Models can serve as effective reasoning engines for graph construction in personality detection. By identifying implicit relationships and optimizing graph structures through self-supervision, LL4G provides a robust framework for capturing the complexities of human personality from digital footprints.

Summary updated

BibTeX
@inproceedings{shen2025ll,
  author = {Lingzhi Shen and Yunfei Long and Xiaohao Cai and Guanming Chen and Yuhan Wang and Imran Razzak and Shoaib Jameel},
  title = {{LL4G: Self-Supervised Dynamic Optimization for Graph-Based Personality Detection}},
  booktitle = {ICME},
  year = {2025},
  doi = {10.1109/icme59968.2025.11209311},
}
Figure