Optimization for Active Learning-based Interactive Database ...Optimization for Active...

14
Optimization for Active Learning-based Interactive Database Exploration Enhui Huang , Liping Peng , Luciano Di Palma , Ahmed Abdelkafi , Anna Liu , Yanlei Diao ,´ Ecole Polytechnique, France; University of Massachusetts Amherst, USA enhui.huang, luciano.di-palma, ahmed.abdelkafi @polytechnique.edu, lppeng, yanlei @cs.umass.edu, [email protected] ABSTRACT There is an increasing gap between fast growth of data and limited human ability to comprehend data. Consequently, there has been a growing demand of data management tools that can bridge this gap and help the user retrieve high- value content from data more eectively. In this work, we aim to build interactive data exploration as a new database service, using an approach called “explore-by-example”. In particular, we cast the explore-by-example problem in a principled “active learning” framework, and bring the prop- erties of important classes of database queries to bear on the design of new algorithms and optimizations for active learning-based database exploration. These new techniques allow the database system to overcome a fundamental limita- tion of traditional active learning, i.e., the slow convergence problem. Evaluation results using real-world datasets and user interest patterns show that our new system significantly outperforms state-of-the-art active learning techniques and data exploration systems in accuracy while achieving desired eciency for interactive performance. PVLDB Reference Format: Enhui Huang, Liping Peng, Luciano Di Palma, Ahmed Abdelkafi, Anna Liu, Yanlei Diao. Optimization for Active Learning-based Interactive Database Exploration. PVLDB, 12(1): 71-84, 2018. DOI: https://doi.org/10.14778/3275536.3275542 1. INTRODUCTION Today data is being generated at an unprecedented rate. However, the human ability to comprehend data remains as limited as before. Consequently, there has been a growing demand of data management tools that can bridge the gap between the data growth and limited human ability, and help retrieve high-value content from data more eectively. To respond to such needs, we build a new database service for interactive exploration in a framework called “explore-by- example” [12,13]. In this framework, the database content is considered as a set of tuples, and the user is interested in some of them but not all. In the data exploration process, This work is licensed under the Creative Commons Attribution- NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. For any use beyond those covered by this license, obtain permission by emailing [email protected]. Copyright is held by the owner/author(s). Publication rights licensed to the VLDB Endowment. Proceedings of the VLDB Endowment, Vol. 12, No. 1 ISSN 2150-8097. DOI: https://doi.org/10.14778/3275536.3275542 the system allows the user to interactively label tuples as “interesting” or “not interesting”, so that it can construct an increasingly-more-accurate model of the user interest. Eventually, the model is turned into a user interest query 1 that will retrieve all relevant tuples from the database. In this work, we consider several target applications. First, when a scientist comes to explore a large sky survey database such as SDSS [39], she may not be able to express her data in- terest precisely. Instead, she may prefer to navigate through a region of the sky, see a few examples of sky objects, provide yes or no feedback, and ask the system to find all other (po- tentially many more) relevant sky objects from the database. Second, consider many web applications backed by a large database, such as E-commerce websites and housing websites, which provide a simple search interface but leave the job of filtering through a long list of returned objects to the user. The new database service in the explore-by-example framework will provide these applications with a new way to interact with the user and, more importantly, help the user filter through numerous objects more eciently. Our approach to building an explore-by-example system is to cast it in an “active learning” framework: We treat the modeling of the user interest as a classification problem where all the user labeled examples thus far are used to train a classification model. Then active learning [5, 36, 41] decides how to choose a new example, from the unlabeled database, for the user to label next so that the system can learn the user interest eciently. The active learning based explore-by-example approach oers potential benefits over alternative methods such as faceted search [26, 34, 35] and semantic windows [25] for several reasons. First, the user interest may include varying degrees of complexity, or the user does not have prior knowledge about the complexity and hence expects the system to learn a model as complex as necessary for her interest. More specifically, if the user knows the relevant attributes and just wants to set the appropriate value for each attribute, an interactive GUI or faceted search [26, 34, 35] may be sucient. However, the user interest may involve more complex constraints, e.g., “( rowc-a 1 b 1 ) 2 +( rowc-a 2 b 2 ) 2 <c”, and “x +2.5 log 10 (y) < 23.3” from the SDSS example query set [38], or “lengthwidth > cas seen in our car database. If the user knows the function shape and constants in advance, some of the above examples (e.g., the ellipse pattern) can be supported by semantic 1 In our work we use the term, user interest query, to refer to the final query that represents the user interest, while the term, user interest model, can refer to an immediate model before it converges to the true user interest. 71

Transcript of Optimization for Active Learning-based Interactive Database ...Optimization for Active...

Page 1: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

Optimization for Active Learning-based Interactive

Database Exploration

Enhui Huang†, Liping Peng⇤, Luciano Di Palma†, Ahmed Abdelkafi†, Anna Liu⇤, Yanlei Diao⇤,†

†Ecole Polytechnique, France;

⇤University of Massachusetts Amherst, USA

†�enhui.huang, luciano.di-palma, ahmed.abdelkafi @polytechnique.edu,

⇤�lppeng, yanlei @cs.umass.edu, [email protected]

ABSTRACTThere is an increasing gap between fast growth of data and

limited human ability to comprehend data. Consequently,there has been a growing demand of data management toolsthat can bridge this gap and help the user retrieve high-value content from data more e↵ectively. In this work, weaim to build interactive data exploration as a new databaseservice, using an approach called “explore-by-example”. Inparticular, we cast the explore-by-example problem in aprincipled “active learning” framework, and bring the prop-erties of important classes of database queries to bear onthe design of new algorithms and optimizations for activelearning-based database exploration. These new techniquesallow the database system to overcome a fundamental limita-tion of traditional active learning, i.e., the slow convergenceproblem. Evaluation results using real-world datasets anduser interest patterns show that our new system significantlyoutperforms state-of-the-art active learning techniques anddata exploration systems in accuracy while achieving desirede�ciency for interactive performance.

PVLDB Reference Format:Enhui Huang, Liping Peng, Luciano Di Palma, Ahmed Abdelkafi,Anna Liu, Yanlei Diao. Optimization for Active Learning-basedInteractive Database Exploration. PVLDB, 12(1): 71-84, 2018.DOI: https://doi.org/10.14778/3275536.3275542

1. INTRODUCTIONToday data is being generated at an unprecedented rate.

However, the human ability to comprehend data remains aslimited as before. Consequently, there has been a growingdemand of data management tools that can bridge the gapbetween the data growth and limited human ability, andhelp retrieve high-value content from data more e↵ectively.

To respond to such needs, we build a new database servicefor interactive exploration in a framework called “explore-by-example” [12, 13]. In this framework, the database contentis considered as a set of tuples, and the user is interested insome of them but not all. In the data exploration process,

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copyof this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. Forany use beyond those covered by this license, obtain permission by [email protected]. Copyright is held by the owner/author(s). Publication rightslicensed to the VLDB Endowment.Proceedings of the VLDB Endowment, Vol. 12, No. 1ISSN 2150-8097.DOI: https://doi.org/10.14778/3275536.3275542

the system allows the user to interactively label tuples as“interesting” or “not interesting”, so that it can constructan increasingly-more-accurate model of the user interest.Eventually, the model is turned into a user interest query

1

that will retrieve all relevant tuples from the database.In this work, we consider several target applications. First,

when a scientist comes to explore a large sky survey databasesuch as SDSS [39], she may not be able to express her data in-terest precisely. Instead, she may prefer to navigate througha region of the sky, see a few examples of sky objects, provideyes or no feedback, and ask the system to find all other (po-tentially many more) relevant sky objects from the database.Second, consider many web applications backed by a largedatabase, such as E-commerce websites and housing websites,which provide a simple search interface but leave the jobof filtering through a long list of returned objects to theuser. The new database service in the explore-by-exampleframework will provide these applications with a new way tointeract with the user and, more importantly, help the userfilter through numerous objects more e�ciently.

Our approach to building an explore-by-example systemis to cast it in an “active learning” framework: We treatthe modeling of the user interest as a classification problemwhere all the user labeled examples thus far are used totrain a classification model. Then active learning [5, 36,41]decides how to choose a new example, from the unlabeleddatabase, for the user to label next so that the system canlearn the user interest e�ciently. The active learning basedexplore-by-example approach o↵ers potential benefits overalternative methods such as faceted search [26, 34, 35] andsemantic windows [25] for several reasons.

First, the user interest may include varying degrees ofcomplexity, or the user does not have prior knowledge aboutthe complexity and hence expects the system to learn a modelas complex as necessary for her interest. More specifically,if the user knows the relevant attributes and just wants toset the appropriate value for each attribute, an interactiveGUI or faceted search [26,34,35] may be su�cient. However,the user interest may involve more complex constraints, e.g.,“( rowc�a1

b1)2 +( rowc�a2

b2)2 < c”, and “x+2.5⇤ log10(y) < 23.3”

from the SDSS example query set [38], or “length⇤width > c”as seen in our car database. If the user knows the functionshape and constants in advance, some of the above examples(e.g., the ellipse pattern) can be supported by semantic

1In our work we use the term, user interest query, to refer tothe final query that represents the user interest, while the term,user interest model, can refer to an immediate model before itconverges to the true user interest.

71

Page 2: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

windows [25] as pre-defined patterns. However, if the userdoes not have such prior knowledge, explore-by-example maywork regardless of how complex the predicates are, and whichfunctions and constants are used in the predicates.

Second, increased dimensionality makes it harder for se-mantic windows to scale. For example, when the interestof the SDSS user involves both the ellipse and log patternsabove, it will be more di�cult for both the system and theuser to handle multiple patterns for data exploration (even ifsuch patterns can be predefined). In contrast, as the dimen-sionality increases, explore-by-example can keep the sameuser interface for data exploration and handles increasedcomplexity via its learning algorithm “behind the scenes”.

While prior work on explore-by-example has used activelearning [13], a main issue is the large number of labeledexamples needed to achieve high accuracy. For example, 300-500 labeled examples are needed to reach 80% accuracy [13],which is undesirable in many applications. This problem,referred to as slow convergence, is exacerbated when the userinterest covers only a small fraction of the database (i.e.,low selectivity) or the number of the attributes chosen forexploration is large (i.e., high dimensionality).

In this work, we take a new approach to active learning-based database exploration. Instead of improving activelearning in isolation from the database, we treat it as aninternal module of the database system and ask the question:what query and data properties from the database can we

