56
Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April ,

Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Distributed frequent sequence mining withdeclarative subsequence constraints

Alexander Renz-WielandApril 26, 2017

Page 2: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1

Page 3: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

1

Page 4: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

→ lives in (2), in Washington (2),lives (2), in (2), Washington (2)

1

Page 5: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

ENTITY

PERSON

Obama Gates

LOCATION

Medina Washington

VERB

live

lives

PREP

in

→ lives in (2), in Washington (2),lives (2), in (2), Washington (2),PERSON lives in LOCATION (2), ...

1

Page 6: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

Subsequences of input sequence 1:

Obama, Obama lives, Obama in, ObamaWashington, Obama lives in, Obama livesWashington, Obama in Washington, Obamalives in Washington, lives, lives in, livesWashington, lives in Washington, in, inWashington, Washington

(15 subsequences, with hierarchy: 190)

1

Page 7: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

ENTITY

PERSON

Obama Gates

LOCATION

Medina Washington

VERB

live

lives

PREP

in

item constraint, gap constraint, lengthconstraint, ...

1

Page 8: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

ENTITY

PERSON

Obama Gates

LOCATION

Medina Washington

VERB

live

lives

PREP

in

item constraint, gap constraint, lengthconstraint, ...

“relational phrases between entities”→ lives in (2)

1

Page 9: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

• Sequence: succession of items• Words in text• Products bought by a customer• Nucleotides in DNA molecules

• Goal: find frequent sequences

• Item hierarchy

• Subsequences

• Subsequence constraints

• Declarative constraints:(Beedkar and Gemulla, 2016)

• Scalable algorithms

1: Obama lives in Washington2: Gates lives in Medina3: The IMF is based in Washington

ENTITY

PERSON

Obama Gates

LOCATION

Medina Washington

VERB

live

lives

PREP

in

item constraint, gap constraint, lengthconstraint, ...

“relational phrases between entities”→ lives in (2)

1

Page 10: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

2

Page 11: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

3

Page 12: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Problem definition

• Given• Input sequences• Item hierarchy• Constraint π• Minimum support threshold σ

• Candidate sequences of input sequence T:• Subsequences of T that conform with constraint π

• Find frequent sequences• Every sequence that is a candidate sequence of at least σ inputsequences

4

Page 13: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Related work

Sequential algorithms DESQ-COUNT and DESQ-DFS(Beedkar and Gemulla, 2016)

Two distributed algorithms for Hadoop MapReduce:

• MG-FSM (Miliaraki et al., 2013; Beedkar et al., 2015)• Maximum gap and maximum length constraints• No hierarchies

• LASH (Beedkar and Gemulla, 2015)• Maximum gap and maximum length constraints• Hierarchies

5

Page 14: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

6

Page 15: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Naïve approach

• “Word count”• Generate candidate sequences→ count→ filter

• Can improve by using single item frequencies

• Problem: a sequence of length n has O(2n) subsequences(without considering hierarchy)

• Typically less due to constraints, but still a problem

→ Need a better approach

7

Page 16: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Naïve approach

• “Word count”• Generate candidate sequences→ count→ filter

• Can improve by using single item frequencies

• Problem: a sequence of length n has O(2n) subsequences(without considering hierarchy)

• Typically less due to constraints, but still a problem

→ Need a better approach

7

Page 17: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

8

Page 18: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

• Two main stages

• Partition candidate sequences

• Similar approach used in MG-FSM and LASH

9

Page 19: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

node 1

node 2

node n

...

stage 1: process input sequences stage 2: shuffle stage 3: local mining

input sequences intermediary information partitions frequent sequences

10

Page 20: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

11

Page 21: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Partitioning

• Partition candidate sequences

• Item-based partitioning

• Pivot item

• First item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pa: ab, abc, abd, abcd

Pb: b, bc, bd, bcd

• Least frequent item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pb: ab, b

Pc: abc, bc

Pd: abd, abcd, bd, bcdwith f(a) > f(b) > f(c) > f(d)

→ reduces variance in partition sizes

12

Page 22: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Partitioning

• Partition candidate sequences

• Item-based partitioning

• Pivot item• First item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pa: ab, abc, abd, abcd

Pb: b, bc, bd, bcd

• Least frequent item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pb: ab, b

Pc: abc, bc

Pd: abd, abcd, bd, bcdwith f(a) > f(b) > f(c) > f(d)

→ reduces variance in partition sizes

12

Page 23: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Partitioning

