Abstract
The existing literatures of the query processing on knowledge graphs focus on an exhaustive enumeration of all matches, which is time-consuming. Users are often interested in diversified top-k matches, rather than the entire match set. Motivated by these, this paper formalizes the diversified top-k querying (DTQ) problem in the context of RDF/SPARQL and proposes a diversification function to balance importance and diversity. We first prove that the decision problem of DTQ is NP-complete, and give a baseline algorithm with an approximation ratio of 2. Secondly, an index-based algorithm with the early termination property is proposed. The index is adept in parallel diversified top-k selection in multicore architectures. Using real-world and synthetic data, we experimentally verify that our algorithms are efficient and effective in computing meaningful diversified top-k matches.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Arnaout, H., Elbassuoni, S.: Result diversity for RDF search. In: KDIR (2016)
Bonifati, A., Martens, W., Timm, T.: An analytical study of large SPARQL query logs. VLDB J. 1–25 (2019)
Borodin, A., Lee, H.C., Ye, Y.: Max-sum diversification, monotone submodular functions and dynamic updates. In: PODS (2012)
Cheng, J., Zeng, X., Yu, J.X.: Top-k graph pattern matching over large graphs. In: 2013 IEEE 29th International Conference on Data Engineering (ICDE), pp. 1033–1044 (2013)
Fan, W., Wang, X., Wu, Y.: Diversified top-k graph pattern matching. PVLDB 6, 1510–1521 (2013)
Gupta, M., Gao, J., Yan, X., Çam, H., Han, J.: Top-k interesting subgraph discovery in information networks. In: 2014 IEEE 30th International Conference on Data Engineering, pp. 820–831 (2014)
Ravi, S.S., Rosenkrantz, D.J., Tayi, G.K.: Heuristic and special case algorithms for dispersion problems. Oper. Res. 42, 299–310 (1994)
Vieira, M.R., et al.: On query result diversification. In: 2011 IEEE 27th International Conference on Data Engineering, pp. 1163–1174 (2011)
Wang, X., Chai, L., Xu, Q., Yang, Y., Li, J., Wang, J., Chai, Y.: Efficient subgraph matching on large RDF graphs using mapreduce. Data Sci. Eng. 4, 24–43 (2019). https://doi.org/10.1007/s41019-019-0090-z
Wang, X., Zhan, H.: Approximating diversified top-k graph pattern matching. In: Hartmann, S., Ma, H., Hameurlain, A., Pernul, G., Wagner, R.R. (eds.) DEXA 2018. LNCS, vol. 11029, pp. 407–423. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-98809-2_25
Yang, Z., Fu, A.W.C., Liu, R.: Diversified top-k subgraph querying in a large graph. In: SIGMOD Conference (2016)
Zou, L., Özsu, M.T.: Graph-based RDF data management. Data Sci. Eng. 2, 56–70 (2016). https://doi.org/10.1007/s41019-016-0029-6
Acknowledgment
This work is supported by the Joint Funds of the National Natural Science Foundation of China No. U19A2059, the National Key Research and Development Program of China No. 2019YFB2101902, and National Natural Science Foundation of China (No. 61532015, No. 61672189).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix
Appendix
We will prove the approximation ratio of Algorithm 1 is 2. \(\mathbb {M}(G_D,Q_D)\) is named \(\mathbb {M}\) for short. For disjoint subsets \(S,T \subseteq \mathbb {M}\), let \(d(S)=\sum _{u,v\in S}\delta _D(u,v)\), \(d(S,T)=\sum _{u\in S, v\in T}\delta _D(u,v)\) and \(f(S)=\sum _{u\in S}\delta _I(u)\).
Now we define marginal gain. For any given subset \(S\subseteq \mathbb {M}\) and an element \(u\in \mathbb {M}\backslash S\), let F(S) be the value of the objective function, \(d_u(S)=\sum _{v\in S}\delta _D(u,v)\) be the marginal gain on the diversity, \(f_u(S)=f(S+u)-f(S)=f(u)=\delta _I(u)\) be the marginal gain on the importance, and \(F_u(S) = (1-k)(1-\lambda )f_u(S) + 2\lambda d_u(S)\) be the total marginal gain on the objective function. Let \(f_u^{'}(S) = \frac{1}{2}(k-1)(1-\lambda )f_u(S)\) and \(F_u^{'}(S) = f_u^{'}(S) + 2\lambda d_u(S)\).
We utilize the a theorom in [13]: Given a metric distance function \(d(\cdot ,\cdot )\), and two disjoint sets X and Y, the following inequality holds: \((|X|-1)d(X,Y)\ge |Y|d(X)\).
Let O be the optimal solution and G be the greedy one at the end of the Algorithm 1. Let \(G_i\) be the greedy solution at the end of step i, \(i<k\); let \(A=O\cap G_i\), \(B=G_i\backslash A\) and \(C = O\backslash A\). By Lemma 1, we have the following three inequalities: (1) \((|C|-1)d(B,C)\ge |B|d(C)\); (2) \((|C|-1)d(A,C)\ge |A|d(C)\); (3) \((|A|-1)d(A,C)\ge |C|d(A)\). Besides, we have (4) \(d(A,C)+d(A)+d(C) =d(O)\).
When \(k = 1\), match u with the largest \(\delta _I(u)\) must be in both G and O, so \(F(G)=\frac{1}{2}(k-1)(1-\lambda )f_u(S)+2\lambda d_u(S)=\frac{1}{2}(k-1)(1-\lambda )\delta _I(u)+0=\frac{1}{2}F(O)\) apparently.
When \(k>1\), suppose \(|C|=1\) and \(i=k-1\). Let v be the element in C, and let u be the element taken by the greedy algorithm in the next step, and then \(F_u^{'}(G_i)\ge F_v^{'}(G_i)\). Therefore, \(\frac{(k-1)(1-\lambda )}{2}f_u(G_i) + 2\lambda d_u(G_i) \ge \frac{(k-1)(1-\lambda )}{2}f_v(G_i) +2\lambda d_v(G_i)\), which implies \(F_u(G_i)=(k-1)(1-\lambda )f_u(G_i)+2\lambda d_u(G_i) \ge \frac{(k-1)(1-\lambda )}{2}f_u(G_i) +2\lambda d_u(G_i) \ge \frac{(k-1)(1-\lambda )}{2}f_v(G_i) + 2\lambda d_v(G_i) \ge \frac{1}{2}F_v(G_i)\), hence \(F(G)\ge \frac{1}{2}F(O)\).
Now we can suppose that \(k>1\) and \(|C|>1\). We apply the following non-negative multipliers to Inequality. (1) (2) (3) and Eq. (4) and add them: (1)\(\,\times \,\frac{1}{|C|-1}\)Â +Â (2)\(\,\times \,\frac{|C|-|B|}{k(|C|-1)}\)Â +Â (3)\(\,\times \,\frac{i}{k(k-1)}\)Â +Â (4)\(\,\times \,\frac{i|C|}{k(k-1)}\); then we have \(d(A,C)\,+\,d(B,C)-\frac{i|C|(k-|C|)}{k(k-1)(|C|-1)}d(C)\ge \frac{i|C|}{k(k-1)}d(O)\).
Since \(k>|C|\), we have \(d(C,G_i)=d(C,A+B)=d(C,A)+d(C,B)\ge \frac{i|C|}{k(k-1)}d(O)\). Suppose P is a set, we define function \(f^{'}(P)=\sum _{x\in P}f_x^{'}(P)\). Then, \(\sum _{v\in C}f_v^{'}(G_i) = f^{'}(C\cup G_i)-f^{'}(G_i) = f^{'}(O)-f^{'}(G)\). Therefore,
Let \(u_{i+1}\) be the element taken at step \((i+1)\), and then we have \(F_{u_{i+1}}^{'}(G_i)\ge \frac{1}{k}(f'(O)-f'(G))+\frac{2\lambda i}{k(k-1)}d(O)\). Summing over all i from 0 to \(k-1\), we have \(F^{'}(G)=\sum _{i=0}^{i=k-1}F_{u_{i+1}}^{'}(G_i) \ge (f'(O)-f'(G))+\lambda d(O)\). Hence, \(F^{'}(G)=f'(G)+2\lambda d(G)\ge f'(O)-f'(G)+\lambda d(O)\), and \(F(G)=(k-1)(1-\lambda )f(G)+2\lambda d(G)=2f'(G)+2\lambda d(G)\ge f'(O)+\lambda d(O)=\frac{1}{2}[(k-1)(1-\lambda )f(O)+2\lambda d(O)]=\frac{1}{2}F(O)\).
So the approximation ratio of Algorithm 1 is 2. This completes the proof. Â Â Â \(\square \)
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Guo, X., Gao, H., An, Y., Zou, Z. (2020). Diversified Top-k Querying in Knowledge Graphs. In: Wang, X., Zhang, R., Lee, YK., Sun, L., Moon, YS. (eds) Web and Big Data. APWeb-WAIM 2020. Lecture Notes in Computer Science(), vol 12317. Springer, Cham. https://doi.org/10.1007/978-3-030-60259-8_24
Download citation
DOI: https://doi.org/10.1007/978-3-030-60259-8_24
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-60258-1
Online ISBN: 978-3-030-60259-8
eBook Packages: Computer ScienceComputer Science (R0)