Cognitive Computation

, Volume 8, Issue 6, pp 1074–1086 | Cite as

Towards GPU-Based Common-Sense Reasoning: Using Fast Subgraph Matching

  • Ha-Nguyen Tran
  • Erik CambriaEmail author
  • Amir Hussain



Common-sense reasoning is concerned with simulating cognitive human ability to make presumptions about the type and essence of ordinary situations encountered every day. The most popular way to represent common-sense knowledge is in the form of a semantic graph. Such type of knowledge, however, is known to be rather extensive: the more concepts added in the graph, the harder and slower it becomes to apply standard graph mining techniques.


In this work, we propose a new fast subgraph matching approach to overcome these issues. Subgraph matching is the task of finding all matches of a query graph in a large data graph, which is known to be a non-deterministic polynomial time-complete problem. Many algorithms have been previously proposed to solve this problem using central processing units. Here, we present a new graphics processing unit-friendly method for common-sense subgraph matching, termed GpSense, which is designed for scalable massively parallel architectures, to enable next-generation Big Data sentiment analysis and natural language processing applications.

Results and Conclusions

We show that GpSense outperforms state-of-the-art algorithms and efficiently answers subgraph queries on large common-sense graphs.


Common-sense reasoning Subgraph matching GPU computing CUDA 



This work was conducted within the Rolls-Royce@NTU Corp Lab with support from the National Research Foundation Singapore under the Corp Lab@University Scheme. The study was also supported by the National Natural Science Foundation of China (NNSFC) (Grant Numbers 61402386, 61305061 and 61402389). A. Hussain was supported by the Royal Society of Edinburgh (RSE) and NNSFC Joint Project Grant No. 61411130162, and the UK Engineering and Physical Science Research Council (EPSRC) Grant No. EP/M026981/1. We also wish to thank the anonymous reviewers who helped improve the quality of the paper.

Compliance with Ethical Standards

Conflict of Interest

Ha-Nguyen Tran, Erik Cambria, and Amir Hussainy declare that they have no conflict of interest.

Informed Consent

Informed consent was not required as no human or animals were involved.

