A recommender framework that takes the research paper seriously
Cornac bundles 30+ recommendation models, ANN search, and a Flask serving layer so you can compare algorithms instead of just citing them.

What it does Cornac is a Python toolkit for training and comparing recommender systems, with a deliberate focus on models that consume auxiliary data—text, images, social graphs—alongside standard user-item interactions. It wraps common algorithms (MF, BPR, PMF) and recent research implementations into a uniform API, then runs them through the same evaluation split and metric suite. A built-in experiment object spits out a comparison table in a few lines of code.
The interesting bit The project treats reproducibility as infrastructure, not an afterthought. It is one of the frameworks officially recommended by ACM RecSys 2023 for evaluation, and its BPR implementation has been independently flagged as a trustworthy baseline. That is unusual for a field where “baseline” often means “whatever the author had lying around.”
Key highlights
- 30+ models spanning collaborative filtering, content-based, hybrid, and multimodal approaches, many with linked papers and deep-dive notebooks
- Built-in wrappers for Annoy, Faiss, HNSWLib, and ScaNN for approximate nearest-neighbor retrieval at serving time
- A Flask-based serving layer with environment-variable configuration, plus a separate A/B testing dashboard extension (Cornac-AB)
- One-line experiment runner: instantiate models, metrics, and an eval method, then call
.run() - Available via PyPI and conda-forge; most models declare their own extra requirements rather than forcing a monolithic dependency tree
Caveats
- Some algorithms rely on OpenMP, and macOS users may need to install Homebrew gcc to get multi-threading
- The README notes that “additional dependencies required by models are listed” but does not surface them prominently; you will likely hit import errors until you install the right extras
Verdict Researchers and engineers who actually need to compare recommendation algorithms—not just implement one in isolation—should look here. If you only need a single production model and do not care about benchmarking alternatives, it may be more framework than you need.