OpenRec is an open-source and modular library for neural network-inspired recommendation algorithms
Clone or download


OpenRec is an open-source and modular library for neural network-inspired recommendation algorithms. Each recommender is modeled as a computational graph that consists of a structured ensemble of reusable modules connected through a set of well-defined interfaces. OpenRec is built to ease the process of extending and adapting state-of-the-art neural recommenders to heterogeneous recommendation scenarios, where different users', items', and contextual data sources need to be incorporated.

For the structure and the design philosophy of OpenRec, please refer to the following paper published in WSDM'18:

Longqi Yang, Eugene Bagdasaryan, Joshua Gruenstein, Cheng-Kang Hsieh, and Deborah Estrin. 2018. OpenRec: A Modular Framework for Extensible and Adaptable Recommendation Algorithms. In Proceedings of WSDM’18, February 5–9, 2018, Marina Del Rey, CA, USA.

2018-08-31 Introducing new modular interfaces for OpenRec. Major changes:

  • A new paradigm for defining, extending, and building recommenders.
    • Remove boilerplate class structure of recommenders.
    • Introduce a macro-based recommender construction paradigm.
    • Disentangle module construction and connection.
    • Support module construction directly using Tensorflow and Keras APIs.
  • A more efficient and customizable pipeline for recommender training and evaluation.
    • A new Dataset class for complex data input.
    • A customizable ModelTrainer handling complex training/evaluation scenarios.
    • Caching mechanism to speed up evaluation of complex recommenders.
  • Provide model training and evaluation examples for new interfaces.

More recommenders, examples, documents and tutorials are under development. Please checkout following events where we will present OpenRec new features:

Strata Data Conference 2018:

Recsys 2018:

To use original openrec, simply import openrec.legacy.


Before installing OpenRec, please install TensorFlow backend (GPU version is recommended).

  • Install OpenRec from PyPI (recommended):
pip install openrec
  • Install OpenRec from source code:

First, clone OpenRec using git:

git clone

Then, cd to the OpenRec folder and run the install command:

cd openrec
python install

Dataset download

Use script.

Get started

How to cite

  title={OpenRec: A Modular Framework for Extensible and Adaptable Recommendation Algorithms},
  author={Yang, Longqi and Bagdasaryan, Eugene and Gruenstein, Joshua and Hsieh, Cheng-Kang and Estrin, Deborah},
  booktitle={Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining},


Apache License 2.0