Abstract
We propose conditional graph patterns (CGPs) that make conventional patterns more expressive, especially with positive and negative predicates. In emerging applications, CGPs allow to express complex search conditions and to find more sensible information than their traditional counterparts. We show that this expressivity does not come with a much higher price. Indeed, we propose a (parallel) matching algorithm that allows to match CGPs over any data graphs in quadratic time, as opposed to the prohibitive solutions based on subgraph isomorphism. In the second part of this article, we study the problem of top-k CGP matching algorithm. We propose the notion of relevance schema that allows users to define relevance criteria according to their preferences. We propose an early termination algorithm that finds the top-k relevant matches by requiring only \(3\%\) of the time spent by the naive algorithm. To our knowledge, this is the first effort that investigates an expressive top-k graph pattern matching under simulation semantic. An extensive experimental study has been conducted to prove effectiveness and efficiency of our results.
Similar content being viewed by others
Notes
Indices are used to distinguish between pattern nodes of the same label.
Polynomial Time.
Contrary to existing approaches that consider a static definition of relevance.
This article extends [29] by including contributions (5–9).
This is why we call them conditional graph patterns.
This may not reduce the practicability of our approach since many query languages (e.g., XPath, SQL) adopt this syntax of predicates.
One can prove this result by leveraging that of dual simulation [25].
\(M(v,u,u') {:}{=} \{v'\in V\setminus (v,v')\in E,(u',v')\in S,{\mathcal {L}}(v,v')={\mathcal {L}}_{_q}(u,u'),{\mathcal {A}}(e_v)\sim {\mathcal {L}}_{_q}(e_u)\}\).
The proof can be done by leveraging our results in [30].
References
Bapna R, Umyarov A (2015) Do your online friends make you pay? A randomized field experiment on peer influence in online social networks. Manage Sci 61(8):1902–1920
Brynielsson J, Högberg J, Kaati L, Mårtenson C, Svenson P (2010) Detecting social positions using simulation. In: IEEE Computer Society ASONAM, pp. 48–55
Brynielsson J, Högberg J, Kaati L, Mårtenson C, Svenson P (2010) Detecting social positions using simulation. In: ASONAM, pp. 48–55
Castelltort A, Laurent A (2015) Fuzzy historical graph pattern matching a nosql graph database approach for fraud ring resolution. In: AIAI, pp 151–167
Cheng J, Zeng X, Yu JX (2013) Top-k graph pattern matching over large graphs. In: ICDE, pp 1033–1044
Cook SA (1971) The complexity of theorem-proving procedures. In: Harrison MA, Banerji RB, Ullman JD (eds) STOC, pp 151–158
Cordella LP, Foggia P, Sansone C, Vento M (2004) A (sub)graph isomorphism algorithm for matching large graphs. IEEE Trans Pattern Anal Mach Intell 1367–1372
Cormen TH, Leiserson CE, Rivest RL, Stein C (2009) Introduction to algorithms, 3rd edn. The MIT Press, Cambridge
Fan G, Fan W, Li Y, Lu P, Tian C, Zhou J (2020) Extending graph patterns with conditions. In: SIGMOD, pp 715–729
Fan W (2012) Graph pattern matching revised for social network analysis. In: ICDT, pp 8–21
Fan W, Li J, Ma S, Tang N, Wu Y (2011) Adding regular expressions to graph reachability and pattern queries. In: ICDE, pp 39–50
Fan W, Li J, Ma S, Tang N, Wu Y, Wu Y (2010) Graph pattern matching: from intractable to polynomial time. VLDB Endowment, pp 264–275
Fan W, Wang X, Wu Y (2013) Diversified top-k graph pattern matching. Proc VLDB Endow pp 1510–1521
Fan W, Wang X, Wu Y (2013) Expfinder: Finding experts by graph pattern matching. In: ICDE, pp 1316–1319
Fan W, Wu Y, Xu J (2016) Adding counting quantifiers to graph patterns. In: SIGMOD, pp 1215–1230
Fionda V, Pirrò G (2013) Querying graphs with preferences. In: CIKM, pp 929–938
Francis N, Green A, Guagliardo P, Libkin L, Lindaaker T, Marsault V, Plantikow S, Rydberg M, Selmer P, Taylor A (2018) Cypher: an evolving query language for property graphs. In: SIGMOD, pp 1433–1445. ACM
Gallagher B (2006) Matching structure and semantics: a survey on graph-based pattern matching. In: Proceedings of the AAAI Fall Symposium Series, pp 45–53
Hannah Blau Neil Immerman DJ (2002) A visual language for querying and updating graphs. Technical report, University of Massachusetts
Hung BWK, Jayasumana AP (2016) Investigative simulation: towards utilizing graph pattern matching for investigative search. In: Kumar R, Caverlee J, Tong H (eds) ASONAM, pp 825–832
Lappas T, Liu K, Terzi E (2011) A survey of algorithms and systems for expert location in social networks. In: Aggarwal CC (ed) Social network data analytics, pp 215–241
Li L, Zhang F, Zhang Z, Li P, Bu C (2020) Multi-fuzzy-objective graph pattern matching in big graph environments with reliability, trust and social relationship. World Wide Web 23(1):649–669
Liu G, Wang Y, Zheng B, Li Z, Zheng K (2020) Strong social graph based trust-oriented graph pattern matching with multiple constraints. IEEE Trans Emerg Top Comput Intell 4(5):675–685
Liu G, Zheng K, Wang Y, Orgun MA, Liu A, Zhao L, Zhou X (2015) Multi-constrained graph pattern matching in large-scale contextual social graphs. ICDE, pp 351–362
Ma S, Cao Y, Fan W, Huai J, Wo T (2014) Strong simulation: capturing topology in graph pattern matching. ACM Trans Database Syst 39(1):4:1-4:46
Ma S, Li J, Hu C, Liu X, Huai J (2018) Graph pattern matching for dynamic team formation. CoRR abs/1801.01012
Ma Y, Yuan Y, Liu M, Wang G, Wang Y (2020) Graph simulation on large scale temporal graphs. GeoInformatica 24(1):199–220
Mahfoud H (2018) Graph pattern matching preserving label-repetition constraints. In: MEDI, pp 268–281
Mahfoud H (2020) Conditional graph pattern matching with a basic static analysis. In: Pattern recognition and artificial intelligence—4th mediterranean conference (MedPRAI), pp 298–313
Mahfoud H (2020) Graph pattern matching with counting quantifiers and label-repetition constraints. Clust Comput 23(3):1529–1553
Mennicke S, Kalo J, Balke W (2017) Querying graph databases: what do graph patterns mean? In: ER, pp 134–148
Milner R (1989) Communication and Concurrency. Prentice-Hall, Inc., Hoboken
Van Rest O, Hong S, Kim J, Meng X, Chafi H (2016) Pgql: a property graph query language. In: GRADES, p 7
Wang X, Chai L, Xu Q, Yang Y, Li J, Wang J, Chai Y (2019) Efficient subgraph matching on large RDF graphs using mapreduce. Data Sci Eng 4(1):24–43
Wang X, Wang Y, Xu Y, Zhang J, Zhong X (2020) Extending graph pattern matching with regular expressions. In: DEXA, pp 111–129
Wang X, Zhan H (2018) Approximating diversified top-k graph pattern matching. In: DEXA, pp 407–423
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
I certify that there is no relevant financial or non-financial conflict of interest in relation to this article.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Mahfoud, H. Expressive top-k matching for conditional graph patterns. Neural Comput & Applic 34, 14205–14221 (2022). https://doi.org/10.1007/s00521-021-06590-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-021-06590-7