A Distributed Algorithm for Large-Scale Generalized Matching Faraz - - PowerPoint PPT Presentation

a distributed algorithm for large scale generalized
SMART_READER_LITE
LIVE PREVIEW

A Distributed Algorithm for Large-Scale Generalized Matching Faraz - - PowerPoint PPT Presentation

A Distributed Algorithm for Large-Scale Generalized Matching Faraz Makari, Baruch Awerbuch, Rainer Gemulla, Rohit Khandekar, Julin Mestre, Mauro Sozio Recommender systems Given: A user-item feedback matrix Goal: Recommend additional


slide-1
SLIDE 1

Faraz Makari, Baruch Awerbuch, Rainer Gemulla, Rohit Khandekar, Julián Mestre, Mauro Sozio

A Distributed Algorithm for Large-Scale Generalized Matching

slide-2
SLIDE 2

Recommender systems

1

? ? 2 ? ? ? 4 ? ? ? 5 ?

Given:

  • A user-item feedback matrix

Goal:

  • Recommend additional

items users may like

slide-3
SLIDE 3

Recommender systems

4 1 2 5 1 3 4 4 2 3 5 2

1

Given:

  • A user-item feedback matrix

Goal:

  • Recommend additional

items users may like

Approach:

I. Predict missing ratings

slide-4
SLIDE 4

Recommender systems

4 1 2 5 1 3 4 4 2 3 5 2

1

Given:

  • A user-item feedback matrix

Goal:

  • Recommend additional

items users may like

Approach:

I. Predict missing ratings

  • II. Recommend items with

highest predicted ratings

slide-5
SLIDE 5

Recommender systems

4 1 2 5 1 3 4 4 2 3 5 2

1

Given:

  • A user-item feedback matrix

Goal:

  • Recommend additional

items users may like

Approach:

I. Predict missing ratings

  • II. Recommend items with

highest predicted ratings

slide-6
SLIDE 6

Recommender systems

4 1 2 5 1 3 4 4 2 3 5 2

1

Given:

  • A user-item feedback matrix

Goal:

  • Recommend additional

items users may like

Approach:

I. Predict missing ratings

  • II. Recommend items with

highest predicted ratings How to recommend items under constraints?

slide-7
SLIDE 7

Generalized Bipartite Matching (GBM)

2

# Recommendation = 1 Available DVD per movie = 2

4 Constraints:

  • Neither too few nor too many recommendations
  • Number of DVDs limited

1 5 1 3 4 2 3 2

Users Predicted ratings DVDs

slide-8
SLIDE 8

Generalized Bipartite Matching (GBM)

2

Constraints:

  • Neither too few nor too many recommendations
  • Number of DVDs limited

# Recommendation = 1

4 1 5 1 3 4 2 3 2

Users Predicted ratings DVDs Available DVD per movie = 2

slide-9
SLIDE 9

Generalized Bipartite Matching (GBM)

1 ≤ # Recommendations ≤ 2

Goal

  • Recommend items to users s.t.

I.

Interesting for users

II.

Neither too few nor too many

  • III. Availability of items satisfied

3

Maximum weight matching LB and UB constraints

4 1 5 1 3 4 2 3 2

Users Predicted ratings DVDs Available DVD per movie = 2 s.t.

slide-10
SLIDE 10

Generalized Bipartite Matching (GBM)

3

1 ≤ # Recommendations ≤ 2

4 1 5 1 3 4 2 3 2

Users Predicted ratings DVDs Available DVD per movie = 2

Goal

  • Recommend items to users s.t.

I.

Interesting for users

II.

Neither too few nor too many

  • III. Availability of items satisfied

Maximum weight matching LB and UB constraints s.t.

slide-11
SLIDE 11

Challenge

GBM optimally solvable in polynomial time

  • E.g., linear programming
  • Available solvers handle small instances very well

4

slide-12
SLIDE 12

Challenge

GBM optimally solvable in polynomial time

  • E.g., linear programming
  • Available solvers handle small instances very well

Real applications can be large

  • E.g., Netflix has >20M users, >20k movies
  • Available solvers do not scale to large problems

4

slide-13
SLIDE 13

Challenge

GBM optimally solvable in polynomial time

  • E.g., linear programming
  • Available solvers handle small instances very well

Real applications can be large

  • E.g., Netflix has >20M users, >20k movies
  • Available solvers do not scale to large problems

Goal:

  • Efficient and scalable algorithm for large-scale GBM instances

4

slide-14
SLIDE 14

Framework

Phase 1: Approximate LP

  • Compute “edge probabilities’’

using linear programming

5

Phase 1

2

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.6 0.4

