← all repositories
lyst/lightfm

Matrix Factorization That Remembers User Metadata

LightFM fuses collaborative filtering with user and item metadata so your recommender still works when you know nothing about a new user or product.

5.1k stars Python ML FrameworksDomain Apps
lightfm
Not currently ranked — collecting fresh signals.
star history

What it does

LightFM is a Python library implementing hybrid recommendation algorithms for both implicit and explicit feedback. It wraps efficient BPR and WARP ranking losses inside a multithreaded matrix factorization engine. The core trick is representing users and items as sums of latent feature vectors, letting the model ingest metadata alongside interaction history.

The interesting bit

Traditional collaborative filtering chokes on cold starts—new users or items with no history. LightFM sidesteps this by baking item and user metadata directly into the factorization, so the model can generalize to strangers and freshly uploaded products without needing a neural network.

Key highlights

  • Handles both implicit and explicit feedback datasets.
  • Supports BPR and WARP ranking losses out of the box.
  • Multithreaded model estimation for faster training.
  • Generalizes to new users and items via feature embeddings.
  • Ships with built-in evaluation helpers like precision_at_k.

Caveats

  • OpenMP multithreading is disabled in the official macOS and Windows builds; Linux gets the full parallel speedup.

Verdict

Worth a look if you want a lean hybrid recommender that handles cold starts without a GPU. Less interesting if you are already invested in a modern deep-learning retrieval stack.

Frequently asked

What is lyst/lightfm?
LightFM fuses collaborative filtering with user and item metadata so your recommender still works when you know nothing about a new user or product.
Is lightfm open source?
Yes — lyst/lightfm is open source, released under the Apache-2.0 license.
What language is lightfm written in?
lyst/lightfm is primarily written in Python.
How popular is lightfm?
lyst/lightfm has 5.1k stars on GitHub.
Where can I find lightfm?
lyst/lightfm is on GitHub at https://github.com/lyst/lightfm.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.