An automated template selection framework for keyword query over linked data

44
An Automated Template Selection Framework for Keyword Query over Linked Data Md-Mizanur Rahoman, Ryutaro Ichise December 2-4, 2012, JIST2012: The 2nd Joint International Semantic Technology Conference, Nara, Japan

description

Template-based information access, in which templates are constructed for keywords, is a recent development of linked data information retrieval. However, most such approaches suffer from ineffective template management. Because linked data has a structured data representation, we assume the data’s inside statistics can effectively influence template management. In this work, we use this influence for template creation, template ranking, and scaling. Our proposal can effectively be used for automatic linked data information retrieval and can be incorporated with other techniques such as ontology inclusion and sophisticated matching to further improve performance.

Transcript of An automated template selection framework for keyword query over linked data

Page 1: An automated template selection framework for keyword query over linked data

An Automated Template Selection Framework forKeyword Query over Linked Data

Md-Mizanur Rahoman, Ryutaro Ichise

December 2-4, 2012, JIST2012: The 2nd Joint International Semantic Technology

Conference, Nara, Japan

Page 2: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Outline

IntroductionRelated WorkProposed Method

Template management (for Two Keywords)Resource ManagerTemplate ConstructorBest Template Selector

Template management (for More than Two Keywords)Best Template ConstructorComparatorRefinerMerger

ExperimentExperimental DataResult AnalysisComparision with Other System

Conclusion and Future WorkMd-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 2

Page 3: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Introduction

Linked data295 data sets, 31 billion RDF triples (as of Sep. 2011).Difficult data access option for general purpose users.

Keyword-based linked data accessUser frinedly for general purpose users.Difficult in implementation.Template, a good implementation option.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 3

Page 4: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Problem

Current template fitted keyword-based linked data accessLacks of guideline on template construction.Holds poor template ranking strategy.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 4

Page 5: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Solution

Construct templates according to link data structure.

Rank templates using dataset’s inside statistics.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 5

Page 6: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Related Work

GoRelations: An Intuitive Query System for DBpedia. [Han, et al.,2011]

User needs to learn special kind of query formation technique.

Template-Based Question Answering Over RDF Data. [Unger, etal., 2012]

NL tool based QA system where NL tools sometime lead to incorrecttemplate construction.

Keyword-driven SPARQL Query Generation Leveraging BackgroundKnowledge. [Shekarpour, et al., 2011]

Needs to know some part of schema information such as instance orclass type information.Handle query with at most two keywords.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 6

Page 7: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

OverviewConstruct keyword fitted query templates.Rank all query templates and select the best query template.Construct final SPARQL query from the best query template.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 7

Page 8: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template managementAssumed for orderly given keywords.Follow linear binary progressive approach

Construct query templates for two adjacent keywords.Extend template construction linearly, if more than two keywords.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 8

Page 9: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for two keywords)

Templates Arranged In

1 2

Query

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 9

Page 10: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for two keywords)

Templates Arranged In

1 2

Query

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 10

Page 11: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Extract and classify of keyword related resources

1 2

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 11

Page 12: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Extract related resources

1 2

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 12

Page 13: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Related resource for keyword, k

RR(k) = {s | ∃ < s, p, o >∈ KB∧(p ∈ rtag)∧(m(o, k) = true)}

wherertag is a set of resources representing tags such as label, name,prefLabel, etc.m(o, k) is a boolean function between the triple object o and thekeyword k, whether they match exactly or not.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 13

Page 14: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Calculate positional frequencies for related resource

1 2

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 14

Page 15: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Positional frequency for related resource, r

PFs(r) =| {< r , p, o >| ∃ < r , p, o >∈ KB} |

PFp(r) =| {< s, r , o >| ∃ < s, r , o >∈ KB} |

PFo(r) =| {< s, p, r >| ∃ < s, p, r >∈ KB} |

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 15

Page 16: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Perform type classification for related resource

1 2

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 16

Page 17: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Type classifying function uType for related resource, r

uType(r) =

{PR iff (PFp(r) > PFs(r)) ∧ (PFp(r) > PFo(r))NP otherwise

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 17

Page 18: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Resource Manager

Extract and classify of keyword related resources

1 2

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 18

Page 19: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for two keywords)

Templates Arranged In

1 2

Query

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 19

Page 20: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Construct query templates

Find all possible query templates for two adjacent keywords.Rank query templates using affinity matrix

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 20

Page 21: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Query TemplatePossible semantic query structure for given keywords.