leverage to address the slow convergence problem? Basedon the common properties that we observed in query tracesfrom the Sloan Digital Sky Survey [38] and a car database(described more in Section 6), we can indeed design newtechniques that overcome or alleviate the slow convergenceproblem. Some of the key query properties include:

Subspatial Convexity: Consider the database attributesas dimensions of a data space D and map the tuples to thespace based on the values of their attributes. Then all thetuples that match the user interest form the positive regionin D; others form the negative region. We observe thatin some lower-dimensional subspaces of D, the projectedpositive or negative region is a convex object. For example,the SDSS query trace [38] includes 116 predicates, amongwhich 107 predicates define a convex positive region in thesubspace formed by the attributes used in the predicate,and 3 predicates define a convex negative region in theirsubspaces. For the car database, the 70 predicates definedon numerical attributes all form a convex positive region.Figure 2 shows a range of predicates from these two databasesand their positive and negative regions.

Conjunctivity: Conjunctive queries are a major classof database queries that have been used in numerous ap-plications. For data exploration, we are interested in the“conjunctive” property of the set of predicates that char-acterize the user interest. Among 45 queries provided bySDSS [38], 40 queries are conjunctive queries. For the cardatabase, all user queries use the conjunctive property.

In this paper, we bring the subspatial convexity and con-junctive properties of database queries, treated as true (yetunknown) user interest queries, to bear on the design ofnew algorithms and optimizations for active learning-baseddatabase exploration. These techniques allow the databasesystem to overcome a fundamental limitation of traditionalactive learning, i.e., the slow convergence problem when dataexploration is performed with high dimensionality and low

selectivity of the user interest query. More specifically, ourpaper makes the following contributions.

1. Dual-Space Model (Section 3): By leveraging thesubspatial convex property, we propose a new “dual-spacemodel” (dsm) that builds not only a classification model,FV , from labeled examples, but also a polytope model ofthe data space, FD. On one hand, active learning theoryimproves FV by choosing the next example that enablesreduction of the version space V (the space of all classificationmodels consistent with labeled data). On the other hand,our polytope model o↵ers a more direct description of thedata space D including the areas known to be positive, areasknown to be negative, and areas with unknown labels. Weuse both models to predict unlabeled examples and choosethe best example to label next. In addition, dsm allows usto prove exact and approximate lower bounds on the modelaccuracy in terms of F1-score. While active learning theoryo↵ers provable bounds on classification errors [7, 14,18–20],it treats positive and negative classes equally. Given the lowselectivity of user interest queries, e.g., 1%, a classifier thatassigns all tuples to the negative class has a low error rate of1%, but fails to return any relevant tuples. Hence, we chooseto bound F1-score as it emphasizes accuracy for the positiveclass, i.e., the relevant tuples returned to the user.

2. High-dimensional Exploration: When the userinterest involves a large number of attributes, we employ twoapproaches to reducing dimensionality in data exploration.

(a) Factorization (Section 4): By leveraging the conjunc-tive and subspatial convexity properties of user interestqueries, we factorize a high-dimensional data space into low-dimensional subspaces, in some of which the projections ofuser positive or negative regions are convex. Our dual-spacemodel with factorization, dsmF , runs the polytope model ineach subspace where the convex property holds. We formallydefine the class of queries that dsmF supports, the decisionfunction it utilizes, and prove that it achieves a better lowerbound of F1-score than dsm without factorization.

(b) Online feature selection (Section 5): The user maystart exploration with more attributes than those needed inthe final model. To remove irrelevant attributes, we proposean online feature selection method that adaptively selects thetop-k relevant attributes and leverages the convex property(if present) for optimization.

3. Evaluation (Section 6): We evaluated our systemusing two real datasets. The SDSS dataset [39] includes 190Mtuples, for which the user interests are selective and theirdecision boundaries present varied complexity for detection.Without knowing these queries in advance, dsmF can achieveF1-score of 95% within 10 labeled examples if the decisionboundary B falls in a sparse region, and otherwise requires upto 100 labeled examples for 2D queries and 160-240 examplesfor 4D-6D queries while maintaining per-iteration time within1-2 seconds. For these queries, our results show that dsmF

significantly outperforms learning methods including ActiveLearning (AL) [5,15] and Active Search [16], as well as recentexplore-by-example systems, Aide [12, 13] and LifeJoin [9].

Our user study using a 5622-tuple car database validatesthe subspatial convex property and the conjunctive propertyof user interest queries. It also shows the benefits of dsmF

(a median of 10 labeled examples to reach high accuracy)over manual exploration (where the user wrote 12 queriesand reviewed 98 tuples as the median), as well as over AL,even in the presence of noisy user labels.

72

Page 3: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

2. BACKGROUNDIn this section, we review our design of an explore-by-

example system and present background on active learning.

2.1 System OverviewOur data exploration system is depicted in Figure 1. The

main concepts and modules are described as follows.Data space. When a user comes to explore a database,

she is presented with the database schema for browsing.Based on her best understanding of the (implicit) explorationgoal, she may choose a set of attributes, {Ai}, i = 1, . . . , d,from a table for consideration. These attributes form asuperset of the relevant attributes that will eventually bediscovered by the system. Let us consider the projection ofthe underlying table to {Ai}, and pivot the projected tablesuch that each Ai becomes a dimension and the projectedtuples are mapped to points in this d-dimensional space –the resulting space is called a data space where the userexploration will take place.

Initial examples. To bootstrap data exploration, theuser is asked to give a positive example and a negativeexample. If she does not have such examples, the systemcan run initial sampling [12,29] over the data space to helpher find such examples. Since the initial sampling problemhas been studied before, our work in this paper focuses ondata exploration after such initial examples are identified.

Iterative learning and exploration. The iterative ex-ploration starts with a given positive example set and anegative example set, which form the labeled dataset. Ineach iteration, the labeled dataset is used to train a user inter-est model, which is fast due to the small size of training data.Before the model reaches convergence or a user-specifiedaccuracy level, it is used next to explore the data space andretrieve a new example for display. In the next iteration,the user labels this example as positive or negative – suchfeedback can be collected explicitly through a graphical in-terface [11], or implicitly based on the user behavior.2 Thenewly labeled example is added to the labeled dataset, andthe above process repeats.

Convergence and final retrieval. At each iteration,our system assesses the current model to decide whethermore iterations are needed. The process is terminated whenthe model accuracy has reached a user-defined threshold. Atthis point, the model for the positive class is translated toa query which will retrieve from the database all the tuplesclassified as relevant. To provide better interpretability, oursystem can visualize the final (nonparametric) model and fita corresponding parametric model, the form of which can besuggested by the user after seeing the visualization.

2.2 Active Learning for Data ExplorationThe problem of dynamically seeking the next example

for labeling from a large database of unlabeled tuples isclosely related to active learning. The recent results onactive learning are surveyed in [36]. Below, we summarizethose results relevant to our work.Pool-Based Sampling. Many real-world problems fit the

following scenario: there is a small set of labeled data L anda large pool of unlabeled data U available. In active learning,an example is chosen from the pool in a greedy fashion,

2Methods for collecting user feedback are in the purview of human-computer interaction and are beyond the scope of this paper.

positive samples

negative samples

User Feedback Classification

Convergence Space Exploration

classification model

classification model

trend detection

accuracy estimationdimensionality

reduction

active learning

next sample

Database

Initial Sampling

initial samples

retrieval query

N

Y

optimizations

Final retrieval optimization

Figure 1: System architecture for explore by example.

according to a utility measure used to evaluate all instancesin the pool (or, if U is large, a subsample thereof). In oursetting of database exploration, the labeled data L is whatthe user has provided thus far. The pool U is a subsampleof size m of the unlabeled part of the database. The utilitymeasure depends on the classifier in use, as discussed below.Classification Model. Previous explore-by-example sys-

tems [12, 13] used decision trees to build a classificationmodel. It works well if the user interest pattern is a hyper-rectangle in the data space, whereas real-world applicationsmay use more complex predicates. To support higher com-plexity, our system uses more powerful classifiers such asSupport Vector Machines (SVM) or Gradient Boosting. Thenew techniques proposed in our work do not depend on thespecific classifier; they can work with most existing classifiers.But the implementation of active learning does depend onthe classifier in use. For ease of composition, in this paperwe use SVM as an example classifier.

Uncertainty Sampling and Version Space Search. A com-mon form of utility measure over the unlabeled pool U char-acterizes the degree of uncertainty that the current modelexperiences for classifying each data example in U . Underuncertainty sampling, the example that leads to the high-est degree of uncertainty in classification is chosen as theexample for labeling. If the classifier is SVM-based, theuncertainty can be measured by the distance of each examplefrom the decision boundary of the current SVM [5,15]. Aformal description of uncertainty sampling is through thenotion of version space, which is the space of all configu-rations of the classification model consistent with labeleddata. Uncertainty sampling is a (rough) approximation ofan optimal algorithm that bisects the version space witheach selected example [41]. For the above reason, we callactive learning algorithms version space-based because theyare designed to reduce the version space.

3. DUAL-SPACE MODELFor interactive data exploration, active learning algorithms

often require a large number of user-labeled examples to reachhigh accuracy, known as the slow convergence problem. Onereason for slow convergence is the limitation of uncertaintysampling itself: it may exert a lot of e↵ort searching in sparse,noisy, or irrelevant regions of the input space [36].

With the goal to provide a service for database exploration,our work takes a new, a database centric approach to tacklethe slow convergence problem. We observe from existingquery traces that in some lower-dimensional subspaces, theprojected positive or negative region of user interest queryis often a convex object. In this section, we utilize suchsubspatial convexity and introduce a dual-space (data and

73

Page 4: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

(a) rowc > 480 and rowc < 885 (b) (rowc − 682.5)4+(colc − 1022.5)4 < 904

(c) rowc > 617.5 and rowc < 747.5and colc > 925 and colc < 1120

line segment ellipse rectangle

(d) rowv4 + colv4 > 0.24 (f) length ∗ width >= 10.1(e) petroMag_ext_r +2.5 ∗ logFG petroR50_r2 < 23.3

outside an ellipse log pattern hyperbola pattern

Figure 2: Positive (green) and negative (red) regions of 6example predicates

version space) model, which enables improved accuracy andprovable lower bounds on the model accuracy. We beginwith the simple case that the convex property holds for thequery over the entire data space D, without factorization,and defer the extension to subspaces to Section 4. We callthis class of queries “convex pattern queries”, denoted asQc ⌘ Q+