Human and Animal Rights

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


  1. 1.
    Brocheler M, Pugliese A, Subrahmanian VS. COSI: cloud oriented subgraph identification in massive social networks. In: 2010 International conference on advances in social networks analysis and mining (ASONAM). IEEE; 2010, p. 248–55.Google Scholar
  2. 2.
    Cambria E. Affective computing and sentiment analysis. IEEE Intell Syst. 2016;31(2):102–7.CrossRefGoogle Scholar
  3. 3.
    Cambria E, Hussain A. Sentic computing: a common-sense-based framework for concept-level sentiment analysis, vol. 1. Berlin: Springer; 2015.CrossRefGoogle Scholar
  4. 4.
    Cambria E, Hussain A, Havasi C, Eckl C. Common sense computing: from the society of mind to digital intuition and beyond. Berlin: Springer; 2009.Google Scholar
  5. 5.
    Cambria E, Olsher D, Rajagopal D. SenticNet 3: a common and common-sense knowledge base for cognition-driven sentiment analysis. In: AAAI. Quebec City; 2014. p. 1515–21.Google Scholar
  6. 6.
    Cambria E, Rajagopal D, Kwok K, Sepulveda J. GECKA: game engine for commonsense knowledge acquisition. In: FLAIRS; 2015. p. 282–7.Google Scholar
  7. 7.
    Cambria E, Wang H, White B. Guest editorial: big social data analysis. Knowl Based Syst. 2014;69:1–2.CrossRefGoogle Scholar
  8. 8.
    Cook SA. The complexity of theorem-proving procedures. In: Proceedings of the third annual ACM symposium on theory of computing. ACM; 1971. p. 151–8.Google Scholar
  9. 9.
    Cordella LP, Foggia P, Sansone C, Vento M. A (sub) graph isomorphism algorithm for matching large graphs. IEEE Trans Pattern Anal Mach Intell. 2004;26(10):1367–72.CrossRefPubMedGoogle Scholar
  10. 10.
    Han W-S, Lee J, Lee J-H. Turbo iso: towards ultrafast and robust subgraph isomorphism search in large graph databases. In: Proceedings of the 2013 ACM SIGMOD international conference on management of data. ACM; 2013. p. 337–48.Google Scholar
  11. 11.
    Harish P, Narayanan P. Accelerating large graph algorithms on the GPU using CUDA. Berlin: Springer; 2007.CrossRefGoogle Scholar
  12. 12.
    Harris M, Sengupta S, Owens JD. GPU gems 3: parallel prefix sum (scan) with CUDA. Addison-Wesley Professional; 2007. p. 851–76.Google Scholar
  13. 13.
    He H, Singh AK. Graphs-at-a-time: query language and access methods for graph databases. In: Proceedings of the 2008 ACM SIGMOD international conference on management of data. ACM; 2008. p. 405–18Google Scholar
  14. 14.
    Hong S, Kim SK, Oguntebi T, Olukotun K. Accelerating CUDA graph algorithms at maximum warp. In: ACM SIGPLAN notices, vol. 46. ACM; 2011. p. 267–76.Google Scholar
  15. 15.
    Jenkins J, Arkatkar I, Owens JD, Choudhary A, Samatova F. Lessons learned from exploring the backtracking paradigm on the GPU. Berlin: Springer; 2011.CrossRefGoogle Scholar
  16. 16.
    Katz GJ, Kider JT Jr. All-pairs shortest-paths for large graphs on the GPU. In: Proceedings of the 23rd ACM SIGGRAPH/EUROGRAPHICS symposium on graphics hardware. Eurographics Association; 2008. p. 47–55.Google Scholar
  17. 17.
    Merrill D, Garland M, Grimshaw A. Scalable GPU graph traversal. In: ACM SIGPLAN notices, vol. 47. ACM; 2012. p. 117–28.Google Scholar
  18. 18.
    Minsky M. Society of mind. New York City: Simon and Schuster; 1988.Google Scholar
  19. 19.
    Mueller ET. Commonsense reasoning: an event calculus based approach. Burlington: Morgan Kaufmann; 2014.Google Scholar
  20. 20.
    Poria S, Cambria E, Howard N, Huang G-B, Hussain A. Fusing audio, visual and textual clues for sentiment analysis from multimodal content. Neurocomputing. 2016;174:50–9.CrossRefGoogle Scholar
  21. 21.
    Poria S, Gelbukh A, Agarwal B, Cambria E, Howard N. Common sense knowledge based personality recognition from text. Berlin: Springer; 2013.Google Scholar
  22. 22.
    Poria S, Gelbukh A, Cambria E, Das D, Bandyopadhyay S. Enriching senticnet polarity scores through semi-supervised fuzzy clustering. In: 2012 IEEE 12th international conference on data mining workshops (ICDMW). IEEE; 2012. p. 709–16.Google Scholar
  23. 23.
    Poria S, Gelbukh A, Cambria E, Yang P, Hussain A, Durrani TS. Merging senticnet and wordnet-affect emotion lists for sentiment analysis. In: 2012 IEEE 11th international conference on signal processing (ICSP), vol. 2. IEEE; 2012. p. 1251–55.Google Scholar
  24. 24.
    Shang H, Zhang Y, Lin X, Yu JX. Taming verification hardness: an efficient algorithm for testing subgraph isomorphism. Proc VLDB Endow. 2008;1(1):364–75.CrossRefGoogle Scholar
  25. 25.
    Sun Z, Wang H, Wang H, Shao B, Li J. Efficient subgraph matching on billion node graphs. Proc VLDB Endow. 2012;5(9):788–99.CrossRefGoogle Scholar
  26. 26.
    Tran HN, Kim JJ, He B. Fast subgraph matching on large graphs using graphics processors. In: Renz M, Shahabi C, Zhou X, Cheema AM, editors. Database systems for advanced applications: 20th International Conference, DASFAA 2015, Proceedings, Part I. Springer; 2015. p. 299–315.Google Scholar
  27. 27.
    Ullmann JR. An algorithm for subgraph isomorphism. J ACM (JACM). 1976;23(1):31–42.CrossRefGoogle Scholar
  28. 28.
    Vineet V, Harish P, Patidar S, Narayanan P. Fast minimum spanning tree for large graphs on the GPU. In: Proceedings of the conference on high performance graphics 2009. ACM; 2009. p. 167–71.Google Scholar
  29. 29.
    Wang Q-F, Cambria E, Liu C-L, Hussain A. Common sense knowledge for handwritten Chinese text recognition. Cognit Comput. 2013;5(2):234–42.CrossRefGoogle Scholar
  30. 30.
    Zhang S, Li S, Yang J. GADDI: distance index based subgraph matching in biological networks. In: Proceedings of the 12th international conference on extending database technology: advances in database technology. ACM; 2009. p. 192–203.Google Scholar
  31. 31.
    Zhao P, Han J. On graph query optimization in large networks. Proc VLDB Endow. 2010;3(1–2):340–51.CrossRefGoogle Scholar
  32. 32.
    Dashtipour K, Poria S, Hussain A, Cambria E, Hawalah AYA, Gelbukh A, Zhou Q. Multilingual sentiment analysis: state of the art and independent comparison of techniques. Cogn Comput. 2016. doi: 10.1007/s12559-016-9415-7.Google Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  1. 1.School of Computer Science and EngineeringNanyang Technological UniversitySingaporeSingapore
  2. 2.Division of Computing Science and Maths, Faculty of Natural SciencesUniversity of StirlingStirlingScotland, UK
  3. 3.Anhui UniversityHefeiChina

Personalised recommendations