Table: Query templates for resources r1 and r2

Template Group Query Template

TG1 <?uri , r1, r2 >< r2, r1, ?uri >

TG2 < r1, ?uri , r2 >< r2, ?uri , r1 >

<?uri , ?p1, r1 > <?uri , ?p2, r2 >< r1, ?p1, ?uri > < r2, ?p2, ?uri >< r1, ?p1, ?uri > <?uri , ?p2, r2 ><?uri , ?p1, r1 > < r2, ?p2, ?uri >

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 21

Page 22: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Query TemplatePossible semantic query structure for given keywords.

Table: Query templates for resources r1 and r2

Template Group Query Template

TG1 < ?uri , r1, r2 >< r2, r1, ?uri >

TG2 < r1, ?uri , r2 >< r2, ?uri , r1 >

< ?uri , ?p1, r1 > < ?uri , ?p2, r2 >< r1, ?p1, ?uri > < r2, ?p2, ?uri >< r1, ?p1, ?uri > < ?uri , ?p2, r2 >< ?uri , ?p1, r1 > < r2, ?p2, ?uri >

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 22

Page 23: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Query TemplatePossible semantic query structure for given keywords.

Table: Query templates for resources r1 and r2

Template Group Query Template

TG1 <?uri , r1, r2 >(PR − NP) < r2, r1, ?uri >

TG2 < r1, ?uri , r2 >< r2, ?uri , r1 >

<?uri , ?p1, r1 > <?uri , ?p2, r2 >< r1, ?p1, ?uri > < r2, ?p2, ?uri >< r1, ?p1, ?uri > <?uri , ?p2, r2 ><?uri , ?p1, r1 > < r2, ?p2, ?uri >

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 23

Page 24: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Query TemplatePossible semantic query structure for given keywords.

Table: Query templates for resources r1 and r2

Template Group Query Template

TG1 <?uri , r1, r2 >< r2, r1, ?uri >

TG2 < r1, ?uri , r2 >(NP − NP) < r2, ?uri , r1 >

<?uri , ?p1, r1 > <?uri , ?p2, r2 >< r1, ?p1, ?uri > < r2, ?p2, ?uri >< r1, ?p1, ?uri > <?uri , ?p2, r2 ><?uri , ?p1, r1 > < r2, ?p2, ?uri >

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 24

Page 25: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Affinity matrixQuery templates storing and ranking structure.

. . . . . . . .

. . . .

. . . .

. . . .

. .

. . . .

. . . .

. . . .

. .

. . . .

. . . .

. . . .

. .

. . . .

. . . .

. . . .

. .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

TG1

TGq

TGq

TGq

TGq

TGq TGq

TGq

TGq

query template weight

<?uri kr kr >

<rk kr ?uri>

1,s 2,t

1,s2,tW2

rk1,1

rk1,s

rk1,m

rk2,1

rk2,t

rk2,n W1

. . . .

. . . .

(a)

(b)

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 25

Page 26: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Template Constructor

Calculate weight of query template:

Frequency of query template fq(QT ).Frequency of resource r , given query template QT .

fq(r ,QT (r1, r2)) =

PFs(r) if r is on subject in QTPFp(r) if r is on predicate in QTPFo(r) if r is on object in QT

The final weight FW (QT ) of query template QT

FW (QT ) = fq(QT ) ∗ fq(r1,QT ) ∗ fq(r2,QT )

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 26

Page 27: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for two keywords)

Templates Arranged In

1 2

Query

s

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 27

Page 28: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Best Template Selector

Select best query template:

Weight.Depth level.

How closely resources r1 and r2 are attached in triples for a querytemplate.for example

<?uri , r1, r2 > depth level is 1.<?uri , ?p1, r1 > <?uri , ?p2, r2 > depth level is 2.

Best query template in an affinity matrixlowest depth level and highest weight

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 28

Page 29: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Query template conversion to SPARQL query

SPARQL query conversionPut variable resource ?uri in SELECT clausePut query template inside WHERE clause

Table: Related SPARQL queries for all query templates

TG SPARQL Query for QT

< ?uri, r1, r2 > SELECT ?uri WHERE {?uri r1 r2.}< r2, r1, ?uri > SELECT ?uri WHERE {r2 r1 ?uri.}< r1, ?uri, r2 > SELECT ?uri WHERE {r1 ?uri r2.}< r2, ?uri, r1 > SELECT ?uri WHERE {r2 ?uri r1.}