• Partition candidate sequences

• Item-based partitioning

• Pivot item• First item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pa: ab, abc, abd, abcd

Pb: b, bc, bd, bcd

• Least frequent item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pb: ab, b

Pc: abc, bc

Pd: abd, abcd, bd, bcdwith f(a) > f(b) > f(c) > f(d)

→ reduces variance in partition sizes

12

Page 24: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Partitioning

• Partition candidate sequences

• Item-based partitioning

• Pivot item• First item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pa: ab, abc, abd, abcd

Pb: b, bc, bd, bcd

• Least frequent item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pb: ab, b

Pc: abc, bc

Pd: abd, abcd, bd, bcdwith f(a) > f(b) > f(c) > f(d)

→ reduces variance in partition sizes

12

Page 25: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Partitioning

• Partition candidate sequences

• Item-based partitioning

• Pivot item• First item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pa: ab, abc, abd, abcd

Pb: b, bc, bd, bcd

• Least frequent item

T: abcdab, abc, abcd, abd,b, bc, bcd, bd

Pb: ab, b

Pc: abc, bc

Pd: abd, abcd, bd, bcdwith f(a) > f(b) > f(c) > f(d)

→ reduces variance in partition sizes

12

Page 26: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

node 1

node 2

node n

...

stage 1: process input sequences stage 2: shuffle stage 3: local mining

input sequences intermediary information partitions frequent sequences

One partition per pivot item.

An input sequence is relevant for zero or more partitions. Next: what to shuffle?

13

Page 27: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

node 1

node 2

node n

...

stage 1: process input sequences stage 2: shuffle stage 3: local mining

input sequences intermediary information partitions frequent sequences

One partition per pivot item.An input sequence is relevant for zero or more partitions.

Next: what to shuffle?

13

Page 28: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

node 1

node 2

node n

...

stage 1: process input sequences stage 2: shuffle stage 3: local mining

input sequences intermediary information partitions frequent sequences

One partition per pivot item.An input sequence is relevant for zero or more partitions. Next: what to shuffle? 13

Page 29: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

14

Page 30: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffle

• Goal: from an input sequence, communicate candidatesequences to relevant partitions

• Two main options• Send input sequence

+ compact when many candidate sequences- need to compute candidate sequences twice

• Send candidate sequences

+ compact when candidate sequences are short and few per partition

→ Focus on sending candidate sequences→ Try to represent them compactly

15

Page 31: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffle

• Goal: from an input sequence, communicate candidatesequences to relevant partitions

• Two main options• Send input sequence

+ compact when many candidate sequences- need to compute candidate sequences twice

• Send candidate sequences

+ compact when candidate sequences are short and few per partition

→ Focus on sending candidate sequences→ Try to represent them compactly

15

Page 32: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffle

• Goal: from an input sequence, communicate candidatesequences to relevant partitions

• Two main options• Send input sequence

+ compact when many candidate sequences- need to compute candidate sequences twice

• Send candidate sequences+ compact when candidate sequences are short and few per partition

→ Focus on sending candidate sequences→ Try to represent them compactly

15

Page 33: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffle

• Goal: from an input sequence, communicate candidatesequences to relevant partitions

• Two main options• Send input sequence

+ compact when many candidate sequences- need to compute candidate sequences twice

• Send candidate sequences+ compact when candidate sequences are short and few per partition

→ Focus on sending candidate sequences→ Try to represent them compactly

15

Page 34: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

A compact representation for candidate sequences

• Goal: compactly represent set of candidate sequences• Trick: exploit shared structure

{caabe, caaBe, caAbe, caABe, cAabe, cAaBe, cAAbe, cAABe, cbe, cBe}

• Naïve NFA

0start

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

26 27 28 29 30

31 32 33 34 35

36 37 38 39 40

41 42 43

44 45 46

c

a a b e

ca a B e

ca A b e

c a A B e

c A a b e

c A a B ec A A b ec

A A B ec

b ec

B e

• Compressed NFA

0start 1

2 3

4 5{c}

{a,A} {a,A} {b,B}

{e}

{b,B}

16

Page 35: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

A compact representation for candidate sequences

• Goal: compactly represent set of candidate sequences• Trick: exploit shared structure

{caabe, caaBe, caAbe, caABe, cAabe, cAaBe, cAAbe, cAABe, cbe, cBe}

• Naïve NFA

0start

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

26 27 28 29 30

31 32 33 34 35

