Detecting MBTI Personality Types from Persian Twitter (X) Using Transformer-Based Models
Detecting MBTI Personality Types from Persian Twitter (X) Using Transformer-Based Models
Marieh Rajabi,A. Koochari,A. Zamanifar
Abstract
Personality detection from social media text is wellestablished in English but remains underexplored for lowresource languages like Persian, despite its relevance for cultural policymaking, mental health monitoring and cybersecurity in the Iranian context. This study introduces an advanced transformer-based framework for detecting MBTI personality types from Persian Twitter (X) posts. To overcome data scarcity and class imbalance, we construct a large augmented dataset by combining the native dataset with translated multilingual tweets and applying synonym replacement augmentation. We evaluate over 10 transformer models, including Persian-specific variants (ParsBERT-Peymaner, DistilBigBird-fa) and multilingual baselines, using two user-level aggregation strategies: a flat concatenation approach and a novel Multi-Level Tweet Encoder (MLTE) that aggregates tweet embeddings via supervised contrastive learning. Robustness is further improved through a Hybrid Confidence-Selective Ensemble with dynamic model selection, calibrated weighting, and adaptive sample-wise fusion. Results show that Persian-native models consistently outperform multilingual ones. The MLTE framework achieves an average accuracy of 0.6891, ROC-AUC of 0.7220, and Macro F1-score of 0.6069 on the combined dataset, surpassing flat ensembles and classical ML baselines. N/S dimension is the easiest to predict, while J/P remains the most challenging. Explainability via SHAP confirms the models rely on psychologically interpretable linguistic cues. This work contributes a large combined Persian MBTI dataset, the MLTE aggregation framework and a dynamic ensemble strategy, addressing key gaps in low-resource Persian NLP.
