More changes to the Intro.

This commit is contained in:
Aaron Huber 2021-06-30 16:23:36 -04:00
parent f0b7d5d968
commit 334b78c526
2 changed files with 12 additions and 4 deletions

View file

@ -137,18 +137,25 @@
\caption{Two step model of computation}
\label{fig:two-step}
\end{figure}
A probabilistic database (\abbrPDB) $\pdb$ is a two-tuple ($\idb, \pd$) such that $\idb$ is the set of possible worlds $\db$ represented by $\pdb$, and $\pd$ is the associated probability distribution across each $\db$ in $\idb$. Given a query $\query$ the output of $\query(\pdb)$ is ($\idb', \pd'$) such that $\idb' = \{\query(\db_i) \suchthat i \in [\numvar]\}$ where $\numvar = \abs{\idb}$, the number of possible worlds in $\pdb$, and $\pd'$ is the resulting probability distribution over $\idb'$. The problem of computing an arbitrary $\query$ over an arbitrary $\pdb$ has been studied extensively in the literature, expecially in the context of set-$\abbrPDB\xplural$. In the deterministic setting it is well known that there exist queries $\query$ such that the runtime of $\query$ is superlinear as in the case of counting cliques, or even exponential in the size of $\query$, as is the case of a multi-join. Assuming $\query$ is linear or better, how does query computation of a $\abbrPDB$ compare to deterministic query processing?
A probabilistic database (\abbrPDB) $\pdb$ is a two-tuple ($\idb, \pd$) such that $\idb$ is the set of possible worlds $\db$ represented by $\pdb$, and $\pd$ is the associated probability distribution across each $\db$ in $\idb$. Given a query $\query$ the output of $\query(\pdb)$ is ($\idb', \pd'$) such that $\idb' = \{\query(\db_i) \suchthat i \in [\numvar]\}$ where $\numvar = \abs{\idb}$, the number of possible worlds in $\pdb$, and $\pd'$ is the resulting probability distribution over $\idb'$. In a similar way, one can view $\pdb$ (and $\query(\pdb)$) as the set of possible tuples appearing in $\idb$ each annotated with a lineage polynomial ($\poly(\vct{X})$) and respective expectation ($\expct\pbox{\poly(\vct{X})})$. When considering query complexity it is tivial to note that deterministic query complexity has its \emph{own} non-linear hardness results and there exist
%The problem of computing an arbitrary $\query$ over an arbitrary $\pdb$ has been studied extensively in the literature, predominantly in the context of set-$\abbrPDB\xplural$. In the deterministic setting it is well known that
queries $\query$ such that the runtime of $\query$ is superlinear as in the case of counting cliques, or even exponential in the size of $\query$, as is the case of a multi-join. This observation suggests a natural model of computation for query processing over $\abbrPDB\xplural$. %Assuming $\query$ is linear or better, how does query computation of a $\abbrPDB$ compare to deterministic query processing?
Query processing in the $\abbrPDB$ setting can be viewed as a two step model of computation. As depicted in \cref{fig:two-step}, computing $\query$ over a $\abbrPDB$ consists of the first step, which is essentially the deterministic computation of both the query output and result tuple lineage polynomial(s) encoded in the respective representation.\footnote{Note that the runtime of the first step is the same in both the deterministic and \abbrPDB settings, since the computation of the linage is never greater than the query processing time.} The second step consists of computing the expectation of the lineage representation. This model of computation is nicely followed by set-\abbrPDB semantics and also by that of semiring provenance, and further, it is useful in this work for the purpose separating the deterministic computation from the probability computation.
This model views query processing in $\abbrPDB\xplural$ as two steps. As depicted in \cref{fig:two-step}, computing $\query$ over a $\abbrPDB$ consists of the first step, which is essentially the deterministic computation of both the query output and result tuple lineage polynomial(s) encoded in the respective representation.\footnote{Note that the runtime of the first step is the same in both the deterministic and \abbrPDB settings, since the computation of the linage is never greater than the query processing time.} The second step consists of computing the expectation of the lineage representation. This model of computation is nicely followed by set-\abbrPDB semantics and also by that of semiring provenance, and further, it is useful in this work for the purpose separating the deterministic computation from the probability computation.
A set-\abbrPDB $\pdb$ views each element $\db$ in $\idb$ to be a set of tuples. Queries over set-\abbrPDB\xplural produce set-$\abbrPDB$ output. The problem of computing $\query$ \emph{exactly} over a set-\abbrPDB is known to be \sharpphard in the general case. The dichotomy of Dalvi and Suicu shows that for set-\abbrPDB\xplural it is the case that $\query(\pdb)$ is either polynomial or \sharpphard. Further, this dichotomy is \emph{based} on the query structure and in general is independent of the representation of the lineage polynomial, meaning that the bottleneck is always in the second step of the computation model.\footnote{We do note that there exist specific cases when given a specific database instance combined with an amenable representation, that a hard $\query$ can become easy, but this is \emph{not} the general case.} In this setting, if one allows for approximation, the query processing problem can then be brought back down to quadratic time.
Since set-\abbrPDB\xplural are essentially limited to computing the marginal probability of $\tup$, bag-\abbrPDB\xplural are a more natural fit for computing queries such as count queries. Traditionally, bag-\abbrPDB\xplural have long been considered to be bottlenecked in step one only, or linear in the size of query. This may partially be due to the prevalence that exists in using a sum of products (\abbrSOP) representation of the lineage polynomial amongst many of the most well-known implementations of set-\abbrPDB\xplural. Such a representation used in the bag-\abbrPDB setting \emph{indeed} allows for step two to be linear in the \emph{size} of the \abbrSOP representation, a result due to linearity of expectation.
However, it is not necessarily satisfying to stop here. Since typical implementations of \abbrPDB\xplural compute the representation of the lineage polynomial in sync with the particular choice of query plan, it is important that optimizations are allowed if we want to have a true comparison between step one and step two in bag-\abbrPDB queries. Optimizations like projection push-down produce factorized or non-\abbrSOP representations of the lineage polynomial. Our work explores whether or not step two in the computation model is \emph{always} linear in the \emph{size} of the representation of the lineage polynomial when step one of $\query(\pdb)$ is easy. %This works focuses on step two of the computation model specifically in regards to bag-\abbrPDB queries.
Given a bag-\abbrTIDB\footnote{A \abbrTIDB is a \abbrPDB such that each tuple is considered to be an independent random event.} $\pdb$, when the probability of all tuples $\prob_i = 1$, the problem of computing the expected count is linear, and we have deterministic runtime. However, for the class of \abbrTIDB\xplural with $\prob_i < 1$, the problem of computing the expected count (step two of the computation model) in general is no longer linear in the size of the lineage polynomial representation. This work focuses on analyzing step two of the query processing problem over bag-\abbrPDB queries, specifically, ``Given a lineage polynomial generated by a query $\query$, compute the expected multiplicity.'' We also introduce an approximation algorithm of the expected count of $\tup$ from the bag-\abbrPDB query $\query$ which runs in linear time.
Given a bag-\abbrTIDB\footnote{A \abbrTIDB is a \abbrPDB such that each tuple is considered to be an independent random event.} $\pdb$, when the probability of all tuples $\prob_i = 1$, the problem of computing the expected count is linear, and we have deterministic runtime. However, for the class of \abbrTIDB\xplural with $\prob_i < 1$, the problem of computing the expected count (step two of the computation model) in general is no longer linear in the size of the lineage polynomial representation. This work focuses on analyzing step two of the query processing problem over bag-\abbrPDB queries, specifically:
\begin{Problem}
``Given a lineage polynomial circuit generated by a query $\query$, what is the complexity of computing the expected multiplicity of $\tup$?''
\end{Problem}
As alluded earlier, the general case of query complexity over bag-\abbrPDB lineage representations is \emph{not} linear. Our work further introduces an approximation algorithm of the expected count of $\tup$ from the bag-\abbrPDB query $\query$ which runs in linear time.
As noted, bag-\abbrPDB query output is a probability distribution over the possible multiplicities of $\tup$, which is a stark contrast to the marginal probability paradigm of set-\abbrPDB\xplural. Further, from a theoretical perspective, not much work has been done considering bag-\abbrPDB\xplural. Focusing on computing the expected count of $\tup$ is therfore a natural (and simplistic) statistic to consider in further developing the theoretical foundations of bag-\abbrPDB\xplural. There are indeed other statistical measures that can be computed, but which are beyond the scope of this paper, though we do consider higher moments, which can be found in the appendix.
As noted, bag-\abbrPDB query output is a probability distribution over the possible multiplicities of $\tup$, which is a stark contrast to the marginal probability paradigm of set-\abbrPDB\xplural. Further, from a theoretical perspective, not much work has been done considering bag-\abbrPDB\xplural. Focusing on computing the expected count of $\tup$ is therfore a natural (and simplistic) statistic to consider in further developing the theoretical foundations of bag-\abbrPDB\xplural. There are indeed other statistical measures that can be computed, but which are beyond the scope of this paper, though we additionally consider higher moments, which can be found in the appendix.
%A tuple independent database (\abbrTIDB) is a \abbrPDB whose tuples are treated as independent random events. Given a set-\abbrTIDB $\pdb$, $\query(\pdb)$ is essentially limited to computing the \emph{marginal} probability for a member tuple $\tup$. When it is desirable to compute either a probability distribution over the set of possible multiplicities of $\tup$ or to compute certain statistical measures over the multiplicity of $\tup$, bag-\abbrPDB\xplural are a natural fit, proving very useful for posing questions such as count queries to the database. While other statistical measures can be computed, we focus primarily on computing the expected multiplicity of $\tup$, a natural interpretation of step two in the bag setting.\footnote{We consider this natural since it is true that computing the marginal probability of $\tup$ in set-\abbrPDB\xplural is essentially computing $\tup$'s expectation.} It is also compelling to consider the expected multiplicity since bag-\abbrPDB\xplural are not well studied from a theoretical perspective, and the expected count is both natural and simplistic to consider as a first building block. We consider higher moments in the appendix.\AH{Pointer here.}

View file

@ -29,6 +29,7 @@
\newtheorem{Corollary}[Theorem]{Corollary}
\newtheorem{Example}[Theorem]{Example}
\newtheorem{hypo}[Theorem]{Conjecture}%used in mult_distinct_p.tex
\newtheorem{Problem}[Theorem]{Problem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%