Using Sentiment Representation Learning to Enhance Gender Classification for User Profiling

  • Yunpei Zheng
  • Lin LiEmail author
  • Jianwei Zhang
  • Qing Xie
  • Luo Zhong
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11642)


User profiling means exploiting the technology of machine learning to predict attributes of users, such as demographic attributes, hobby attributes, preference attributes, etc. It’s a powerful data support of precision marketing. Existing methods mainly study network behavior, personal preferences and post texts to build user profile. Through our data analysis of micro-blog, we find that females show more positive and have richer sentiments than males in online social platform. This difference is very conducive to the distinction between genders. Therefore, we argue that sentiment context is important as well for user profiling. In this paper, we propose to predict one of the demographic labels: gender by exploring micro-blog user posts. Firstly we build a sentiment polarity classifier in advance by training a Long Short-Term Memory (LSTM) model. Next we extract sentiment representations from LSTM middle layer. Lastly we combine sentiment representations with virtual document vectors to train a basic MLP network for gender classification. We conduct experiments on a dataset provided by SMP CUP 2016 in China. Experimental results show that our approach can improve gender classification accuracy by 5.53%, compared with classical MLP gender classification without sentiment context.


Gender classification Neural networks Sentiment representation User profiling 


  1. 1.
    Bianchin, M., Angrilli, A.: Gender differences in emotional responses: a psychophysiological study. Physiol. Behav. 105(4), 925–932 (2012)CrossRefGoogle Scholar
  2. 2.
    Burger, J.D., Henderson, J.C., Kim, G., Zarrella, G.: Discriminating gender on Twitter. In: Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, EMNLP 2011, John McIntyre Conference Centre, Edinburgh, UK, A meeting of SIGDAT, a Special Interest Group of the ACL, 27–31 July 2011, pp. 1301–1309 (2011)Google Scholar
  3. 3.
    Cheng, Y., Qiao, X., Wang, X., Yu, Q.: Random forest classifier for zero-shot learning based on relative attribute. IEEE Trans. Neural Netw. Learn. Syst. 29(5), 1662–1674 (2018)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Farnadi, G., Tang, J., Cock, M.D., Moens, M.: User profiling through deep multimodal fusion. In: Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, WSDM 2018, 5–9 February 2018, Marina Del Rey, CA, USA, pp. 171–179 (2018)Google Scholar
  5. 5.
    Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)CrossRefGoogle Scholar
  6. 6.
    Li, W., Dickinson, M.: Gender prediction for chinese social media data. In: Proceedings of the International Conference Recent Advances in Natural Language Processing, RANLP 2017, 2–8 September 2017, Varna, Bulgaria, pp. 438–445 (2017)Google Scholar
  7. 7.
    Li, X., Cao, Y., Shang, Y., Liu, Y., Tan, J., Guo, L.: Inferring user profiles in online social networks based on convolutional neural network. In: Li, G., Ge, Y., Zhang, Z., Jin, Z., Blumenstein, M. (eds.) KSEM 2017. LNCS (LNAI), vol. 10412, pp. 274–286. Springer, Cham (2017). Scholar
  8. 8.
    Li, Z., Wei, Y., Zhang, Y., Yang, Q.: Hierarchical attention transfer network for cross-domain sentiment classification. In: Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, 2–7 February 2018, New Orleans, Louisiana, USA (2018)Google Scholar
  9. 9.
    Mao, W., Wang, J., Wang, L.: Online sequential classification of imbalanced data by combining extreme learning machine and improved SMOTE algorithm. In: 2015 International Joint Conference on Neural Networks, IJCNN 2015, 12–17 July 2015, Killarney, Ireland (2015)Google Scholar
  10. 10.
    Pan, S.J., Yang, Q.: A survey on transfer learning. IEEE Trans. Knowl. Data Eng. 22(10), 1345–1359 (2010)CrossRefGoogle Scholar
  11. 11.
    Pla, F., Hurtado, L.F.: Political tendency identification in Twitter using sentiment analysis techniques. In: COLING 2014, 25th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, 23–29 August 2014, Dublin, Ireland, pp. 183–192 (2014)Google Scholar
  12. 12.
    Volkova, S., Bachrach, Y., Armstrong, M., Sharma, V.: Inferring latent user properties from texts published in social media. In: Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, 25–30 January 2015, Austin, Texas, USA, pp. 4296–4297 (2015)Google Scholar
  13. 13.
    Wang, L., Cardie, C.: A piece of my mind: a sentiment analysis approach for online dispute detection. In: Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, ACL 2014, 22–27 June 2014, Baltimore, MD, USA, Volume 2: Short Papers, pp. 693–699 (2014)Google Scholar
  14. 14.
    Wang, Y., Lin, X., Wu, L., Zhang, W., Zhang, Q., Huang, X.: Robust subspace clustering for multi-view data by exploiting correlation consensus. IEEE Trans. Image Process. 24(11), 3939–3949 (2015)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Wang, Y., Zhang, W., Wu, L., Lin, X., Zhao, X.: Unsupervised metric fusion over multiview data by graph random walk-based cross-view diffusion. IEEE Trans. Neural Netw. Learn. Syst. 28(1), 57–70 (2017)CrossRefGoogle Scholar
  16. 16.
    Wang, Y., Wu, L., Lin, X., Gao, J.: Multiview spectral clustering via structured low-rank matrix factorization. IEEE Trans. Neural Netw. Learn. Syst. 29(10), 4833–4843 (2018)CrossRefGoogle Scholar
  17. 17.
    Wang, Y., Sun, A., Han, J., Liu, Y., Zhu, X.: Sentiment analysis by capsules. In: Proceedings of the 2018 World Wide Web Conference on World Wide Web, WWW 2018, 23–27 April 2018, Lyon, France, pp. 1165–1174 (2018)Google Scholar
  18. 18.
    Yang, Z., Yang, D., Dyer, C., He, X., Smola, A., Hovy, E.: Hierarchical attention networks for document classification. In: The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL HLT 2016, 12–17 June 2016, San Diego California, USA, pp. 1480–1489 (2016)Google Scholar
  19. 19.
    Yosinski, J., Clune, J., Bengio, Y., Lipson, H.: How transferable are features in deep neural networks? In: Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, 8–13 December 2014, Montreal, Quebec, Canada, pp. 3320–3328 (2014)Google Scholar
  20. 20.
    Zhang, D., Li, S., Wang, H., Zhou, G.: User classification with multiple textual perspectives. In: COLING 2016, 26th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, 11–16 December 2016, Osaka, Japan, pp. 2112–2121 (2016)Google Scholar
  21. 21.
    Zhang, Y., Dang, Y., Chen, H.: Research note: examining gender emotional differences in web forum communication. Decis. Support Syst. 55(3), 851–860 (2013)CrossRefGoogle Scholar
  22. 22.
    Zhou, J., Xu, W.: End-to-end learning of semantic role labeling using recurrent neural networks. In: Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, Volume 1: Long Papers, 26–31 July 2015, Beijing, China, pp. 1127–1137 (2015)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Yunpei Zheng
    • 1
  • Lin Li
    • 1
    Email author
  • Jianwei Zhang
    • 2
  • Qing Xie
    • 1
  • Luo Zhong
    • 1
  1. 1.School of Computer Science and TechnologyWuhan University of TechnologyWuhanChina
  2. 2.Faculty of Science and EngineeringIwate UniversityMoriokaJapan

Personalised recommendations