keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.59k stars 19.41k forks source link

RFC: Keras Recommenders (Keras-RS) #20080

Open hertschuh opened 1 month ago

hertschuh commented 1 month ago

Keras Recommenders (Keras-RS)

We are considering building Keras Recommenders, a multi-backend (TensorFlow, JAX, PyTorch) Keras 3 based library to ease the development of recommender models.

We want your feedback on features you think would be useful to have.

Please comment below.

rlcauvin commented 1 month ago

We have used TensorFlow Recommenders (TFRS) to generate sets of recommended content for users. We are mostly optimizing for user clicks, so the problem is binary classification. (We want to present content to users that they will click.) Here are some capabilities that are important to us:

  1. Leverage rich user, context, and item attributes in models.
  2. Simple feature preprocessing.
  3. Easily evaluate and compare the performance of the models in terms of ROC-AUC, top K categorical accuracy, and any other metrics suitable for evaluating recommendation engines.
  4. Leverage transfer learning (e.g. training retrieval and ranking models simultaneously).
  5. Take negatives into account in retrieval. (The standard retrieval models in TFRS are trained only on positive examples and therefore haven't learned from negative examples.)
  6. Easily examine feature importances (we currently use SHAP and learned weight matrices).
  7. Easily deploy and test models in production that seamlessly incorporate the feature preprocessing.

The primary challenge we have faced with TFRS is that the deployed models do not scale well; We have a custom multi-model endpoint that first invokes the retrieval model, then cross joins the retrieved items with the users, then invokes the ranking model. The endpoint times out or runs out of memory when we invoke it with millions of queries.