Improving User Attribute Classification with Text and Social Network Attention

  • Yumeng Li
  • Liang Yang
  • Bo Xu
  • Jian Wang
  • Hongfei LinEmail author


User attribute classification is an important research topic in social media user profiling, which has great commercial value in modern advertisement systems. Existing research on user profiling has mostly focused on manually handcrafted features for different attribute classification tasks. However, these research has partly overlooked the social relation of users. We propose an end-to-end neural network model called the social convolution attention neural network. Our model leverages the convolution attention mechanism to automatically extract user features with respect to different attributes from social texts. The proposed model can capture the social relation of users by combining semantic context and social network information, and improve the performance of attribute classification. We evaluate our model in the gender, age, and geography classification tasks based on the dataset from SMP CUP 2016 competition, respectively. The experimental results demonstrate that the proposed model is effective in automatic user attribute classification with a particular focus on fine-grained user information. We propose an effective model based on the convolution attention mechanism and social relation information for user attribute classification. The model can significantly improve the accuracy in various user attribute classification tasks.


User attribute classification Social media Convolution neural network Attention mechanism 



This work is partially supported by grant from the Natural Science Foundation of China (Nos. 61632011, 61572102, 61772103, 61702080, 61602078), the Ministry of Education Humanities and Social Science Project (No. 16YJCZH12), the Fundamental Research Funds for the Central Universities (DUT18ZD102), and the National Key Research Development Program of China (No. 2016YFB1001103). China Postdoctoral Science Foundation (No. 2018M641691).

Compliance with Ethical Standards

Conflict of interests

The authors declare that they have no conflicts of interest.

Informed Consent

All procedures followed were in accordance with the ethical standards of the responsible committee on human experimentation (institutional and national) and with the Helsinki declaration of 1975, as revised in 2008(5). Additional informed consent was obtained from all patients for which identifying information is included in this article.

Human and Animal Rights