36 37 38 39 40

41 42 43

44 45 46

c

a a b e

ca a B e

ca A b e

c a A B e

c A a b e

c A a B ec A A b ec

A A B ec

b ec

B e

• Compressed NFA

0start 1

2 3

4 5{c}

{a,A} {a,A} {b,B}

{e}

{b,B}

16

Page 36: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

A compact representation for candidate sequences

• Goal: compactly represent set of candidate sequences• Trick: exploit shared structure

{caabe, caaBe, caAbe, caABe, cAabe, cAaBe, cAAbe, cAABe, cbe, cBe}

• Naïve NFA

0start

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

26 27 28 29 30

31 32 33 34 35

36 37 38 39 40

41 42 43

44 45 46

c

a a b e

ca a B e

ca A b e

c a A B e

c A a b e

c A a B ec A A b ec

A A B ec

b ec

B e

• Compressed NFA

0start 1

2 3

4 5{c}

{a,A} {a,A} {b,B}

{e}

{b,B}

16

Page 37: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

A compact representation for candidate sequences

• Goal: compactly represent set of candidate sequences• Trick: exploit shared structure

{caabe, caaBe, caAbe, caABe, cAabe, cAaBe, cAAbe, cAABe, cbe, cBe}

• Naïve NFA

0start

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

26 27 28 29 30

31 32 33 34 35

36 37 38 39 40

41 42 43

44 45 46

c

a a b e

ca a B e

ca A b e

c a A B e

c A a b e

c A a B ec A A b ec

A A B ec

b ec

B e

• Compressed NFA

0start 1

2 3

4 5{c}

{a,A} {a,A} {b,B}

{e}

{b,B} 16

Page 38: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffling NFAs

Constructing NFAs

• Per input sequence, build one NFA for each relevant partition• Naïve: generate all candidate sequences, compress• Better: build directly from Finite State Transducer

Serialization

• Send structure and items• Many “simple” NFAs

0start 1 2 3{a} {b} {c}

17

Page 39: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffling NFAs

Constructing NFAs

• Per input sequence, build one NFA for each relevant partition• Naïve: generate all candidate sequences, compress• Better: build directly from Finite State Transducer

Serialization

• Send structure and items

• Many “simple” NFAs

0start 1 2 3{a} {b} {c}

17

Page 40: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Shuffling NFAs

Constructing NFAs

• Per input sequence, build one NFA for each relevant partition• Naïve: generate all candidate sequences, compress• Better: build directly from Finite State Transducer

Serialization

• Send structure and items• Many “simple” NFAs

0start 1 2 3{a} {b} {c}

17

Page 41: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

18

Page 42: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

node 1

node 2

node n

...

stage 1: process input sequences stage 2: shuffle stage 3: local mining

input sequences intermediary information partitions frequent sequences

Done: How to partition? What to shuffle?

Next: How to process the partitions?

19

Page 43: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Overview

node 1

node 2

node n

...

stage 1: process input sequences stage 2: shuffle stage 3: local mining

input sequences intermediary information partitions frequent sequences

Done: How to partition? What to shuffle?Next: How to process the partitions? 19

Page 44: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Local mining

• Partition for pivot item p• Given: list of NFAs• Goal: mine frequent sequences with pivot item p

• Pattern-growth approach (Pei et al., 2001)

20

Page 45: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Outline

Preliminaries

Naïve approach

Proposed algorithm

Partitioning

Shuffle

Local mining

Experimental evaluation

21

Page 46: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Experimental setup

• Implementation• In Java and Scala• For Apache Spark

• Experiments on cluster with 8 worker nodes• 8 cores per node• 64 GB memory per node

• Here: two datasets• 50 million sentences from New York Times• Product reviews of 21 million Amazon users

22

Page 47: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Non-traditional constraints

• Constraints that cannot be expressed with traditional methods• Compare to count-based approach

A1A2 A3 A4N1 N2 N3 N4 N5100

101

102

103

totalrun

time(seconds) Count

DDIN

→ DDIN not slower for selective constraints N1, N2, N3, and A2→ DDIN up to 50× faster for unselective constraints N4, N5, A1, A3, and A4

23

Page 48: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Non-traditional constraints

• Constraints that cannot be expressed with traditional methods• Compare to count-based approach

A1A2 A3 A4N1 N2 N3 N4 N5100

101

102

103

totalrun

time(seconds) Count

DDIN

