Abstract
Online forums and social media platforms provide noisy but valuable data every day. In this paper, we propose a novel end-to-end neural network-based user embedding system, Author2Vec. The model incorporates sentence representations generated by BERT (Bidirectional Encoder Representations from Transformers) with a novel unsupervised pre-training objective, authorship classification, to produce better user embedding that encodes useful user-intrinsic properties. This user embedding system was pre-trained on post data of 10k Reddit users and was analyzed and evaluated on two user classification benchmarks: depression detection and personality classification, in which the model proved to outperform traditional count-based and prediction-based methods. We substantiate that Author2Vec successfully encoded useful user attributes and the generated user embedding performs well in downstream classification tasks without further finetuning.
Introduction
Social media platforms are vast repositories of human behavior, yet extracting a coherent and discriminative "profile" of a user remains a significant challenge. Traditional methods for user representation often rely on manual feature engineering, such as keyword counting, or simple text aggregation techniques like averaging word vectors. These approaches frequently fail to capture the nuances of a user's unique linguistic "voice" or the temporal evolution of their posts.
Author2Vec addresses this gap by providing a general-purpose, end-to-end system designed to create a dense "user embedding." This representation is intended to be robust enough to serve various downstream tasks—such as mental health screening or personality prediction—without requiring task-specific fine-tuning of the core model.
Methodology
The Author2Vec framework processes a user's history through a multi-stage neural pipeline designed to distill identity from noisy text data.
1. Post Embedding with BERT
Individual posts are first converted into high-dimensional vectors using a pre-trained BERT-Base model. To capture the most comprehensive semantic information, the system concatenates the [CLS] token representations from the final four layers of the BERT model, resulting in a rich initial representation for each post.
2. Sequence Modeling and Sparsity
Because a user is defined by a sequence of interactions over time, the model employs a Bidirectional Gated Recurrent Unit (Bi-GRU). This architecture allows the system to process a variable number of posts while capturing stylistic and sentimental shifts. The output of the Bi-GRU is then passed through a K-Sparse encoding layer. By forcing the model to represent the user using only the $k$ most significant features, the system acts as a regularizer, distilling the most salient "semantic" features of the user's identity.
3. The Authorship Classification Objective
The core innovation of Author2Vec is its pre-training task. Rather than training on specific labels like "depression," the model is trained to solve an authorship classification problem. Given a set of posts, the model must identify which of the 10,000 users in the training set authored them. This unsupervised objective forces the model to learn a unique linguistic "fingerprint" for every individual.
Datasets
The model was pre-trained on a custom dataset of 10,000 Reddit users, each contributing at least 20 posts. For evaluation, the authors utilized three distinct benchmarks:
- Gender Classification: The "/r/RateMe" dataset (4,802 authors).
- Depression Detection: A curated dataset of 6,000 authors from subreddits like
/r/depression. - Personality Classification: The MBTI9k dataset, containing Reddit users labeled with their Myers-Briggs Type Indicator.
Key Results
Author2Vec demonstrated strong performance across all evaluation metrics, suggesting that authorship is an effective proxy for learning latent human traits.
- Authorship Accuracy: The model achieved a 74.22% top-1 accuracy and 91.21% top-5 accuracy in identifying authors from a test set of 3,000 individuals.
- Downstream Task Performance: In depression detection, Author2Vec achieved an F1-score of 0.720, significantly outperforming count-based baselines (0.683). In gender detection, it reached a weighted F1-score of 0.933.
- Personality Prediction: The model consistently outperformed baselines across all four MBTI axes. The confusion matrix for the 16-class personality task shows that the model can effectively distinguish between complex psychological profiles, even without task-specific fine-tuning.
Conclusion
Author2Vec successfully substantiates that dense user embeddings can encode intrinsic human properties by learning to distinguish between individuals in a large population. While the model currently operates as a "black box," making it difficult to interpret specific linguistic features, its ability to generalize to unseen tasks like depression detection marks a significant step forward in automated user profiling. Future work will focus on improving the interpretability of the sparse embeddings and testing the framework's robustness across different social media platforms like Twitter.
Summary updated