Lean Machine Learning

Lean Machine Learning

The Lean library for machine learning research

Lean Machine Learning is a carefully curated library of formalized definitions and theorems in machine learning theory, verified in Lean.

Imports: your project imports LMLExplore, which imports Tau Ceti and LML. LML imports Statlib, and Tau Ceti and Statlib both import Mathlib. Your project e.g. a formalized paper LMLExplore AI-written ML theory Tau Ceti AI-written mathematics LML curated ML theory Statlib mathematical statistics Mathlib Lean's mathematics library
Written or curated by humans Written by AI, from human roadmaps ↓imports

Lean Machine Learning Core

LML is the human-checked core of Lean Machine Learning: carefully curated definitions of the objects of machine learning theory, and the theorems about them, all reviewed by people. You proved that your new algorithm converges at the optimal rate and your LLM formalized the proof. Lean checked the proof. But who checked the Lean definition of optimal rate? We did. Since your LLM is using a definition from LML, you can trust it proved the right thing.

Formalized Definitions

Rigorous definitions of machine learning concepts: algorithms, performance measures, etc. All the tools needed to talk about machine learning theory.

Proven Theorems

Essential theorems in machine learning theory. Convergence guarantees, regret bounds, and foundational results in probability theory and optimization.

AI-Ready

A common vocabulary of formal definitions that can be used by AI systems to generate theorems about objects we care about and avoid misformalization errors.

Algorithmic Tools

A framework for defining and analyzing stochastic algorithms in Lean, and to connect formal specifications with executable implementations.

Documentation

Comprehensive documentation with examples and tutorials to guide users through the library and its applications.

Collaborative

Open source, collaborative, and integrated in the Lean ecosystem. We welcome contributions from the community. We build on top of Mathlib and contribute to it in return.

LMLExplore

LMLExplore is a companion library written by AI. Humans write its roadmaps, AI agents write the Lean code, and AI reviewers check every pull request. It builds on Mathlib, Statlib, Tau Ceti and LML, and covers more ground, faster. The maintainers of LML then pick, by hand, what to bring into the curated library.

Formalized with Lean Machine Learning

Research papers formalized in Lean on top of LML and LMLExplore, each in its own repository. An AI agent writes the Lean code, the paper's author checks the statements of its main results, and comparator checks that they are proved.

Sponsors and Partners

We are grateful for the support of the following organizations.

Maintainers

Rémy Degenne

Inria centre at the University of Lille

Rémy Degenne

Paulo Rauber

Queen Mary University of London

Paulo Rauber