<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Learning Analysis Paterns using a Contextual Edit Distance</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Clement Moreau</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Veronika Peralta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Patrick Marcel</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexandre Chanson</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Thomas Devogele</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Tours Blois</institution>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper presents a proposal for learning users' behavior patterns when they interactively analyse data. Users' explorations (sequences of queries) are compared looking for subsequences of common actions or operations performed by the users during data analysis. We use a hierarchical clustering algorithm to retrieve groups of similar explorations. The main dificulty is to devise a similarity measure suitable to measure similarities between sequences of human actions. We propose to use a Contextual Edit Distance (CED), a generalization of Edit Distance that manages context-dependent edition costs. CED compares two users' explorations, making special emphasis in the similarity of queries with nearby queries in the exploration, which determines a local context. We test our approach on three workloads of real users' explorations, extracting common analysis patterns, both in explorations devised by students and expert analysts. We also experiment on an artificial workload, generated with CubeLoad [19], showing that our approach is able to identify the patterns imposed by the generator. To the best of our knowledge, this is the first attempt to characterize human analysis behavior in workloads of data explorations.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Analyzing a database workload ofers many practical interests,
from the monitoring of database physical access structures [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
to the generation of user-tailored collaborative query
recommendations for interactive exploration [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. There has been much
attention lately devoted to the analysis of user past activities
to support Interactive Database Exploration (IDE) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. OLAP
analysis is a particular case of IDE, that takes advantage of simple
primitives like drill-down or slice-and-dice for the navigation of
multidimensional data. These particularities enable the design of
approaches for characterizing user explorations in how focused
they are [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], in how contributive a query is to the exploration [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ],
or even in how to ensure that a sequence of analytical queries
forms a coherent exploration [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. Characterising user behavior
while analysing data, i.e. learning the way users analyse data (the
type and order of operations, the level of detail, the degree of
focus) is a step forward in the understanding of analysis activities.
      </p>
      <p>
        Identifying analysis behavior has several applications. The
more natural one is a better support of IDE, for instance to
understand users’ information needs, to identify "struggling" during
the exploration, or to provide better query recommendations.
Notably, IDE systems usually do not ofer such facilities. The
prediction of next analysis steps is particularly interesting, enabling
beforehand execution of probable queries and caching of results,
as well as advanced optimization strategies. Another benefit is
the design of more realistic workloads for database
benchmarking. Classical benchmarks like TPC-H or TPC-DS poorly include
interactive exploration activities in their synthetic workloads,
and are not appropriate to evaluate modern IDE systems [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
Identifying analysis patterns would allow to better model user’s
explorations and mimic such activities in benchmark workloads.
Finally, we mention the detection of clandestine intentions [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
as another potential benefit. Indeed, as reported by [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], query
sequences may reflect such intentions, where users prefer to obtain
information by means of sequences of smaller, less conspicuous
queries to avoid direct queries which may disclose their true
interests. The identification of typical analysis patterns may help
distinguishing normal from clandestine intentions.
      </p>
      <p>
        In this paper we deal with the identification of analysis
patterns in a log of explorations devised by real users. We consider
that an exploration is a coherent sequence of queries over a
database schema, done by a user with the goal of fulfilling an
information need. In [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], Rizzi and Gallinucci described 4
recurrent types of user analyses and propose a tool for generating
realistic explorations based on these usage types. Our goal is to
go a step forward and learn more analysis patterns from the
explorations of real users. Concretely, we aim to cluster together
explorations showing similar analysis patterns. The idea
behind analysis patterns is to look for sequences of common
actions or operations performed together when analysing data,
as some kind of movements in a data space. From this point of
view, OLAP operations (e.g. drilling down, adding a filter,
changing a measure) are first class citizens, while the actual analyzed
data is less important. For example, we can retain that a user
performed a sequence of drills down, disregarding the dimension
that was drilled down or the semantics of the underlying data.
Explorations can be compared in such terms, i.e. to what extent
they share the same sequences of operations and evolve at the
same level of aggregation and filtering.
      </p>
      <p>
        Many distances proposed to compare sequences, for example
the Damerau-Levenshtein distance [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] or the Smith-Watermann
algorithm [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], part of Edit Distance family, count the
minimum number of operations (modification, addition, deletion)
required to transform one sequence into the other. They are
particularly adapted for sequences of independent symbols, as
DNA sequences or strings. However, when symbols represent
human behavior, including homogeneous, interconnected and
repetitive actions, an appropriate distance should satisfy other
requirements. In particular, we want the following requirements:
(R1) edition cost depends on the similarity of nearby symbols.
(R2) edition of repeated close symbols has little cost.
(R3) permutation of close symbols has little cost.
      </p>
      <p>Indeed, while edition cost is constant in classical Edit Distance,
for comparing interconnected actions, it should take context (i.e.
the nearby actions) into account. For example, removing a
measure should be costly within a focused sequence of drills down
and filters, while it should be cheaper inside a sequence with
other changes in measures. In addition, sequences of filters should
be similar, no matter how many filters there are. Furthermore,
permuting operations should have little impact, e.g. filtering and
then drilling vs. drilling then filtering.</p>
      <p>
        Previous attempts made for measuring the similarity of
sequences of OLAP queries (like e.g. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], that extends the
SmithWatermann algorithmm) were not designed to satisfy the stated
requirements. We propose a Contextual Edit Distance (CED)
specially designed to satisfy them.
      </p>
      <p>Our contributions, sketched in Figure 1 include: (i) a
representation of queries and explorations in the space of OLAP
operations, including a similarity function among OLAP operations
in such space (described in Section 3), (ii) a CED for comparing
explorations considering context (Section 4), (iii) a proposal for
clustering explorations, based on CED (Section 5), and (iv) a set
of experiments showing that CED outperforms state of the art
distances allowing the learning of analysis behavior in varied
logs of explorations (Section 6).
2</p>
    </sec>
    <sec id="sec-2">
      <title>RELATED WORK</title>
      <p>
        The recurrent types of user analyses described by Rizzi and
Gallinucci [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] are the first attempt to define analysis patterns in
OLAP workloads. Authors claim that obtaining real OLAP
workloads by monitoring the queries actually issued in companies
and organizations is hard, and propose a parametric generator
of OLAP workloads, CubeLoad, based on a four templates that
model recurrent types of user analyses:
• Slice And Drill. Following the default behavior of several
OLAP front-ends, hierarchies are progressively navigated
by choosing a member of a current group-by level,
creating a selection predicate on such member and drilling
down on it. Therefore, explorations of this template
conBase de trajteacitnoirseesquences oBfafilsteerdea ntrdajdercitloli-rdeoswn operations.
spatio-temporelles riche s´emantiquement
      </p>
      <p>A
e1 = hq1, q2, ..., qmi
e2 = hq1, q2, ..., qni T S
.</p>
      <p>.</p>
      <p>M´e.trique de comparaison sur
leesktr=ajehcqt1o,iqre2s, .s.´e.m,qapnitiques
Exploration sessions
{e1, e2, ..., ek} ✓ Q⇤
(a)</p>
      <p>Partitionnement
Regroupement des trajectoiresHeienramrcohtiifcsal
de comportements csliumsitleariirnesg
(c)</p>
      <p>d : Q⇤ ⇥ Q⇤ ! R++
d : TMSeas u⇥re oTn S ! R
exploration sessions (b)
e
t
a
c
i
d
re 6
p
n
o
it
c
e
lse
2
• Slice All. Users are sometimes interested in navigating a
cube by slices, i.e., repeatedly running the same query but
with diferent selection predicates. Then, this templates
generates sequences of unfilter/filter operations.
• Exploratory. The motivation for this template is the
assumption that several users, while exploring the cube in
search of significant correlations, will be “attracted” by one
surprising query and then evolve casually. So, explorations
based on this template contain varied random operations.
• Goal Oriented. Explorations of this type are run by users
who have a specific analysis goal, but whose OLAP skills
are limited so they may follow a complex path to reach
their destination. Explorations of this template contain
varied operations but converging to some specific point.</p>
      <p>
        Other works analyse real workloads and observe tendences
or patterns. Aligon et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] analyse a workload of explorations
devised by master students and observe some general tendence.
They report the number of OLAP operations used between two
consecutive queries, the level of detail and the number of filters
of queries in the explorations, as well as the queries indicated
as relevant by the students. As general behavior, they highlight
that explorations are more focused at the end (i.e. the number of
iflters and level of detail increase along the exploration, while the
number of OLAP operations between consecutive queries varies
before a final drop at the end of the exploration) and contain
more relevant queries at the end. The term focus is used as in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]:
“When focused, an analyst would expect more precise queries,
related to what she is currently analyzing. On the contrary, when
exploring the data, the analyst would prefer more diverse queries,
for a better data space coverage." Djedaini et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] analyse
another workload of explorations of master students and propose a
model for learning the quality of an exploration (and the skill of
the user) based on a set of query features.
      </p>
      <p>To our knowledge, our work is the first devoted to discover
exploration patterns in OLAP workloads.</p>
      <p>
        Many recent works aimed at comparing queries and sessions.
We mention as good recent surveys [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for OLAP queries and
explorations, and [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] for SQL queries.
      </p>
      <p>
        Aligon et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] also proposes two similarity measures: one
tailored for OLAP queries and another tailored for OLAP sessions.
Their measures were designed for satisfying other requirements,
in particular capturing the portions of the cube that are more
explored for improving query recommendation. Consequently,
similarity measures are based on common query parts (e.g. filters
and measures) more than common operations, and are strongly
dependent on cube schema. To our knowledge, no similarity
already proposed in the literature for comparing explorations
includes the requirements presented in the previous section.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>EXPLORATION MODEL</title>
      <p>This section introduces the description of queries and
explorations used all along the paper as well as their representation in
a space of OLAP operations.
3.1</p>
    </sec>
    <sec id="sec-4">
      <title>Queries and explorations</title>
      <p>
        In order to keep the formalism simple, we only take into account
cubes under a ROLAP perspective, described by a star schema
[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. For convenience, we consider that a dimension consists of
a unique hierarchy without branches, i.e., consisting of chains
of levels. In this paper, we focus on multidimensional queries
modeled as a collection of fragments extracted from the query
expression, as in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>Definition 3.1 (OLAP query). An OLAP query over cube schema
S is a triple q = ⟨G, P, M⟩ where:
(1) G = {д1, . . . , дj } is the query group-by set, each дi being
a level of a hierarchy of the cube;
(2) P = {p1, . . . , pk } is a set of Boolean predicates, of the form
l = v, with l a level and v a value. Compound predicates
are build as the disjunction of predicates on a same level
(l ), at most one for each hierarchy, whose conjunction
defines the selection predicate for q;
(3) M = {m1, . . . , ml } is the measure set whose values are
returned by q.</p>
      <p>We intentionally remain independent of presentation and
optimization aspects, specially the order in which attributes are
projected (and visualized), the order of joins, etc.</p>
      <p>Finally, an exploration is a coherent sequence of queries over
a cube schema, devised by a user with the goal of fulfilling an
information need that may not be well defined initially.</p>
      <p>Definition 3.2 (Exploration). Let S be a cube schema. An
exploration e = ⟨q1, . . . , qp ⟩ is a sequence of queries over S. We
note q ∈ e if q appears in the exploration e, and exploration(q)
to refer to the explorations where q appears.
3.2</p>
    </sec>
    <sec id="sec-5">
      <title>Query features</title>
      <p>
        For each query, we extract a set of simple features computed from
the query text and its relationship with previous query in an
exploration. The set of features is inspired from our previous works
[
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. It intends to capture various aspects of OLAP navigation,
in particular the set of OLAP operations that express one query
w.r.t. the previous one (e.g. a query being a drill down of the
previous one), the level of aggregation (i.e. how deep the query
is in the aggregation lattice) and the level of filtering (i.e. how
ifltered is the data space). Table 1 presents an overview of the
features, where added (resp., deleted) indicates the modification
made compared to the previous query.
      </p>
      <p>For the following definitions let qk = ⟨Gk , Pk , Mk ⟩ be the
query occurring at position k in the exploration e over cube
schema S. All the queries we considered are supposed to be
well formed, and so we do not deal with query errors. Features
are computed comparing the query qk to the previous query
in the exploration e, qk−1 = ⟨Gk−1, Pk−1, Mk−1⟩. For the first
query of e, i.e. q1, we consider as predecessor the "empty" query
q0 = ⟨∅, ∅, ∅⟩. All the following features are defined for k ≥ 1.</p>
      <p>Number of Added Levels. N AL(qk , qk−1) counts the number of
levels in the group by set of qk that were not part of the group
by set of qk−1.</p>
      <p>N AL(qk , qk−1) = |Gk − Gk−1 |</p>
      <p>Number of Deleted Levels. N DL(qk , qk−1) counts the number
of levels in the group by set of qk−1 that are not longer used in
qk .</p>
      <p>N DL(qk , qk−1) = |Gk−1 − Gk |</p>
      <p>Number of Added Filters. N AF (qk , qk−1) counts the number
of filters of qk that were not filters of qk−1.</p>
      <p>N AF (qk , qk−1) = |Pk − Pk−1 |
(1)
(2)
(3)</p>
      <p>Description
Number of added levels
Number of deleted levels
Number of added filters
Number of deleted filters
Number of added measures
Number of deleted measures
Aggregation depth</p>
      <p>Filter depth</p>
      <p>Table 1: Query features</p>
      <p>Number of Deleted Filters. N DF (qk , qk−1) counts the number
of filters of qk−1 that are not longer used in qk .</p>
      <p>N DF (qk , qk−1) = |Pk−1 − Pk |</p>
      <p>Number of Added Measures. N AM(qk , qk−1) counts the
number of measures of qk that were not measures of qk−1.</p>
      <p>N AM(qk , qk−1) = |Mk − Mk−1 |</p>
      <p>Number of Deleted Measures. N DM(qk , qk−1) counts the
number of measures of qk−1 that are not longer used in qk .</p>
      <p>N DM(qk , qk−1) = |Mk−1 − Mk |</p>
      <p>Aggregation Depth. Adepth(qk ) measures the granularity of
qk in terms of the depth of each level in its hierarchy. It can
be seen as the number of drills down necessaries for obtaining
Gk from the most aggregated group-by set. Let depth(дi ) be the
depth of level дi in the hierarchy hi to which it belongs (ranging
from 0 if дi is the top level of hi to |hi | − 1 if дi is the bottom
level of hi ):</p>
      <p>Adepth(qk ) =
depth(дi )
(4)
(5)
(6)
(7)
Õ
дi ∈Gk</p>
      <p>Filter Depth. Fdepth(qk ) measures the number of filters
appearing in qk .</p>
      <p>Fdepth(qk ) = |Pk | (8)</p>
      <p>In what follows, we represent an OLAP query in the space
of query features, i.e. as a 8-dimensional vector, each position
corresponding to one of the features described above. This
representation is at the core of our proposal for computing the
similarity between queries and then between explorations. It
focuses in operations between queries and is independent of the
underlying data cube, i.e. a given sequence of operations, even
on diferent data cubes, will result in the same sequence of query
vectors.</p>
      <p>Example 1. Consider an exploration e1 composed of 4 queries:
q1 = ⟨{year }, ∅, {qty}⟩ – sales quantity per year;
q2 = ⟨{year }, {year = “2019”}, {qty}⟩ – adds a filter;
q3 = ⟨{year, country}, ∅, {qty}⟩ – unfilter, drill-down;
q4 = ⟨{year, city}, ∅, {qty, amount }⟩ – drill-down, adds measure;
Vector for q1, ⟨1, 0, 0, 0, 1, 0, 1, 0⟩, indicates an added level (year)
and an added measure (qty) w.r.t. the empty query; last positions
correspond to aggregation and filter depths. Vectors for q2, q3 and q4
indicate the diferences w.r.t. previous queries and the changes in
aggregation and filter depths: ⟨0, 0, 1, 0, 0, 0, 1, 1⟩, ⟨1, 0, 0, 1, 0, 0, 2, 0⟩,
⟨1, 0, 0, 0, 1, 0, 3, 0⟩, resp.</p>
      <p>
        Finally, we use cosine similarity for computing similarity
between queries. This measure is adapted to compute similarity of
two vectors and is normalized in [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ]. In this way, it privileges
the nature of OLAP operations and not their number.
      </p>
    </sec>
    <sec id="sec-6">
      <title>CONTEXTUAL EDIT DISTANCE</title>
      <p>This section describes our proposal of Contextual Edit Distance:
definition and implementation issues.</p>
      <p>CED is a generalization of the Edit Distance that incorporates
the following requirements:
(1) Context-dependent cost: Edition cost depends on the
similarity of nearby queries. The more similar and closer the
queries, the lower the cost of operation.
(2) Repetition: Edition of repeated close queries has low cost.
(3) Permutation: Similar and close queries can be exchanged
with a low cost.</p>
      <p>Example 2. Consider an exploration reflecting an exploratory
behavior at the beginning (many changes in measures and group by
set) and more focus at the end (drilling and filtering). We can sketch
it as follows (where L, F and M means level, filter and measure,
+ means addition and - means deletion; we skip aggregation and
iflter depth for simplicity):
⟨ +D+M, +M, +M, +D, +M-M, -M+D, -D+D, +F+D, +F+D, +F, +F ⟩.</p>
      <p>Consider the insertion of a query adding an additional measure
(+M). The edition cost should be low if the query is inserted at the
beginning (as it is similar to near queries), even lower at positions
2 to 4 (because repeating the same operations), but high at the end.</p>
      <p>This requirements ensure that explorations reflecting a given
pattern (e.g. sequences of drill-downs) are judged to be very
similar no matter the exploration length (i.e. how many
drilldowns) nor the underlying data (which data was drilled-down).</p>
      <p>We remark that although this paper deals with explorations,
CED definition and properties are independent on the type of
explorations, the type of queries and even the nature of data.
Indeed, CED can be adapted to any type of sequence on an alphabet
of symbols provided that exists a similarity metric among them.
4.1</p>
    </sec>
    <sec id="sec-7">
      <title>Definition of Contextual Edit Distance</title>
      <p>The main contribution of CED is the modification of the cost
function γ which generalizes the classical definition of Edit
Distance and takes into account the local context of each query in
the exploration. Intuitively, the cost of an edit operation will
be lower if the edited query (e.g. a query to be added to an
exploration) is similar to nearby queries (e.g. the queries that are
near the position where the query is added). This notion of local
context is modeled as a context vector, which controls the zone of
influence of the context. This subsection presents these concepts
and a formal definition of CED.</p>
      <p>
        Let Q be the set of all possible queries over a cube schema S
and Q∗ the set of all possible explorations on Q. For the following
definitions, let e = ⟨q1, ..., qn ⟩ be an exploration, qk be a query
in e, 1 ≤ k ≤ n, and qx be a new query to be edited in e. These
notations are partially adapted from the formal language theory
community and particularly from [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ].
      </p>
      <p>CED extends the set of edit operations of Edit Distance (usually
modification, addition, deletion) to take context into account.</p>
      <p>Definition 4.1 (Contextual edit operation). A contextual edit
operation o is a function o : (Q∗ × Q ∪ {ε } × N) → Q∗ whose
arguments are an exploration, a new query to be included in the
exploration (or none) and the index (position) in the exploration
where the edition takes place. We consider the following set
O = {mod, add, del} of edit operations:
• mod : (e, qx , k) 7→ q1, ..., qk−1, qx , qk+1, ..., qn</p>
      <p>Replace the query at index k by the query qx .
• add : (e, qx , k) 7→ q1, ..., qk−1, qx , qk , ..., qn</p>
      <p>Insert query qx at index k. The queries at and after index
k are shifted forward.
• del : (e, ε, k) 7→ q1, ..., qk−1, qk+1, ..., qn</p>
      <p>Delete the query at position k. The queries after position
k are shifted backward.</p>
      <p>Given an operation o(e, qx , k), a context vector is a numeric
vector that indicates the level of influence of nearby queries for
this operation, being stronger near index k and softening farther.
We use the context vector for weighting the similarity between
queries. Intuitively, the context vector quantifies the relationship
between a query qx and another query qi . Thus, the greater vi ,
the greater the impact of query qi on qx . A seed function is used
to generate context vectors.</p>
      <p>
        Definition 4.2 (Context function and context vector). Consider
a contextual edit operation o(e, qx , k) and a seed function fk :
N → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] which holds the following properties:
(1) fk (k) = 1.
(2) fk is a monotonically increasing function on ] − ∞, k].
(3) fk is symmetrically centered on k.
      </p>
      <p>The third property guarantees to take with the same importance
previous and future queries located at equal distance from qk .</p>
      <p>
        A context function φo : N∗ → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] is a transformation of fk