→ DDIN not slower for selective constraints N1, N2, N3, and A2→ DDIN up to 50× faster for unselective constraints N4, N5, A1, A3, and A4

23

Page 49: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Non-traditional constraints

• Constraints that cannot be expressed with traditional methods• Compare to count-based approach

A1A2 A3 A4N1 N2 N3 N4 N5100

101

102

103

totalrun

time(seconds) Count

DDIN

→ DDIN not slower for selective constraints N1, N2, N3, and A2→ DDIN up to 50× faster for unselective constraints N4, N5, A1, A3, and A4

23

Page 50: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Traditional constraints

• Compare to LASH, state-of-the art distributed algorithm• Maximum gap and maximum length constraints, hierarchies

L(10,1,5)

L(100,0,5)

L(100,1,3)

L(100,1,4)

L(100,1,5)

L(100,1,6)

L(100,1,7)

L(100,2,5)

L(100,3,5)

L(10k,1,5)

L(1k,1,5)

0

10

20

n/atotalrun

time(minutes) LASH (Hadoop)

DDIN (Spark)

→ DDIN generally competitive to LASH, despite being more general→ The fewer candidate sequences, the better DDIN

24

Page 51: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Traditional constraints

• Compare to LASH, state-of-the art distributed algorithm• Maximum gap and maximum length constraints, hierarchies

L(10,1,5)

L(100,0,5)

L(100,1,3)

L(100,1,4)

L(100,1,5)

L(100,1,6)

L(100,1,7)

L(100,2,5)

L(100,3,5)

L(10k,1,5)

L(1k,1,5)

0

10

20

n/atotalrun

time(minutes) LASH (Hadoop)

DDIN (Spark)

→ DDIN generally competitive to LASH, despite being more general→ The fewer candidate sequences, the better DDIN

24

Page 52: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Traditional constraints

• Compare to LASH, state-of-the art distributed algorithm• Maximum gap and maximum length constraints, hierarchies

L(10,1,5)

L(100,0,5)

L(100,1,3)

L(100,1,4)

L(100,1,5)

L(100,1,6)

L(100,1,7)

L(100,2,5)

L(100,3,5)

L(10k,1,5)

L(1k,1,5)

0

10

20

n/atotalrun

time(minutes) LASH (Hadoop)

DDIN (Spark)

→ DDIN generally competitive to LASH, despite being more general→ The fewer candidate sequences, the better DDIN 24

Page 53: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

More findings

• Scales linearly• Tested effect of dataset size, weak and strong scalability

• Main limitation• Many candidate sequences with no common structure• Better approach: send input sequence

25

Page 54: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Conclusion

• Distributed algorithm for frequent sequence mining withdeclarative subsequence constraints

• Item-based partitioning, shuffles candidate sequences as NFA

• Can mine a wide range of constraints

• Outperforms naïve approach, competitive to LASH, scaleslinearly

Thank you!

26

Page 55: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

Conclusion

• Distributed algorithm for frequent sequence mining withdeclarative subsequence constraints

• Item-based partitioning, shuffles candidate sequences as NFA

• Can mine a wide range of constraints

• Outperforms naïve approach, competitive to LASH, scaleslinearly

Thank you!

26

Page 56: Distributed frequent sequence mining with declarative ... · Distributed frequent sequence mining with declarative subsequence constraints Alexander Renz-Wieland April 26, 2017

References

Kaustubh Beedkar and Rainer Gemulla. Lash: Large-scale sequence mining withhierarchies. SIGMOD ’15, pages 491–503. ACM, 2015.

Kaustubh Beedkar and Rainer Gemulla. Desq: Frequent sequence mining withsubsequence constraints. ICDM ’16, pages 793–798. IEEE, 2016.

Kaustubh Beedkar, Klaus Berberich, Rainer Gemulla, and Iris Miliaraki. Closing thegap: Sequence mining at scale. ACM Transactions on Database Systems, 40(2):8:1–8:44, 2015.

Iris Miliaraki, Klaus Berberich, Rainer Gemulla, and Spyros Zoupanos. Mind the gap:Large-scale frequent sequence mining. SIGMOD ’13, pages 797–808. ACM, 2013.

Jian Pei, Jiawei Han, Behzad Mortazavi-Asl, Helen Pinto, Qiming Chen, UmeshwarDayal, and Mei-Chun Hsu. Prefixspan: mining sequential patterns efficiently byprefix-projected pattern growth. ICDE ’01, pages 215–224. IEEE, 2001.

27