The growing size, heterogeneity and complexity of databases demand the creation of strategies to facilitate users and systems to consume data. Ideally, query mechanisms should be schema-agnostic, i.e. they should be able to match user queries in their own vocabulary and syntax to the data, abstracting data consumers from the representation of the data. This work provides an informationtheoretical framework to evaluate the semantic complexity involved in the query-database communication, under a schema-agnostic query scenario. Different entropy measures are introduced to quantify the semantic phenomena involved in the user-database communication, including structural complexity, ambiguity, synonymy and vagueness. The entropy measures are validated using natural language queries over Semantic Web databases. The analysis of the semantic complexity is used to improve the understanding of the core semantic dimensions present at the query-data matching process, allowing the improvement of the design of schema-agnostic query mechanisms and defining measures which can be used to assess the semantic uncertainty or difficulty behind a schema-agnostic querying task.
How hard is this Query? Measuring the Semantic Complexity of Schema-agnostic Queries
1. How hard is this query?
Measuring the Semantic Complexity of
Schema-agnostic Queries
André Freitas, Juliano Efson Sales,
Siegfried Handschuh, Edward Curry
IWCS, London 2015
4. Shift in the Database Landscape
Very-large and dynamic “schemas”.
10s-100s attributes
1,000s-1,000,000s attributes
before 2000
circa 2015
4 Brodie & Liu, 2010
5. Databases for a Complex World
How do you query data on this scenario?
5
7. Schema-agnostic queries
Query approaches over structured databases which
allow users satisfying complex information needs
without the understanding of the representation
(schema) of the database.
7
Semantic Parsing
8. Vocabulary Problem for Databases
Query: Who is the daughter of Bill Clinton married to?
Quantify the Semantic Gap
Possible representations
8
9. Core Questions
• Can we measure the semantic complexity of a
query-DB mapping?
• What defines an “easy” or a “hard” query?
• Which are the best estimators?
9
16. In the scope of this work
• Entropy -> Entropy estimator, approximation.
16
17. Syntactic Entropy (Hsyntax)
• The syntactic entropy of a query is defined by the
possible syntactic configurations in which a query
can be interpreted under the database syntax.
• Estimate the uncertainty of the translation of the
query into the DB categories (IDB(Q)).
• Is a function of the probability of the syntactic
interpretation of a query.
17
18. Structural Entropy (Hstruct)
• The structural entropy defines the complexity of a
database based on the possible facts that can be
encoded under its schema.
• Pollard & Biermann, A measure of semantic
complexity for natural language systems (2000).
18
19. Terminological Entropy (Hterm)
• The terminological entropy focuses on quantifying an
estimate on the amount of ambiguity, synonymy and
vagueness for the query or database terms.
• Translational Entropy (Htrans) as an estimator.
• Melamed, Measuring semantic entropy (1997).
• Translation probability based on parallel corpora.
19
20. Matching Entropy (Hmatching)
• Consists of measures which describe the
uncertainty involved in the query-data
matching/alignment between query terms and
dataset entities.
• Provides an estimate based on the set of
potential alignments.
• Distributional entropy (Hdist): Estimator based on
distributional semantic models.
20
21. Query Features as Complexity
Estimators
• Query features (reference to data model/query
operator categories).
– Contains instance reference (named entities)
– Contains class reference
– Contains complex class reference
– Contains property
– Contains value
– Yes/No question
– Contains operator
21
38. Minimizing the Semantic Entropy for
the Semantic Matching
Definition of a semantic pivot: first query term to
be resolved in the database.
Maximizes the reduction of the semantic
configuration space (Hstruct , Hmatch).
38
39. Semantic Pivots (Hstruct , Hmatch)
• Who is the daughter of Bill Clinton married to?
437100,184 62,781
> 4,580,000
dbpedia:spouse dbpedia:children :Bill_Clinton
39
40. Minimizing the Semantic Entropy for
the Semantic Matching
Definition of a semantic pivot: first query term
to be resolved in the database.
Maximizes the reduction of the semantic
configuration space (Hstruct , Hmatch).
Less prone to more complex synonymic
expressions and abstraction-level differences
(Hterm , Hmatch).
40
41. Semantic Pivots
• Proper nouns tends to have high percentage of string
overlap for synonymic expressions.
William Jefferson Clinton
Bill Clinton
William J. Clinton
T. E. Lawrence
Thomas Edward
Lawrence
Lawrence of Arabia
Who is the daughter of Bill Clinton married to?
41
42. Minimizing the Semantic Entropy for
the Semantic Matching
Definition of a semantic pivot: first query term to be
resolved in the database.
Maximizes the reduction of the semantic
configuration space (Hstruct , Hmatch).
Less prone to more complex synonymic expressions
and abstraction-level differences (Hterm , Hmatch).
proper nouns >> nouns >> complex nominals >>
adjectives , verbs.
42
43. Semantic Matching
• Hsyntax is a strong estimator of query
complexity.
• Hmatching can be used as an estimator for the
quality of the predicate alignment.
• Hterm can be used as a heuristic for matching
complexity.
43
44. Conclusions
• Both entropy (Hsyntax, Hterm, Hmatching) and query features
(instances, complex classes, operators) can be used as
estimators for query semantic complexity.
• This can be incorporated as heuristics into schema-
agnostic query planning approaches (or approximate
semantic parsing) to maximize semantic matching
probabilities.
• Need for the construction of better semantic entropy
estimators.
44