stretching the function according to the type of operation o. We
distinguish three cases for o in {mod, add, del}:
• φadd(x ) =
• φmod(x ) = fk (x )
(
fk (x + 1) if x ≤ k − 1
fk (x )
      </p>
      <p>
        if x ≥ k
 fk (x + 1) if x ≤ k − 1

• φdel(x ) = 0 if x = k

 fk (x − 1) if x ≥ k + 1

Finally, a context vector v : O → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ]n is defined as
v(o) = ⟨v1, . . . , vn ⟩
where vi = φo (i).
      </p>
      <p>About add and del contextual vector functions:
• For an insertion add : (e, qx , k), query qk−1 and qk are
fully taken into account for the addition of qx in e because
we insert qx between index k − 1 and k i.e. φadd(k − 1) = 1
and φadd(k) = 1.
• For a deletion del : (e, ε, k), the absence of the query
qk in e is quantified in relation to the remaining of e i.e.
φdel(k) = 0.</p>
      <p>φ"##</p>
      <p>1 x − 4 2
f4 = exp (− 2 ( 2 ) )
o = "## : (e, q x,4)
q 1
|
q 2</p>
      <p>q 3
{ez
q 4
}</p>
      <p>Example 3. Consider the operation o = add(e, qx , 4), adding
a query at index 4 of an exploration. Figure 2 illustrates the
computation of φadd (plotted in blue) from a given seed function (in
red). The corresponding context vector is v(o) = ⟨0.61, 0.88, 1, 1⟩. It
indicates that the similarity score of queries at indexes 3 and 4 is
fully considered (weight of 1) while a lower score is considered for
query at index 1.</p>
      <p>The cost function γ of CED generalizes the classical definition