c [ Q�c . Figure 2 gives examples in both classes.

3.1 A Polytope Model in Data SpaceThe key idea behind our data space model is that at each

iteration we use all available labeled examples to build apartitioning of the data space. It divides the data spaceinto the positive region (any point inside which is known tobe positive), the negative region (any point inside which isknown to be negative) and the uncertain region. As moreexamples are labeled, we have more knowledge about theuncertain region, so part of it will be converted to either thepositive or the negative region in later iterations. Eventually,with enough training data, the uncertain region becomesempty, and the positive region converges to the query region.

For simplicity, we begin with queries whose positive regionis convex (Q+

c ). When the query region Q is convex, anypoint on the line segment between two points x1 2 Q andx2 2 Q is also in Q. Then we have the following definition.

Definition 3.1 (Positive Region) Denote the examples

that have been labeled as “positive” as L+ = {e+i | i =

1, . . . , n+}. The convex hull of L+is known to be the smallest

convex set that contains L+[27] and is called the positive

region, denoted as R+.

It is known that the convex hull of a finite number of pointsis a convex polytope [17]. For example, the green trianglein Fig. 3(a) and the green tetragon in Fig. 3(b) are thepositive regions formed by three and four positive examples,respectively, which are an approximation of the query regionmarked by the green ellipse. We can prove the followingproperty of the positive region for convex queries, assumingthat user labels are consistent with her interest:

Proposition 3.1 All points in the positive region R+are

positive.

All proofs in this paper are left to Appendix A of ourtechnical report [22] due to space constraints.

+"

+" +"

_"

+" +"

(a) A positive region(green) with 3 examples,and a negative region (red)with 1 negative and 2positive examples

`

+

+ +

_

+

+

_

_

__

(b) A positive region (green)and 5 negative regions (red)built from 5 positive examplesand 5 negative examples.

Figure 3: Positive and negative regions in the polytope model.

Definition 3.2 (Negative Region) For a negative exam-

ple e�i , we can define a corresponding negative region R�

i

such that the line segment connecting any point x 2 R�i

and e�i does not overlap with the positive region R+

, but

the ray that starts from x 2 R�i and passes through e�

i will

overlap with R+. More formally, R�

i = {x|xe�i \ R+ =

; ^��!xe�

i \ R+ 6= ;}. Given n�negative examples, the nega-

tive region R�is the union of the negative region for each

negative example, i.e., R� = [n�i=1R

�i .

From the definition, we know that R�i is a convex cone

generated by the conical combination of the vectors fromthe positive examples to the given negative example, i.e.,���!e+

j e�i (j = 1, . . . , n+). The red triangle in Fig. 3(a) depicts

such a convex cone. However, the union of R�i , i = 1, 2, . . . is

non-convex. For example, the union of the five red polygonsin Fig. 3(b) is non-convex. Given more labeled examples, theresult of the union will be more accurate for approximatingthe true negative region, which is outside the ellipse. Weprove the following property of the negative region:

Proposition 3.2 All points in the negative region R�are

negative.

Definition 3.3 (Uncertain Region) Denote the data

space as Rd, the uncertain region Ru = Rd � R+ � R�

.

Formally, the polytope model makes a decision about anexample x based on the following decision function, whichtakes values in {�1, 0, 1} corresponding to R�, Ru, and R+

defined above:

FD(x) = 1 · (x 2 R+) � 1 · (x 2 R�). (1)

Our work also supports the case that the negative regionof the query is convex (Q�

c ). We can simply switch theabove definitions such that we build a convex polytope forthe negative region, and a union of convex cones for thepositive region, one for each positive example. We also o↵era test at the beginning of the data exploration process tochoose between two polytope models, Q 2 Q+

c or Q 2 Q�c .

The details are deferred to Section 4 where we o↵er a testprocedure for all the assumptions made in the work.

74

Page 5: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

Three-Set Metric. Our goal is not only to provide anew data space model, as described above, but also to designa new learning algorithm that enables a provable bound onthe model accuracy. As stated before, our accuracy measureis F1-score. Formally, F1-score is evaluated on a test set

Dtest = {(xi, yi)}, where xi denotes a database object andyi denotes its label according to the classification model.Then F1-score is defined as:

F1-score = 2 · precision · recallprecision + recall

,

where precision is the fraction of points returned from Dtest

by the model that are positive, and recall is the fraction ofpositive points in Dtest that are returned by the model.

However, capturing F1-score in our data exploration pro-cedure is di�cult because we do not have such a labeled testset, Dtest, available. We cannot a↵ord to ask the user to la-bel more to produce one since the user labor is an importantconcern. To bound the F1-score with limited labeled data,our idea is to run our polytope model, FD : Rd ! {�1, 0, 1},on an evaluation set. We define the evaluation set Deval asthe projection of Dtest without labels yi’s. Then for eachdata point in Deval, depending on which region it falls into,Deval can be partitioned into three sets accordingly, denotedas D+, D� and Du. We can compute a metric from thenumber of data points in the three sets, as follows.

Definition 3.4 (Three-Set Metric) Denote D+ =Deval \ R+

, D� = Deval \ R�, Du = Deval \ Ru

, and |S|means the size of set S. At a specific iteration of exploration,

the three-set metric is defined to be|D+|

|D+|+|Du| .

We will prove shortly that this metric is a lower bound ofF1-score evaluated on Dtest. As more labeled examples areprovided, data points will be moved from Du to either D+

or D�. Eventually, with enough training data the uncertainset shrinks to an empty set and the Three-Set Metric risesto 100%, reaching convergence.

3.2 Dual-Space Model and AlgorithmWe now propose a new algorithm for interactive data

exploration by exploiting models from two spaces, includingour data space model FD with the Three-Set Metric, and aclassification model FV with uncertainty sampling derivedfrom the version space.

We first define the dual-space model (dsm) by consideringtwo functionalities of a model for data exploration.

(1) Prediction: Given an unlabeled example, dsm predictsthe class label first based on the data space model FD. If theexample falls in the positive region R+, it is predicted to bepositive; if it falls in the negative region R�, it is predictedto be negative. If the example falls in the unknown regionRu, then the classification model FV is used to predict theexample to be positive or negative.

(2) Sampling: In the active learning framework, the modelis also used to guide the choice of the next example forlabeling such that the new label can lead to significant im-provement of the model accuracy. As discussed in Section 2,active learning uses an uncertainty sampling method, SV ,for a given classification model to choose the next example.However, directly application of uncertainty sampling to ourdual-space model raises a problem: the example chosen bySV may fall in the known positive or negative region of our

data space model FD, hence wasting computing resourceson such examples. In our work, we propose an uncertaintysampling method that is restricted to the unknown regionof our data space model, denoted as SD. However, if wesample only from the unknown region of our data spacemodel, we may not get a representative sample to train theclassifier. Therefore, we use a sampling ratio, �, to alternatebetween the sampling methods, SD and SV . For instance,when � = 1/3, in each iteration we use SD with probability1/3 and use SV otherwise.

Now we present the full algorithm for interactive dataexploration, as shown in Algorithm 1. The input is thedatabase D, a positive example x+, a negative examplex�, a user-defined accuracy threshold �, and the samplingratio �. First, we extract an evaluation dataset Deval fromthe database D (line 1). For now, let us assume Deval

to be D. Then we initialize data structures, setting theunknown partition of the evaluation dataset to be Deval.The algorithm next goes through iterative exploration.

Lines 8-14 update our dsm model. The data space model,R+ and R�, is updated with the newly labeled example(s)by the user (lines 8-9). This step incrementally updates ourconvex polytope for R+ and the union of convex polytopes forR� based on computational geometry [3]. Afterwards, thecorresponding partitions of Deval are incrementally updated(line 10). In this step, some examples are removed from theunknown partition Du and placed to the positive partitionD+ or the negative partition D�. The accuracy is thenestimated using the Three-Set Metric. We also keep trackof the labeled and unlabeled examples using Dlabeled andDunlabeled. We use the labeled examples to train a classifier,that is, the version space model in our dsm.

Then lines 15-28 implement uncertainty sampling usingdsm. With probability �, we perform uncertainty samplingfrom a pool that is restricted to the unknown partition of theevaluation set, Du. Then the example chosen by uncertaintysampling is labeled by the user. With probability 1 � �, weperform uncertainty sampling from a pool that is a subsampleof all unlabeled examples in the database. Then the examplechosen by uncertainty sampling is first run through our dataspace model, (R+, R�), to see if it falls in the positive ornegative region and hence can be labeled directly by themodel. Otherwise, it will be labeled by the user.

Then the algorithm proceeds to the next iteration. Itrepeats until it has met the user accuracy requirement basedon the lower bound o↵ered by our Three-Set Metric, orreached the maximum of iterations allowed (line 29). Finally,we run the dsm model over the database to retrieve all tuplespredicated to be positive. For the subsample proceduresused in the algorithm, we defer their details to Section 3.4.

3.3 Lower Bounds of F1-scoreGiven how the dsm algorithm works, we now present formal

results on the model accuracy achieved by dsm.Exact Lower Bound. We begin with an exact lower

bound of our accuracy measure, the F1-score.

Theorem 3.1 The Three-Set Metric evaluated on Deval is

a lower bound of the F1-score if dsm is evaluated on Dtest.

The lower bound of dsm has several features. First, it isan exact lower bound throughout the exploration process forany evaluation set Deval. Second, the metric is monotonic

75

Page 6: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

Algorithm 1 Dual-Space Algorithm for Convex Queries

Input: database D, a positive example x+, a negative example x�,accuracy threshold �, sampling ratio �

1: Deval subsample(D, n)2: R+ ;, R� ;3: D+ ;, D� ;, Du Deval4: Dlabeled { x+, x�}5: Dunlabeled D \ Dlabeled6: Dlabeled by user Dlabeled, Dlabeled by dsm ;7: repeat

// building the Dual-Space model:8: for x 2 Dlabeled by user do9: (R+, R�) updateRegion(R+, R�,x)10: (D+, D�, Du) threeSets(R+, R�, D+, D�, Du)11: accu threeSetMetric(D+, D�, Du)12: Dlabeled.append(Dlabeled by user [Dlabeled by dsm)13: Dunlabeled.remove(Dlabeled by user [Dlabeled by dsm)14: classifier trainClassifier(Dlabeled)

// uncertainty sampling:15: Dlabeled by user ;, Dlabeled by dsm ;16: if rand() � then17: pool subsample(Du, m)18: x getNextToLabel(pool, classifier)19: Dlabeled by user getUserLabel(x)20: else21: pool subsample(Dunlabeled, m)22: x getNextToLabel(pool, classifier)23: if x 2 R+ then24: Dlabeled by dsm (x, 1)25: else if x 2 R� then26: Dlabeled by dsm (x,�1)27: else28: Dlabeled by user getUserLabel(x)29: until accu � � or reachedMaxNum()30: finalRetrieval(D, (R+, R�), classifier)

in the sense that points in the uncertain region Du can bemoved to the positive or negative region later, but not viceversa, and the metric goes to 1 when Du = ;. If the metricis above the desired accuracy threshold at some iteration,it is guaranteed to be greater than the threshold in lateriterations, so we can safely stop the exploration.

Approximate Lower Bound. When Deval is too large,we employ a sampling method to reduce the time to evaluatethe Three-Set Metric. Let p and q be the true proportionsof the positive and negative examples in Deval, i.e., p =|D+|/|Deval| and q = |D�|/|Deval|. Then the Three-Set

Metric is b =p

1 � q. Let p and q be the observed proportions

of the positive and negative examples in a random draw of

n examples from Deval, and let Xn =p

1 � q. Our goal is to

find the smallest sample size n such that the error of theestimation Xn from the exact Three-Set Metric is less than �with probability no less than �. That is, Pr(|Xn�b| < �) � �.

The following theorem helps us find the lower bound of n.

Theorem 3.2 sup✏kPr(p

n|Xn�b|<✏)�

2�(✏(1�q)pp(1�p�q)

)

�1

!k = O(1/

pn) for any ✏, where � is the cumulative

distribution function of the standard Normal distribution.

With the theorem, we can approximate the sample size by

2�(

pn�(1 � q)p

p(1 � p � q)) � 1 � �.

Since p(1�p�q)/(1�q)2 1/4, it is su�cient for n to satisfy

2�(2p

n�) � 1 � � and therefore n ����1

��+1

2

��2/(4�2).

3.4 Optimization of Sampling MethodsSampling for creating the evaluation set (OPT1).

In line 1 of Algorithm 1, we construct an evaluation set Deval

to develop a lower bound of the dsm model. Ideally, we wantDeval to be as large as the entire database D. For e�ciency,we can only a↵ord to have a memory-resident sample. Theanalysis in Theorem 3.2 indicates that we can choose a sampleof size n from the database, and achieve an approximate lowerbound of the F1-score of our dsm algorithm when evaluatedon the database. The sample, denoted as Deval, will expediteline 10 of Algorithm 1. For example, the SDSS databaseused in our experiments contains 190 million tuples. Denotethe true lower bound as b, when n = 50k, our approximatelower bound b approximates b by ✏ .005 with probability0.975 or higher. When n = 1.9 million, b approximates b by✏ .001 with probability 0.994 or higher.

Sampling for pool-based active learning (OPT2).Algorithm 1 contains two subsample procedures for pool-based uncertainty sampling, that is, choosing the most uncer-tain example from the pool for labeling next. The subsampleroutine in line 17 creates a pool of unlabeled examples fromthe uncertain partition of the evaluation set, Du, which ismemory-resident. This can be implemented using reservoirsampling. The subsample routine in line 21, however, createsa pool, from the unlabeled portion of the entire database,which is large and not materialized. Our work o↵ers asampling-based optimization to avoid scanning the unlabeleddatabase in each iteration. Due to space constraints theinterested reader is referred to [22] for details.

4. FACTORIZATIONAlthough dsm can reduce user labeling e↵ort and o↵er

better accuracy than traditional active learning, increaseddimensionality will make the volume of its uncertain re-gion grow fast and degrade its performance. To handle thisissue, we leverage the property of conjunctive queries tofactorize a high-dimensional data space into a set of low-dimensional spaces. By running the polytope model in eachlow-dimensional space, we can “simulate” dsm in the high-dimensional space with improved performance. This exten-sion, denoted as dsmF , may require user labels of examples insome subspaces: If the user label is positive for an example,the label in each subspace is inferred to be positive. How-ever, if the user label is negative for an example, she will beasked to specify the subset of attributes (and the subspacesthereof) that lead to the negative label. Since the user hasgone through thinking when deciding the label, specifying asubset of attributes that lead to the negative label can befacilitated via a graphical interface such as in [11].

Factorization for dsc queries. Formally, factorizationconcerns a user interest query Q defined on an attributeset A of size d, and can be written in the conjunctive form,Q1 ^ . . . ^ Qm. Each Qi, i 2 [1 . . . m], uses a subset ofattributes Ai = {Ai1, · · · , Aidi}. The family of attribute sets,A = (A1, · · · , Am), is pairwise disjoint with d =

Pmi=1 di,

and is called the factorization structure.In practice, we can derive the factorization structure from

available data in a database. It is a partitioning of thedatabase attributes with two properties: 1) Each attribute

76

Page 7: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

(a) A query in the dsc family is not con-vex in either the positive region (green)or the negative region (red).

A

D

C

B

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

x-y

z

(b) A positive region built from 4 positivepoints, {A, B, C, D}

A

D

C

B

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

A

D

"↑− 

C

B

(a) Case 1A

D

"↑− 

C

B

(b) Case 2

A

D

"↑− 

C

B

(c) Case 3

Figure 5: Illustration of positive and negative regions in factorized space.

an example, the label is certainly positive in each subspace. How-ever, if the user label is negative for an example, she will be askedto highlight the specific set of attributes (and the subspaces thereof)that lead to the negative label. This can be easily achieved througha graphical interface such as in [12].

Positive and negative regions in factorized space. Formally,factorization concerns a user interest query Q that involve d at-tributes and can be written in the conjunctive form, Q1 ^ · · ·^Qm,where each QI is convex in the positive region6 and contains anattribute set AI = {AI1, · · · , AIdI }, with AIj representing thejth attribute in the Ith partition. A family of attribute sets, A =(A1, · · · , Am), is pairwise disjoint. The total dimension is d =Pm

I=1 dI . Then in the Ith subspace defined by AI , the positiveand negative regions of QI can be defined as in Definition 3.1 and3.2, but based on the “positive” and “negative” examples labeledfor QI . We denote these positive and negative regions in the Ith

subspace as R+I and R�

I , respectively.We note that a positive example with respect to Q implies that its

projection in every Ith subspace satisfies Qi. However, a negativeexample with respect to Q implies that there exists at least onesubspace, I , where the example’s projection is negative for QI ,while there may still other subspaces, I � 6= I , where the example’sprojection satisfies QI� .

Next we build the positive and negative regions of the query Qfrom the positive and negative regions in the subspaces:

R+f = ⇥m

I=1R+I , R�

f = ⇥mI=1(R

�I )c (1)

where each R+I (or R�

I ) is interpreted equally as a geometric objector the set of all possible points enclosed in the object, ⇥ representsthe Cartesian product between two sets, and Rc represents the com-plement of set R. Therefore, the uncertain region of Q is

Ruf = Rd � R+

f � R�f

Finally, denote the entire dataset as D and the evaluation set asDeval. The definitions of positive, negative, and uncertain parti-tions of Deval are the same as in Definition 3.4 with the three re-gions replaced by R+

f , R�f , and Ru

f .Formal results on factorization. When the true query is con-

junctive, taking advantage of the factorization property of the dataspace proves to be effective for enlarging the positive and nega-tive regions known to the DSM algorithm and hence reducing theuncertain region. Formally, we have the following results.

Proposition 4.1 All points in the positive region R+f are positive

and R+ ✓ R+f at each iteration of the data exploration process.

6[As mentioned before, each QI can also be convex in the negative region.However, in the interest space our discussion focuses on the case of convexpositive regions.]

PROOF. For each point x = (x1, · · · , xm) 2 R+f where xI

denotes the values of x on attributes AI , we have xI 2 R+I , 8I 2

Z \ [1, m]. According to proposition 3.1, all points in R+I are

positive for QI . Therefore, x is positive for Q = Q1 ^ · · · ^ Qm.To prove the second part of the proposition, we see that the

Cartesian product of convex sets is convex, so R+f is convex by

definition. At each iteration, given a finite set of positive points{x}, R+ and R+

f are constructed on {x}. Since R+ as a convexpolytope is the smallest convex set that contains {x}, we concludeR+ ✓ R+

f .

Proposition 4.2 All points in the negative region R�f are negative

and R� ✓ R�f at each iteration of the data exploration process.

PROOF. If a point x = (x1, · · · , xm) 2 R�f , then there exists

some subspace spanned by attributes AI such that xI 2 R�I . Since

all points in R�I are negative for QI based on proposition 3.2, and

the target query Q is in a conjunctive form, x is negative for Q.To prove R� ✓ R�

f , it is sufficient to prove that every arbitraryconvex cone that R� is built upon, is contained by R�

f . Let e�

be the apex of a convex cone R�e� in Definition 3.2. Since e� is

negative for Q, there exists I such that its factorization vector e�I

is negative for QI . Let �I(R�e�) be the projection of the cone R�

e�

onto the subspace spanned by AI . Then for a point x 2 R�e� ,

xI 2 �I(R�e�).

Now define the convex cone construction in the subspace spannedby AI with e�

I as apex as

R�e�

I

= {xI 2 RdI |xIe�I \ R+

I = ; ^���!xIe�

I \ R+I 6= ;}.

We will now show that �I(R�e�) ✓ R�

e�I

.

We have

�I(R�e�) = {xI 2 RdI |xIe�

I \�I(R+) = ;^

���!xIe�

I \�I(R+) 6= ;}.

Since xI 2 �I(R�e�) and �I(R

�e�) is a negative convex cone,

xIe�I \ R+

I = ; is true. On the other hand, since �I(R+) ✓ R+

I ,���!xIe�

I \ �I(R+) 6= ; implies

���!xIe�

I \ R+I 6= ;. This shows

�I(R�e�) ✓ R�

e�I

.

Therefore xI 2 �I(R�e�) ✓ R�

e�I

✓ R�I , and x 2 R�

f . Finally,

R�e� ✓ R�

f for any e�, and hence R� ✓ R�f .

Proposition 4.3 Factorized DSM improves the Three-Set Metric,the lower bound of the model accuracy in F1-score.

x-y

z

(c) 4 positive points {A, B, C, D} and 1negative point (e�), where e� is negativein the (x-y) subspace and positive in the(z) subspace

Figure 4: Illustration of factorization when 3D space (x-y-z) is factorized into two subspaces (x-y) and (z).

can appear in only one partition. 2) If several attributesmay be used in the same predicate (e.g., the positionalattributes rowc-colc, or the velocity attributes rowv-colvfrom SDSS), they must be assigned to the same partition. Ifa query trace is available to show how attributes are usedin predicates, e.g., individually or in a pair, we can run asimple algorithm over the query trace: Initially assign eachattribute to its own partition. As the query trace is scanned,two partitions are merged if a predicate uses attributes fromthe two partitions. At the end, all the remaining partitionsbecome the factorization structure A. Even if a querytrace is not available, it is not unreasonable to assume thatby working with domain experts, it is possible to extract areasonable factorization structure that reflects how attributesare used based on their semantics, e.g., the velocity attributesrowv-colv are often used in the same predicate.

dsc Queries. We next define a class of user interest queriesthat dsmF supports with benefits over active learning: that is,8i = 1, . . . , m, either the positive region in the ith subspace,defined as {xi 2 R|Ai||Qi(xi) > 0}, is convex (in the Q+

c

class), or the negative region, {xi 2 R|Ai||Qi(xi) < 0} is con-vex (in Q�

c ). We call such queries Decomposable Subspatial

Convex (dsc) queries.dsc allows us to combine a subspace whose positive region

is convex with another subspace whose negative region isconvex. However, the global query is not necessarily convexin either the positive or negative region. Fig. 4(a) shows anexample query, Q = x2 + y2 > 0.22 ^ 480 < z < 885, whichcombines the ellipse pattern in Fig. 2(d), whose negativeregion is convex, with the line pattern in Fig. 2(a), whosepositive region is convex. In the 3D space, the negativeregion (marked in red) is the union of the red cylinder in themiddle of the figure and the red rectangles above and belowthe cylinder, while the positive region (marked in green) isthe complement of it. Neither of the positive nor the negativeregion of Q is convex although it belongs to dsc.

p-dsc Queries. We also support a superset of dsc queries,where the convex assumption holds only in some subspaces.We call this generalization partial factorization or p-dsc.

As a special case, if none of the subspaces permits theconvexity property, we call such queries Zero dsc or 0-dsc.

Polytope model with factorization and DSMF .Given the factorization structure, the polytope model runs ineach subspace where the subspatial convexity is deemed true.First, in the ith subspace defined by Ai, Qi’s positive andnegative regions, denoted as R+

i and R�i , are built according

to Definition 3.1 and 3.2, but based on the “positive” and

“negative” labels of projected examples for Qi, as describedabove. Then we build the positive and negative regions ofQ from the positive and negative regions in the subspacesvia the conjunctive property:

R+f = ⇥m

i=1R+i , R�

f =�⇥m

i=1(R�i )c�c (2)

where ⇥ denotes the Cartesian product between two sets,and Rc denotes the complement of set R. Then the uncertainregion of Q is, Ru

f = Rd � R+f � R�

f .Next we formally define the decision function for the poly-

tope model with factorization. In each subspace defined onAi, let FAi : R|Ai| ! {�1, 0, 1} be the decision function thatdivides the subspace into three disjoint regions correspondingto the negative, unknown, and positive regions, respectively.As in (Eq. 1),

FAi(x) = 1 · (x 2 R+i ) � 1 · (x 2 R�

i ). (3)

For p-dsc queries, if the subspatial convexity is deemed nottrue in a subspace, the value of its decision function is aconstant zero.

The global decision function for the polytope model withfactorization over the entire data space is then

FDf (x) = minmi=1 FAi(xi) (4)

where x = (x1, . . . , xd), and xi denotes the projection of xon the ith subspace defined by Ai.

Finally, consider the dual-space model. Let dsmF be dsmin §3.2 with the polytope data space model FD replacedby the polytope model with factorization FDf . Then the

dual-space decision function of dsmF , H : Rd ! {�1, 1}, is:

H(x) =

⇢FDf (x), FDf (x) 6= 0FV(x), otherwise

(5)

where FV is the classification model. H is our final predictionmodel returned to approximate the user interest query. For0-dsc queries, dsmF simply runs traditional active learning.

Illustration. Before presenting the formal results, we il-lustrate the intuition that factorization allows us to constructthe positive and negative regions (R+

f , R�f ) as supersets of

(R+, R�), hence reducing the unknown region and o↵er-ing better accuracy. Fig. 4(b) shows four positive pointsA, B, C, D when the 3D space (x-y-z) is factorized into twosubspaces (x-y) and (z). It depicts the positive region R+ asthe pyramid shaded in grey and marked by the green lines.When we factorize R+ into (x-y) and (z) planes, we haveR+

xy as a triangle marked ABC and R+z as a line segment

77

Page 8: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

projected onto z. Then we construct R+f from the triangle

and the line segment based on Eq. 2, we obtain a prismmarked by the blue lines, which is much bigger than R+.

Fig. 4(c) shows a negative point e� and the negative regionconstructed for it. R� is a convex cone shaded in grey andbounded by the solid purple rays emitting from e�. Whene� is projected onto (x-y), it is negative and defines a convexcone R�

xy marked by the two solid red lines in the (x-y) plane.When e� is projected onto z, it lies in the positive region.According to Eq. 2, the new negative region R�

f extends the

convex cone R�xy by all possible values of z, resulting in a

geometric shape enclosed by the three solid red lines in thefigure. Again, the new R�

f is much larger than R�.Formal results. For both dsc and p-dsc queries, we o↵er

formal results of the polytope model with factorization.

Proposition 4.1 All points in the positive region R+f are

positive and R+ ✓ R+f at each iteration of the data explo-

ration process.

Proposition 4.2 All points in the negative region R�f are

negative and R� ✓ R�f at each iteration of the data explo-

ration process.

Proposition 4.3 dsmF improves the Three-Set Metric, the

lower bound of the model accuracy in F1-score, over dsm.

Proposition 4.1 and Proposition 4.2 state that the positiveand negative regions constructed via factorization, (R+

f , R�f ),

are a superset of (R+, R�) that the original dsm o↵ers.Hence, the lower bound of F1-score built from (R+

f , R�f ) is

higher than that from (R+, R�) based on Def. 3.4.Testing assumptions of dsmF . Factorization replies

on two assumptions, which our system will test when auser is performing data exploration online. The first as-sumption is that we have a correct factorization structure,A = (A1, · · · , Am), for a database derived from its querytrace or schema. The second assumption is that user inter-ests take the form a conjunctive query (CQ). In fact, oursystem o↵ers a simple extension of dsm to handle categoricalattributes, which is left to [22] in the interest of space. Withthis extension, the class of user interest queries is an extended

class of conjunctive queries, in the form of P1 ^P2 ^ . . ., suchthat either Pi is an individual predicate, or Pi is defined ona categorical attribute A and can take the disjunctive form,(A = 1) _(A = 2) _ ...

Test Procedure. When either the factorization structureor the CQ assumption is wrong, we start to see conflictingexamples in a polytope model for a specific subspace, i.e., apositive example labeled by the user appears in the negativeregion or vice versa. Based on this, our system uses thefollowing procedure to test online both assumptions behinddsmF . At the beginning of data exploration, we build twopolytope models for each subspace, one under the assumptionthat the positive region is convex, Q+

c , the other under theassumption that the negative region is convex, Q�

c . Overiterations, we count the number of conflicting examples ofthese two polytope models, and use a threshold, T , to turno↵ a polytope model if its count exceeds T . If both polytopemodels remain active in a given iteration, the one with thesmaller count will be used; in the case of a tie, the modelfor Q+

c will be used as more query patterns belong to this

class. When both polytope models for a subspace are turnedo↵, we use partial factorization until they are turned o↵for all subspaces, when we resort to the classifier. The testprocedure also allows dsmF to handle noisy user labeling byadjusting the threshold T , the number of conflicting examplesthat can be tolerated by each polytope model.

5. ONLINE FEATURE SELECTIONThe user exploration task may start with more attributes

than those included in the final learned model (user interestquery). The attributes that are not included in the finalmodel are noise in data exploration and cause slow conver-gence of the model. To remove such noisy attributes, weemploy both o✏ine dimensionality reduction on the databaseand online feature selection techniques.

We examined dimension reduction methods including PCAfor o✏ine compression, and Random forests (RF) and Gra-dient boosting regression trees (GBRT) for online featureselection. Since these are standard methods, we leave theirdescription and evaluation to [22]. We found that GBRTworks best for reducing dimensions. Therefore, we outlinehow GBRT is used for online feature (attribute) selection inour work. In each iteration of data exploration, we feed alllabeled examples to the GBRT learner, and ask the learnerto return the top-k features that are deemed most importantin learning. Then we build the classifier using these featuresand select the next example for labeling. We repeat the twosteps in each iteration until the choice of top-k features stabi-lizes. Then we build the full dsmF model until it converges.However, we observe two limitations of this approach:

Unbalanced training data. GBRT is very sensitiveto unbalanced classes, that is, when the training data isdominated by the negative examples. This is common in dataexploration because the true user interest is often a highlyselective query. We draw upon two insights in this work tomitigate the imbalance problem. First, when applicable, ourdsmF algorithm already maintains a list of positive examplesfrom the evaluation set and we can add them to make thetraining data balanced. Second, before dsmF accumulatesenough positive examples, we can also boost GBRT usingsynthetic positive data: if the user interest has a convexshape, as long as there are two positive examples, we candraw points from the line that connects these two examples,and treat these points as synthetic positive examples tobalance the training data.

How many features to select? Another issue is thatwe do not know how many features to select, or the exactvalue of top-k. The user does not o↵er this information apriori. Choosing the right value of k is nontrivial becauseGBRT may not have high confidence for selecting the correctfeatures in earlier iterations. To formalize the notion ofconfidence, we utilize the feature importance scores providedby GBRT. GBRT is a linear combination of decision tree base-learners, where each decision tree intrinsically selects featuresfor splitting nodes. For each decision tree, the importancescore of a feature is computed as weighted sum of impuritydecreases for all the nodes where the feature is used [6]. Thenthis score is averaged over all trees. Given feature importancescores, we propose two strategies to characterize “su�cientconfidence” of GBRT for feature selection.

Proportion of nonroot trees: The intuition is that all deci-sion trees must be weak learners and hence find some featuresuseful in distinguishing the positive class from the negative

78

Page 9: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

Table 1: Query templates with di↵erent selectivity values

Query template

Q1 (rectangle): rowc 2 [a1, a2] ^ colc 2 [b1, b2]Q2 (ellipse): ((rowc� a1)/b1)2 + ((colc� a2)/b2)2 < c2

Q3 (rectangle): ra 2 [a1, a2] ^ dec 2 [b1, b2]Q4 (outside a circle): rowv2 + colv2 > c2

Q5: 4D queries combining two queries from Q1-Q4Q6: 6D queries combining three from Q1-Q4Q7: 6D-11D queries with 4-9 irrelevant attributesQ8: 4D, (x1 > a + b · x2) ^ (x3 + c · log10 x2

4 < d)

class. Based on this intuition, we wait until the iterationwhere all trees become nonroot trees, hence likely to be weaklearners. Then we believe that the confidence of GBRT hasreached a su�cient level.Entropy of Importance Scores (EIS): The next intuition

is that we prefer to have a lower entropy of the importancescores across all the features. That is, the distribution ofimportance scores departs from a uniform distribution andbecomes concentrated. Based on this, our second strategy isto wait until EIS has dropped significantly below the expectedentropy of uniform importance scores, i.e., the importancescores of some features really stand out. Then we think thatthe confidence of GBRT has been su�cient.

Adaptive Feature Selection: We next devise adaptive strate-gies to decide top-k features, depending on whether the cur-rent iteration has reached the point of su�cient confidencefor feature selection, based on any of the above strategies.Before reaching this point, we perform conservative featurefiltering: we select top-k features that account for 50% ofthe total feature importance scores. After GBRT reaches thepoint of su�cient confidence, we perform aggressive featureselection by scanning the ranked list of feature importancescores and choosing the top-k features such that the kth

feature and the k + 1th feature have the largest gap in theranked list. When GBRT chooses the same top-k featuresfor 10 iterations, we consider the choice of relevant featuresstable and use them to build dsmF .

6. EXPERIMENTAL EVALUATIONWe implemented all of our proposed techniques in a

Java-based prototype for data exploration, which connectsto a PostgreSQL database. In this section, we evaluateour techniques and compare to recent active learning algo-rithms [5, 15], active search [16], and explore-by-examplesystems, Aide [12, 13] and LifeJoin [9].Datasets: Our evaluation used two datasets. (1) SDSS (190million tuples) contains the “PhotoObjAll” table with 510attributes. By default, we used 1% sample (1.9 million tuples,4.9GB) to create an evaluation set for dsm and for pool-based uncertainty sampling – our formal results in Section 3.4allowed us to use the 1% sample for data exploration, yet withbounded di↵erence of ✏ .001 from the accuracy achievedover the full database with probability �0.994. (2) Cardatabase (5622 tuples): this small dataset is used for ouruser study because it is more intuitive for users to performexplorative analytics. We defer a detailed discussion to §6.3.User Interest Queries: We extracted 8 query templatesfrom the SDSS query release [38] to represent user interests.They allow us to run simulations of user exploration sessions,as in [12,13], by using the true query answers as the proxyfor user labeling. The 8 templates are shown in Table 1.Each template is instantiated with di↵erent constants to

vary query selectivity in [0.01%, 10%]. In particular, Q1-Q3represent patterns that are convex in the positive region (Q+

c ).Q4 retrieves tuples outside a circle, hence in the Q�

c class.Q5-Q7 combine these attributes, optionally with irrelevantattributes, for scalability tests. Q8 includes a predicate onx1 and x2 that belongs to Q+

c , and a log predicate on x3 andx4 that belongs to Q�

c if x4 > 0 or is non-convex if x4 2 R.

6.1 Dual-Space Algorithm with FactorizationWe evaluate our Dual-Space Model (dsm) and compare it

to two ML techniques: (i) Active Learning (AL) runs uncer-tainty sampling [5,15] to obtain labeled examples for buildinga classifier, which is the version space part of dsm. We runAL with an SVM or a standard kNN classifier (kNN+). (ii)Active Search (AS) [16] also follows an iterative procedureof asking the user to label an example and training a newmodel to guide the selection of the next example, but uses astrategy to maximize the number of positive examples in theset of selected examples, not classification accuracy. It usesa special variant of kNN classifier to enable optimization,denoted as kNN�. All tests were run up to 500 labeledexamples or when the lower bound of F1-score reaches 99%.In all plots, the x-axis is the number of labeled examples.

Expt 1 (2D queries): We run 2D queries from templatesQ1 to Q4. Since the results show similar trends, we showthe F1-score, lower bound, and time measurement for Q3(1%) in Fig. 5(a)-5(d).

Regarding accuracy, dsm outperforms AL, and AL out-performs AS. (1) A factor that a↵ects performance is thedata distribution around the decision boundary B of the userinterest query. If B falls into a sparse region, separating thepositive and negative classes is relatively easy for dsm andAL. Fig. 5(a) shows that for Q3 whose decision boundaryis in a sparse region, dsm and AL-svm converge within 10labeled examples. However, AS performs poorly, with F1-score less than 20%. The reason is that AS compromisesrecall by searching close to existing positive examples. Incontrast, dsm and AL aims to maximize classification accu-racy by sampling the most uncertain region of the model,e.g., close to the decision boundary, hence o↵ering betterF1-score. (2) If B falls into a dense data region, learningan approximate B that can accurately divide all unlabeleddata points requires more labeled examples. To reach 95%accuracy, dsm requires 100 labeled examples for Q3 and 90examples on average for Q1-Q4. AL works better with theSVM than the kNN classifier, but even AL-svm cannot reach95% for Q3 or most other workloads. Finally, AS performsmuch worse than AL-knn+ while both use a kNN classifier.dsm further o↵ers a lower bound in F1-score. Fig. 5(c)

shows that the lower bound is quite close to the true F1-score.The time cost of dsm depends on the sampling method.

Recall from Algorithm 1 that with probability �, it samplesfrom the unknown partition of the polytope model, Du; oth-erwise, it does so from a subsample of the unlabeled examplesin the database, Dunlabeled. �=0 leads to high time costsbecause the examples retrieved from Dunlabeled may repeat-edly fall in the positive or negative region of the polytopemodel, wasting resources with no new information. �=1 and�=0.5 significantly reduce the time cost, with �=0.5 o↵eringslightly better accuracy due to balanced sampling. However,both settings exhibit a spike in time cost in the early phase,which is the time to build the polytope model the first timeby scanning the entire evaluation set. Finally, we improve

79

Page 10: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

0

0.2

0.4

0.6

0.8

1

0 20 40 60 80 100

F1-sc

ore

Iteration

DSMAL-SVM

AL-KNN+

AS-KNN-

(a) F-score for Q3 (1%, sparse region)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSMAL-SVM

AL-KNN+

AS-KNN-

(b) F-score for Q3 (1%, dense region)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSM truthDSM lower bound

(c) Lower bound for Q3 (1%, dense region)

0.01

0.1

1

10

100

1000

10000

0 100 200 300 400 500 600

Time

per i

terati

on (s

ec)

Iteration

DSM(γ=0)DSM(γ=0.5)

DSM(γ=1)DSM(γ=0.5,OPT1)

AL

(d) Time per iteration for Q3 (1%, dense)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSMFDSM

AL-SVMAL-KNN+

AS-KNN-

(e) F-score for Q2+Q3 (0.1%, dense)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSMF truthDSMF lower boundDSM lower bound

(f) Lower bound for Q2+Q3 (0.1%, dense)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSMFAL-SVM

AL-KNN+

AS-KNN-

(g) F-score for Q2+Q3+Q4 (0.01%, dense)

0.01

0.1

1

10

100

0 100 200 300 400 500 600

Time

per i

terati

on (s

ec)

Iteration

DSMF(γ=0.5)DSMF(γ=0.5, OPT1)

AL

(h) Time for Q2+Q3+Q4 (0.01%, dense)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSMF(DSC)AL-KNN+

DSMF(p-DSC)AS-KNN-

AL-SVM

(i) Full vs. partial factorization with Q8

Figure 5: dsm with factorization for 2D, 4D, and 6D queries, compared to Active Learning (AL) and Active Search (AS) algorithms

�=0.5 with the optimization (OPT1) from Section 3.4, wherewe start with a smaller evaluation set to avoid the initialspike, but later switch to a larger evaluation set once itspolytope model is built completely in the background. Thisoptimization keeps the time cost per iteration within a secondand will be used as the default algorithm.

Expt 2 (4D-6D queries): We next show results of 4D-6Dqueries in dense regions as they present harder workloads.The main results of Fig. 5(e)-5(h) are: (1) Without factor-ization, dsm performs similarly to AL because the polytopemodel is dominated by the uncertain region. Then dsmF

dramatically shrinks the uncertain region, and improves thelower bound and F1-score. (2) Consistently, dsmF outper-forms AL, which further outperforms AS. Fig. 5(g) showsthat for the 6D query, dsmF reaches 95% with 240 examples,AL-svm cannot reach 40% with 500 examples, and AS hasF-score close to 0. (3) dsmF can keep the time per iterationwithin 1-2 seconds, as shown in Fig. 5(h) for the 6D query.

Expt 3 (Partial factorization): We next generate twoqueries from Q8 with 7.8% selectivity (based on the constantsused in SDSS). Q8.v1 is in the dsc family because its positiveregion is convex in the (x1, x2) subspace, and its negativeregion is convex in (x3, x4). Q8.v2 is in the p-dsc familybecause it is non-convex in (x3, x4). Hence, dsm supportsQ8.v2 with partial factorization. Fig. 5(i) shows that dsmF

works better for the dsc query than p-dsc query, as expected,

but even partial factorization works much better than (i)AL, which does not reach 60% after 500 labeled examples,and (ii) AS, which cannot achieve more than 5% accuracy.

Expt 4 (Feature selection for 6D-11D queries): We nowevaluate the optimizations proposed for GBRT as an onlinefeature selection method in Section 5. To do so, we use thetemplate Q7. Since the major results are similar, below wereport results by extending Q2 with 4 irrelevant attributes(making it a 6D query) or with 9 irrelevant attributes (makingthe query 11D). Without feature selection, the F1-score is0 for these queries. As Fig. 6(a) shows, feature selectionimproves the F1-score to above 80% for all of them. Asstated earlier, GBRT is sensitive to selectivity and hence thecombination of high dimensionality (11D) and low selectivity(0.1%) represents the hardest workload among the three.

6.2 Comparison to Alternative SystemsWe next compare our system to two state-of-the-art

explore-by-example systems: 1) LifeJoin [9] uses SVM forclassification and active learning for seeking the next examplefor labeling. But it di↵ers in the SVM implementation fromour work. We implemented LifeJoin techniques as additionalmethods in our system. 2) Aide [12,13] uses decision trees asthe classification model and customized methods for seekingthe next example for labeling. We obtained the source codefrom the authors. When comparing these systems, we ex-

80

Page 11: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

Q2+9dim(1%)Q2+4dim(0.1%)Q2+9dim(0.1%)

(a) Feature selection for Q7 (6D-11D)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

DSMAIDE

LifeJoin

(b) dsm vs Aide and LifeJoin (2D)

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

F1-sc

ore

Iteration

4D-DSMF6D-DSMF6D-AIDE4D-AIDE

6D-LifeJoin4D-LifeJoin

(c) dsm vs Aide and LifeJoin (4D, 6D)

Figure 6: Results for partial factorization, feature selection, and comparison to Aide and LifeJoin systems, and the user study.

clude the overhead to find the first positive example as thesesystems use di↵erent methods / assumptions to find them.

Expt 5: F1-score is reported in Fig. 6(b) for a 2D query,and in Fig. 6(c) for 4D and 6D queries. (1) For the 2D query,our system outperforms Aide, which further outperformsLifeJoin. Overall, LifeJoin is significantly worse in accuracy.(2) For the 4D query, Aide and LifeJoin drop to below 10% inaccuracy, while our system achieves 99% within 200 iterations.For the 6D query, again Aide and LifeJoin fail to work. Thisobservation remains for any query that we tried beyond 2D.This is due to the combination of low selectivity and highdimensionality in data exploration. Additional analysis ofthese systems is available in [22].

6.3 User Study using a Car DatabaseWe conducted a user study by building a car database3.

The database includes 5622 vehicles with 27 attributes suchas the model, year, length, height, engine power, and retailprice. Additional details on the database are given in [22].Our study has two objectives: (1) build a query trace tounderstand the characteristics of data exploration tasks inthis domain; (2) use this trace as the ground truth of userinterests to evaluate our system.

To develop the query trace, we designed task scenarios withdi↵erent price constraints and usage patterns, e.g., buying acar for everyday city commute, outdoor sports, an elderly inthe family, or a small business. The 18 users in our studybelong to two groups: the first 11 users are CS professorsand graduate students, while the rest of 7 are non-technicalpeople. We asked each user to find all the cars that meetthe requirements of the assigned task so that he can providea recommendation service to customers who belong to thegiven scenario. Each user proceeds in three phases: 1) Reviewthe schema: Since this is a familiar domain, most users canunderstand the schema quickly. 2) Initial exploration: Wenext show sample data to help the user understand the dataand materialize his preference. We also ask the user to comeup with the first positive example via (a) naming a car thathe already has in mind, or (b) reviewing a sample set pre-computed for the given task based on the price constraints,body type, year, etc., and finding one that appears relevant.Two users chose option (a) while the others chose option(b). 3) Iterative manual exploration: In the third phase, theuser is asked to specify his interest precisely by (a) sendinga SQL query to the database4; (b) reviewing a subset of

3The content is extracted from http://www.teoalida.com/4For the 7 non-techncial people, we o↵ered help to translate theirrequirements to SQL but otherwise did not influence the users indata exploration.

the returned tuples; (c) going back to revise the query. Thesteps are repeated until the user is satisfied with all returnedtuples of the final query.

First, we verify that the selectivities of all 18 queries arein the range of [0.2%, 0.9%]. They contain 117 predicates intotal: 70 of them are defined on numerical attributes and areall convex in the positive region. The rest 47 use categoricalattributes, for which the notion of convexity does not apply.All the queries are conjunctive; the only disjunction is appliedto the categorical attributes.

Second, we evaluate our system by running simulationsusing these queries as the true user interest. While thequeries involve 4 to 10 attributes, the classifier requires cate-gorical attributes to be transformed using one-hot encoding,resulting in 4 to 418 features used by dsm. Table 2 showsin the “DSM” column family that dsmF achieve 99% forall queries, with a median of 10 labeled examples, despitethe high-dimensionality. In contrast, the users manuallywrote a series of queries, with a median of 12, and reviewedmany tuples, with a median of 98. The results from two usergroups are largely consistent with each other, with a smalldi↵erence that non-technical people tend to specify simplerqueries, hence easier for dsm to learn. Note that the initialcost of finding the first positive example, with a median of10 tuples, can be added fairly to both exploration modes.

Third, the study verified our benefits over active learning(AL), which cannot reach 95% accuracy for most querieswithin 100 iterations and for 80% has a median of 29 labeledexamples. Even if the decision boundary is often in a sparseregion, high dimensionality makes AL lose performance.

Fourth, to test the robustness of dsm we run it with noisyuser labels as described in Section 4. Any polytope modelthat has exceeded T=1 conflicting examples will be turnedo↵, leading to partial factorization. To inject noisy labels,our intuition is that they are more likely to occur close tothe boundary of the true pattern. 1) Noise model: we usea Gaussian noise model where a new example gets a wronglabel with a probability that depends on its distance to thetrue boundary, i.e., the probability that its distance to theboundary of a perfect SVM classifier (with the margin size�) is less than a sample from a Gaussian function with u=0and � = �/2. 2) Non-uniform user behaviors: we assumethe first s (=5 or 10) examples to be noise free because theyare drawn from the broad data space, hence likely to be farfrom from the true boundary, and the user tends to be morepatient at the beginning. The last 9 columns of Table 2show dsm and AL under noisy labels. dsm reaches 95%accuracy with a median of 11 labeled examples including5 noise-free initial examples, while AL requires 36 labeledexamples with 10 noise-free examples to achieve 80%. Out

81

Page 12: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

Table 2: Results of the car database using Manual Exploration, DSM, Active Learning (AL). #A shows the number of attributes usedin the user interest and #F shows the number of features (with onehot encoding) after transforming all categorical attributes for use bythe classifier. For manual exploration, T2 shows the number of tuples reviewed in initial exploration (the 2nd phase) for the user to findthe first positive example; and T3 shows those reviewed in iterative exploration (3rd phase). For DSM and AL, the algorithm marked by‘-’ never reached the desired accuracy within 100 iterations.

Q #A #F Manual AL DSM DSM DSM ALExploration 5 noise free 10 noise free 10 noise free

T2 T3 #SQL 0.8 0.95 0.99 0.8 0.95 0.99 0.8 0.95 0.99 0.8 0.95 0.99 0.8 0.95 0.99

Q1 Min 4 12 0 35 8 8 9 9 4 4 5 4 4 5 4 4 5 8 9 9⇠ Max 8 418 18 412 49 - - - 14 23 26 - - - 14 - - - - -

Q11 Mdn 6 35 11 104 16 29 42 - 7 10 13 7 13 - 7 10 13 35 - -

Q12 Min 4 4 0 50 4 9 15 15 3 5 6 3 5 6 3 5 6 9 16 -⇠ Max 10 51 24 260 15 - - - 7 11 12 - - - 7 11 12 - - -

Q18 Mdn 6 24 4 91 10 28 - - 6 6 9 6 6 - 6 6 9 48 - -

GlobalMdn 6 30 10 98 12 29 - - 6 9 10 6 11 - 6 9 10 36 - -

of the 105 subspatial polytope models built for 18 queries,14% were turned o↵ when s=5 and 6% were turned o↵ whens=10. Partial factorization still outperforms AL for noisylabels due to fast convergence.

7. RELATED WORKData Exploration. Faceted search iteratively recommendsquery attributes for drilling down into the database, but theuser is often asked to provide attribute values until the desiredtuple(s) are returned [26, 34, 35] or o↵er an “interestingness”measure and its threshold [10]. Semantic windows [25] arepre-defined multidimensional predicates that a user can ex-plore. These methods are di↵erent from our active learningapproach. Recent work also supports time series data [32]or avoids false discoveries of statistical patterns [44] duringinteractive data exploration. Finding best database objectsbased on user preferences [40] assumes a numeric weight perdatabase attribute, which is di↵erent from the active learningapproach to discover the user interest on the fly.Query by Example is a specific framework for data ex-ploration. Earlier work on QBE focused on a visualizationfront-end that aims to minimize the user e↵ort to learn theSQL syntax [23, 33]. Recent work [31] proposes exemplarqueries which treat a query as a sample from the desiredresult set and retrieve other tuples based on similarity met-rics, but for graph data only. The work [37] considers datawarehouses with complex schemas and learns the minimalproject-join queries from a few example tuples e�ciently. Itdoes not consider selection with complex predicates, which isa focus of our work. The work [24] helps users construct joinqueries for exploring relational databases, and [28] does soby asking the user to determine whether a given output tableis the result of her intended query on a given database.Query formulation has been surveyed in [8]. The clos-est to our work is LifeJoin [9], which we compared in Sec-tion 6.2. Query By Output (QBO) [42] takes the output ofone query on a database, and constructs another query suchthat running these two queries on the database are instance-equivalent. Dataplay [2] provides a GUI for users to directlyconstruct and manipulate query trees. It assumes that theuser can specify the value assignments used in his intendedquery, and learns conjunctions of quantified Horn expressions(with if-then semantics) over nested relations [1].Active Learning. Tong and Koller [41] provide a theoreti-cal motivation on selecting new examples using the notionof a version space, but with unknown convergence speed.Related to our work is a lower bound on the probability

of misclassification error on the unlabeled training set [7].However, it relies on user labeling of an additional samplefrom the unlabeled pool, which is not required in our work.Recent papers [14,18–20] o↵er probabilistic bounds for theclassification error and sample complexity. Our work dif-fers in that we focus on F1-score, which suits selective userinterest queries (imbalanced classes in classification).

Most learning theory makes no assumptions on convexdata/class distributions [21]. Clustering techniques can as-sume that data is clustered in convex sets [21], but addressa di↵erent problem from ours. In Active Learning, convexityassumptions occur in the Version Space [4, 41], which is theset of classifiers consistent with training data. dsm can em-brace any classifier developed through the version space, butalso includes the new polytope model.Active Search. Active search [16, 30, 43] aims to maximizethe number of positive examples discovered, called the Target

Set Accuracy, within a limited budget of user labeling e↵ort.In comparison, our work aims to maximize the F1-score ofthe model learned to approximate the true user interest. Wereported the performance di↵erence from [16] in the previoussection. The works [30, 43] use a kernel function to measuresimilarity of items in order to maximize the utility of a setof selected items. Such kernel methods have the smoothnessrequirement, i.e., similar items have similar utility values,and require training data to tune the kernel for each use case(user interest), which do not suit our problem setting.

8. CONCLUSION AND FUTURE WORKWe presented new algorithms for interactive data explo-

ration in the active learning framework, which leverage thesubspatial convex and conjunctive properties of databasequeries to overcome the slow convergence of active learning.Our results show that our dsm algorithm significantly outper-forms active learning [5, 15], active search [16], and existingexplore-by-example systems, Aide [12, 13] and LifeJoin [9],in accuracy and convergence speed, while maintaining theper-iteration time within 1-2 seconds. In future work, we willaddress inconsistent labeling by extending our dsm modelto a probabilistic model, extend query patterns to multi-ple disjoint areas using exploration versus exploitation, andleverage data properties to further improve accuracy.

Acknowledgements. This work was funded in part byNSF under the grant IIS-1218524, Agence Nationale de laRecherche (ANR), and Universite Paris-Saclay.

82

Page 13: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

9. REFERENCES[1] A. Abouzied, D. Angluin, C. H. Papadimitriou, J. M.

Hellerstein, and A. Silberschatz. Learning and verifyingquantified boolean queries by example. In Symposium

on Principles of Database Systems (PODS), pages49–60, 2013.

[2] A. Abouzied, J. M. Hellerstein, and A. Silberschatz.Playful query specification with dataplay. PVLDB,5(12):1938–1941, 2012.

[3] C. B. Barber, D. P. Dobkin, and H. Huhdanpaa. Thequickhull algorithm for convex hulls. ACM Transactions

on Mathematical Software, 22(4):469–483, Dec. 1996.[4] K. Bellare, S. Iyengar, A. Parameswaran, and

V. Rastogi. Active sampling for entity matching withguarantees. ACM Transactions on Knowledge

Discovery from Data, 7(3):12:1–12:24, Sept. 2013.[5] A. Bordes, S. Ertekin, J. Weston, and L. Bottou. Fast

kernel classifiers with online and active learning.Journal of Machine Learning Research, 6:1579–1619,Dec. 2005.

[6] L. Breiman. Random forests. Machine learning,45(1):5–32, 2001.

[7] C. Campbell, N. Cristianini, and A. J. Smola. Querylearning with large margin classifiers. In Proceedings of

the Seventeenth International Conference on Machine

Learning, ICML ’00, pages 111–118, San Francisco, CA,USA, 2000. Morgan Kaufmann Publishers Inc.

[8] A. Cheung and A. Solar-Lezama. Computer-assistedquery formulation. Foundations and Trends R� in

Programming Languages, 3(1):1–94, June 2016.[9] A. Cheung, A. Solar-Lezama, and S. Madden. Using

program synthesis for social recommendations. InProceedings of the 21st ACM International Conference

on Information and Knowledge Management, CIKM’12, pages 1732–1736, New York, NY, USA, 2012. ACM.

[10] D. Dash, J. Rao, N. Megiddo, A. Ailamaki, andG. Lohman. Dynamic faceted search fordiscovery-driven analysis. In CIKM, pages 3–12, 2008.

[11] Y. Diao, K. Dimitriadou, Z. Li, W. Liu,O. Papaemmanouil, K. Peng, and L. Peng. AIDE: anautomatic user navigation system for interactive dataexploration. PVLDB, 8(12):1964–1967, 2015.

[12] K. Dimitriadou, O. Papaemmanouil, and Y. Diao.Explore-by-example: an automatic query steeringframework for interactive data exploration. InSIGMOD Conference, pages 517–528, 2014.

[13] K. Dimitriadou, O. Papaemmanouil, and Y. Diao. Aide:an active learning-based approach for interactive dataexploration. IEEE Transactions on Knowledge and

Data Engineering, 28(11):2842–2856, 2016.[14] R. El-Yaniv and Y. Wiener. Active learning via perfect

selective classification. Journal of Machine Learning

Research, 13(1):255–279, Feb. 2012.[15] S. Ertekin, J. Huang, L. Bottou, and L. Giles. Learning

on the border: Active learning in imbalanced dataclassification. In Proceedings of the Sixteenth ACM

Conference on Conference on Information and

Knowledge Management, CIKM ’07, pages 127–136,New York, NY, USA, 2007. ACM.

[16] R. Garnett, Y. Krishnamurthy, X. Xiong, J. G.Schneider, and R. P. Mann. Bayesian optimal activesearch and surveying. In Proceedings of the 29th

International Conference on Machine Learning, ICML

2012, Edinburgh, Scotland, UK, June 26 - July 1, 2012,pages 843–850, 2012.

[17] B. Grunbaum. Convex polytopes. In Convex Polytopes.Springer-Verlag New York, 2 edition, 2003.

[18] S. Hanneke. Rates of convergence in active learning.The Annals of Statistics, 39(1):333–361, 02 2011.

[19] S. Hanneke. Theory of disagreement-based activelearning. Foundations and Trends R� in Machine

Learning, 7(2-3):131–309, June 2014.[20] S. Hanneke. Refined error bounds for several learning

algorithms. The Journal of Machine Learning Research,17(1):4667–4721, Jan. 2016.

[21] T. Hastie, R. Tibshirani, and J. Friedman. TheElements of Statistical Learning. Springer, 2001.

[22] E. Huang, L. Peng, L. D. Palma, A. Abdelkafi, A. Liu,and Y. Diao. Optimization for active learning-basedinteractive database exploration. Technical report,2018. https://hal.inria.fr/hal-01870560.

[23] B. E. Jacobs and C. A. Walczak. A GeneralizedQuery-by-Example Data Manipulation Language Basedon Database Logic. IEEE Transactions on Software

Engineering, 9(1):40–57, 1983.[24] M. Kahng, S. B. Navathe, J. T. Stasko, and D. H. P.

Chau. Interactive browsing and navigation in relationaldatabases. PVLDB, 9(12):1017–1028, 2016.

[25] A. Kalinin, U. Cetintemel, and S. Zdonik. Interactivedata exploration using semantic windows. InProceedings of the 2014 ACM SIGMOD International

Conference on Management of Data, SIGMOD ’14,pages 505–516, New York, NY, USA, 2014. ACM.

[26] N. Kamat, P. Jayachandran, K. Tunga, and A. Nandi.Distributed and Interactive Cube Exploration. InICDE, pages 472–483, 2014.

[27] S. R. Lay. Convex Sets and Their Applications. DoverPublications, 2007.

[28] H. Li, C.-Y. Chan, and D. Maier. Query from examples:An iterative, data-driven approach to queryconstruction. PVLDB, 8(13):2158–2169, 2015.

[29] W. Liu, Y. Diao, and A. Liu. An analysis ofquery-agnostic sampling for interactive dataexploration. Technical report, University ofMassachusetts Amherst, 2016. Technical reportUM-CS-2016-003.

[30] Y. Ma, R. Garnett, and J. G. Schneider. ⌃-optimalityfor active learning on gaussian random fields. InAdvances in Neural Information Processing Systems 26:

27th Annual Conference on Neural Information

Processing Systems 2013. Proceedings of a meeting held

December 5-8, 2013, Lake Tahoe, Nevada, United

States., pages 2751–2759, 2013.[31] D. Mottin, M. Lissandrini, Y. Velegrakis, and

T. Palpanas. Exemplar queries: Give me an example ofwhat you need. PVLDB, 7(5):365–376, 2014.

[32] R. Neamtu, R. Ahsan, C. Lovering, C. Nguyen, E. A.Rundensteiner, and G. N. Sarkozy. Interactive timeseries analytics powered by ONEX. In Proceedings of

the 2017 ACM International Conference on

Management of Data, SIGMOD Conference 2017,

Chicago, IL, USA, May 14-19, 2017, pages 1595–1598,2017.

83

Page 14: Optimization for Active Learning-based Interactive Database ...Optimization for Active Learning-based Interactive Database Exploration Enhui Huang†, Liping Peng , Luciano Di Palma†,

[33] G. Ozsoyoglu and H. Wang. Example-Based GraphicalDatabase Query Languages. Computer, 26(5):25–38,1993.

[34] S. B. Roy, H. Wang, G. Das, U. Nambiar, andM. Mohania. Minimum-e↵ort driven dynamic facetedsearch in structured databases. In Proceedings of the

17th ACM Conference on Information and Knowledge

Management (CIKM), pages 13–22, 2008.[35] S. B. Roy, H. Wang, U. Nambiar, G. Das, and

M. Mohania. Dynacet: Building dynamic faceted searchsystems over databases. In International Conference on

Data Engineering (ICDE), pages 1463–1466, 2009.[36] B. Settles. Active Learning. Synthesis Lectures on

Artificial Intelligence and Machine Learning. MorganClaypool Publishers, 2012.

[37] Y. Shen, K. Chakrabarti, S. Chaudhuri, B. Ding, andL. Novik. Discovering queries based on example tuples.In Proceedings of the 2014 ACM SIGMOD

International Conference on Management of Data,SIGMOD ’14, pages 493–504, New York, NY, USA,2014. ACM.

[38] Sloan digital sky survey: Dr8 sample sql queries.http://skyserver.sdss.org/dr8/en/help/docs/realquery.asp.

[39] A. S. Szalay, P. Z. Kunszt, A. Thakar, J. Gray, D. R.Slutz, and R. J. Brunner. Designing and miningmulti-terabyte astronomy archives: The sloan digital

sky survey. In SIGMOD Conference, pages 451–462,2000.

[40] B. Tang, K. Mouratidis, and M. L. Yiu. Determiningthe impact regions of competing options in preferencespace. In Proceedings of the 2017 ACM International

Conference on Management of Data, SIGMOD ’17,pages 805–820, New York, NY, USA, 2017. ACM.

[41] S. Tong and D. Koller. Support vector machine activelearning with applications to text classification. Journalof Machine Learning Research, 2:45–66, Mar. 2002.

[42] Q. T. Tran, C.-Y. Chan, and S. Parthasarathy. Queryby output. In Proceedings of the 2009 ACM SIGMOD

International Conference on Management of Data,SIGMOD ’09, pages 535–548, New York, NY, USA,2009. ACM.

[43] H. P. Vanchinathan, A. Marfurt, C. Robelin,D. Kossmann, and A. Krause. Discovering valuableitems from massive data. In Proceedings of the 21th

ACM SIGKDD International Conference on Knowledge

Discovery and Data Mining, Sydney, NSW, Australia,

August 10-13, 2015, pages 1195–1204, 2015.[44] Z. Zhao, L. De Stefani, E. Zgraggen, C. Binnig,

E. Upfal, and T. Kraska. Controlling false discoveriesduring interactive data exploration. In Proceedings of

the 2017 ACM International Conference on

Management of Data, SIGMOD ’17, pages 527–540,New York, NY, USA, 2017. ACM.

84