This article does not contain any studies with human participants or animals performed by any of the authors.


  1. 1.
    Volkova S, Bachrach Y, Armstrong M, Sharma V. 2015. Inferring latent user properties from texts published in social media. In: AAAI, pp 4296–4297.Google Scholar
  2. 2.
    Park G, Schwartz AH, Eichstaedt JC, Kern ML, Kosinski M, Stillwell DJ, Ungar LH, Seligman MEP. Automatic personality assessment through social media language. J Pers Soc Psychol 2015;108(6): 934.CrossRefGoogle Scholar
  3. 3.
    Mueller J, Stumme G. 2016. Gender inference using statistical name characteristics in twitter. arXiv:1606.05467.
  4. 4.
    Alowibdi JS, Buy UA, Yu P. 2013. Language independent gender classification on twitter. In: Proceedings of the 2013 IEEE/ACM international conference on advances in social networks analysis and mining, pp 739–743. ACM.Google Scholar
  5. 5.
    Chamberlain BP, Humby C, Deisenroth MP. 2016. Detecting the age of twitter users. arXiv:1601.04621.
  6. 6.
    Sloan L, Morgan J, Burnap P, Williams M. Who tweets? deriving the demographic characteristics of age, occupation and social class from twitter user meta-data. Plos one 2015;10(3):e0115545.CrossRefGoogle Scholar
  7. 7.
    Rahimi A, Vu D, Cohn T, Baldwin T. 2015. Exploiting text and network context for geolocation of social media users. arXiv:1506.04803.
  8. 8.
    Ludu PS. 2014. Inferring gender of a twitter user using celebrities it follows. arXiv:1405.6667.
  9. 9.
    Sesa-Nogueras E, Faundez-Zanuy M, Roure-alcobé J. Gender classification by means of online uppercase handwriting A text-dependent allographic approach. Cogn Comput 2016;8(1):15–29.CrossRefGoogle Scholar
  10. 10.
    Wang L, Cao Z, de Melo G, Liu Z. 2016. Relation classification via multi-level attention cnns. In: Proceedings of the 54th annual meeting of the association for computational linguistics. Association for computational linguistics.Google Scholar
  11. 11.
    Rush AM, Chopra S, Weston J. 2015. A neural attention model for abstractive sentence summarization. arXiv:1509.00685.
  12. 12.
    Yang Z, Yang D, Dyer C, He X, Smola A, Hovy E. 2016. Hierarchical attention networks for document classification. In: Proceedings of NAACL-HLT, pp 1480–1489.Google Scholar
  13. 13.
    Lin Z, Feng M, dos Santos CN, Yu M, Xiang B, Zhou B, Bengio Y. 2017. A structured self-attentive sentence embedding. arXiv:1703.03130.
  14. 14.
    Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser L, Polosukhin I. 2017. Attention is all you need. In: Advances in neural information processing systems, pp 6000–6010.Google Scholar
  15. 15.
    Schler J, Koppel M, Argamon S, Pennebaker JW. 2006. Effects of age and gender on blogging. In: AAAI Spring symposium: Computational approaches to analyzing weblogs, vol 6, pp 199–205.Google Scholar
  16. 16.
    Mukherjee A, Liu B. 2010. Improving gender classification of blog authors. In: Proceedings of the 2010 conference on empirical methods in natural language processing, pp 207–217. Association for computational linguistics.Google Scholar
  17. 17.
    Feng S, Wang Y, Song K, Wang D, Yu G. Detecting multiple coexisting emotions in microblogs with convolutional neural networks. Cogn Comput 2018;10(1):136–155.CrossRefGoogle Scholar
  18. 18.
    Cha M, Gwon Y, Kung HT. 2015. Twitter geolocation and regional classification via sparse coding. In: ICWSM, pp 582–585.Google Scholar
  19. 19.
    Burger JD, Henderson J, Kim G, Zarrella G. 2011. Discriminating gender on twitter. In: Proceedings of the conference on empirical methods in natural language processing, pp 1301–1309. Association for computational linguistics.Google Scholar
  20. 20.
    Miller Z, Dickinson B, Hu W. Gender prediction on twitter using stream algorithms with n-gram character features. Int J Internet Sci 2012;2(04):143.Google Scholar
  21. 21.
    Bo H, Cook P, Baldwin T. 2012. Geolocation prediction in social media data by finding location indicative words. In: Proceedings of COLING, pp 1045–1062.Google Scholar
  22. 22.
    Ahmed A, Hong L, Smola AJ. 2013. Hierarchical geographical modeling of user locations from social media posts. In: Proceedings of the 22nd international conference on world wide web, pp 25–36. ACM.Google Scholar
  23. 23.
    Li Y, Pan Q, Yang T, Wang S, Tang J, Cambria E. Learning word representations for sentiment analysis. Cogn Comput 2017;9(6):843–851.CrossRefGoogle Scholar
  24. 24.
    Alradaideh QA, Alqudah GY. Application of rough set-based feature selection for arabic sentiment analysis. Cogn Comput 2017;9(4):436–445.CrossRefGoogle Scholar
  25. 25.
    Asgarian E, Kahani M, Sharifi S. The impact of sentiment features on the sentiment polarity classification in persian reviews. Cogn Comput 2018;10(1):117–135.CrossRefGoogle Scholar
  26. 26.
    Mukhtar N, Khan MA, Chiragh N. Effective use of evaluation measures for the validation of best classifier in urdu sentiment analysis. Cogn Comput 2017;9(4):446–456.CrossRefGoogle Scholar
  27. 27.
    Peng H, Cambria E, Hussain A. A review of sentiment analysis research in chinese language. Cogn Comput 2017;9(4):423–435.CrossRefGoogle Scholar
  28. 28.
    Xi P, Lu J, Yi Z, Yan R. Automatic subspace learning via principal coefficients embedding. IEEE Trans Cybern 2017;47(11):3583–3596.CrossRefGoogle Scholar
  29. 29.
    Xi P, Lu C, Yi Z, Tang H. Connections between nuclear-norm and frobenius-norm-based representations. IEEE Trans Neural Netw Learn Syst 2018;29(1):218–224.CrossRefGoogle Scholar
  30. 30.
    Mikolov T, Chen K, Corrado G, Dean J. 2013. Efficient estimation of word representations in vector space. arXiv:1301.3781.
  31. 31.
    Pennington J, Socher R, Manning C. 2014. Glove: Global vectors for word representation. In: Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532–1543.Google Scholar
  32. 32.
    Bojanowski P, Grave E, Joulin A, Mikolov T. Enriching word vectors with subword information. Trans Assoc Comput Linguist 2017;5:135–146.CrossRefGoogle Scholar
  33. 33.
    Le Quoc V, Mikolov Tomas. 2014. Distributed representations of sentences and documents. In: ICML, vol 14, pp 1188–1196.Google Scholar
  34. 34.
    Perozzi B, Al-Rfou R, Skiena S. 2014. Deepwalk: Online learning of social representations. In: Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 701–710. ACM.Google Scholar
  35. 35.
    Grover A, Leskovec J. 2016. node2vec: Scalable feature learning for networks. In: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pp 855–864. ACM.Google Scholar
  36. 36.
    Tang J, Qu M, Wang M, Zhang M, Yan J, Mei Q. 2015. Line: Large-scale information network embedding. In: Proceedings of the 24th international conference on world wide web, pp 1067–1077. ACM.Google Scholar
  37. 37.
    Dong Y, Chawla NV, Swami A. 2017. metapath2vec: Scalable representation learning for heterogeneous networks. In: Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, pp 135–144. ACM.Google Scholar
  38. 38.
    Lai Y-A, Hsu C-C, Chen WH, Yeh M-Y, Lin S-D. Prune: Preserving proximity and global ranking for network embedding. In: Advances in neural information processing systems, pp 5263–5272; 2017.Google Scholar
  39. 39.
    Cavallari S, Zheng VW, Cai H, Chang KC-C, Cambria E. 2017. Learning community embedding with community detection and node embedding on graphs. In: Proceedings of the 2017 ACM On conference on information and knowledge management, pp 377–386. ACM.Google Scholar
  40. 40.
    Cao S, Lu W, Xu Q. 2015. Grarep: Learning graph representations with global structural information. In: Proceedings of the 24th ACM international on conference on information and knowledge management, pp 891–900. ACM.Google Scholar
  41. 41.
    Bo H, Cook P, Baldwin T. Text-based twitter user geolocation prediction. J Artif Intell Res 2014;49: 451–500.CrossRefGoogle Scholar
  42. 42.
    Tang D, Qin B, Liu T. 2015. Document modeling with gated recurrent neural network for sentiment classification. In: EMNLP, pp 1422–1432.Google Scholar
  43. 43.
    Yang L, Lin H, Lin Y, Liu S. Detection and extraction of hot topics on chinese microblogs. Cogn Comput 2016;8(4):577–586.CrossRefGoogle Scholar
  44. 44.
    Xu B, Lin H, Lin Y. Assessment of learning to rank methods for query expansion. J Assoc Inf Sci Technol 2016;67(6):1345–1357.CrossRefGoogle Scholar
  45. 45.
    Chen H, Sun M, Tu C, Lin Y, Liu Z. 2016. Neural sentiment classification with user and product attention. In: Proceedings of EMNLP.Google Scholar
  46. 46.
    Cai F, Chen H. A probabilistic model for information retrieval by mining user behaviors. Cogn Comput 2016; 8(3):494–504.CrossRefGoogle Scholar
  47. 47.
    Chen T, Guestrin C. 2016. Xgboost: A scalable tree boosting system. In: Proceedings of the 22Nd ACM SIGKDD international conference on knowledge discovery and data mining, pp 785–794. ACM.Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  • Yumeng Li
    • 1
  • Liang Yang
    • 1
  • Bo Xu
    • 1
  • Jian Wang
    • 1
  • Hongfei Lin
    • 1
    Email author
  1. 1.Dalian University of TechnologyDalianChina

Personalised recommendations