of Edit Distance and takes into account the local context of each
query in the exploration.
is defined as:</p>
      <p>
        Definition 4.3 (Cost function γ ). Given an operation o(e, qx , k),
a cost function γ : O → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] for the contextual edit operations
γ (o) = α × δ (o)+
(1 − α ) 1 −
max
i ∈[[1,n]] {sim(qi , qx ) × vi (o)}
(9)
where:
• α ∈ [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] is a contextual parameter.
      </p>
      <p>If α → 0 the contextual part is maximal and therefore the
distance between two queries will be strongly evaluated
according to the content of the exploration being edited ;
• δ (o) =</p>
      <p>1
if α → (1 then cost of edition is fixed.</p>
      <p>1 − sim(qk , qx ) i f o = mod
is the local cost of the Edit Distance.</p>
      <p>else
queries, computed as the cosine of query vectors.</p>
      <p>
        • sim : Q × Q → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] is a similarity measure between two
Example 4. Consider the exploration e1 of Example 1 and
consider the insertion of query qx , with vector ⟨0, 0, 1, 0, 0, 0, 2, 1⟩
(addition of a filter), at position 4, as shown in Figure 2, with α = 0.1.
Then, the cost γ (o) is such that:
γ (o) = 0.1 + 0.9 ­­1 − max  cos(q2, qx ) × φadd(2) ª
© ®
®






 cos(q1, qx ) × φadd(1) 

      </p>
      <p>
 cos(q3, qx ) × φadd(3) ®
 cos(q4, qx ) × φadd(4) ¬
