libFM: Factorization Machine Library

Author: Steffen Rendle

Factorization machines (FM) are a generic approach that allows to mimic most factorization models by feature engineering. This way, factorization machines combine the generality of feature engineering with the superiority of factorization models in estimating interactions between categorical variables of large domain. libFM is a software implementation for factorization machines that features stochastic gradient descent (SGD) and alternating least squares (ALS) optimization as well as Bayesian inference using Markov Chain Monte Carlo (MCMC).

Source code

Latest release


Please see the libFM 1.4.2 manual for details about how to use libFM. This manual is also included in the tar.gz archive of the source code.


If you use libFM please cite the following paper: BibTeX:
	author = {Rendle, Steffen},
	title = {Factorization Machines with {libFM}},
	journal = {ACM Trans. Intell. Syst. Technol.},
	issue_date = {May 2012},
	volume = {3},
	number = {3},
	month = May,
	year = {2012},
	issn = {2157-6904},
	pages = {57:1--57:22},
	articleno = {57},
	numpages = {22},
	publisher = {ACM},
	address = {New York, NY, USA},


Factorization Machines have been introduced in [ICDM 2010]. The alternating least-squares (ALS) optimization for regression tasks has been proposed in [SIGIR 2011], MCMC inference in [NIPS-WS 2011] and adaptive SGD in [WSDM 2012]. An overview of all these approaches and extensions for classification and grouping is described in [TIST 2012]. Fast computation of design matrices with block structure is proposed in [VLDB 2013]

[TIST 2012] Steffen Rendle (2012): Factorization Machines with libFM, in ACM Trans. Intell. Syst. Technol., 3(3), May PDF
[ICDM 2010] Steffen Rendle (2010): Factorization Machines, in Proceedings of the 10th IEEE International Conference on Data Mining (ICDM 2010), Sydney, Australia. Supplementary Material BibTeX PDF
[SIGIR 2011] Steffen Rendle, Zeno Gantner, Christoph Freudenthaler, Lars Schmidt-Thieme (2011): Fast Context-aware Recommendations with Factorization Machines, in Proceeding of the 34th international ACM SIGIR conference on Research and development in information retrieval (SIGIR 2011), Beijing, China. Supplementary Material BibTeX PDF
[NIPS-WS 2011] Christoph Freudenthaler, Lars Schmidt-Thieme, Steffen Rendle (2011): Bayesian Factorization Machines, in Workshop on Sparse Representation and Low-rank Approximation, Neural Information Processing Systems (NIPS-WS), Granada, Spain. PDF
[WSDM 2012] Steffen Rendle (2012): Learning Recommender Systems with Adaptive Regularization, in Proceedings of the 5th ACM International Conference on Web Search and Data Mining (WSDM 2012), Seattle. BibTeX PDF
[VLDB 2013] Steffen Rendle (2013): Scaling Factorization Machines to Relational Data, in Proceedings of the 39th international conference on Very Large Data Bases (VLDB 2013), Trento, Italy. BibTeX PDF