< ?uri, ?p1, r1 > < ?uri, ?p2, r2 > SELECT ?uri WHERE {?uri ?p1 r1. ?uri ?p2 r2.}< r1, ?p1, ?uri > < r2, ?p2, ?uri > SELECT ?uri WHERE {r1 ?p1 ?uri. r2 ?p2 ?uri.}< r1, ?p1, ?uri > < ?uri, ?p2, r2 > SELECT ?uri WHERE {r1 ?p1 ?uri. ?uri ?p2 r2.}< ?uri, ?p1, r1 > < r2, ?p2, ?uri > SELECT ?uri WHERE {?uri ?p1 r1. r2 ?p2 ?uri.}

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 29

Page 30: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for more than two keywords)

1 2 n Constructor

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 30

Page 31: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for more than two keywords)

1 2 n Constructor

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 31

Page 32: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Best Template Constructor

Construct best query templates for every two adjacentkeywords

Keywords:

{k1, k2, k3, .., kn}Best query templates:

QT1 for {k1, k2}QT2 for {k2, k3}.........................QTn−1 for {kn−1, kn}

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 32

Page 33: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for more than two keywords)

1 2 n Constructor

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 33

Page 34: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Comparator

Compare two adjacent best query templatesCompare by depth levels and weights.Retain retain query template

Query template that is lower depth and higher weight .

Forward not retained keyword to Refiner process

Keyword that is not retained by retained template.

For example:

Keywords: k1, k2, k3Best query templates: QT1 for {k1, k2} and QT2 for {k2, k3}Retain template: QT1, if QT1 has lower depth and higher weight thanQT2

Not retained keyword: k3

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 34

Page 35: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for more than two keywords)

1 2 n Constructor

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 35

Page 36: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Refiner

Refine not retained keywordsRefine individual not retained keyword.Construct individual keyword based modified query template.

Table: Modified query templates for resources r1

Modified ModifiedTemplate Group Query Template

MTG1 <?uri , r1, ?o1 >MTG2 < r1, ?p1, ?uri >

<?uri , ?p1, r1 >

Find adjust query template by the frequency of modified querytemplates.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 36

Page 37: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Proposed Method

Template management (for more than two keywords)

1 2 n Constructor

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 37

Page 38: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Merger

Merge of all retained and adjusted query templates

Keep variable resource identifier ?uri intack.Use different variable resource identifiers for others.

For example. if identifier ?p1 and ?p2 are already used, use anotheridentifier (e.g., ?p3).

Merge query templates at ?uri .

Convert merged query template to SPARQL query.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 38

Page 39: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Experiments

How does system perform in keyword query?

How does system perform comparing to other system(s)?

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 39

Page 40: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Experimental Data

QALD-1 DBpedia Test set

Reason of choosing:

Real linked data implementation.Recognize linked data retrieval challenge.

Use 42 natural language questions out of 50.Construct keywords by considering question and underlying data.

Q# 29: In which films directed by Garry Marshall was Julia Robertsstarring?keywords: Film, starring, Julia Roberts, Director, Garry Marshall.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 40

Page 41: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Result Analysis

Table: Proposed system’s recall, precision, and F1 measure grouped bynumber of keywords.

# of # of Recall Precision F1 Measure*Keywords Questions (avg) (avg) (avg)

2 30 0.933 0.884 0.8993 8 0.472 0.442 0.4544 3 0.000 0.000 0.0005 1 1.000 1.000 1.000

Average 0.780 0.740 0.753

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 41

Page 42: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Comparision with Other System

Table: Performance comparison between GoRelations[Han, et al., 2011] andour System

Recall Precision F1 Measure*

GoRelations 0.722 0.687 0.704Proposed System 0.780 0.740 0.753

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 42

Page 43: An automated template selection framework for keyword query over linked data

Introduction Related Work Proposed Method Experiments Conclusion and Future Work

Conclusion and Future Work

ConclusionShow automated keyword-based linked data query using predefinedtemplate.Construct concrete guideline for template construction and templateranking.Show our implementation result for real linked implementation withsome comparsion.

Future Work

Explore automated ontology incorporation and feedback incorporation.Introduce more shophisticated keyword matching.Explore benefits of off-line statistical parameter inclusion.

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 43

Page 44: An automated template selection framework for keyword query over linked data

Questions?

Md-Mizanur Rahoman, [email protected] Ichise, [email protected]

Md-Mizanur Rahoman, Ryutaro Ichise |An Automated Template Selection Framework for Keyword Query over Linked Data | 44