DeepRec
Code for the WWW 2021 paper - DeepRec: On-device Deep Learning for Privacy-Preserving Sequential Recommendation in Mobile Commerce
Install / Use
/learn @hanjialiang/DeepRecREADME
DeepRec
This repository contains code for the paper DeepRec: On-device Deep Learning for Privacy-Preserving Sequential Recommendation in Mobile Commerce.
If you find this code useful, please cite our work:
@inproceedings{DBLP:conf/www/Han0ML21,
author = {Jialiang Han and
Yun Ma and
Qiaozhu Mei and
Xuanzhe Liu},
title = {DeepRec: On-device Deep Learning for Privacy-Preserving Sequential
Recommendation in Mobile Commerce},
booktitle = {{WWW} '21: The Web Conference 2021, Virtual Event / Ljubljana, Slovenia,
April 19-23, 2021},
pages = {900--911},
publisher = {{ACM} / {IW3C2}},
year = {2021}
}
Workflow Overview

First, we train a Gated Recurrent Unit (GRU) based recommendation model, i.e. the global model, with existing interaction behavior data of all users collected before GDPR, extract a personal recommendation item candidate set for each user through a collaborative filtering based model on the cloud, and push the global model to individual devices. Second, we perform fine-tuning over a GRU-based recommendation model, i.e. the personal model, with interaction behavior data of each user collected after GDPR on her own device, and extract a unique user-specific embedding from her personal model. Third, a user's device pulls her recommendation item candidate set from the cloud, and then we calculate the inner products of her user embedding and candidate item embeddings to acquire scores representing probabilities she would like to click an item in the current session. Note that, fine-tuning in the personal training phase means freezing the layers before the last GRU layer in the global model, and re-training only the last GRU layer and fully connected layer(s). The intuition behind fine-tuning is that the first several GRU layers can generalize from the global training set to the personal training set. So only the last GRU layer and fully connected layer(s) require to be re-trained, to fit the user-specific next click prediction.
Dataset and Requirements
~~TensorFlow.js~~
numpy, pandas, ipdb
Note that TensorFlow Lite has supported on-device training, therefore, we have changed the implementation of on-device training from tfjs to tflite, for better performance and less overhead.
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
400Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
last30days-skill
19.1kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