= 0.1 + 0.9 ­­1 − max  0.94 × 0.88 ª
© ®
®
= 0.1 + 0.9 «× (1 − 0.83) = 0.25
distance from an exploration e1 to an exploration e2.
­
«
­
such that:</p>
      <p>Definition 4.5 (One-sided Contextual Edit Distance). Let d˜C ED :
Q∗ × Q∗ → R+ be the Contextual Edit Distance from e1 to e2
(10)
˜
dC ED (e1, e2) =</p>
      <p>min
P ∈ P(e1,e2)  i=1
 Õ|P|

γ (oi )





</p>
      <p>
        In this form, CED would be very similar to Hausdorf distance
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], but would remain asymmetric. This is why we use the same
trick as Hausdorf distance and we apply the max operator on
each one-sided contextual edit distance to recover the symmetry.
      </p>
      <p>Definition 4.6 (Contextual Edit Distance).</p>
      <p>Q∗ → R+ be the Contextual Edit Distance such that:
Let dC ED : Q∗ ×
dC ED (e1, e2) = max nd˜C ED (e1, e2), d˜C ED (e2, e1)
o
(11)
4.2</p>
    </sec>
    <sec id="sec-8">
      <title>Implementation of CED</title>
      <p>computation of CED.</p>
      <p>
        We can compute dC ED using a Dynamic Programming approach
like the classical Edit Distance [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. This solution has a
polynomial complexity in O(n × p) and can be adapted easily for the
      </p>
      <p>
        Algorithm 1 computes the context vector and the cost function
(as in Equation 9). Note that φo : N∗ → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] and α ∈ [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] are
ifxed parameters and operator · represents vector concatenation.
Algorithm 2 computes the one-sided Contextual Edit Distance
(Equation 10), and Algorithm 3 recovers the symmetry.
      </p>
      <sec id="sec-8-1">
        <title>Algorithm 1: Cost function γ</title>
        <sec id="sec-8-1-1">
          <title>Result: Cost γ (o) of the operation o. Data: Contextual edit operator o : (e, qx , k).</title>
          <p>v(o) ← v(o) · ⟨φo (i)⟩
v(o) ← ⟨⟩
for i ∈ ⟦1, |e |⟧ do
vsim ← ⟨⟩
for i ∈ ⟦1, |e |⟧ do
if e = mod then
else
δ (o) ← 1
vsim ← vsim · ⟨sim(qi , qx ) × vi (o)⟩
δ (o) ← 1 − sim(qk , qx )
return α × δ (o) + (1 − α ) × (1 − max(vsim ))
time:
and |e2 | = p.</p>
        </sec>
      </sec>
      <sec id="sec-8-2">
        <title>So we have :</title>
        <p>algorithm Ai , with i ∈ {1, 2, 3}.</p>
        <p>Next, we prove that the computation of CED is polynomial in
Theorem 4.7. CED is in O(n × p × max(n, p)) where |e1 | = n
Proof : Let’s note T (Ai ) the big O time complexity of the
• T (A2(e1, e2)) = n × p × T (A1(o : e1, qx , k))
• T (A1(o)) = |e | where e is the edited exploration.
• T (A2(e2, e1)) = n × p × T (A1(o : e2, qx , k))
• T (A3(e1, e2)) = T (A2(e1, e2)) + T (A2(e2, e1))
= n2 × p
= n × p</p>
        <p>2
