Joint Learning with both Classification and Regression Models for Age Prediction

Chen Jing, Cheng Long, Xi Yang, Jun Liang, Quan Bing, Shoushan LiJournal of Physics Conference Series 2019

Abstract

Age classification and regression are two main approaches to age prediction in social media, and these two approaches have their own characteristics and strength. For instance, the classification model can flexibly utilize distinguished models in machine learning, while the regression model can capture the connections between different ages. In order to exploit the advantages of both age classification and regression models, a novel approach to age prediction is proposed, namely joint learning for age prediction. Specifically, an auxiliary Long-Short Term Memory (LSTM) layer is employed to learn the auxiliary representation from the classification setting, and simultaneously join the auxiliary representation into the main LSTM layer for the age regression setting. In the learning process, the auxiliary classification LSTM model and the main regression LSTM model are jointly learned. Empirical studies demonstrate that our joint learning approach significantly improves the performance of age prediction using either individual classification or regression model.

Introduction

Age prediction on social media is a critical task for applications ranging from targeted advertising to sociological research. Traditionally, this task is framed as either a classification problem (assigning users to age brackets) or a regression problem (predicting a continuous age value). Classification models excel at identifying discriminative linguistic features—such as slang specific to certain generations—but fail to account for the ordinal relationship between ages. Conversely, regression models capture the continuous nature of aging but may miss the sharp stylistic shifts that define different life stages. This paper proposes a joint learning framework, Aux-LSTM, to leverage the strengths of both paradigms.

Methodology

The proposed Aux-LSTM architecture integrates age classification as an auxiliary task to support a primary regression objective.

Architecture

The model consists of two parallel Long Short-Term Memory (LSTM) layers: a "Main LSTM" for regression and an "Auxiliary LSTM" for classification. The key innovation lies in the information sharing between these components. The hidden representation generated by the Auxiliary LSTM is concatenated with the hidden state of the Main LSTM, allowing the regression model to incorporate categorical, group-level features during its final estimation.

The proposed Aux-LSTM architecture, showing the integration of the auxiliary classification layer with the main regression layer.

Joint Learning Objective

The model is optimized using a weighted loss function: $$Loss_{Total} = \lambda(Loss_{Regression}) + (1 - \lambda)(Loss_{Classification})$$ Empirical testing determined that a weight of $\lambda = 0.75$ (favoring the regression task) provides the most robust performance.

Datasets and Features

The study utilizes data from Sina Weibo, a prominent Chinese micro-blogging platform. The researchers initially collected data from approximately 12,000 users, filtering for active accounts with at least 50 posts.

Initial age distribution of users in the Sina Weibo dataset before balancing.

To ensure a rigorous evaluation, a balanced subset of 2,000 users was created, featuring 200 samples for each age between 19 and 28. The model incorporates both Textual Features (Bag-of-Words, POS patterns) and Social Features (posting frequency, temporal distributions, and network IDs).

Results and Discussion

The performance of the Aux-LSTM was evaluated using the Coefficient of Determination ($R^2$).

  • Standalone LSTM (Regression): Achieved an $R^2$ of 0.553 using joint features.
  • Aux-LSTM (Joint Learning): Reached a superior $R^2$ of 0.573.
  • Feature Impact: The integration of both textual and social features is vital; the "Joint" feature set provided a substantial performance gain over single-modality inputs (e.g., 0.481 for text-only).

Notably, a simple hybrid model that merely averaged the outputs of separate classifiers and regressors performed worse than the integrated Aux-LSTM, underscoring the importance of shared internal representations during the learning process.

Conclusion

The Aux-LSTM framework demonstrates that classification and regression are complementary rather than mutually exclusive for age prediction. By using classification as a feature extractor, the model captures stylistic milestones while maintaining the precision of a continuous regressor. Future research will explore scaling this approach to broader age ranges and adapting the social feature mapping to other platforms like Twitter or Instagram.

Summary updated

BibTeX
@article{jing2019joint,
  author = {Chen Jing and Cheng Long and Xi Yang and Jun Liang and Quan Bing and Shoushan Li},
  title = {{Joint Learning with both Classification and Regression Models for Age Prediction}},
  journal = {Journal of Physics Conference Series},
  year = {2019},
  doi = {10.1088/1742-6596/1168/3/032016},
}
Figure