slide-15
SLIDE 15

Framework

Phase 1: Approximate LP

  • Compute “edge probabilities’’

using linear programming

Phase 2: Round

  • Select edges based on

probabilities from phase 1

1 1 1 1 1 1 Phase 2

5

2

Phase 1 0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.6 0.4

slide-16
SLIDE 16

Phase 1: Computing edge probabilities

Algorithm for Mixed Packing Covering (MPC) LPs (like GBM LP)

  • Gradient-based multiplicative weights update algorithm
  • Approximately solves MPC LPs (ε: approx. parameter)
  • LB and UB constraints satisfied up to (1±ε) Almost feasible
  • Objective value (1-ε) of the optimum Near-optimal
  • Poly-log rounds
  • Easy to implement: Each round involves matrix-vector multiplications

6

  • Contrib. 1
slide-17
SLIDE 17

Phase 1: Computing edge probabilities

Algorithm for Mixed Packing Covering (MPC) LPs (like GBM LP)

7

  • Contrib. 1

0.9 0.5 0.6 0.2 0.1 0.2 0.2 0.8 0.5 1 ≤ deg ≤ 2 0 ≤ deg ≤ 2

slide-18
SLIDE 18

Phase 1: Computing edge probabilities

Algorithm for Mixed Packing Covering (MPC) LPs (like GBM LP)

8

  • Contrib. 1

0.9 0.5 0.6 0.2 0.1 0.2 0.2 0.8 0.5 1 ≤ deg ≤ 2 1.3 0.9 0.4 1.3 0 ≤ deg ≤ 2 2.3 0.9 0.8

slide-19
SLIDE 19

Phase 1: Computing edge probabilities

Algorithm for Mixed Packing Covering (MPC) LPs (like GBM LP)

9

  • Contrib. 1

0.6 0.6 0.8 0.3 0.4 0.5 0.2 0.7 0.7 1 ≤ deg ≤ 2 1.2 1.5 0.7 1.4 0 ≤ deg ≤ 2 2.1 1.4 1.3

slide-20
SLIDE 20

Phase 1: Computing edge probabilities

Algorithm for Mixed Packing Covering (MPC) LPs (like GBM LP)

10

  • Contrib. 1

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6 1 ≤ deg ≤ 2 1.1 1.7 1.0 1.0 0 ≤ deg ≤ 2 2.0 1.4 1.4

slide-21
SLIDE 21

Phase 1: Computing edge probabilities

Algorithm for Mixed Packing Covering (MPC) LPs (like GBM LP) Distributed Processing for GBM (details in paper)

  • Communication depends on # nodes not # edges
  • All computation in parallel

10

  • Contrib. 1

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6 1 ≤ deg ≤ 2 1.1 1.7 1.0 1.0 0 ≤ deg ≤ 2 2.0 1.4 1.4

  • Contrib. 2
slide-22
SLIDE 22

Phase 2: Selecting edges

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6

11

1.1 1.7 1.0 1.0 2.0 1.4 1.4

slide-23
SLIDE 23

Phase 2: Selecting edges

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)

Naïve approach: Round independently using prob. from phase 1

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6

11

1.1 1.7 1.0 1.0 2.0 1.4 1.4

slide-24
SLIDE 24

Phase 2: Selecting edges

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding) ✖

II.

  • Approx. guarantee preserved (in expectation) ✔

Naïve approach: Round independently using prob. from phase 1

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6

11

1.1 1.7 1.0 1.0 2.0 1.4 1.4

slide-25
SLIDE 25

Phase 2: Selecting edges

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6

12

1.1 1.7 1.0 1.0 2.0 1.4 1.4

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
slide-26
SLIDE 26

Phase 2: Selecting edges

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6

13

1.1 1.7 1.0 1.0 2.0 1.4 1.4

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
slide-27
SLIDE 27

Phase 2: Selecting edges

0.7 0.4 0.9 0.3 0.5 0.7 0.3 0.4 0.6

14

1.1 1.7 1.0 1.0 2.0 1.4 1.4

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph

Cycle

slide-28
SLIDE 28

0.7 0.4 1 0.3 0.4 0.7 0.3 0.3 0.7

15

1.1 1.7 1.0 1.0 2.0 1.4 1.4

Phase 2: Selecting edges

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph

Cycle

slide-29
SLIDE 29

0.7 0.4 1 0.3 0.4 0.7 0.3 0.3 0.7

16

1.1 1.7 1.0 1.0 2.0 1.4 1.4

Phase 2: Selecting edges

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph
  • 3. Repeat until graph is empty

Cycle

slide-30
SLIDE 30

