aaron&jaech&and&mari&ostendorf university&of&washington · 2018-10-10 ·...

15
Personalized Language Model for Query AutoCompletion Aaron Jaech and Mari Ostendorf University of Washington

Upload: others

Post on 22-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Personalized  Language  Model  for  Query  Auto-­‐Completion

Aaron  Jaech  and  Mari  OstendorfUniversity  of  Washington

Page 2: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Query  Auto-­‐Completion● Search  engine  suggests  queries  as  

the  user  types

● Idea  from  Park  &  Chiba  (2017):  Use  an  LSTM  to  generate  completions○ Memory  savings  over  most  popular  

completion○ Handles  previously  unseen  prefixes

● Can  we  do  better  by  adapting  the  LM  to  provide  personalized  suggestions?

2

Page 3: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

RNN  Language  Model  Adaptation

● Learn  an  embedding,  c,    for  each  user  and  use  it  to  adapt  the  predictions

● Method  #1: Concatenate  the  user  embedding  with  the  input  at  each  step*○ Same  as  applying  a  constant  linear  shift  to  

the  bias  vector  (in  recurrent  &  output  layers)○ Leaves  most  of  the  recurrent  model  

parameters  unchanged● Method  #2: Low-­‐rank  adaptation  of  

recurrent  weight  matrix  (FactorCell  model)

Concatenating  the  user  embedding   is  the  same  as  shifting  the  bias.  

3

𝑊" = 𝑊  𝑉

ℎ' = 𝜎 𝑊" ℎ')*,𝑒', 𝑐 + 𝑏                        = 𝜎 𝑊 ℎ')*, 𝑒'   + 𝑉𝑐 + 𝑏

user  embedding

word  embedding

Adjust  b  and  W!

𝑏0

*  Referred  to  here  as  ConcatCell(Mikolov&  Zweig,  2012)

Page 4: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

W0+WA =

c LLLL cR

Low-­‐rank  adaptationGeneric  weightsAdapted  weights

(e  +  h)  x  h (e  +  h)  x  h k  x  (e  +  h)  x  r r  x  h  x  k1  x  k k  x  1

FactorCell  Model

4

● The  adaptation  matrix  is  formed  from  a  product  of  the  context  embedding  with  left  and  right  bases.

● The  two  bases  tensors  (L and  R)  hold  k  different  rank  r  matrices,  each  the  same  size  as  W. Context  vectors  give  a  weighted  combination.

Page 5: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Learning

● User  embeddings,  recurrent  layer  weights  and  {L,  R}  tensor  learned  jointly  

● Need  online  learning  to  adapt  to  users  that  were  not  previously  seen● In  joint  training,  learn  a  cold-­‐start  embedding  for  set  of  infrequent  users● During  evaluation

○ Initialize  each  users’  embedding  with  learned  cold-­‐start  vector○ Make  query  suggestions○ After  user  selects  a  query,  back-­‐propagate  and  only  update  the  user  embedding

5

Page 6: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Data  &  Experiments● Using  AOL  2006  Query  Log  data,  173K  

users  and  12  million  queries  for  training

● User  embedding  size  =  32,  LSTM  size  =  600

● Evaluate  on  500K  queries  with  disjoint  user  population

● Mean reciprocal  rank (MRR)  as  a  metric

6

Page 7: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Experimental  Results

7

Mean  Re

ciprocal  Rank

Performance  for  users  with  >  50  queries

Benefit  improves  over  time!

Page 8: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Qualitative  ComparisonWhat  queries  are  boosted  the  most  after  searching  for  “high school softball”  and  “math homework help”?

8

FactorCell ConcatCellhigh school musical horoscope

chris brown high school musical

funnyjunk.com homes for sale

funbrain.com modular homes

chat room hair styles

Queries  that  most  decrease  in  likelihood  with  the  FactorCell include  travel  agencies  and  plane  tickets.  

Page 9: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Recent  Related  Work:  Florini &  Lu,  NAACL  2018

• Also  personalized  LSTM  for  query  prediction• ConcatCell adaptation  framework• User  embedding  learned  separately• No  online  learning• Assessed  on  two  datasets,  but  different  split  of  AOL  data• Confirms  benefit  of  adapted  LM

9

Page 10: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Conclusions

● Personalization  helps  and  the  benefit  increases  as  more  queries  are  seen● Stronger  adaptation  of  the  recurrent  layer  (FactorCell)  gives  better  

results  than  concatenating  a  user  vector○ No  extra  latency/computation  due  to  caching  of  adapted  weight  matrix

● Try  out  the  FactorCell  on  your  data○ http://github.com/ajaech/query_completion

10

Page 11: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

THANKS!

Page 12: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Qualitative  ComparisonWhat  queries  are  boosted  the  most  after  searching  for  “pradahandbags”  and  “versace eyewear”?

12

FactorCell ConcatCellneiman marcus craigslist nyc

pottery barn myspace layours

jc penny verizon wireless

verizon wireless jensen ackles

bed bath and beyond

webster dictionary

Page 13: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Backup  Slides

13

Page 14: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

FactorCell  Model

14

W0 +WA =Low-­‐rank  adaptationGeneric  weightsAdapted  weights

cLLLL

cRThe  adapted  weight  matrix  is  a  drop-­‐in  replacement  for  W

h1 h2 h3 h4

<START> THE YELLOW FOX

THE YELLOW FOX JUMPED

Much  larger  change  in  recurrent  layer  than  what  ConcatCell does

ℎ'1*   =  𝜎( W4 +W0 ℎ', 𝑒' + 𝑏)

Page 15: Aaron&Jaech&and&Mari&Ostendorf University&of&Washington · 2018-10-10 · high school musical horoscope chris brown high school musical funnyjunk.com homes for sale funbrain.com modular

Prefix  and  query  length

• Longer  queries  are  more  difficult• Suggestion  quality  improves  as  prefix  length  increases

15