How we have repeatedly improved the quality of recommendations in offline retail

Hello everyone! My name is Sasha, I am CTO & Co-Founder at LoyaltyLab. Two years ago, I went with friends, like all poor students, in the evening for a beer to the nearest convenience store. We were very upset that the retailer, knowing that we would come for a beer, did not offer a discount on chips or crackers, although this is so logical! We did not understand why this situation was happening and decided to make our company. Well, as a bonus, write yourself discounts every Friday for the very chips.


image


And it all went so far that I speak at NVIDIA GTC with material on the technical side of the product . We are happy to share our best practices with the community, so I am posting my report in the form of an article.


Introduction


Like everything at the beginning of the journey, we started with a review of how recommendation systems are made. And the most popular was the architecture of the following type:
image


:


  1. , .
  2. c .

:


  • candidate/ β€” user-product, .
  • candidates extraction/extractor/ β€” β€œ ” .

. β€” ALS. , , . , , . , ALS, baseline’.


, , , realtime , , 30 , , , . , , , , β€” , .


baseline , ALS . , , :


  • Precision β€” .
  • Recall β€” , target .
  • F1-score β€” F-, .

. 3 :


  • precision@5 β€” -5 .
  • response-rate@5 β€” ( 5 ).
  • avg roc-auc per user β€” roc-auc .

, time-series -, k , test k+1 . / . -, β€” . , .


, , baseline, ALS .
:
image


:
image


, . , , , , β€œ , ”. , , :


  1. .
  2. , .
  3. .
  4. /.
  5. ( ).
  6. , , (Word2Vec, DSSM, etc.).


, . , K ( 1-3 ), K . , :
image


, , , recall precision . β€œ 2 ”.


,


, β€œ ” , , , - . . , ALS, , . β€œ ” , , / , , , , , . 2 :
image


k β€” , 14 .
, , .



, - . , //. , - . β€” , k . , . :
image


, , , . :
image


2 , :


  1. , , K .
  2. , .

, :
image
ft β€” , K ( K=5)
tm β€” ,


, (0, 0) recall precision, . , , k , .



β€” , . -k β€œβ€ / β€œβ€ /. β€œβ€ β€œβ€ . . , , , . . :
image
β€œcategory” .


, , , β€œβ€ .



, β€” . 2 , [ i]-[ j], j > i, . producti-productj , producti . -k , . :
image


:
image
, : , , . , , , .


:
image
k β€” , .
, k=4. 4 . 


, ,


β€” , . 3:


  • ALS
  • Word2Vec (Item2Vec )
  • DSSM

ALS , , . Word2Vec, gensim. , , . , , β€œβ€ ( ). ecommerce , Ozon. DSSM . Microsoft, , research paper. :
image


Q β€” query, , D[i] β€” document, -. , . (multilayer perceptron). , .
, , β€” . :
image


β€” ALS DSSM , Word2Vec . 3 :


  1. , , .
  2. .
  3. TF-IDF .

, , , , . 1, , Β½, β…“, .:
image


TF-IDF , TF-IDF , , , , β€” . , . :
image


. ALS:
image
Item2Vec :
image
, baseline. , k . , , 50-70 .


DSSM:
image


?


, , ? ? :


  1. - . , , , .
  2. ?

, : , . , , , β€œ ” β€œ ”.


, , : (recall). , , . .
image


β€” , recall β€” . 2 , :


  • , .
  • .

, Β«, Β» , . , β€œ ” . , . , .


:
image
:
image


, , . , , , . , . , , :


  1. / .
  2. .
  3. .

, , .  , . . , :


  1. / .
  2. , . , -.
  3. , , .

:
image
overall products conversion β€” , .


. , , , . , , .


, , , , β€” 3-4%:
image


, , realtime , . , .


, . telegram. AI/ telegram β€” welcome :)


All Articles