Age Prediction in Social Networks Based on Word Embedding and Tensor Learning

Ziyi Lin, Yan Wang2017

Abstract

Latent attribute prediction in social networks provides a foundation for constructing sophisticated text classification models. Traditional frameworks typically map social network text to a vector space for classification. However, the Vector Space Model (VSM) often ignores semantic relevance between words, leading to "semantic blindness" and poor performance on long-form text due to the curse of dimensionality. This paper proposes a word embedding-based Tensor Space Model (TSM) that maps text into a tensor feature space. By utilizing supervised tensor learning algorithms, specifically Support Tensor Machines (STM), this approach preserves structural relationships and improves classification accuracy. Experiments on Sina Weibo datasets demonstrate the effectiveness of the proposed model over traditional vector-based methods.

Introduction

Predicting latent attributes—such as age, gender, or location—from user-generated content is a critical task in social media analytics. Historically, the Vector Space Model (VSM) has been the standard, treating documents as a "bag of words." While simple, VSM suffers from two primary drawbacks: it fails to capture semantic similarities (e.g., treating "car" and "automobile" as unrelated) and it creates high-dimensional, sparse feature spaces that are computationally expensive and prone to overfitting.

To address these limitations, we propose a framework that integrates word embeddings with tensor learning. By representing user data as 2D tensors (matrices) rather than 1D vectors, we can maintain the semantic context of keywords while reducing the number of free parameters, leading to more robust and efficient models.

Methodology

The proposed pipeline transitions from traditional vector representations to a structured tensor-based approach.

Word Embedding and Keyword Extraction

Using a large-scale corpus from Sina Weibo, we trained a word2vec model to map 161,427 Chinese words into a 40-dimensional continuous vector space. To represent individual users, we applied TF-IDF (Term Frequency-Inverse Document Frequency) to extract the top 100 most representative keywords from their post history.

Tensor Space Model (TSM)

Instead of flattening these 100 keywords into a single 4,000-dimension vector, the TSM represents each user as a $100 \times 40$ matrix. Each row corresponds to a keyword, and each column corresponds to a dimension in the embedding space. This structure preserves the relationship between a word and its semantic vector.

Framework of the proposed Tensor Space Model (TSM) for age prediction.

Support Tensor Machine (STM)

Classification is performed using a Support Tensor Machine. Unlike standard Support Vector Machines (SVMs) that operate on vectors, STMs are designed to find an optimal separating hyperplane directly within the tensor space. This approach significantly reduces the "curse of dimensionality" by exploiting the low-rank structure of the data.

Experimental Setup

The study utilized data from Sina Weibo, focusing on two primary age groups: "post-80s" (born 1980–1989) and "post-90s" (born 1990–1999).

  • General Corpus: 30 million tweets from 650,000 users for embedding training.
  • Labeled Dataset: 2,127 users categorized by self-identified tags (1,380 post-80s; 747 post-90s).
  • Verified Testing Set: A subset of 175 users whose ages were manually verified to ensure data quality.
Example of user-defined tags on Sina Weibo, including age-related labels like "post-80s".

Results and Discussion

The TSM-STM framework was compared against several baselines, including C-SVM, Naive Bayes, and k-Nearest Neighbor (kNN). The STM consistently outperformed vector-based models in both accuracy and computational efficiency.

  • Accuracy: In primary experiments, the STM achieved 82.2% accuracy, outperforming C-SVM (78.1%) and Naive Bayes (78.2%). On the manually verified dataset, the STM maintained a lead with 77.1% accuracy.
  • Efficiency: The training time for the STM (172 seconds) was significantly faster than the C-SVM (274 seconds), highlighting the benefit of the reduced parameter space inherent in tensor learning.

Furthermore, the model's ability to handle "semantic fuzziness" through embeddings allowed it to correctly classify users even when they used different but related vocabularies.

Conclusion

This paper demonstrates that moving from vector-based to tensor-based representations significantly improves age prediction in social networks. By combining word embeddings with Support Tensor Machines, the proposed model captures semantic relationships and mitigates the curse of dimensionality. Future work will explore more advanced tensor optimization algorithms and address the cultural ambiguity of age-based labeling.

Summary updated

Abstract

Latent attribute prediction problem in social network provides a set of conditions for the construction of text classification models. The general framework of current latent attribute prediction problems is mapping the text in social network to vector space, along with a classification model to classify different categories. Unfortunately, as the vector space model ignores the similarity and relevance between different words, it fails to identify the semantic fuzziness in natural language and always performs badly on a long text. With the aim of finding a better framework for age prediction problem, in this paper we propose a word embedding based tensor space model which maps text to tensor feature space. The proposed method relies on supervised tensor learning algorithms which are well studied by many scholars, thus allowing for its easy application in text classification problems. Two experiments on different testing sets show the effectiveness and limitation of our approach.
BibTeX
@misc{lin2017age,
  author = {Ziyi Lin and Yan Wang},
  title = {{Age Prediction in Social Networks Based on Word Embedding and Tensor Learning}},
  year = {2017},
  doi = {10.2991/ceie-16.2017.28},
}
Figure