1 0.1 1

17

2.0 1.4 1.4 1.1 1.7 1.0 1.0 1

Phase 2: Selecting edges

0.3 0.4 1

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph
  • 3. Repeat until graph is empty

Maximal path

slide-31
SLIDE 31

1 0.4 1

18

2.0 1.4 1.7 1.4 1.7 1.0 1.0 1

Phase 2: Selecting edges

0.7 1

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph
  • 3. Repeat until graph is empty

Maximal path

slide-32
SLIDE 32

1 1 1

19

2.0 2.0 2.0 2.0 2.0 1.0 1.0 1

Phase 2: Selecting edges

1 1

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding)

II.

  • Approx. guarantee preserved (in expectation)
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph
  • 3. Repeat until graph is empty
slide-33
SLIDE 33

1 1 1

20

2.0 2.0 2.0 2.0 2.0 1.0 1.0 1

Phase 2: Selecting edges

1 1

  • Given: Edge probabilities from phase 1
  • Goal: Select edges to be in final solution s. t.

I.

LB and UB constraints satisfied (up to rounding) ✔

II.

  • Approx. guarantee preserved (in expectation) ✔
  • Seq. algorithm [Gandhi et al. 06]:
  • 1. Find a cycle/maximal path
  • 2. Modify edge prob. on the

cycle/maximal path (details omitted)

  • If edge prob. = 1, include in solution
  • If edge prob. = 0, remove from graph
  • 3. Repeat until graph is empty
slide-34
SLIDE 34

Phase 2: Selecting edges

21

How to distribute?

  • A local cycle is a global cycle
  • A local maximal path is not

a global maximal path

  • Order of processing cycles has no

affect on approx. guarantess

  • Contrib. 3

Partition Partition

slide-35
SLIDE 35

Phase 2: Selecting edges

22

  • Contrib. 3

Distributed algorithm:

  • 1. Partition edges uniformly across

compute nodes

  • 2. Process all cycles in each partition
  • 3. Merge all partitions
  • 4. Repeat until graph is “small enough”
  • 5. On last partition: Process all cycles

and maximal paths using seq. alg.

Partition Partition

slide-36
SLIDE 36

Phase 2: Selecting edges

23

  • Contrib. 3

Partition Partition

Distributed algorithm:

  • 1. Partition edges uniformly across

compute nodes

  • 2. Process all cycles in each partition
  • 3. Merge all partitions
  • 4. Repeat until graph is “small enough”
  • 5. On last partition: Process all cycles

and maximal paths using seq. alg.

slide-37
SLIDE 37

Large-Scale (Semi-) Synthetic Experiments

Dataset # users # items # edges Netflix-predicted 490k 18k 3.2B Synthetic 10M 1M 1B

Gurobi ran out of memory on a large-memory server with 512GB RAM

24

Cluster of commodity nodes

Nodes x cores Total time (h) 1x8 2x8 4x8 8x8 16x8 10 20 30 40 50 60

Rounding Netflix−predicted Fractional solution Netflix−predicted Rounding Synthetic Fractional solution Synthetic

Insufficient memory Insufficient memory Insufficient memory Insufficient memory Insufficient memory

Powerful server

slide-38
SLIDE 38

Large-Scale (Semi-) Synthetic Experiments

Dataset # users # items # edges Netflix-predicted 490k 18k 3.2B Synthetic 10M 1M 1B

Gurobi ran out of memory on a large-memory server with 512GB RAM

Scales to very large problem instances

24

Cluster of commodity nodes

Nodes x cores Total time (h) 1x8 2x8 4x8 8x8 16x8 10 20 30 40 50 60

Rounding Netflix−predicted Fractional solution Netflix−predicted Rounding Synthetic Fractional solution Synthetic

Insufficient memory Insufficient memory Insufficient memory Insufficient memory Insufficient memory

Powerful server

slide-39
SLIDE 39

Summary

25

  • Recommending items to users under constraints
  • Contributions:
  • A scalable distributed algorithm for large-scale GBM
  • A simple and efficient algorithm for general MPC LPs
  • Effective distributed processing for GBM
  • A distributed randomized rounding for GBM
  • Experiments indicate scalability to instances with millions

and nodes and billions of edges

slide-40
SLIDE 40

Summary

25

  • Recommending items to users under constraints
  • Contributions:
  • A scalable distributed algorithm for large-scale GBM
  • A simple and efficient algorithm for general MPC LPs
  • Effective distributed processing for GBM
  • A distributed randomized rounding for GBM
  • Experiments indicate scalability to instances with millions

and nodes and billions of edges

Thank you Questions?