= n2p + p2n
∈ O(n × p × max(n, p))
max(n, p)).</p>
        <p>As a result, the Algorithm 3 has a time complexity in O(n × p ×
□
else
Algorithm 2: One-sided Contextual Edit Distance d˜C ED</p>
        <sec id="sec-8-2-1">
          <title>Data: Exploration couple (e1, e2).</title>
          <p>Result: One-sided Context Edit Distance d˜C ED (e1, e2)
D ← [0...|e1 |][0...|e2 |]
for i ∈ ⟦0, |e1 |⟧ do
for j ∈ ⟦0, |e2 |⟧ do
if i = 0 ∨ j = 0 then</p>
          <p>D[i, j] ← i + j
omod ← mod : (e1, q(j2−)1, i − 1)
odel ← del : (e1, qi(1−)1, i − 1)
oadd ← add : (e1, q(j2−)1, i − 1)
D[i, j] ← min{</p>
          <p>D[i − 1, j − 1] + γ (omod),
D[i − 1, j] + γ (odel),
D[i, j − 1] + γ (oadd)
}
Algorithm 3: Contextual Edit Distance dC ED</p>
        </sec>
        <sec id="sec-8-2-2">
          <title>Data: Exploration couple (e1, e2).</title>
          <p>Result: Context Edit Distance dC ED (e1, e2).
o
return max nd˜C ED (e1, e2), d˜C ED (e2, e1)
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>CLUSTERING OF EXPLORATIONS</title>
      <p>Our objective is to cluster together explorations showing the
same user behavior. To this end, we pair CED to an of-the-shell
clustering algorithm, and we test it against several workloads
concerning users with varied analytical skills and diferent UI,
aiming to discover diferent types of patterns. In addition, as some
datasets come with a ground truth, they allow for the
quantification of clustering quality and the comparison to state of the art
distances. The following subsections describe the workload used
in experiments, the experimental protocol and implementation
details.
5.1</p>
    </sec>
    <sec id="sec-10">
      <title>Workloads</title>
      <p>
        In our experiments, we reuse several workloads described in
the literature [
        <xref ref-type="bibr" rid="ref15 ref2 ref7">2, 7, 15</xref>
        ] consisting of navigation traces of real
users on real data. We chose to test our proposal in several
workloads to avoid learning specific behavior of a set of users. The 3
workloads concern users with diferent analysis skills (students,
experts), using diferent analysis tools (an OLAP tool, a research
prototype and an advanced IDE interface) and accessing data
cubes of diferent sizes and complexities. We are not aware of
other public analytical workloads, specially from senior analysts,
whose analysis activity is jealously guarded by companies [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
We also generated artificial explorations on artificial data using
a state-of-the-art workload generator [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>
        Real explorations on ipums data. The first workload,
henceforth dubed Ipums, consists of navigation traces of OLAP users
collected during the testing phase of the development of Falseto
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], a tool meant to assist query and exploration composition, by
letting the user summarize, browse, query, and reuse former
analytical explorations. The 17 OLAP users engaged in the test were
students of two Master’s programs specialized in Business
Intelligence. The test was not part of the programs, was not graded and
all the participants were volunteers. They developed explorations
for answering four analytical questions on the IPUMS cube. The
IPUMS cube integrates data from the IPUMS (Integrated Public
Use Microdata Series) website 1. It is organized as a star schema
with 5 dimensions, 12 (non-top) levels, 25 measures, and contains
500,000 facts recorded in the fact table. From this experiment,
we reuse 27 explorations and 306 queries, with an average of 11
queries per exploration.
      </p>
      <p>During a preliminary analysis of the workload, Aligon et al.
labelled explorations distinguishing five analysis styles:
• FOCUS. The exploration is more focused as time passes,
• OSCILLATE-FOCUS. The exploration is more exploratory
(the levels of detail and filtering oscillate) at the beginning
but is more focused at the end,
• OSCILLATE. The exploration is always exploratory,
• FIX. The exploration keeps constant levels of detail and
ifltering,
• ATYPICAL. The exploration has atypical or erratic
behavior.</p>
      <p>
        Real explorations on open data. The second workload,
henceforth dubed Open, consists of navigation traces collected in the
context of a French project on energy vulnerability. These traces
were produced by 8 volunteer students of a Master’s degree in
Business Intelligence, answering fuzzy information needs defined
by their lecturer, to develop explorative OLAP navigations using
Saiku2 over three cubes instances [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The main cube is organized
as a star schema with 19 dimensions, 68 (non-top) levels, 24
measures, and contains 37,149 facts recorded in the fact table. The
other cubes are organized in a similar way. From this experiment,
we reuse 28 explorations and 941 queries, with an average of 34
queries per exploration. A particularity of some third party OLAP
tools, like Saiku, is that their user interface submits a new query
for each user action (including intermediate drag-and-drops),
resulting in very long explorations in the log. Nevertheless, there
were some extremely short explorations (6 explorations counting
less than 10 queries), which mainly correspond to incomplete
studies.
      </p>
      <p>
        Real explorations on cyber security data. The third workload,
henceforth dubed Security, consists of analysis sessions made by
real analysts in the context of the "Honeynet Project" [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. 56
analysts specialized in the domain of cyber-security were recruited
(via dedicated forums, network security firms, and volunteer
senior students from the Israeli National Cyber-Security Program)
and asked them to analyze 4 diferent datasets using a prototype
web-based analysis platform. Each dataset contains between 350
to 13K rows of raw network logs that may reveal a distinct
security event, e.g. malware communication hidden in network
trafic, hacking activity inside a local network, an IP range/port
scan, etc. (there is no connection between the tuples of diferent
datasets). The analysts were asked to perform as many analysis
actions as required to reveal the details of the underlying security
event of each dataset. They used a web-based analysis platform
developed for the project [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
      <p>Even if there is no ground truth for this workload, it is
interesting because queries were devised by expert analysts.</p>
      <p>
        Artificial explorations. The last workload, with artificial data,
comes from the Star Schema Benchmark [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], and was used with
1Minnesota Population Center. Integrated Public Use Microdata Series.
http://www.ipums.org, 2008.
2http://meteorite.bi/products/saiku
artificial explorations. The Star Schema Benchmark (SSB) is a
variation of TPC-H, a popular benchmark from the Transaction
Processing Performance Council (TPC). SSB cube consists of a
relational database under the form of a star schema, with one
fact table and 4 dimension tables.
      </p>
      <p>
        Instead of using the rather limited SSB workload, we generated
artificial explorations using CubeLoad [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
In order to cluster explorations, we execute an of-the-shelf
clustering algorithm using CED as distance function. For comparison,
we execute the same clustering algorithm with two alternative
distances: (i) the classical Edit Distance (henceforth dubed ED) as
a baseline, and (ii) Aligon et al.’s distance [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] (henceforth dubed
AD), a state of the art metric for session similarity. We analyze
the obtained clusters under several angles:
      </p>
      <p>Firstly, when we have some knowledge qualifying explorations,
even if it is not exactly a ground truth, we compare our results
to such knowledge. For the artificial explorations we compare
the obtained clusters with the Cubeload templates used for the
generation of the workload. This experiment aims to show that
our approach is able to cluster together all the explorations
corresponding to a given template. For the ipums workload we
compare to the preliminary labels assigned by Aligon et al. Actually,
such labels are not a ground truth, as there were not produced
with the goal of clustering explorations, but they may provide a
nice idea of the quality of the exploration. We report Adjusted
Rand Index (ARI) and V-measure (harmonic mean of clusters
homogeneity and completeness) scores3, and we compare our
clustering scores to those obtained with ED and AD distances.</p>
      <p>Second, for the four workloads, we report further scores
concerning intrinsic cluster quality. Indeed, too few clusters will mix
diferent behaviors, too many clusters will overfit user
behavior. We aim to balance: number of clusters, cluster diameter (the
distance between the farthest objects in the cluster) and mean
Silhouette Coeficient (a measure of how similar an object is to
its own cluster (cohesion) compared to other clusters
(separation)). Silhouette scores3 are merely informative in out tests, as
the metric is more adapted to hyper-spherical clusters.</p>
      <p>Finally, we study the medoids of each cluster (the exploration
that is the most similar to all other explorations in the cluster)
and we manually observe the OLAP operations of the medoid
for providing an explanation of the concerned behavior pattern.
5.3</p>
    </sec>
    <sec id="sec-11">
      <title>Implementation and setting</title>
      <p>
        Our methods are implemented in Python, using Scipy, Sklearn
[
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and Matplotlib libraries. Code and data are available from
Github 4. CED parameters were tuned and set as follows:
• Cosine similarity is used to compare two queries in an
exploration.
• α parameter is set to 0 to give fully priority to context.
• We use the following seed function.
      </p>
      <p>1 2√k + 1(x − k)
fk (x ) = exp ©­− 2 |e |
ª
®
« ¬</p>
      <p>
        It is a Gaussian function centered at k, therefore satisfying
the properties announced in Definition 4.2. Furthermore, it is
!2
3Metrics for clustering performance evaluation are well described in
https://scikit-learn.org/stable/modules/clustering.html sect. 2.3.10.
[
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]
4https://github.com/ClementMoreau-UnivTours/CED_Dolap
based on a Gaus√sian function with a standard deviation
coeficient equal to 2 k+1 . This coeficient is interesting because, as
|e |
it depends on k, it allows to vary context size along the
exploration. In particular, when k is small (at the beginning of the
exploration, when user intents are less defined and behavior is
more exploratory), the standard deviation is high (i.e. the curve
of fk is flattened) which allows to include in local context, some
queries that are far from the index k. On the other hand, when
k → |e | (at the end of the exploration, when behavior is more
focused), the curve of fk narrows around k reducing context size.
Figure 3 illustrates the context function for several values of k.
      </p>
      <p>As we do not know, a priori, the form of clusters, nor their
density, we use a hierarchical clustering algorithm, which
provides more flexibility than hyper-spherical and density-based
algorithms. In addition, it outputs a dendrogram that allows to
parameter the setting of number of clusters and eases the visual
analysis of clusters. In order to find a good balance, we
experimentally combine some criteria to cut the dendrogram: relative
loss of inertia, cluster diameter and minimum number of clusters.
We use the Ward method as agglomeration criteria.</p>
      <p>Finally, a correlation study among query features revealed that
Fdepth was highly correlated with Adepth in all workloads. In
consequence, we excluded Fdepth from query vector.
6</p>
    </sec>
    <sec id="sec-12">
      <title>EXPERIMENTS</title>
      <p>In this section we report the results of the experiments conducted
to validate our proposal.
6.1</p>
    </sec>
    <sec id="sec-13">
      <title>Comparison against ground truth</title>
      <p>In this experiment on Artificial and Ipums workloads, we
compared the clusters obtained with our method to the available
ground truth (i.e. the template used to generate each exploration
and the preliminary classification of Ipums).</p>
      <p>Figure 4 (a and d) shows the obtained dendrograms.
Explorations (identified by numbers) are arranged in the horizontal
axis, plotting similar explorations close (according to CED). Links
indicate which explorations are clustered together, shorter links
meaning more similar explorations (vertical axis reports
distances). Links of the same color represent a cluster, while dotted
links just indicate inter-cluster distances. For easing the
interpretation we also color explorations ids, according to ground truth
labels. We deliberately chose the same set of colors as clusters to
visually highlight the good matches.</p>
      <p>Artificial workload. The dendrogram exhibits a perfect match
among CubeLoad templates (Slice and Drill, Slide All, Exploratory
and Goal Oriented, described in Section 2) constituting well
separated clusters. We expected a good result with this workload, as
CubeLoad templates are well diferentiated.</p>
      <p>Colored Dendrogram ( 4 groups)
(a): CED on Artificial</p>
      <p>(d): CED on Ipums
Oscillate
focus</p>
      <p>Focus
and Fix
_P _S _Z J_ _F V _B L Q AA _T _U R X _Y
0
6
0
4
0
3
0
2
0
1
0
2
0
1
ICAL explorations. However, it fails to distinguish between
OSCILLATE-FOCUS and OSCILLATE explorations, the frontier being
quite fuzzy, and FIX explorations are not distinguished from
FOCUS ones. We remind that these labels are not a real ground
truth, but a preliminary classification for other purpose. Table 2
indicates ARI and V-measure scores.</p>
    </sec>
    <sec id="sec-14">
      <title>6.2 Comparison with other distances</title>
      <p>In this experiment we compare the clusters obtained using 3
distances: CED, ED and AD. Results are reported in Table 2 and
in both Artificial and Ipums workloads on both quality metrics.</p>
      <p>With ED, clusters reflect exploration sizes instead of query
operations. For example, in Figure 4(e) the first cluster includes
short explorations, the second cluster contains the longest ones,
and the last cluster contains medium ones. Conversely, AD relies</p>
      <sec id="sec-14-1">
        <title>Dataset Distance</title>
      </sec>
      <sec id="sec-14-2">
        <title>ARI V-measure Artificial Ipums CED</title>
      </sec>
    </sec>
    <sec id="sec-15">
      <title>6.3 Other quality considerations</title>
      <p>In addition to ARI and V-measure scores (calculated w.r.t. a
ground truth), we computed cluster diameters and Silhouette
scores to complete our quality analysis. Results are reported in
Table 3 for the 4 datasets.</p>
      <p>Globally, we observe that most diameters are low, indicating
that clusters are compact. Therefore, medoids are good
representatives of each cluster. Most Silhouette scores are also positive,
which is a good result given that our clusters are not
hyperspherical. In particular, we note that even if CED was able to
generate a pure partition for the Artificial workload, we observe
a low Silhouette score.
6.4</p>
    </sec>
    <sec id="sec-16">
      <title>Interpretation of students’ behavior</title>
      <p>The next experiment clusters students explorations of the Ipums
and Open workloads. We manually examine some explorations of
each cluster, including the centroid, with the goal of abstracting
students explorations patterns.</p>
      <p>Ipums workload. The 27 explorations are arranged in 4 clusters
of diferent sizes.</p>
      <p>Clusters of explorations represent the following behavior:
• The 2 explorations in the first cluster start by many changes
in the measure set (as trying to choose the good measures),
followed by a long period of filter/unfilter operations,
combined with some drill-downs and roll-ups, but with little
changes in the level of detail.
• Globally, explorations in the second cluster alternates
drilldowns and roll-ups. Some of them include a few filters,
but most of them (this is the case of the medoid) do not
iflter any data.
• The 3 explorations of the third cluster start alternating
drills down and rolls up (as in cluster 2), then alternate
iflters/unfilters, some of them focusing at the end (as in
cluster 4). This cluster has common points with clusters 2
and 4, some kind of intermediate behavior.
• The last cluster includes focused explorations, which
regularly increase the level of detail and filtering by adding
drill-down and filter operations. Some of them mix other
operations, mostly at the beginning, but drill-downs and
iflters are the predominant operations.</p>
      <p>From a more general perspective, our study shows that half of
the explorations follow a focused pattern (cluster 4) translating
that those students have developed a particular type of
analysis skills, while other students are more exploratory (cluster 2),
perhaps translating a lack of maturity in their analysis skills,
perhaps just showing their style. Clusters 1 and 3 depicts outlier
behaviors.</p>
      <p>Open workload. Our method organizes the 28 explorations in 6
clusters, 3 of them containing an outlier exploration, the first one
being very diferent from all the others (inter-cluster distance
around 50).</p>
      <p>The interpretation of clusters is harder for this workload, as
Saiku tool produce very longs explorations (the longest in this
workload counts 127 queries). So manual inspection of
explorations is tedious and may lead to judgement errors. With this
disclaimer, we summarize the behavior represented by clusters
as follows:
• The outlier in first cluster is the shortest exploration (4
queries), whose queries are fully aggregated (only ALL
levels), and operations only change measures.
• The second cluster contains 10 explorations, many ones
being very short, including the medoid. A general behavior
is a constant or lightly increasing level of detail, sometimes
being high, sometimes medium. Most explorations (except
one) have little filters, but exhibit some changes in the
measure set.
• The third cluster contains 7 explorations, all of them
continuously increasing the level of detail and filtering. There
are multiple drill-downs and multiple filters all along the
explorations.
• Cluster 4 contains another outlier clustered alone. It
exhibits several abrupt changes in the level of detail with
several peaks, continuous changes of measures and some
iflters in the middle.
• Another exploration also clustered alone. It also shows
many abrupt changes in the level of detail, with some
changes in filters and measures at the beginning and an
increase in the filter level at the end.
• The last cluster contains 8 explorations. Its medoid has no
iflters nor changes in the measure set. OLAP operations
include only drill-downs and roll-ups, with an increase of
the level of detail in the middle, decreasing at the end of
the exploration. Other explorations in the cluster include
other OLAP operations. The common behavior resides in
the increasing-decreasing pattern in the level of detail.</p>
      <p>In conclusion, this clustering confirmed some of the already
identified patterns and enabled to discover a new one. Specifically,
cluster 3 corresponds quite well to the Focus cluster of Ipums
workload and the Slice and Drill template of CubeLoad; while
cluster 6 corresponds to the Oscillate cluster of Ipums (having no
equivalent template in CubeLoad). The new pattern, reflected by
cluster 2, corresponds to less skilled students, making timid usage
of OLAP operations (some drill-downs and roll-ups, few filters,
some changes of measure). The recognition of outlier behavior
is another strong point of our method.
6.5</p>
    </sec>
    <sec id="sec-17">
      <title>Interpretation of experts’ behavior</title>
      <p>This experiment shows the application of our approach to a
larger workload, whose explorations were devised by expert
analysts using an advanced IDE interface. Surprisingly, many
explorations of the Security workload contain only one query
(260 out of 723); we excluded them from the study. Another
interesting point is that there are long sequences of repeated
queries (i.e. the exploration contains many times the same query).
This may reflect movements in the way query results are arranged
and visualized, while referring to the same underlying query.</p>
      <p>There is no ground truth and a manual observation of the 723
explorations is not doable, however, we provide some general
comments and a detailed analysis of the medoids of the 5 retrieved
clusters (and some randomly picked explorations):
• Explorations in cluster 1 do many movements in the group
by set, oscillating the level of detail, with some peaks in</p>
      <sec id="sec-17-1">
        <title>Slice and Drill</title>
        <p>and few filters.
the middle. There are other operations; the medoid does
many changes in measure set.
• Cluster 2 contains many long explorations, which
characteristic is the alternation of adding and deleting one
fragment (a level in the group by set, a filter or a measure).
• Explorations in the third cluster are highly similar (many
distances are around 0). It includes many short
explorations (as the medoid), with few operations, mainly
drill• Explorations in cluster 4 have very few operations, and
globally exhibit long subsequences of identical queries.
• In the last cluster, queries have constant level of detail
(generally low), with some movements in the group by set
As expected, analysts’ behavior is diferent from students’.
Globally, their explorations exhibit less operations, with more
emphasis in the grouping of data, probably also in their
arrangement and visualization (which is not captured in our method)
of the data; while students are more click-oriented and produce
longer explorations with much more operations.</p>
        <p>Clusters 3 and 4 evidence this behavior and Cluster 2 is some
kind of generalization of the Slice All pattern of CubeLoad.
Clusters 1 and 5 coincide with those of the other workloads. Table 4
summarizes the discovered patterns.
7</p>
      </sec>
    </sec>
    <sec id="sec-18">
      <title>CONCLUSION</title>
      <p>This paper addressed the problem of learning analysis patterns
in OLAP explorations, which is a hot topic for the understanding
of human behavior and providing IDE support. Concretely, we
propose to cluster similar explorations using a Contextual Edit
Distance, and then extract analysis behavior from clusters. CED
is a new distance that is well-suited for comparing explorations
taking into account their local context, and then lowering the
edition cost of similar queries, repetitions and permutations. Our
experiments with four workloads allowed to detect CubeLoad
templates and to learn some new analysis patterns from students
and expert analysts explorations. Even if these results are
promising, our method needs to be tested in larger workloads, with
varied skilled and non-skilled users and diferent types of user
interfaces, before abstracting more general patterns.</p>
      <p>As future work, we plan to tune our method and study its
sensibility and robustness with respect to CED parameters, query
features and query similarity. We would also like to compare our
results to other clustering methods and distances. Our long term
goal is to automatically classify explorations and qualify users
skills, allowing the recommendation of pertinent next queries,
among other applications.</p>
      <p>
        Finally, we remark that CED is not endemic to analysis
behavior and it can be adapted to study other types of human behavior
(provided that such behavior could be represented as a sequence
of symbols). In particular, we have used CED for comparing
human daily moves [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] and we are currently discovering and
analysing peculiar patterns of children mobility.
      </p>
    </sec>
    <sec id="sec-19">
      <title>ACKNOWLEDGMENTS</title>
      <p>The authors would like to thank Nicolas Labroche for their useful
insights on clustering quality. This work is partially supported
by French ANR Agency, in the context of Mobi’kids project.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Aybar</surname>
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Acar</surname>
            and
            <given-names>Amihai</given-names>
          </string-name>
          <string-name>
            <surname>Motro</surname>
          </string-name>
          .
          <year>2004</year>
          .
          <article-title>Why Is this User Asking so Many Questions? Explaining Sequences of Queries</article-title>
          .
          <source>In Eighteenth Annual Conference on Data and Applications Security</source>
          .
          <fpage>159</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Julien</given-names>
            <surname>Aligon</surname>
          </string-name>
          , Kamal Boulil, Patrick Marcel, and
          <string-name>
            <given-names>Verónika</given-names>
            <surname>Peralta</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>A Holistic Approach to OLAP Sessions Composition: The Falseto Experience</article-title>
          .
          <source>In DOLAP</source>
          <year>2014</year>
          .
          <volume>37</volume>
          -
          <fpage>46</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Julien</given-names>
            <surname>Aligon</surname>
          </string-name>
          , Matteo Golfarelli, Patrick Marcel, Stefano Rizzi, and
          <string-name>
            <given-names>Elisa</given-names>
            <surname>Turricchia</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Similarity measures for OLAP sessions</article-title>
          .
          <source>KAIS 39</source>
          ,
          <issue>2</issue>
          (
          <year>2014</year>
          ),
          <fpage>463</fpage>
          -
          <lpage>489</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N.</given-names>
            <surname>Arzamasova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Böhm</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Goldman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Saaler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Schaeler</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>On the Usefulness of SQL-Query-Similarity Measures to Find User Interests</article-title>
          .
          <source>TKDE</source>
          (
          <year>2019</year>
          ),
          <fpage>1</fpage>
          -
          <lpage>1</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Surajit</given-names>
            <surname>Chaudhuri and Vivek R. Narasayya</surname>
          </string-name>
          .
          <year>2007</year>
          .
          <article-title>Self-Tuning Database Systems: A Decade of Progress</article-title>
          .
          <source>In VLDB. 3-14.</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F. J.</given-names>
            <surname>Damerau</surname>
          </string-name>
          .
          <year>1964</year>
          .
          <article-title>A Technique for Computer Detection and Correction of Spelling Errors</article-title>
          .
          <source>Commun. ACM 7</source>
          ,
          <issue>3</issue>
          (
          <year>1964</year>
          ),
          <fpage>171</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Mahfoud</given-names>
            <surname>Djedaini</surname>
          </string-name>
          , Krista Drushku, Nicolas Labroche, Patrick Marcel, Verónika Peralta, and
          <string-name>
            <given-names>Willeme</given-names>
            <surname>Verdeaux</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Automatic assessment of interactive OLAP explorations</article-title>
          .
          <source>Inf. Syst</source>
          .
          <volume>82</volume>
          (
          <year>2019</year>
          ),
          <fpage>148</fpage>
          -
          <lpage>163</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Mahfoud</given-names>
            <surname>Djedaini</surname>
          </string-name>
          , Nicolas Labroche, Patrick Marcel, and
          <string-name>
            <given-names>Verónika</given-names>
            <surname>Peralta</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Detecting User Focus in OLAP Analyses</article-title>
          . In ADBIS.
          <volume>105</volume>
          -
          <fpage>119</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Philipp</given-names>
            <surname>Eichmann</surname>
          </string-name>
          , Emanuel Zgraggen,
          <string-name>
            <given-names>Zheguang</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Carsten</given-names>
            <surname>Binnig</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Tim</given-names>
            <surname>Kraska</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Towards a Benchmark for Interactive Data Exploration</article-title>
          .
          <source>IEEE Data Eng. Bull. 39</source>
          ,
          <issue>4</issue>
          (
          <year>2016</year>
          ),
          <fpage>50</fpage>
          -
          <lpage>61</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Magdalini</surname>
            <given-names>Eirinaki</given-names>
          </string-name>
          , Suju Abraham, Neoklis Polyzotis, and
          <string-name>
            <given-names>Naushin</given-names>
            <surname>Shaikh</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>QueRIE: Collaborative Database Exploration</article-title>
          .
          <source>TKDE 26</source>
          ,
          <issue>7</issue>
          (
          <year>2014</year>
          ),
          <fpage>1778</fpage>
          -
          <lpage>1790</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>D. P.</given-names>
            <surname>Huttenlocher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. J.</given-names>
            <surname>Rucklidge</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G. A.</given-names>
            <surname>Klanderman</surname>
          </string-name>
          .
          <year>1992</year>
          .
          <article-title>Comparing images using the Hausdorf distance under translation</article-title>
          .
          <source>In CVPR</source>
          .
          <volume>654</volume>
          -
          <fpage>656</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Stratos</surname>
            <given-names>Idreos</given-names>
          </string-name>
          , Olga Papaemmanouil, and
          <string-name>
            <given-names>Surajit</given-names>
            <surname>Chaudhuri</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Overview of Data Exploration Techniques</article-title>
          .
          <source>In SIGMOD</source>
          .
          <volume>277</volume>
          -
          <fpage>281</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Richard</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Karp</surname>
          </string-name>
          .
          <year>1972</year>
          .
          <article-title>Reducibility among Combinatorial Problems</article-title>
          .
          <fpage>85</fpage>
          -
          <lpage>103</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Ralph</given-names>
            <surname>Kimball</surname>
          </string-name>
          .
          <year>1996</year>
          .
          <article-title>The Data Warehouse Toolkit: Practical Techniques for Building Dimensional Data Warehouses</article-title>
          . John Wiley.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Tova</given-names>
            <surname>Milo</surname>
          </string-name>
          and
          <string-name>
            <given-names>Amit</given-names>
            <surname>Somech</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Next-Step Suggestions for Modern Interactive Data Analysis Platforms</article-title>
          . In KDD.
          <volume>576</volume>
          -
          <fpage>585</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>C.</given-names>
            <surname>Moreau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Devogele</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Peralta</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Etienne</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>A Contextual Edit Distance for Semantic Trajectories</article-title>
          .
          <source>Proc. of 35th ACM/SIGAPP</source>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Patrick E. O'Neil</surname>
          </string-name>
          ,
          <string-name>
            <surname>Elizabeth J. O'Neil</surname>
            ,
            <given-names>Xuedong</given-names>
          </string-name>
          <string-name>
            <surname>Chen</surname>
            , and
            <given-names>Stephen</given-names>
          </string-name>
          <string-name>
            <surname>Revilak</surname>
          </string-name>
          .
          <year>2009</year>
          .
          <article-title>The Star Schema Benchmark and Augmented Fact Table Indexing.</article-title>
          .
          <source>In TPCTC (2009-10-28)</source>
          .
          <fpage>237</fpage>
          -
          <lpage>252</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>F.</given-names>
            <surname>Pedregosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Varoquaux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gramfort</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Michel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Thirion</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Grisel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Blondel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Prettenhofer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Weiss</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Dubourg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vanderplas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Passos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Cournapeau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brucher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Perrot</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Duchesnay</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Scikit-learn: Machine Learning in Python</article-title>
          .
          <source>Journal of Machine Learning Research</source>
          <volume>12</volume>
          (
          <year>2011</year>
          ),
          <fpage>2825</fpage>
          -
          <lpage>2830</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>Stefano</given-names>
            <surname>Rizzi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Gallinucci</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>CubeLoad: A Parametric Generator of Realistic OLAP Workloads</article-title>
          . In CAiSE
          <year>2014</year>
          .
          <fpage>610</fpage>
          -
          <lpage>624</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Oscar</surname>
            <given-names>Romero</given-names>
          </string-name>
          , Patrick Marcel, Alberto Abelló, Verónika Peralta, and
          <string-name>
            <given-names>Ladjel</given-names>
            <surname>Bellatreche</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Describing Analytical Sessions Using a Multidimensional Algebra</article-title>
          . In DaWaK.
          <fpage>224</fpage>
          -
          <lpage>239</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <source>[21] TF. Smith and MS. Waterman</source>
          .
          <year>1981</year>
          .
          <article-title>Identification of Common Molecular Subsequences</article-title>
          .
          <source>Journal of Molecular Biology</source>
          <volume>147</volume>
          (
          <year>1981</year>
          ),
          <fpage>195</fpage>
          -
          <lpage>197</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>R.</given-names>
            <surname>Wagner</surname>
          </string-name>
          and M. Fisher.
          <year>1974</year>
          .
          <article-title>The String-to-String Correction Problem</article-title>
          .
          <source>J. ACM</source>
          <volume>21</volume>
          (
          <year>1974</year>
          ),
          <fpage>168</fpage>
          -
          <lpage>173</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>